[7922] Implement param2 for ACTION_T_COMBAT_MOVEMENT for allow control start/stop melee combat state for creature at start/stop movement in combat. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-05-31 16:24:19 -05:00
1 parent 552e08b3f0
commit 067cbec40d
6 files changed
+24 -11

No files matched your search

+5 -5
View File
@@ -2641,7 +2641,7 @@ float Unit::CalculateLevelPenalty(SpellEntry const* spellProto) const
return (100.0f - LvlPenalty) * LvlFactor / 100.0f;
}
void Unit::SendAttackStart(Unit* pVictim)
void Unit::SendMeleeAttackStart(Unit* pVictim)
{
WorldPacket data( SMSG_ATTACKSTART, 8 + 8 );
data << uint64(GetGUID());
@@ -2651,7 +2651,7 @@ void Unit::SendAttackStart(Unit* pVictim)
DEBUG_LOG( "WORLD: Sent SMSG_ATTACKSTART" );
}
void Unit::SendAttackStop(Unit* victim)
void Unit::SendMeleeAttackStop(Unit* victim)
{
if(!victim)
return;
@@ -8025,7 +8025,7 @@ bool Unit::Attack(Unit *victim, bool meleeAttack)
if( meleeAttack && !hasUnitState(UNIT_STAT_MELEE_ATTACKING) )
{
addUnitState(UNIT_STAT_MELEE_ATTACKING);
SendAttackStart(victim);
SendMeleeAttackStart(victim);
return true;
}
return false;
@@ -8074,7 +8074,7 @@ bool Unit::Attack(Unit *victim, bool meleeAttack)
resetAttackTimer(OFF_ATTACK);
if(meleeAttack)
SendAttackStart(victim);
SendMeleeAttackStart(victim);
return true;
}
@@ -8103,7 +8103,7 @@ bool Unit::AttackStop()
((Creature*)this)->SetNoSearchAssistance(false);
}
SendAttackStop(victim);
SendMeleeAttackStop(victim);
return true;
}