diff options
author | Xanadu <none@none> | 2010-03-17 17:43:28 +0100 |
---|---|---|
committer | Xanadu <none@none> | 2010-03-17 17:43:28 +0100 |
commit | a73b9b0f1ec557ac3fa4acf34f774996f4aa1369 (patch) | |
tree | 54df1c32e5a2574d3833691f7dc121785257401f /src | |
parent | e5cbe017f402a8e0f6feccdad42a11ff5ce06361 (diff) |
Cleanup
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/CreatureEventAI.cpp | 7 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 62 |
3 files changed, 30 insertions, 41 deletions
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp index 081dc776aeb..6ae5472b8d0 100644 --- a/src/game/CreatureEventAI.cpp +++ b/src/game/CreatureEventAI.cpp @@ -584,10 +584,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 m_creature->SendMeleeAttackStart(victim); } if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE) - { - //m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveChase(victim, AttackDistance, AttackAngle); // Targeted movement generator will start melee automatically, no need to send it explicitly - } } } else @@ -601,11 +598,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 m_creature->SendMeleeAttackStop(victim); } if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) - { - //m_creature->StopMoving(); - //m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveIdle(); - } } } break; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 3754043c572..d4b84e9191f 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1415,8 +1415,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, // Drain Soul - If the target is at or below 25% health, Drain Soul causes four times the normal damage if (GetSpellProto()->SpellFamilyFlags[0] & 0x00004000) { - if (!target) - break; if (apply) { if (target != caster && target->GetHealth() <= target->GetMaxHealth() / 4) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ee18c90e468..cee19b7b0e0 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -14795,38 +14795,36 @@ void Unit::SetControlled(bool apply, UnitState state) switch(state) { - case UNIT_STAT_STUNNED: - { - addUnitState(state); - SetStunned(true); - CastStop(); - } - break; - case UNIT_STAT_ROOT: - if (!hasUnitState(UNIT_STAT_STUNNED)) - { - addUnitState(state); - SetRooted(true); - } - break; - case UNIT_STAT_CONFUSED: - if (!hasUnitState(UNIT_STAT_STUNNED)) - { - addUnitState(state); - SetConfused(true); - CastStop(); - } - break; - case UNIT_STAT_FLEEING: - if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED)) - { - addUnitState(state); - SetFeared(true); - CastStop(); - } - break; - default: - break; + case UNIT_STAT_STUNNED: + addUnitState(state); + SetStunned(true); + CastStop(); + break; + case UNIT_STAT_ROOT: + if (!hasUnitState(UNIT_STAT_STUNNED)) + { + addUnitState(state); + SetRooted(true); + } + break; + case UNIT_STAT_CONFUSED: + if (!hasUnitState(UNIT_STAT_STUNNED)) + { + addUnitState(state); + SetConfused(true); + CastStop(); + } + break; + case UNIT_STAT_FLEEING: + if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED)) + { + addUnitState(state); + SetFeared(true); + CastStop(); + } + break; + default: + break; } } else |