mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core: Fix more warnings
--HG-- branch : trunk
This commit is contained in:
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
void SummonSpirits(Unit* victim)
|
||||
{
|
||||
if (Creature *Spirit = DoSpawnCreature(9178, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
if (Creature *Spirit = DoSpawnCreature(9178, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
Spirit->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,13 +67,13 @@ public:
|
||||
|
||||
void SummonAdds(Unit* victim)
|
||||
{
|
||||
if (Creature *SummonedAdd = DoSpawnCreature(8901, irand(-14,14), irand(-14,14), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
if (Creature *SummonedAdd = DoSpawnCreature(8901, float(irand(-14,14)), float(irand(-14,14)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedAdd->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
void SummonMedics(Unit* victim)
|
||||
{
|
||||
if (Creature *SummonedMedic = DoSpawnCreature(8894, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
if (Creature *SummonedMedic = DoSpawnCreature(8894, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedMedic->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
if (AddTimer <= diff)
|
||||
{
|
||||
//Summon Astral Flare
|
||||
Creature* AstralFlare = DoSpawnCreature(17096, rand()%37, rand()%37, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
Creature* AstralFlare = DoSpawnCreature(17096, float(rand()%37), float(rand()%37), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
|
||||
uint64 axes[2];
|
||||
uint64 enfeeble_targets[5];
|
||||
uint64 enfeeble_health[5];
|
||||
uint32 enfeeble_health[5];
|
||||
|
||||
uint32 phase;
|
||||
|
||||
|
||||
@@ -683,7 +683,7 @@ public:
|
||||
|
||||
if (CycloneTimer <= diff)
|
||||
{
|
||||
if (Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, urand(0,9), urand(0,9), 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000))
|
||||
if (Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, float(urand(0,9)), float(urand(0,9)), 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000))
|
||||
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_VISUAL, true);
|
||||
CycloneTimer = 30000;
|
||||
} else CycloneTimer -= diff;
|
||||
|
||||
@@ -254,7 +254,6 @@ public:
|
||||
case TYPE_NIGHTBANE: return m_auiEncounter[11];
|
||||
case DATA_OPERA_PERFORMANCE: return m_uiOperaEvent;
|
||||
case DATA_OPERA_OZ_DEATHCOUNT: return m_uiOzDeathCount;
|
||||
case DATA_IMAGE_OF_MEDIVH: return ImageGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -278,6 +277,7 @@ public:
|
||||
case DATA_GO_NETHER_DOOR: return m_uiNetherspaceDoor;
|
||||
case DATA_MASTERS_TERRACE_DOOR_1: return MastersTerraceDoor[0];
|
||||
case DATA_MASTERS_TERRACE_DOOR_2: return MastersTerraceDoor[1];
|
||||
case DATA_IMAGE_OF_MEDIVH: return ImageGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
{
|
||||
m_uiPyroblastTimer = 7*IN_MILLISECONDS; // These timers are probably wrong
|
||||
m_uiEarthquakeTimer = 3*IN_MILLISECONDS;
|
||||
m_uiBuffTimer = 2.5*IN_MILLISECONDS;
|
||||
m_uiBuffTimer = 2500;
|
||||
m_bEnraged = false;
|
||||
|
||||
DoCast(me, SPELL_MAGMASPLASH, true);
|
||||
|
||||
@@ -571,7 +571,7 @@ public:
|
||||
SaySound(SAY_REJOINED);
|
||||
DoCast(me, SPELL_HEAD);
|
||||
caster->GetMotionMaster()->Clear(false);
|
||||
caster->GetMotionMaster()->MoveFollow(me,6,urand(0,5));
|
||||
caster->GetMotionMaster()->MoveFollow(me,6,float(urand(0,5)));
|
||||
//DoResetThreat();//not sure if need
|
||||
std::list<HostileReference*>::const_iterator itr;
|
||||
for (itr = caster->getThreatManager().getThreatList().begin(); itr != caster->getThreatManager().getThreatList().end(); ++itr)
|
||||
@@ -594,7 +594,7 @@ public:
|
||||
me->SetName("Headless Horseman, Unhorsed");
|
||||
|
||||
if (!headGUID)
|
||||
headGUID = DoSpawnCreature(HEAD,rand()%6,rand()%6,0,0,TEMPSUMMON_DEAD_DESPAWN,0)->GetGUID();
|
||||
headGUID = DoSpawnCreature(HEAD, float(rand()%6), float(rand()%6),0,0,TEMPSUMMON_DEAD_DESPAWN,0)->GetGUID();
|
||||
Unit* Head = Unit::GetUnit((*me), headGUID);
|
||||
if (Head && Head->isAlive())
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
void SummonIllusions(Unit* victim)
|
||||
{
|
||||
if (Creature *Illusion = DoSpawnCreature(11439, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
if (Creature *Illusion = DoSpawnCreature(11439, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
Illusion->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,13 +63,13 @@ public:
|
||||
|
||||
void SummonMinions(Unit* victim)
|
||||
{
|
||||
if (Creature *SummonedMinion = DoSpawnCreature(16119, irand(-7,7), irand(-7,7), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
if (Creature *SummonedMinion = DoSpawnCreature(16119, float(irand(-7,7)), float(irand(-7,7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedMinion->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
void SummonMages(Unit* victim)
|
||||
{
|
||||
if (Creature *SummonedMage = DoSpawnCreature(16120, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
if (Creature *SummonedMage = DoSpawnCreature(16120, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedMage->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
void RaiseUndeadScarab(Unit* pVictim)
|
||||
{
|
||||
if (Creature* pUndeadScarab = DoSpawnCreature(10876, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000))
|
||||
if (Creature* pUndeadScarab = DoSpawnCreature(10876, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000))
|
||||
if (pUndeadScarab->AI())
|
||||
pUndeadScarab->AI()->AttackStart(pVictim);
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ public:
|
||||
break;
|
||||
case TIMER_HUMANOIDES:
|
||||
for (uint8 i = 0; i < 6; ++i)
|
||||
me->SummonCreature(Humanoides[i][0],Humanoides[i][1],Humanoides[i][2],Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
me->SummonCreature(uint32(Humanoides[i][0]),Humanoides[i][1],Humanoides[i][2],Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
Timer[TIMER_HUMANOIDES] = 60000;
|
||||
break;
|
||||
case TIMER_PHASE:
|
||||
@@ -547,7 +547,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
me->SummonCreature(CREATURE_VOID_SPAWN, me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(), rand()%6, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
|
||||
me->SummonCreature(CREATURE_VOID_SPAWN, me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(), float(rand()%6), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -223,8 +223,8 @@ class boss_akilzon : public CreatureScript
|
||||
z = me->GetPositionZ();
|
||||
for (uint8 i = 0; i < 5+rand()%5; ++i)
|
||||
{
|
||||
x = 343+rand()%60;
|
||||
y = 1380+rand()%60;
|
||||
x = 343.0f+rand()%60;
|
||||
y = 1380.0f+rand()%60;
|
||||
if (Unit *trigger = me->SummonTrigger(x, y, z, 0, 2000))
|
||||
{
|
||||
trigger->setFaction(35);
|
||||
@@ -368,7 +368,7 @@ class boss_akilzon : public CreatureScript
|
||||
y = pTarget->GetPositionY() + irand(-10,10);
|
||||
z = pTarget->GetPositionZ() + urand(16,20);
|
||||
if (z > 95)
|
||||
z = 95 - urand(0,5);
|
||||
z = 95.0f - urand(0,5);
|
||||
}
|
||||
Creature *pCreature = me->SummonCreature(MOB_SOARING_EAGLE, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if (pCreature)
|
||||
@@ -407,7 +407,7 @@ class mob_akilzon_eagle : public CreatureScript
|
||||
|
||||
uint32 EagleSwoop_Timer;
|
||||
bool arrived;
|
||||
uint32 TargetGUID;
|
||||
uint64 TargetGUID;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -452,7 +452,7 @@ class mob_akilzon_eagle : public CreatureScript
|
||||
y = pTarget->GetPositionY() + irand(-10,10);
|
||||
z = pTarget->GetPositionZ() + urand(10,15);
|
||||
if (z > 95)
|
||||
z = 95 - urand(0,5);
|
||||
z = 95.0f - urand(0,5);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -223,8 +223,8 @@ class boss_janalai : public CreatureScript
|
||||
float dx, dy;
|
||||
for (int i(0); i < 40; ++i)
|
||||
{
|
||||
dx = irand(-area_dx/2, area_dx/2);
|
||||
dy = irand(-area_dy/2, area_dy/2);
|
||||
dx = float(irand(-area_dx/2, area_dx/2));
|
||||
dy = float(irand(-area_dy/2, area_dy/2));
|
||||
|
||||
Creature* bomb = DoSpawnCreature(MOB_FIRE_BOMB, dx, dy, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
if (bomb) FireBombGUIDs[i] = bomb->GetGUID();
|
||||
@@ -638,9 +638,9 @@ class mob_janalai_hatchling : public CreatureScript
|
||||
{
|
||||
BuffetTimer = 7000;
|
||||
if (me->GetPositionY() > 1150)
|
||||
me->GetMotionMaster()->MovePoint(0, hatcherway[0][3][0]+rand()%4-2,1150+rand()%4-2,hatcherway[0][3][2]);
|
||||
me->GetMotionMaster()->MovePoint(0, hatcherway[0][3][0]+rand()%4-2,1150.0f+rand()%4-2,hatcherway[0][3][2]);
|
||||
else
|
||||
me->GetMotionMaster()->MovePoint(0,hatcherway[1][3][0]+rand()%4-2,1150+rand()%4-2,hatcherway[1][3][2]);
|
||||
me->GetMotionMaster()->MovePoint(0, hatcherway[1][3][0]+rand()%4-2,1150.0f+rand()%4-2,hatcherway[1][3][2]);
|
||||
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
|
||||
void SummonHounds(Unit* pVictim)
|
||||
{
|
||||
if (Creature *Hound = DoSpawnCreature(19207, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
|
||||
if (Creature *Hound = DoSpawnCreature(19207, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
|
||||
Hound->AI()->AttackStart(pVictim);
|
||||
}
|
||||
|
||||
|
||||
@@ -555,7 +555,7 @@ public:
|
||||
|
||||
if (SummonWispTimer <= diff)
|
||||
{
|
||||
DoSpawnCreature(CREATURE_ANCIENT_WISP, rand()%40, rand()%40, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
DoSpawnCreature(CREATURE_ANCIENT_WISP, float(rand()%40), float(rand()%40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
SummonWispTimer = 1500;
|
||||
++WispCount;
|
||||
} else SummonWispTimer -= diff;
|
||||
|
||||
@@ -720,7 +720,7 @@ void hyjalAI::DeSpawnVeins()
|
||||
if (!ai)return;
|
||||
for (uint8 i = 0; i<7; ++i)
|
||||
{
|
||||
if (GameObject* gem = pInstance->instance->GetGameObject(pInstance->GetData64(ai->VeinGUID[i])))
|
||||
if (GameObject* gem = pInstance->instance->GetGameObject(ai->VeinGUID[i]))
|
||||
gem->Delete();
|
||||
}
|
||||
} else if (Faction)
|
||||
@@ -731,7 +731,7 @@ void hyjalAI::DeSpawnVeins()
|
||||
if (!ai)return;
|
||||
for (uint8 i = 7; i<14; ++i)
|
||||
{
|
||||
if (GameObject* gem = pInstance->instance->GetGameObject(pInstance->GetData64(ai->VeinGUID[i])))
|
||||
if (GameObject* gem = pInstance->instance->GetGameObject(ai->VeinGUID[i]))
|
||||
gem->Delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
void SummonAdds(Unit* pVictim)
|
||||
{
|
||||
if (Creature *Add = DoSpawnCreature(13456, irand(-7,7), irand(-7,7), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000))
|
||||
if (Creature *Add = DoSpawnCreature(13456, float(irand(-7,7)), float(irand(-7,7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000))
|
||||
Add->AI()->AttackStart(pVictim);
|
||||
}
|
||||
|
||||
|
||||
@@ -730,7 +730,7 @@ public:
|
||||
if (pUnit && i->second == true)
|
||||
{
|
||||
//Teleport each player out
|
||||
DoTeleportPlayer(pUnit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, rand()%6);
|
||||
DoTeleportPlayer(pUnit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, float(rand()%6));
|
||||
|
||||
//Cast knockback on them
|
||||
DoCast(pUnit, SPELL_EXIT_STOMACH_KNOCKBACK, true);
|
||||
@@ -767,7 +767,7 @@ public:
|
||||
if (pUnit->IsWithinDist3d(&KickPos, 15.0f))
|
||||
{
|
||||
//Teleport each player out
|
||||
DoTeleportPlayer(pUnit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, rand()%6);
|
||||
DoTeleportPlayer(pUnit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, float(rand()%6));
|
||||
|
||||
//Cast knockback on them
|
||||
DoCast(pUnit, SPELL_EXIT_STOMACH_KNOCKBACK, true);
|
||||
|
||||
@@ -55,8 +55,8 @@ public:
|
||||
uint32 SpawnHatchlings_Timer;
|
||||
uint32 SpawnSpawns_Timer;
|
||||
int Rand;
|
||||
int RandX;
|
||||
int RandY;
|
||||
float RandX;
|
||||
float RandY;
|
||||
|
||||
Creature* Hatchling;
|
||||
Creature* Spawn;
|
||||
@@ -76,15 +76,15 @@ public:
|
||||
Rand = 10 + (rand()%10);
|
||||
switch (rand()%2)
|
||||
{
|
||||
case 0: RandX = 0 - Rand; break;
|
||||
case 1: RandX = 0 + Rand; break;
|
||||
case 0: RandX = 0.0f - Rand; break;
|
||||
case 1: RandX = 0.0f + Rand; break;
|
||||
}
|
||||
Rand = 0;
|
||||
Rand = 10 + (rand()%10);
|
||||
switch (rand()%2)
|
||||
{
|
||||
case 0: RandY = 0 - Rand; break;
|
||||
case 1: RandY = 0 + Rand; break;
|
||||
case 0: RandY = 0.0f - Rand; break;
|
||||
case 1: RandY = 0.0f + Rand; break;
|
||||
}
|
||||
Rand = 0;
|
||||
Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
if (pyramidSpawns[i][0] == (float)wave)
|
||||
{
|
||||
Position pos = {pyramidSpawns[i][2], pyramidSpawns[i][3], 8.87f, 0};
|
||||
TempSummon* ts = instance->SummonCreature(pyramidSpawns[i][1],pos);
|
||||
TempSummon* ts = instance->SummonCreature(uint32(pyramidSpawns[i][1]),pos);
|
||||
ts->GetMotionMaster()->MoveRandom(10);
|
||||
addsAtBase.push_back(ts->GetGUID());
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ public:
|
||||
if (Creature *pImpaleTarget = DoSummonImpaleTarget(target))
|
||||
me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_POUND, SPELL_POUND_H), false);
|
||||
}
|
||||
uiPoundTimer = 16.5f*IN_MILLISECONDS;
|
||||
uiPoundTimer = 16500;
|
||||
} else uiPoundTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
uiBellowingRoarTimer = 33*IN_MILLISECONDS;
|
||||
uiGrievousBiteTimer = 20*IN_MILLISECONDS;
|
||||
uiManglingSlashTimer = 18.5*IN_MILLISECONDS;
|
||||
uiManglingSlashTimer = 18500;
|
||||
uiFearsomeRoarTimer = urand(10*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
uiPiercingSlashTimer = 17*IN_MILLISECONDS;
|
||||
uiRaptorCallTimer = urand(20*IN_MILLISECONDS,25*IN_MILLISECONDS);
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
uiConsumeTimer = 15*IN_MILLISECONDS;
|
||||
uiAuraCountTimer = 15.5f*IN_MILLISECONDS;
|
||||
uiAuraCountTimer = 15500;
|
||||
uiCrushTimer = urand(1*IN_MILLISECONDS,5*IN_MILLISECONDS);
|
||||
uiInfectedWoundTimer = urand(60*IN_MILLISECONDS,10*IN_MILLISECONDS);
|
||||
uiExplodeCorpseTimer = 3*IN_MILLISECONDS;
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
void JustSummoned(Creature* pSummon)
|
||||
{
|
||||
if (HealthBelowPct(5))
|
||||
pSummon->DealDamage(pSummon, pSummon->GetHealth() * 0.5, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
pSummon->DealDamage(pSummon, uint32(pSummon->GetHealth() * 0.5), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
pSummon->AI()->AttackStart(me->getVictim());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_ICE_NOVA, false);
|
||||
uiCooldown = 1.5f*IN_MILLISECONDS;
|
||||
uiCooldown = 1500;
|
||||
}
|
||||
uiIceNovaTimer = 15*IN_MILLISECONDS;
|
||||
} else uiIceNovaTimer -= diff;
|
||||
|
||||
@@ -243,7 +243,7 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SpellCrystalSpikeDamageTimer = 3.7*IN_MILLISECONDS;
|
||||
SpellCrystalSpikeDamageTimer = 3700;
|
||||
SpellCrystalSpikePrevisualTimer = 1*IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
{
|
||||
if (uiSplitTimer <= uiDiff)
|
||||
{
|
||||
uiSplitTimer = 2.5*IN_MILLISECONDS;
|
||||
uiSplitTimer = 2500;
|
||||
|
||||
// Return sparks to where Ionar splitted
|
||||
if (bIsSplitPhase)
|
||||
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
|
||||
dmg = DUNGEON_MODE(100, 150); // need to correct damage
|
||||
if (m_fDist > 1.0f) // Further from 1 yard
|
||||
dmg *= m_fDist;
|
||||
dmg = int32(dmg*m_fDist);
|
||||
|
||||
me->CastCustomSpell(i->getSource(), DUNGEON_MODE(52942, 59837), &dmg, 0, 0, false);
|
||||
}
|
||||
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
case EVENT_THORIM_S_HAMMER: // Tower of Storms
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
{
|
||||
if (Creature* pThorim = DoSummon(MOB_THORIM_BEACON, me, urand(20,60), 20000, TEMPSUMMON_TIMED_DESPAWN))
|
||||
if (Creature* pThorim = DoSummon(MOB_THORIM_BEACON, me, float(urand(20,60)), 20000, TEMPSUMMON_TIMED_DESPAWN))
|
||||
pThorim->GetMotionMaster()->MoveRandom(100);
|
||||
}
|
||||
DoScriptText(SAY_TOWER_STORM, me);
|
||||
|
||||
@@ -374,10 +374,10 @@ public:
|
||||
//Some randomes are added so they wont spawn in a pile
|
||||
switch(rand() % 4)
|
||||
{
|
||||
case 0: me->SummonCreature(NPC_XS013_SCRAPBOT, irand(LR_X - 3, LR_X + 3), irand(LR_Y - 3, LR_Y + 3), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break;
|
||||
case 1: me->SummonCreature(NPC_XS013_SCRAPBOT, irand(LL_X - 3, LL_X + 3), irand(LL_Y - 3, LL_Y + 3), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break;
|
||||
case 2: me->SummonCreature(NPC_XS013_SCRAPBOT, irand(UR_X - 3, UR_X + 3), irand(UR_Y - 3, UR_Y + 3), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break;
|
||||
case 3: me->SummonCreature(NPC_XS013_SCRAPBOT, irand(UL_X - 3, UL_X + 3), irand(UL_Y - 3, UL_Y + 3), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break;
|
||||
case 0: me->SummonCreature(NPC_XS013_SCRAPBOT, float(irand(LR_X - 3, LR_X + 3)), float(irand(LR_Y - 3, LR_Y + 3)), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break;
|
||||
case 1: me->SummonCreature(NPC_XS013_SCRAPBOT, float(irand(LL_X - 3, LL_X + 3)), float(irand(LL_Y - 3, LL_Y + 3)), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break;
|
||||
case 2: me->SummonCreature(NPC_XS013_SCRAPBOT, float(irand(UR_X - 3, UR_X + 3)), float(irand(UR_Y - 3, UR_Y + 3)), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break;
|
||||
case 3: me->SummonCreature(NPC_XS013_SCRAPBOT, float(irand(UL_X - 3, UL_X + 3)), float(irand(UL_Y - 3, UL_Y + 3)), SPAWN_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -160,28 +160,28 @@ public:
|
||||
case 0:
|
||||
DoScriptText(SAY_DIALOG_WITH_ARTHAS_1, me);
|
||||
++uiIntroPhase;
|
||||
uiIntroTimer = 3.5f*IN_MILLISECONDS;
|
||||
uiIntroTimer = 3500;
|
||||
break;
|
||||
case 1:
|
||||
DoScriptText(SAY_DIALOG_OF_ARTHAS_1, pArthas);
|
||||
++uiIntroPhase;
|
||||
uiIntroTimer = 3.5f*IN_MILLISECONDS;
|
||||
uiIntroTimer = 3500;
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(SAY_DIALOG_WITH_ARTHAS_2, me);
|
||||
++uiIntroPhase;
|
||||
uiIntroTimer = 3.5f*IN_MILLISECONDS;
|
||||
uiIntroTimer = 3500;
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(SAY_DIALOG_OF_ARTHAS_2, pArthas);
|
||||
++uiIntroPhase;
|
||||
uiIntroTimer = 3.5f*IN_MILLISECONDS;
|
||||
uiIntroTimer = 3500;
|
||||
break;
|
||||
case 4:
|
||||
DoScriptText(SAY_DIALOG_WITH_ARTHAS_3, me);
|
||||
DoCast(me, SPELL_SVALA_TRANSFORMING1);
|
||||
++uiIntroPhase;
|
||||
uiIntroTimer = 2.8f*IN_MILLISECONDS;
|
||||
uiIntroTimer = 2800;
|
||||
break;
|
||||
case 5:
|
||||
DoCast(me, SPELL_SVALA_TRANSFORMING2);
|
||||
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
if (m_bIsActiveWithBJORN && m_uiAbility_BJORN_Timer <= diff)
|
||||
{
|
||||
//DoCast(me, SPELL_SUMMON_SPIRIT_FOUNT); // works fine, but using summon has better control
|
||||
if (Creature* pTemp = me->SummonCreature(CREATURE_SPIRIT_FOUNT, 385+rand()%10, -330+rand()%10, 104.756f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 180000))
|
||||
if (Creature* pTemp = me->SummonCreature(CREATURE_SPIRIT_FOUNT, 385.0f+rand()%10, -330.0f+rand()%10, 104.756f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 180000))
|
||||
{
|
||||
pTemp->SetSpeed(MOVE_RUN, 0.4f);
|
||||
pTemp->CastSpell(pTemp, DUNGEON_MODE(SPELL_SPIRIT_FOUNT, H_SPELL_SPIRIT_FOUNT), true);
|
||||
|
||||
@@ -697,27 +697,27 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
{
|
||||
case 0:
|
||||
if (uiPointId == 5)
|
||||
CreatureStartAttackDoor(me->GetGUID());
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
case 1:
|
||||
if ((uiPointId == 8 && secondPortalRouteID == 0) || (uiPointId == 7 && secondPortalRouteID == 1))
|
||||
CreatureStartAttackDoor(me->GetGUID());
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
case 2:
|
||||
if (uiPointId == 7)
|
||||
CreatureStartAttackDoor(me->GetGUID());
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
case 3:
|
||||
if (uiPointId == 8)
|
||||
CreatureStartAttackDoor(me->GetGUID());
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
case 4:
|
||||
if (uiPointId == 5)
|
||||
CreatureStartAttackDoor(me->GetGUID());
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
case 5:
|
||||
if (uiPointId == 3)
|
||||
CreatureStartAttackDoor(me->GetGUID());
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -787,7 +787,7 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
pInstance->SetData(DATA_NPC_PRESENCE_AT_DOOR_REMOVE,1);
|
||||
}
|
||||
|
||||
void CreatureStartAttackDoor(uint32 /*creature_guid*/)
|
||||
void CreatureStartAttackDoor()
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
DoCast(SPELL_DESTROY_DOOR_SEAL);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1691,8 +1691,8 @@ public:
|
||||
|
||||
//Add delta to make them not all hit the same time
|
||||
uint32 delta = (rand() % 7) * 100;
|
||||
me->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, Info->baseattacktime + delta);
|
||||
me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER , Info->attackpower);
|
||||
me->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, float(Info->baseattacktime + delta));
|
||||
me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER , float(Info->attackpower));
|
||||
}
|
||||
|
||||
//Redefined for random target selection:
|
||||
|
||||
Reference in New Issue
Block a user