Core: Fix more warnings
--HG-- branch : trunk
This commit is contained in:
@@ -70,7 +70,7 @@ public:
|
||||
void InitializeAI()
|
||||
{
|
||||
float x, y, z;
|
||||
me->GetNearPoint(me, x, y, z, 1, 100, M_PI*2*rand_norm());
|
||||
me->GetNearPoint(me, x, y, z, 1, 100, float(M_PI*2*rand_norm()));
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
me->SetVisibility(VISIBILITY_OFF);
|
||||
me->CastSpell(me,SPELL_MOLTEN_FLAME,true);
|
||||
|
||||
+1
-1
@@ -688,7 +688,7 @@ public:
|
||||
{
|
||||
//DoCast(me, SPELL_SUMMON_CYCLONE); // Doesn't work
|
||||
Cyclone_Timer = 30000+rand()%10000;
|
||||
Creature *Cyclone = me->SummonCreature(CREATURE_CYCLONE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
Creature *Cyclone = me->SummonCreature(CREATURE_CYCLONE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
if (Cyclone)
|
||||
{
|
||||
CAST_CRE(Cyclone)->SetFloatValue(OBJECT_FIELD_SCALE_X, 3.0f);
|
||||
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->getSource() && i->getSource()->isAlive() && me->HasInArc((double)diff/20000*(double)M_PI*2,i->getSource()) && me->IsWithinDist(i->getSource(), SPOUT_DIST) && !i->getSource()->IsInWater())
|
||||
if (i->getSource() && i->getSource()->isAlive() && me->HasInArc(float(diff/20000*M_PI*2),i->getSource()) && me->IsWithinDist(i->getSource(), SPOUT_DIST) && !i->getSource()->IsInWater())
|
||||
DoCast(i->getSource(), SPELL_SPOUT, true);//only knock back palyers in arc, in 100yards, not in water
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,9 +76,9 @@ public:
|
||||
if (Mushroom_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
me->SummonCreature(17990, pTarget->GetPositionX()+(rand()%8), pTarget->GetPositionY()+(rand()%8), pTarget->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
|
||||
me->SummonCreature(17990, pTarget->GetPositionX()+(rand()%8), pTarget->GetPositionY()+(rand()%8), pTarget->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
|
||||
else
|
||||
me->SummonCreature(17990, me->GetPositionX()+(rand()%8), me->GetPositionY()+(rand()%8), me->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
|
||||
me->SummonCreature(17990, me->GetPositionX()+(rand()%8), me->GetPositionY()+(rand()%8), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
|
||||
|
||||
Mushroom_Timer = 10000;
|
||||
} else Mushroom_Timer -= diff;
|
||||
|
||||
+2
-2
@@ -234,8 +234,8 @@ class boss_warchief_kargath_bladefist : public CreatureScript
|
||||
{
|
||||
//move in bladedance
|
||||
float x,y,randx,randy;
|
||||
randx = (rand()%40);
|
||||
randy = (rand()%40);
|
||||
randx = 0.0f + rand()%40;
|
||||
randy = 0.0f + rand()%40;
|
||||
x = 210+ randx ;
|
||||
y = -60- randy ;
|
||||
me->GetMotionMaster()->MovePoint(1,x,y,me->GetPositionZ());
|
||||
|
||||
@@ -290,7 +290,7 @@ class boss_alar : public CreatureScript
|
||||
float dist = 3.0f;
|
||||
if (me->IsWithinDist3d(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 5.0f))
|
||||
dist = 5.0f;
|
||||
WaitTimer = 1000 + floor(dist / 80 * 1000.0f);
|
||||
WaitTimer = 1000 + uint32(floor(dist / 80 * 1000.0f));
|
||||
me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0.0f);
|
||||
me->StopMoving();
|
||||
WaitEvent = WE_LAND;
|
||||
|
||||
@@ -188,7 +188,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
|
||||
float Portal_Y(float x, float radius)
|
||||
{
|
||||
float z = RAND(1, -1);
|
||||
float z = RAND(1.0f, -1.0f);
|
||||
|
||||
return (z*sqrt(radius*radius - (x - CENTER_X)*(x - CENTER_X)) + CENTER_Y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user