Cleanup
--HG-- branch : trunk
This commit is contained in:
@@ -584,10 +584,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
|||||||
m_creature->SendMeleeAttackStart(victim);
|
m_creature->SendMeleeAttackStart(victim);
|
||||||
}
|
}
|
||||||
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE)
|
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
|
m_creature->GetMotionMaster()->MoveChase(victim, AttackDistance, AttackAngle); // Targeted movement generator will start melee automatically, no need to send it explicitly
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -601,11 +598,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
|||||||
m_creature->SendMeleeAttackStop(victim);
|
m_creature->SendMeleeAttackStop(victim);
|
||||||
}
|
}
|
||||||
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
|
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
|
||||||
{
|
|
||||||
//m_creature->StopMoving();
|
|
||||||
//m_creature->GetMotionMaster()->Clear(false);
|
|
||||||
m_creature->GetMotionMaster()->MoveIdle();
|
m_creature->GetMotionMaster()->MoveIdle();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -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
|
// 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 (GetSpellProto()->SpellFamilyFlags[0] & 0x00004000)
|
||||||
{
|
{
|
||||||
if (!target)
|
|
||||||
break;
|
|
||||||
if (apply)
|
if (apply)
|
||||||
{
|
{
|
||||||
if (target != caster && target->GetHealth() <= target->GetMaxHealth() / 4)
|
if (target != caster && target->GetHealth() <= target->GetMaxHealth() / 4)
|
||||||
|
|||||||
+30
-32
@@ -14795,38 +14795,36 @@ void Unit::SetControlled(bool apply, UnitState state)
|
|||||||
|
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case UNIT_STAT_STUNNED:
|
case UNIT_STAT_STUNNED:
|
||||||
{
|
addUnitState(state);
|
||||||
addUnitState(state);
|
SetStunned(true);
|
||||||
SetStunned(true);
|
CastStop();
|
||||||
CastStop();
|
break;
|
||||||
}
|
case UNIT_STAT_ROOT:
|
||||||
break;
|
if (!hasUnitState(UNIT_STAT_STUNNED))
|
||||||
case UNIT_STAT_ROOT:
|
{
|
||||||
if (!hasUnitState(UNIT_STAT_STUNNED))
|
addUnitState(state);
|
||||||
{
|
SetRooted(true);
|
||||||
addUnitState(state);
|
}
|
||||||
SetRooted(true);
|
break;
|
||||||
}
|
case UNIT_STAT_CONFUSED:
|
||||||
break;
|
if (!hasUnitState(UNIT_STAT_STUNNED))
|
||||||
case UNIT_STAT_CONFUSED:
|
{
|
||||||
if (!hasUnitState(UNIT_STAT_STUNNED))
|
addUnitState(state);
|
||||||
{
|
SetConfused(true);
|
||||||
addUnitState(state);
|
CastStop();
|
||||||
SetConfused(true);
|
}
|
||||||
CastStop();
|
break;
|
||||||
}
|
case UNIT_STAT_FLEEING:
|
||||||
break;
|
if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED))
|
||||||
case UNIT_STAT_FLEEING:
|
{
|
||||||
if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED))
|
addUnitState(state);
|
||||||
{
|
SetFeared(true);
|
||||||
addUnitState(state);
|
CastStop();
|
||||||
SetFeared(true);
|
}
|
||||||
CastStop();
|
break;
|
||||||
}
|
default:
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user