[8046] Use float for store AttackDistance as expected by using calls.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
NoFantasy 2009-06-20 01:15:33 +04:00 committed by VladimirMangos
parent 4cbf8e2412
commit b91f7c9479
3 changed files with 6 additions and 6 deletions

View file

@ -90,7 +90,7 @@ CreatureEventAI::CreatureEventAI(Creature *c ) : CreatureAI(c)
Phase = 0;
CombatMovementEnabled = true;
MeleeEnabled = true;
AttackDistance = 0;
AttackDistance = 0.0f;
AttackAngle = 0.0f;
//Handle Spawned Events
@ -482,8 +482,8 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
{
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
{
AttackDistance = 0;
AttackAngle = 0;
AttackDistance = 0.0f;
AttackAngle = 0.0f;
m_creature->GetMotionMaster()->Clear(false);
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
@ -652,7 +652,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
target->RemoveAurasDueToSpell(action.remove_aura.spellId);
break;
case ACTION_T_RANGED_MOVEMENT:
AttackDistance = action.ranged_movement.distance;
AttackDistance = (float)action.ranged_movement.distance;
AttackAngle = action.ranged_movement.angle/180.0f*M_PI;
if (CombatMovementEnabled)

View file

@ -608,7 +608,7 @@ class MANGOS_DLL_SPEC CreatureEventAI : public CreatureAI
uint8 Phase; //Current phase, max 32 phases
bool CombatMovementEnabled; //If we allow targeted movment gen (movement twoards top threat)
bool MeleeEnabled; //If we allow melee auto attack
uint32 AttackDistance; //Distance to attack from
float AttackDistance; //Distance to attack from
float AttackAngle; //Angle of attack
};
#endif

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8045"
#define REVISION_NR "8046"
#endif // __REVISION_NR_H__