diff options
| author | megamage <none@none> | 2009-03-13 18:48:53 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-13 18:48:53 -0600 |
| commit | a5882ee84afb8484b23cbeda3c5e4ab130574449 (patch) | |
| tree | 8b713507200ffdc21931a9566212041fe256de55 /src/bindings/scripts | |
| parent | 664fb612b4f87539a43632e31901e3b93f7aa3a0 (diff) | |
| parent | 62cdd39279e573f99bc49db45a043bd057372afc (diff) | |
*Merge.
*"Fix Glowing Blood" is not merged. Outdated patch?
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts')
7 files changed, 15 insertions, 35 deletions
diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 39ddedecb9a..e7177fa9ec6 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -940,7 +940,7 @@ void LoadDatabase() //Creature does not exist in database if (!GetCreatureTemplateStore(temp.creature_id)) - error_db_log("TSCR: Event %u has script for non-existing creature.", i); + error_db_log("TSCR: Event %u has script for non-existing creature.", i); //Report any errors in event if (temp.event_type >= EVENT_T_END) @@ -1125,7 +1125,7 @@ void LoadDatabase() { const SpellEntry *spell = GetSpellStore()->LookupEntry(temp.action[j].param1); if (!spell) - error_db_log("TSCR: Event %u Action %u uses non-existant SpellID %u.", i, j+1, temp.action[j].param1); + error_db_log("SD2: Event %u Action %u uses non-existant SpellID %u.", i, j+1, temp.action[j].param1); else { if (spell->RecoveryTime > 0 && temp.event_flags & EFLAG_REPEATABLE) @@ -1183,7 +1183,7 @@ void LoadDatabase() error_db_log("TSCR: Event %u Action %u uses non-existant SpellID %u.", i, j+1, temp.action[j].param2); if (temp.action[j].param3 >= TARGET_T_END) - error_db_log("TSCR: Event %u Action %u uses incorrect Target type", i, j+1); + error_db_log("SD2: Event %u Action %u uses incorrect Target type", i, j+1); } break; case ACTION_T_CASTCREATUREGO_ALL: @@ -1249,7 +1249,7 @@ void LoadDatabase() case ACTION_T_INC_PHASE: if (!temp.action[j].param1) - error_db_log("TSCR: Event %u Action %u is incrementing phase by 0. Was this intended?", i, j+1); + error_db_log("SD2: Event %u Action %u is incrementing phase by 0. Was this intended?", i, j+1); break; case ACTION_T_SET_INST_DATA: diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index 1f5dc77aa26..59019348043 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -166,7 +166,6 @@ void ScriptedAI::DoStartNoMovement(Unit* victim) return; m_creature->GetMotionMaster()->MoveIdle(); - m_creature->StopMoving(); } void ScriptedAI::DoStopAttack() diff --git a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp index 7102add172d..77c24b16173 100644 --- a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp +++ b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp @@ -687,7 +687,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI AttackDistance = 0; AttackAngle = 0; - m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle); } } @@ -804,19 +803,12 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI //Allow movement (create new targeted movement gen only if idle) if (CombatMovementEnabled) { - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE) - { - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle); - } + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle); } else - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) - { - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveIdle(); - m_creature->StopMoving(); - } + { + m_creature->GetMotionMaster()->MoveIdle(); + } } break; case ACTION_T_SET_PHASE: @@ -886,10 +878,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI if (CombatMovementEnabled) { - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) - { - //Drop current movement gen - m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle); } } @@ -1099,7 +1087,7 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI Reset(); } - + void EnterEvadeMode() { m_creature->InterruptNonMeleeSpells(true); @@ -1234,7 +1222,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI else { m_creature->GetMotionMaster()->MoveIdle(); - m_creature->StopMoving(); } } } @@ -1450,7 +1437,7 @@ void AddSC_mob_event() { Script *newscript; newscript = new Script; - newscript->Name="mob_eventai"; + newscript->Name = "mob_eventai"; newscript->GetAI = &GetAI_Mob_EventAI; newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/zone/azshara/azshara.cpp b/src/bindings/scripts/scripts/zone/azshara/azshara.cpp index 4428f17ea21..b1fb11a8a09 100644 --- a/src/bindings/scripts/scripts/zone/azshara/azshara.cpp +++ b/src/bindings/scripts/scripts/zone/azshara/azshara.cpp @@ -350,9 +350,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI DoScriptText(SAY_RIZZLE_FINAL, m_creature); m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 1); m_creature->setFaction(35); - m_creature->StopMoving(); - m_creature->GetMotionMaster()->MovementExpired(); - m_creature->GetMotionMaster()->Clear(true); + m_creature->GetMotionMaster()->MoveIdle(); m_creature->RemoveAurasDueToSpell(SPELL_PERIODIC_DEPTH_CHARGE); Reached = true; } diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp index 6592e3783f4..78014b34bbb 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp @@ -1086,8 +1086,8 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI Illidan->RemoveAurasDueToSpell(SPELL_KNEEL); m_creature->SetInFront(Illidan); Illidan->SetInFront(m_creature); - m_creature->StopMoving(); - Illidan->StopMoving(); + m_creature->GetMotionMaster()->MoveIdle(); + Illidan->GetMotionMaster()->MoveIdle(); ((boss_illidan_stormrageAI*)Illidan->AI())->AkamaGUID = m_creature->GetGUID(); ((boss_illidan_stormrageAI*)Illidan->AI())->EnterPhase(PHASE_TALK_SEQUENCE); } @@ -1919,8 +1919,8 @@ void boss_illidan_stormrageAI::HandleTalkSequence() Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); // onoz she looks like she teleported! Maiev->SetInFront(m_creature); // Have her face us m_creature->SetInFront(Maiev); // Face her, so it's not rude =P - Maiev->StopMoving(); - m_creature->StopMoving(); + Maiev->GetMotionMaster()->MoveIdle(); + m_creature->GetMotionMaster()->MoveIdle(); }break; case 14: if(GETCRE(Maiev, MaievGUID)) diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp index 013bebb860d..1fec7ccd88e 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp @@ -709,7 +709,6 @@ void mob_headAI::Disappear() m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->GetMotionMaster()->MoveIdle(); - m_creature->StopMoving(); ((boss_headless_horsemanAI*)body->AI())->returned = true; } } diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp index be733b5c819..1498dbfb7ca 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp @@ -228,7 +228,6 @@ struct TRINITY_DLL_DECL advisorbase_ai : public ScriptedAI m_creature->InterruptNonMeleeSpells(false); m_creature->SetHealth(0); - m_creature->StopMoving(); m_creature->ClearComboPointHolders(); m_creature->RemoveAllAurasOnDeath(); m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); @@ -864,7 +863,6 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI DoScriptText(SAY_PHASE5_NUTS, m_creature); - m_creature->StopMoving(); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); DoTeleportTo(GRAVITY_X, GRAVITY_Y, GRAVITY_Z); @@ -928,7 +926,6 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI switch(GravityLapse_Phase) { case 0: - m_creature->StopMoving(); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); DoTeleportTo(GRAVITY_X, GRAVITY_Y, GRAVITY_Z); |
