diff options
author | megamage <none@none> | 2009-03-13 14:42:57 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-13 14:42:57 -0600 |
commit | 146b2560aa8a7d0fc8a90ec3af70d1a8e01e514d (patch) | |
tree | 295c0631404e49ec8acd492513ca614038ca6253 /src | |
parent | bb7391f129e831cd5daac17d54245738571c5d32 (diff) |
*Call stopmoving in moveidle.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/include/sc_creature.cpp | 1 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/creature/mob_event_ai.cpp | 2 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/azshara/azshara.cpp | 4 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp | 8 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp | 1 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp | 1 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp | 3 | ||||
-rw-r--r-- | src/game/Creature.cpp | 3 | ||||
-rw-r--r-- | src/game/GuardAI.cpp | 1 | ||||
-rw-r--r-- | src/game/IdleMovementGenerator.cpp | 5 | ||||
-rw-r--r-- | src/game/IdleMovementGenerator.h | 2 | ||||
-rw-r--r-- | src/game/PetAI.cpp | 1 | ||||
-rw-r--r-- | src/game/PetHandler.cpp | 1 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 |
14 files changed, 11 insertions, 24 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index be37c66c740..f30ae9408c5 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 54b29e07651..41a509cefa8 100644 --- a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp +++ b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp @@ -803,7 +803,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI else { m_creature->GetMotionMaster()->MoveIdle(); - m_creature->StopMoving(); } } break; @@ -1209,7 +1208,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI else { m_creature->GetMotionMaster()->MoveIdle(); - m_creature->StopMoving(); } } } diff --git a/src/bindings/scripts/scripts/zone/azshara/azshara.cpp b/src/bindings/scripts/scripts/zone/azshara/azshara.cpp index 4ed71f89c55..d71101d4898 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 dba57924e56..1c2856fdd14 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp @@ -1079,8 +1079,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); } @@ -1912,8 +1912,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/karazhan/bosses_opera.cpp b/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp index 8478bdca284..2d4a644bf67 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp @@ -895,7 +895,6 @@ void PretendToDie(Creature* _Creature) { _Creature->InterruptNonMeleeSpells(false); _Creature->SetHealth(0); - _Creature->StopMoving(); _Creature->ClearComboPointHolders(); _Creature->RemoveAllAurasOnDeath(); _Creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); 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 7bbbd4d4bc9..0bcfd6ba49b 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 7d22b76ac70..2cb92f07600 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); diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index ed2f3f2ee54..df56a3ac27f 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1620,9 +1620,6 @@ void Creature::setDeathState(DeathState s) if (canFly() && FallGround()) return; - - if(!IsStopped()) - StopMoving(); } Unit::setDeathState(s); diff --git a/src/game/GuardAI.cpp b/src/game/GuardAI.cpp index 0a892961f4d..07a5bd9f819 100644 --- a/src/game/GuardAI.cpp +++ b/src/game/GuardAI.cpp @@ -62,7 +62,6 @@ void GuardAI::EnterEvadeMode() if( !i_creature.isAlive() ) { DEBUG_LOG("Creature stopped attacking because he's dead [guid=%u]", i_creature.GetGUIDLow()); - i_creature.StopMoving(); i_creature.GetMotionMaster()->MoveIdle(); i_state = STATE_NORMAL; diff --git a/src/game/IdleMovementGenerator.cpp b/src/game/IdleMovementGenerator.cpp index ff21643c2b0..c6598409b44 100644 --- a/src/game/IdleMovementGenerator.cpp +++ b/src/game/IdleMovementGenerator.cpp @@ -23,6 +23,11 @@ IdleMovementGenerator si_idleMovement; +void IdleMovementGenerator::Initialize(Unit &owner) +{ + owner.StopMoving(); +} + void IdleMovementGenerator::Reset(Unit& /*owner*/) { diff --git a/src/game/IdleMovementGenerator.h b/src/game/IdleMovementGenerator.h index 3719f7bc7d7..ac5a4da529c 100644 --- a/src/game/IdleMovementGenerator.h +++ b/src/game/IdleMovementGenerator.h @@ -27,7 +27,7 @@ class TRINITY_DLL_SPEC IdleMovementGenerator : public MovementGenerator { public: - void Initialize(Unit &) { } + void Initialize(Unit &); void Finalize(Unit &) { } void Reset(Unit &); bool Update(Unit &, const uint32 &) { return true; } diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index 72c8c1e760b..ad11a49c07d 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -63,7 +63,6 @@ void PetAI::_stopAttack() if( !i_pet.isAlive() ) { DEBUG_LOG("Creature stoped attacking cuz his dead [guid=%u]", i_pet.GetGUIDLow()); - i_pet.StopMoving(); i_pet.GetMotionMaster()->Clear(); i_pet.GetMotionMaster()->MoveIdle(); i_pet.CombatStop(); diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 49a3bb95cb7..456d68ed54d 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -87,7 +87,6 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) case COMMAND_STAY: //flat=1792 //STAY pet->AttackStop(); pet->InterruptNonMeleeSpells(false); - pet->StopMoving(); pet->GetMotionMaster()->MoveIdle(); charmInfo->SetCommandState( COMMAND_STAY ); break; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e3e11c2e840..d8c4d3bb16a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10394,7 +10394,6 @@ void Unit::setDeathState(DeathState s) ClearDiminishings(); GetMotionMaster()->Clear(false); GetMotionMaster()->MoveIdle(); - StopMoving(); //without this when removing IncreaseMaxHealth aura player may stuck with 1 hp //do not why since in IncreaseMaxHealth currenthealth is checked SetHealth(0); @@ -13138,7 +13137,6 @@ void Unit::SetCharmedOrPossessedBy(Unit* charmer, bool possess) if(GetTypeId() == TYPEID_UNIT) { ((Creature*)this)->AI()->OnCharmed(true); - StopMoving(); GetMotionMaster()->Clear(false); GetMotionMaster()->MoveIdle(); } |