diff options
Diffstat (limited to 'src/server/scripts')
42 files changed, 76 insertions, 76 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp index 83c736f3229..02bbd92c431 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp @@ -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); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp index 2b483b4ae43..5ed1b85787e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp @@ -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); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 00d80f06771..a8210e2bae3 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -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); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 3cfb2669127..7cfec5403b0 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -205,7 +205,7 @@ public: uint64 axes[2]; uint64 enfeeble_targets[5]; - uint64 enfeeble_health[5]; + uint32 enfeeble_health[5]; uint32 phase; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 70c70a643a0..db9c87bd2f8 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -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; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 13a19e8cb63..3e8038a465b 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -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; diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp index 446bab0a1b2..d9f1041c0e0 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp @@ -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); diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 3ea9ce2aec5..893e381c821 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -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()) { diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp index 605071cc641..13031669248 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp @@ -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); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp index 2524113d668..218da0357aa 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp @@ -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); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index dc74b1757a4..d3a4ca0e041 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -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); } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 2fdc3d3b843..7fde694879f 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -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) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 61aed76f1a8..dfd3fb87868 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -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 { diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 5823b135a2d..b403e6bfb77 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -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); } diff --git a/src/server/scripts/EasternKingdoms/boss_kruul.cpp b/src/server/scripts/EasternKingdoms/boss_kruul.cpp index 430266952cc..75a0084d12c 100644 --- a/src/server/scripts/EasternKingdoms/boss_kruul.cpp +++ b/src/server/scripts/EasternKingdoms/boss_kruul.cpp @@ -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); } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 5c4fb5264d1..ff4475f2678 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -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; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index 182891a5ea2..7715e39b64b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -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(); } } diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp index 1399704979f..7319d8a4cd0 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp @@ -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); } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 6fe01a99f5f..06a74f6c912 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -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); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp index cf00031ebac..309f4b91019 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp @@ -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); diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index 6552d008143..2b8b590022d 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -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()); } diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index 1097c1b97ef..e78f70590ec 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -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(); diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp index 4db4526d5bb..544c77829bb 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp @@ -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); diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp index ade2633d05e..e647e7532de 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp @@ -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; diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index ccc832470e6..11b039e6cad 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -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()); } }; diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp index 1265b755bef..6a2da3e6b5d 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp @@ -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; diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp index 12d9ac5569a..8dd7363181f 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp @@ -243,7 +243,7 @@ public: void Reset() { - SpellCrystalSpikeDamageTimer = 3.7*IN_MILLISECONDS; + SpellCrystalSpikeDamageTimer = 3700; SpellCrystalSpikePrevisualTimer = 1*IN_MILLISECONDS; } diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index f2972b22bd6..25c62237830 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -234,7 +234,7 @@ public: { if (uiSplitTimer <= uiDiff) { - uiSplitTimer = 2.5*IN_MILLISECONDS; + uiSplitTimer = 2500; // Return sparks to where Ionar splitted if (bIsSplitPhase) diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp index bfaac47683f..9ce5d2ba09d 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp @@ -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); } diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp index 6a5da06cb21..9762ca7c560 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp @@ -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); diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp index dd2014b167d..8f2b55d659c 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp @@ -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; } } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index d9ee68c95fc..21639f2e668 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -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); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index c0847e5cd47..5ad35f231a7 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -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); diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index f61d7dfa7f9..d0df1d19391 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -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); diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp index cc9ca7df95a..fdc37b32bd5 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp @@ -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); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 7340ff34af1..b63dfdcbd4a 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -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); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index d80ce007fd5..08a39b3cfb5 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -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 } } diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp index 795991bcafb..9c0b2490da6 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp @@ -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; diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp index d8b00f62306..665312bcf3e 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp @@ -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()); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index d913ec28aeb..f62d9723c9d 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -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; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index abfc717df4a..71e0f82fff7 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -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); } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index bdf7341bcc6..aab6127cefd 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -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: |
