aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/EventAI
diff options
context:
space:
mode:
authorsilinoron <none@none>2010-08-22 12:39:39 -0700
committersilinoron <none@none>2010-08-22 12:39:39 -0700
commit5cbae843d58431237a270a0960a5d0c324d5cb1e (patch)
treeedac1313ed45bb5ae3a6375043ef6b08d6490bf6 /src/server/game/AI/EventAI
parent399e35f8f53aeabcda8af513a37bb855340663e5 (diff)
Core/Game: fix all warnings related to converting doubles and floats.
--HG-- branch : trunk
Diffstat (limited to 'src/server/game/AI/EventAI')
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAI.cpp12
1 files changed, 6 insertions, 6 deletions
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<Creature*> 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<Creature*> 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))