aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-08-24 02:11:33 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-08-24 02:11:33 +0200
commit547115476f363096483197863e8bbc24064a99ef (patch)
tree847450158d5fd445326d41115f551d7bb15e356d /src/server/scripts
parent4a29c73403c4dc713a8a31cb96289adff2b910c1 (diff)
parent2a36d2bf5b7f14284a499a14f476c4633b1fc0eb (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Battlegrounds/ArenaTeam.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/StatSystem.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Spells/Spell.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp src/server/scripts/Kalimdor/zone_durotar.cpp src/server/scripts/Spells/spell_warrior.cpp
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp4
-rw-r--r--src/server/scripts/Events/childrens_week.cpp16
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp4
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp4
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_silithus.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp6
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp6
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp8
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp4
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp6
-rw-r--r--src/server/scripts/Northrend/zone_grizzly_hills.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp4
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp2
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp2
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp2
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp2
35 files changed, 59 insertions, 59 deletions
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 84716ad9590..9ee0411c302 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -1405,7 +1405,7 @@ public:
// place pet before player
float x, y, z;
player->GetClosePoint (x, y, z, creatureTarget->GetObjectSize(), CONTACT_DISTANCE);
- pet->Relocate(x, y, z, M_PI-player->GetOrientation());
+ pet->Relocate(x, y, z, float(M_PI) - player->GetOrientation());
// set pet to defensive mode by default (some classes can't control controlled pets in fact).
pet->SetReactState(REACT_DEFENSIVE);
@@ -1460,8 +1460,8 @@ public:
FormationInfo* group_member;
group_member = new FormationInfo;
- group_member->follow_angle = (creature->GetAngle(chr) - chr->GetOrientation()) * 180 / M_PI;
- group_member->follow_dist = sqrtf(pow(chr->GetPositionX() - creature->GetPositionX(), int(2))+pow(chr->GetPositionY() - creature->GetPositionY(), int(2)));
+ group_member->follow_angle = (creature->GetAngle(chr) - chr->GetOrientation()) * 180 / float(M_PI);
+ group_member->follow_dist = std::sqrt(std::pow(chr->GetPositionX() - creature->GetPositionX(), 2.f) + std::pow(chr->GetPositionY() - creature->GetPositionY(), 2.f));
group_member->leaderGUID = leaderGUID;
group_member->groupAI = 0;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
index e495cae71fc..ac24f868670 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
@@ -124,7 +124,7 @@ public:
float dist(float xa, float ya, float xb, float yb) // auxiliary method for distance
{
- return sqrt((xa-xb)*(xa-xb) + (ya-yb)*(ya-yb));
+ return std::sqrt((xa-xb)*(xa-xb) + (ya-yb)*(ya-yb));
}
void Reset() override
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
index c8df08937b9..af9f8b72abf 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
@@ -328,7 +328,7 @@ public:
if (TailSweepTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
- if (!me->HasInArc(M_PI, target))
+ if (!me->HasInArc(float(M_PI), target))
DoCast(target, SPELL_TAIL_SWEEP);
TailSweepTimer = 15000;
} else TailSweepTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index f86f267b6b9..19ec8da7fc9 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -1290,7 +1290,7 @@ public:
if (BackwardLungeTimer <= diff)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
- if (target && !me->HasInArc(M_PI, target))
+ if (target && !me->HasInArc(float(M_PI), target))
{
DoCast(target, SPELL_BACKWARD_LUNGE);
BackwardLungeTimer = urand(15000, 30000);
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index e6029acc61f..1f66f834b28 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -1191,8 +1191,8 @@ public:
bPointReached = false;
uiCheckTimer = 1000;
me->GetMotionMaster()->MovePoint(1, x, y, SHIELD_ORB_Z);
- c += M_PI/32;
- if (c >= 2*M_PI) c = 0;
+ c += float(M_PI)/32;
+ if (c >= 2 * float(M_PI)) c = 0;
}
else
{
diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp
index c9798338b36..25257848192 100644
--- a/src/server/scripts/Events/childrens_week.cpp
+++ b/src/server/scripts/Events/childrens_week.cpp
@@ -193,7 +193,7 @@ class npc_winterfin_playmate : public CreatureScript
switch (phase)
{
case 1:
- orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ());
+ orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + std::cos(me->GetOrientation()) * 5, me->GetPositionY() + std::sin(me->GetOrientation()) * 5, me->GetPositionZ());
orphan->AI()->Talk(TEXT_ORACLE_ORPHAN_1);
timer = 3000;
break;
@@ -292,7 +292,7 @@ class npc_snowfall_glade_playmate : public CreatureScript
switch (phase)
{
case 1:
- orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ());
+ orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + std::cos(me->GetOrientation()) * 5, me->GetPositionY() + std::sin(me->GetOrientation()) * 5, me->GetPositionZ());
orphan->AI()->Talk(TEXT_WOLVAR_ORPHAN_1);
timer = 5000;
break;
@@ -393,7 +393,7 @@ class npc_the_biggest_tree : public CreatureScript
switch (phase)
{
case 1:
- orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ());
+ orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + std::cos(me->GetOrientation()) * 5, me->GetPositionY() + std::sin(me->GetOrientation()) * 5, me->GetPositionZ());
timer = 2000;
break;
case 2:
@@ -480,7 +480,7 @@ class npc_high_oracle_soo_roo : public CreatureScript
switch (phase)
{
case 1:
- orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ());
+ orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + std::cos(me->GetOrientation()) * 5, me->GetPositionY() + std::sin(me->GetOrientation()) * 5, me->GetPositionZ());
orphan->AI()->Talk(TEXT_ORACLE_ORPHAN_5);
timer = 3000;
break;
@@ -569,7 +569,7 @@ class npc_elder_kekek : public CreatureScript
switch (phase)
{
case 1:
- orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ());
+ orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + std::cos(me->GetOrientation()) * 5, me->GetPositionY() + std::sin(me->GetOrientation()) * 5, me->GetPositionZ());
orphan->AI()->Talk(TEXT_WOLVAR_ORPHAN_4);
timer = 3000;
break;
@@ -658,7 +658,7 @@ class npc_the_etymidian : public CreatureScript
switch (phase)
{
case 1:
- orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ());
+ orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + std::cos(me->GetOrientation()) * 5, me->GetPositionY() + std::sin(me->GetOrientation()) * 5, me->GetPositionZ());
orphan->AI()->Talk(TEXT_ORACLE_ORPHAN_7);
timer = 5000;
break;
@@ -780,7 +780,7 @@ class npc_alexstraza_the_lifebinder : public CreatureScript
switch (phase)
{
case 1:
- orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ());
+ orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + std::cos(me->GetOrientation()) * 5, me->GetPositionY() + std::sin(me->GetOrientation()) * 5, me->GetPositionZ());
orphan->AI()->Talk(TEXT_ORACLE_ORPHAN_11);
timer = 5000;
break;
@@ -811,7 +811,7 @@ class npc_alexstraza_the_lifebinder : public CreatureScript
Reset();
return;
case 7:
- orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ());
+ orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + std::cos(me->GetOrientation()) * 5, me->GetPositionY() + std::sin(me->GetOrientation()) * 5, me->GetPositionZ());
orphan->AI()->Talk(TEXT_WOLVAR_ORPHAN_11);
timer = 5000;
break;
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
index ef6d7da5116..ce9ed4f36c8 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
@@ -280,8 +280,8 @@ public:
me->SummonCreature(NPC_WITHERED_BATTLE_BOAR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
if (data > 0 && me->GetOrientation() < 4.0f)
me->SummonCreature(NPC_WITHERED_BATTLE_BOAR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
- me->SummonCreature(NPC_DEATHS_HEAD_GEOMANCER, me->GetPositionX() + (cos(me->GetOrientation() - (M_PI/2)) * 2), me->GetPositionY() + (sin(me->GetOrientation() - (M_PI/2)) * 2), me->GetPositionZ(), me->GetOrientation());
- me->SummonCreature(NPC_WITHERED_QUILGUARD, me->GetPositionX() + (cos(me->GetOrientation() + (M_PI/2)) * 2), me->GetPositionY() + (sin(me->GetOrientation() + (M_PI/2)) * 2), me->GetPositionZ(), me->GetOrientation());
+ me->SummonCreature(NPC_DEATHS_HEAD_GEOMANCER, me->GetPositionX() + (std::cos(me->GetOrientation() - (float(M_PI) / 2)) * 2), me->GetPositionY() + (std::sin(me->GetOrientation() - (float(M_PI) / 2)) * 2), me->GetPositionZ(), me->GetOrientation());
+ me->SummonCreature(NPC_WITHERED_QUILGUARD, me->GetPositionX() + (std::cos(me->GetOrientation() + (float(M_PI) / 2)) * 2), me->GetPositionY() + (std::sin(me->GetOrientation() + (float(M_PI) / 2)) * 2), me->GetPositionZ(), me->GetOrientation());
}
else if (data == 7)
me->SummonCreature(NPC_PLAGUEMAW_THE_ROTTING, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index dd0c93e8a28..2cfd977fe99 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -334,9 +334,9 @@ public:
{
//Set angle and cast
if (ClockWise)
- me->SetOrientation(DarkGlareAngle + DarkGlareTick * M_PI / 35);
+ me->SetOrientation(DarkGlareAngle + DarkGlareTick * float(M_PI) / 35);
else
- me->SetOrientation(DarkGlareAngle - DarkGlareTick * M_PI / 35);
+ me->SetOrientation(DarkGlareAngle - DarkGlareTick * float(M_PI) / 35);
me->StopMoving();
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
index d49a6a312da..a9ec3007e5d 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
@@ -120,7 +120,7 @@ class boss_viscidus : public CreatureScript
uint8 NumGlobes = me->GetHealthPct() / 5.0f;
for (uint8 i = 0; i < NumGlobes; ++i)
{
- float Angle = i * 2 * M_PI / NumGlobes;
+ float Angle = i * 2 * float(M_PI) / NumGlobes;
float X = ViscidusCoord.GetPositionX() + std::cos(Angle) * RoomRadius;
float Y = ViscidusCoord.GetPositionY() + std::sin(Angle) * RoomRadius;
float Z = -35.0f;
diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp
index c024c1a567a..98256006fd3 100644
--- a/src/server/scripts/Kalimdor/zone_silithus.cpp
+++ b/src/server/scripts/Kalimdor/zone_silithus.cpp
@@ -1258,7 +1258,7 @@ class go_wind_stone : public GameObjectScript
void SummonNPC(GameObject* go, Player* player, uint32 npc, uint32 spell)
{
go->CastSpell(player, spell);
- TempSummon* summons = go->SummonCreature(npc, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), player->GetOrientation() - M_PI, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10 * 60 * 1000);
+ TempSummon* summons = go->SummonCreature(npc, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), player->GetOrientation() - float(M_PI), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10 * 60 * 1000);
summons->CastSpell(summons, SPELL_SPAWN_IN, false);
switch (summons->GetEntry())
{
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
index c5b87eb48e8..9cc8540342f 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
@@ -50,7 +50,7 @@ enum Misc
};
#define DATA_SPHERE_DISTANCE 25.0f
-#define DATA_SPHERE_ANGLE_OFFSET M_PI / 2
+#define DATA_SPHERE_ANGLE_OFFSET float(M_PI) / 2
#define DATA_GROUND_POSITION_Z 11.30809f
enum Yells
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
index 4015467501e..e0930a1ae2e 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
@@ -289,13 +289,13 @@ public:
switch (i)
{
case 0:
- pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, M_PI);
+ pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, float(M_PI));
break;
case 1:
- pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, M_PI / 2);
+ pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, float(M_PI) / 2);
break;
case 2:
- pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, M_PI / 2 + M_PI);
+ pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, float(M_PI) / 2 + float(M_PI));
break;
}
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
index a0c42492a1b..68de65f9f7b 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
@@ -531,8 +531,8 @@ struct npc_unleashed_ballAI : public ScriptedAI
float x0 = ToCCommonLoc[1].GetPositionX(), y0 = ToCCommonLoc[1].GetPositionY(), r = 47.0f;
float y = y0;
float x = frand(x0 - r, x0 + r);
- float sq = pow(r, 2) - pow(x - x0, 2);
- float rt = sqrtf(fabs(sq));
+ float sq = std::pow(r, 2.f) - std::pow(x - x0, 2.f);
+ float rt = std::sqrt(std::fabs(sq));
if (urand(0, 1))
y = y0 + rt;
else
@@ -756,7 +756,7 @@ class spell_valkyr_essences : public SpellScriptLoader
// Twin Vortex part
uint32 lightVortex = sSpellMgr->GetSpellIdForDifficulty(SPELL_LIGHT_VORTEX_DAMAGE, owner);
uint32 darkVortex = sSpellMgr->GetSpellIdForDifficulty(SPELL_DARK_VORTEX_DAMAGE, owner);
- int32 stacksCount = int32(dmgInfo.GetSpellInfo()->Effects[EFFECT_0].CalcValue()) * 0.001 - 1;
+ int32 stacksCount = dmgInfo.GetSpellInfo()->Effects[EFFECT_0].CalcValue() / 1000 - 1;
if (lightVortex && darkVortex && stacksCount)
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
index e64067fb995..a048abd6554 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
@@ -292,7 +292,7 @@ class boss_devourer_of_souls : public CreatureScript
beamAngle = me->GetOrientation();
- beamAngleDiff = M_PI/30.0f; // PI/2 in 15 sec = PI/30 per tick
+ beamAngleDiff = float(M_PI)/30.0f; // PI/2 in 15 sec = PI/30 per tick
if (RAND(true, false))
beamAngleDiff = -beamAngleDiff;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
index a0f6039d703..535ace3259c 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
@@ -205,8 +205,8 @@ enum EncounterActions
ACTION_SHIP_VISITS = 5
};
-Position const SkybreakerAddsSpawnPos = { 15.91131f, 0.0f, 20.4628f, M_PI };
-Position const OrgrimsHammerAddsSpawnPos = { 60.728395f, 0.0f, 38.93467f, M_PI };
+Position const SkybreakerAddsSpawnPos = { 15.91131f, 0.0f, 20.4628f, float(M_PI) };
+Position const OrgrimsHammerAddsSpawnPos = { 60.728395f, 0.0f, 38.93467f, float(M_PI) };
// Horde encounter
Position const SkybreakerTeleportPortal = { 6.666975f, 0.013001f, 20.87888f, 0.0f };
@@ -439,7 +439,7 @@ private:
Position SelectSpawnPoint() const
{
Position newPos;
- float angle = frand(-M_PI * 0.5f, M_PI * 0.5f);
+ float angle = frand(float(-M_PI) * 0.5f, float(M_PI) * 0.5f);
newPos.m_positionX = _spawnPoint->GetPositionX() + 2.0f * std::cos(angle);
newPos.m_positionY = _spawnPoint->GetPositionY() + 2.0f * std::sin(angle);
newPos.m_positionZ = _spawnPoint->GetPositionZ();
@@ -1455,7 +1455,7 @@ struct npc_gunship_boarding_addAI : public gunship_npc_AI
if (Transport* destTransport = go->ToTransport())
destTransport->CalculatePassengerPosition(x, y, z, &o);
- float angle = frand(0, M_PI * 2.0f);
+ float angle = frand(0, float(M_PI) * 2.0f);
x += 2.0f * std::cos(angle);
y += 2.0f * std::sin(angle);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index 5022cd4f645..1ff7e1b1352 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
@@ -674,7 +674,7 @@ class spell_marrowgar_bone_storm : public SpellScriptLoader
void RecalculateDamage()
{
- SetHitDamage(int32(GetHitDamage() / std::max(sqrtf(GetHitUnit()->GetExactDist2d(GetCaster())), 1.0f)));
+ SetHitDamage(int32(GetHitDamage() / std::max(std::sqrt(GetHitUnit()->GetExactDist2d(GetCaster())), 1.0f)));
}
void Register() override
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
index 53efc628aa2..648da29ca66 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
@@ -126,7 +126,7 @@ public:
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
- me->NearTeleportTo(x, y, z, o - G3D::halfPi());
+ me->NearTeleportTo(x, y, z, o - (float(M_PI) / 2));
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
me->SetTarget(0);
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index 5291e4baed3..fc1f88c083d 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -1014,7 +1014,7 @@ public:
// Used to generate perfect cyclic movements (Enter Circle).
void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
{
- float step = clockwise ? -M_PI / 8.0f : M_PI / 8.0f;
+ float step = clockwise ? float(-M_PI) / 8.0f : float(M_PI) / 8.0f;
float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
for (uint8 i = 0; i < 16; angle += step, ++i)
@@ -1326,7 +1326,7 @@ public:
private:
void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
{
- float step = clockwise ? -M_PI / 9.0f : M_PI / 9.0f;
+ float step = clockwise ? float(-M_PI) / 9.0f : float(M_PI) / 9.0f;
float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
for (uint8 i = 0; i < 18; angle += step, ++i)
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
index f398dd99b5c..d07d68f28c9 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
@@ -315,7 +315,7 @@ class spell_varos_energize_core_area_enemy : public SpellScriptLoader
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end();)
{
float angle = varos->GetAngle((*itr)->GetPositionX(), (*itr)->GetPositionY());
- float diff = fabs(orientation - angle);
+ float diff = std::fabs(orientation - angle);
if (diff > 1.0f)
itr = targets.erase(itr);
@@ -359,7 +359,7 @@ class spell_varos_energize_core_area_entry : public SpellScriptLoader
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end();)
{
float angle = varos->GetAngle((*itr)->GetPositionX(), (*itr)->GetPositionY());
- float diff = fabs(orientation - angle);
+ float diff = std::fabs(orientation - angle);
if (diff > 1.0f)
itr = targets.erase(itr);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
index 011d1844adf..196e410f239 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
@@ -526,7 +526,7 @@ class spell_general_vezax_saronite_vapors : public SpellScriptLoader
{
if (Unit* caster = GetCaster())
{
- int32 mana = int32(aurEff->GetAmount() * pow(2.0f, GetStackAmount())); // mana restore - bp * 2^stackamount
+ int32 mana = int32(aurEff->GetAmount() * std::pow(2.0f, GetStackAmount())); // mana restore - bp * 2^stackamount
int32 damage = mana * 2;
caster->CastCustomSpell(GetTarget(), SPELL_SARONITE_VAPORS_ENERGIZE, &mana, NULL, NULL, true);
caster->CastCustomSpell(GetTarget(), SPELL_SARONITE_VAPORS_DAMAGE, &damage, NULL, NULL, true);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
index 4d904b04618..7f4d585b0a4 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
@@ -985,7 +985,7 @@ public:
if (!caster)
return;
- int32 damage = int32(200 * pow(2.0f, GetStackAmount()));
+ int32 damage = int32(200 * std::pow(2.0f, GetStackAmount()));
caster->CastCustomSpell(caster, SPELL_BITING_COLD_DAMAGE, &damage, NULL, NULL, true);
if (caster->isMoving())
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index 58969fd63c8..71a89c0e508 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
@@ -498,7 +498,7 @@ class spell_ulduar_squeezed_lifeless : public SpellScriptLoader
pos.m_positionX = 1756.25f + irand(-3, 3);
pos.m_positionY = -8.3f + irand(-3, 3);
pos.m_positionZ = 448.8f;
- pos.SetOrientation(M_PI);
+ pos.SetOrientation(float(M_PI));
GetHitPlayer()->DestroyForNearbyPlayers();
GetHitPlayer()->ExitVehicle(&pos);
GetHitPlayer()->UpdateObjectVisibility(false);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
index 4abf46be448..2471b705b90 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
@@ -839,7 +839,7 @@ class boss_sara : public CreatureScript
{
Position pos;
float radius = frand(25.0f, 50.0f);
- float angle = frand(0.0f, 2.0f * M_PI);
+ float angle = frand(0.0f, 2.0f * float(M_PI));
pos.m_positionX = YoggSaronSpawnPos.GetPositionX() + radius * cosf(angle);
pos.m_positionY = YoggSaronSpawnPos.GetPositionY() + radius * sinf(angle);
pos.m_positionZ = me->GetMap()->GetHeight(me->GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), YoggSaronSpawnPos.GetPositionZ() + 5.0f);
@@ -1119,7 +1119,7 @@ class npc_ominous_cloud : public CreatureScript
void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
{
- float step = clockwise ? -M_PI / 8.0f : M_PI / 8.0f;
+ float step = clockwise ? float(-M_PI) / 8.0f : float(M_PI) / 8.0f;
float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
for (uint8 i = 0; i < 16; angle += step, ++i)
@@ -2502,7 +2502,7 @@ class spell_yogg_saron_empowered : public SpellScriptLoader // 64161
void OnPeriodic(AuraEffect const* /*aurEff*/)
{
Unit* target = GetTarget();
- float stack = ceil((target->GetHealthPct() / 10) - 1);
+ float stack = std::ceil((target->GetHealthPct() / 10) - 1);
target->RemoveAurasDueToSpell(SPELL_EMPOWERED_BUFF);
if (stack)
diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
index d0fd948ce6a..6d41a2e9b21 100644
--- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
@@ -718,7 +718,7 @@ public:
if (me->GetEntry() == NPC_LAKE_FROG)
{
me->AddAura(SPELL_FROG_LOVE, me);
- me->GetMotionMaster()->MoveFollow(player, 0.3f, frand(M_PI/2, M_PI + (M_PI/2)));
+ me->GetMotionMaster()->MoveFollow(player, 0.3f, frand(float(M_PI) / 2, float(M_PI) + (float(M_PI) / 2)));
_following = true;
}
else if (me->GetEntry() == NPC_LAKE_FROG_QUEST)
diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
index c56739c783f..a4d6ab31846 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -410,7 +410,7 @@ public:
switch (phase)
{
case 1:
- orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ());
+ orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + std::cos(me->GetOrientation()) * 5, me->GetPositionY() + std::sin(me->GetOrientation()) * 5, me->GetPositionZ());
orphan->AI()->Talk(TEXT_WOLVAR_ORPHAN_6);
timer = 5000;
break;
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index cf8c4cd9b36..2e75b10c0e8 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -247,7 +247,7 @@ public:
break;
case EVENT_RECRUIT_2:
me->SetWalk(true);
- me->GetMotionMaster()->MovePoint(0, me->GetPositionX() + (cos(_heading) * 10), me->GetPositionY() + (sin(_heading) * 10), me->GetPositionZ());
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX() + (std::cos(_heading) * 10), me->GetPositionY() + (std::sin(_heading) * 10), me->GetPositionZ());
me->DespawnOrUnsummon(5000);
break;
default:
diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
index 6b478bc9dfc..f1e170c0705 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -244,8 +244,8 @@ public:
if (me->GetAuraCount(SPELL_SHADE_SOUL_CHANNEL_2) <= 3)
{
- moveSpeed = (2.0 - (0.6 * me->GetAuraCount(SPELL_SHADE_SOUL_CHANNEL_2)));
- me->SetSpeed(MOVE_WALK, moveSpeed / 2.5);
+ moveSpeed = (2.0f - (0.6f * me->GetAuraCount(SPELL_SHADE_SOUL_CHANNEL_2)));
+ me->SetSpeed(MOVE_WALK, moveSpeed / 2.5f);
me->SetSpeed(MOVE_RUN, (moveSpeed * 2) / 7);
me->ClearUnitState(UNIT_STATE_ROOT);
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
index 8e478aadeca..fb5b4579942 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
@@ -278,7 +278,7 @@ public:
if (me->IsWithinDistInMap(who, attackRadius))
{
// Check first that object is in an angle in front of this one before LoS check
- if (me->HasInArc(M_PI/2.0f, who) && me->IsWithinLOSInMap(who))
+ if (me->HasInArc(float(M_PI) / 2.0f, who) && me->IsWithinLOSInMap(who))
{
AttackStart(who);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index be437a154b3..63c01540af2 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -202,7 +202,7 @@ class boss_high_astromancer_solarian : public CreatureScript
{
float z = RAND(1.0f, -1.0f);
- return (z*sqrt(radius*radius - (x - CENTER_X)*(x - CENTER_X)) + CENTER_Y);
+ return (z*std::sqrt(radius*radius - (x - CENTER_X)*(x - CENTER_X)) + CENTER_Y);
}
void UpdateAI(uint32 diff) override
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
index 0981fc527f3..bbb384ed0f8 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
@@ -179,7 +179,7 @@ class boss_warp_splinter : public CreatureScript
{
for (uint8 i = 0; i < 6; ++i)
{
- float angle = (M_PI / 3) * i;
+ float angle = (float(M_PI) / 3) * i;
float X = Treant_Spawn_Pos_X + TREANT_SPAWN_DIST * std::cos(angle);
float Y = Treant_Spawn_Pos_Y + TREANT_SPAWN_DIST * std::sin(angle);
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 22a186b523b..fd4c972edbe 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -1601,7 +1601,7 @@ class spell_gen_gift_of_naaru : public SpellScriptLoader
break;
}
- int32 healTick = floor(heal / aurEff->GetTotalTicks());
+ int32 healTick = std::floor(heal / aurEff->GetTotalTicks());
amount += int32(std::max(healTick, 0));
}
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 70451888c07..a8f8dc1f31c 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -2456,7 +2456,7 @@ class spell_item_unusual_compass : public SpellScriptLoader
void HandleDummy(SpellEffIndex /* effIndex */)
{
Unit* caster = GetCaster();
- caster->SetFacingTo(frand(0.0f, 2.0f * M_PI));
+ caster->SetFacingTo(frand(0.0f, 2.0f * float(M_PI)));
}
void Register() override
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 87661710f53..173e03fef7c 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -2008,7 +2008,7 @@ class spell_q12308_escape_from_silverbrook_summon_worgen : public SpellScriptLoa
void ModDest(SpellDestination& dest)
{
float dist = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster());
- float angle = frand(0.75f, 1.25f) * M_PI;
+ float angle = frand(0.75f, 1.25f) * float(M_PI);
Position pos = GetCaster()->GetNearPosition(dist, angle);
dest.Relocate(pos);
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index c65970aed3d..ecbc6ca1bdc 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -621,7 +621,7 @@ class spell_warr_retaliation : public SpellScriptLoader
bool CheckProc(ProcEventInfo& eventInfo)
{
// check attack comes not from behind and warrior is not stunned
- return GetTarget()->isInFront(eventInfo.GetProcTarget(), M_PI) && !GetTarget()->HasUnitState(UNIT_STATE_STUNNED);
+ return GetTarget()->isInFront(eventInfo.GetActor(), float(M_PI)) && !GetTarget()->HasUnitState(UNIT_STATE_STUNNED);
}
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index e39cf9096f4..ba17dba602a 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -2231,7 +2231,7 @@ public:
if (GameObject* launcher = FindNearestLauncher())
{
launcher->SendCustomAnim(ANIM_GO_LAUNCH_FIREWORK);
- me->SetOrientation(launcher->GetOrientation() + M_PI/2);
+ me->SetOrientation(launcher->GetOrientation() + float(M_PI) / 2);
}
else
return;