From 5cbae843d58431237a270a0960a5d0c324d5cb1e Mon Sep 17 00:00:00 2001 From: silinoron Date: Sun, 22 Aug 2010 12:39:39 -0700 Subject: Core/Game: fix all warnings related to converting doubles and floats. --HG-- branch : trunk --- src/server/game/AI/EventAI/CreatureEventAI.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/server/game/AI/EventAI') diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index 1b5a41a692e..f34564b1389 100644 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -216,7 +216,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction if (!me->isInCombat()) return false; - Unit* pUnit = DoSelectLowestHpFriendly(event.friendly_hp.radius, event.friendly_hp.hpDeficit); + Unit* pUnit = DoSelectLowestHpFriendly((float)event.friendly_hp.radius, event.friendly_hp.hpDeficit); if (!pUnit) return false; @@ -232,7 +232,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction return false; std::list pList; - DoFindFriendlyCC(pList, event.friendly_is_cc.radius); + DoFindFriendlyCC(pList, (float)event.friendly_is_cc.radius); //List is empty if (pList.empty()) @@ -248,7 +248,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction case EVENT_T_FRIENDLY_MISSING_BUFF: { std::list pList; - DoFindFriendlyMissingBuff(pList, event.friendly_buff.radius, event.friendly_buff.spellId); + DoFindFriendlyMissingBuff(pList, (float)event.friendly_buff.radius, event.friendly_buff.spellId); //List is empty if (pList.empty()) @@ -763,7 +763,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 } case ACTION_T_CALL_FOR_HELP: { - me->CallForHelp(action.call_for_help.radius); + me->CallForHelp((float)action.call_for_help.radius); break; } break; @@ -772,7 +772,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 case ACTION_T_MOVE_RANDOM_POINT: //dosen't work in combat { float x,y,z; - me->GetClosePoint(x, y, z, me->GetObjectSize() / 3, action.raw.param1); + me->GetClosePoint(x, y, z, me->GetObjectSize() / 3, (float)action.raw.param1); me->GetMotionMaster()->MovePoint(0,x,y,z); break; } @@ -1014,7 +1014,7 @@ void CreatureEventAI::MoveInLineOfSight(Unit *who) if ((*itr).Event.event_type == EVENT_T_OOC_LOS) { //can trigger if closer than fMaxAllowedRange - float fMaxAllowedRange = (*itr).Event.ooc_los.maxRange; + float fMaxAllowedRange = (float)((*itr).Event.ooc_los.maxRange); //if range is ok and we are actually in LOS if (me->IsWithinDistInMap(who, fMaxAllowedRange) && me->IsWithinLOSInMap(who)) -- cgit v1.2.3