From b91f7c9479d0197ce65eebd96c7ae7951fee03c0 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sat, 20 Jun 2009 01:15:33 +0400 Subject: [PATCH] [8046] Use float for store AttackDistance as expected by using calls. Signed-off-by: VladimirMangos --- src/game/CreatureEventAI.cpp | 8 ++++---- src/game/CreatureEventAI.h | 2 +- src/shared/revision_nr.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp index 7f62f786b..cd120c80e 100644 --- a/src/game/CreatureEventAI.cpp +++ b/src/game/CreatureEventAI.cpp @@ -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) diff --git a/src/game/CreatureEventAI.h b/src/game/CreatureEventAI.h index 6895df666..8e7aab9f2 100644 --- a/src/game/CreatureEventAI.h +++ b/src/game/CreatureEventAI.h @@ -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 diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 4bcbf7a87..81766e366 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8045" + #define REVISION_NR "8046" #endif // __REVISION_NR_H__