mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +00:00
refactor(Core/Misc): sin() to std::sin() (#9795)
This commit is contained in:
@@ -256,7 +256,7 @@ public:
|
||||
{
|
||||
Talk(SAY_ATTUMEN1_MOUNT);
|
||||
_events.Reset();
|
||||
me->GetMotionMaster()->MovePoint(POINT_MOVE_TO_MIDNIGHT, target->GetPositionX() + 2.0f * cos(target->GetAngle(me)), target->GetPositionY() + 2.0f * sin(target->GetAngle(me)), target->GetPositionZ() + 0.2f, true, true, MOTION_SLOT_CONTROLLED);
|
||||
me->GetMotionMaster()->MovePoint(POINT_MOVE_TO_MIDNIGHT, target->GetPositionX() + 2.0f * cos(target->GetAngle(me)), target->GetPositionY() + 2.0f * std::sin(target->GetAngle(me)), target->GetPositionZ() + 0.2f, true, true, MOTION_SLOT_CONTROLLED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -943,7 +943,7 @@ public:
|
||||
if (summon->GetEntry() <= NPC_RIMBLAT_EARTHSHATTER && summon->GetEntry() != NPC_HIGHLORD_TIRION_FORDRING)
|
||||
{
|
||||
float o = lk->GetAngle(summon);
|
||||
summon->GetMotionMaster()->MovePoint(3, lk->GetPositionX() + 2.0f * cos(o), lk->GetPositionY() + 2.0f * sin(o), lk->GetPositionZ());
|
||||
summon->GetMotionMaster()->MovePoint(3, lk->GetPositionX() + 2.0f * cos(o), lk->GetPositionY() + 2.0f * std::sin(o), lk->GetPositionZ());
|
||||
summon->ToTempSummon()->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
|
||||
}
|
||||
}
|
||||
@@ -1052,7 +1052,7 @@ public:
|
||||
if (Creature* tirion = GetEntryFromSummons(NPC_HIGHLORD_TIRION_FORDRING))
|
||||
{
|
||||
float o = me->GetAngle(tirion);
|
||||
tirion->GetMotionMaster()->MovePoint(4, me->GetPositionX() + 2.0f * cos(o), me->GetPositionY() + 2.0f * sin(o), me->GetPositionZ(), false);
|
||||
tirion->GetMotionMaster()->MovePoint(4, me->GetPositionX() + 2.0f * cos(o), me->GetPositionY() + 2.0f * std::sin(o), me->GetPositionZ(), false);
|
||||
tirion->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
tirion->SetFaction(FACTION_FRIENDLY);
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ public:
|
||||
for (uint8 i = 1; i < phase; ++i)
|
||||
{
|
||||
float x = me->GetPositionX() + 18.0f * cos((i * 2.0f - 1.0f) * M_PI / 3.0f);
|
||||
float y = me->GetPositionY() + 18.0f * sin((i * 2.0f - 1.0f) * M_PI / 3.0f);
|
||||
float y = me->GetPositionY() + 18.0f * std::sin((i * 2.0f - 1.0f) * M_PI / 3.0f);
|
||||
if (Creature* orb = me->SummonCreature(NPC_SHIELD_ORB, x, y, 40.0f, 0, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
Movement::PointsArray movementArray;
|
||||
@@ -595,7 +595,7 @@ public:
|
||||
for (uint8 j = 1; j < 20; ++j)
|
||||
{
|
||||
x = me->GetPositionX() + 18.0f * cos(((i * 2.0f - 1.0f) * M_PI / 3.0f) + (j / 20.0f * 2 * M_PI));
|
||||
y = me->GetPositionY() + 18.0f * sin(((i * 2.0f - 1.0f) * M_PI / 3.0f) + (j / 20.0f * 2 * M_PI));
|
||||
y = me->GetPositionY() + 18.0f * std::sin(((i * 2.0f - 1.0f) * M_PI / 3.0f) + (j / 20.0f * 2 * M_PI));
|
||||
movementArray.push_back(G3D::Vector3(x, y, 40.0f));
|
||||
}
|
||||
|
||||
@@ -866,8 +866,8 @@ public:
|
||||
events.ScheduleEvent(eventId + 1, 6000);
|
||||
break;
|
||||
case EVENT_SCENE_03:
|
||||
me->SummonCreature(NPC_SHATTRATH_PORTAL_DUMMY, 1727.08f + cos(5.14f), 656.82f + sin(5.14f), 28.37f + 2.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_SHATTRATH_PORTAL_DUMMY, 1738.84f + cos(2.0f), 627.32f + sin(2.0f), 28.26f + 2.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_SHATTRATH_PORTAL_DUMMY, 1727.08f + cos(5.14f), 656.82f + std::sin(5.14f), 28.37f + 2.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_SHATTRATH_PORTAL_DUMMY, 1738.84f + cos(2.0f), 627.32f + std::sin(2.0f), 28.26f + 2.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 10000);
|
||||
events.ScheduleEvent(eventId + 1, 11000);
|
||||
break;
|
||||
case EVENT_SCENE_04:
|
||||
@@ -880,7 +880,7 @@ public:
|
||||
first->m_Events.AddEvent(new MoveDelayed(first, 1718.70f, 607.78f, 28.06f, 2.323f), first->m_Events.CalculateTime(5000));
|
||||
first->m_Events.AddEvent(new FixOrientation(first), first->m_Events.CalculateTime(12000));
|
||||
for (uint8 i = 0; i < 9; ++i)
|
||||
if (Creature* follower = me->SummonCreature(NPC_SHATTERED_SUN_SOLDIER, 1729.48f + 5 * cos(i * 2.0f * M_PI / 9), 640.49f + 5 * sin(i * 2.0f * M_PI / 9), 28.06f, 3.49f))
|
||||
if (Creature* follower = me->SummonCreature(NPC_SHATTERED_SUN_SOLDIER, 1729.48f + 5 * cos(i * 2.0f * M_PI / 9), 640.49f + 5 * std::sin(i * 2.0f * M_PI / 9), 28.06f, 3.49f))
|
||||
follower->GetMotionMaster()->MoveFollow(first, 3.0f, follower->GetAngle(first));
|
||||
}
|
||||
events.ScheduleEvent(eventId + 1, 10000);
|
||||
@@ -891,7 +891,7 @@ public:
|
||||
first->m_Events.AddEvent(new MoveDelayed(first, 1678.69f, 649.27f, 28.06f, 5.46f), first->m_Events.CalculateTime(5000));
|
||||
first->m_Events.AddEvent(new FixOrientation(first), first->m_Events.CalculateTime(14500));
|
||||
for (uint8 i = 0; i < 9; ++i)
|
||||
if (Creature* follower = me->SummonCreature(NPC_SHATTERED_SUN_SOLDIER, 1729.48f + 5 * cos(i * 2.0f * M_PI / 9), 640.49f + 5 * sin(i * 2.0f * M_PI / 9), 28.06f, 3.49f))
|
||||
if (Creature* follower = me->SummonCreature(NPC_SHATTERED_SUN_SOLDIER, 1729.48f + 5 * cos(i * 2.0f * M_PI / 9), 640.49f + 5 * std::sin(i * 2.0f * M_PI / 9), 28.06f, 3.49f))
|
||||
follower->GetMotionMaster()->MoveFollow(first, 3.0f, follower->GetAngle(first));
|
||||
}
|
||||
events.ScheduleEvent(eventId + 1, 12000);
|
||||
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
if (target->GetDistance(GetCaster()) < 5.0f)
|
||||
{
|
||||
float o = frand(0, 2 * M_PI);
|
||||
pos.Relocate(GetCaster()->GetPositionX() + 4.0f * cos(o), GetCaster()->GetPositionY() + 4.0f * sin(o), GetCaster()->GetPositionZ() + frand(10.0f, 15.0f));
|
||||
pos.Relocate(GetCaster()->GetPositionX() + 4.0f * cos(o), GetCaster()->GetPositionY() + 4.0f * std::sin(o), GetCaster()->GetPositionZ() + frand(10.0f, 15.0f));
|
||||
}
|
||||
else
|
||||
pos.Relocate(GetCaster()->GetPositionX(), GetCaster()->GetPositionY(), GetCaster()->GetPositionZ() + 1.0f);
|
||||
|
||||
@@ -321,12 +321,12 @@ public:
|
||||
Position spawnPos = c->GetPosition();
|
||||
spawnPos.m_orientation = 5.80f;
|
||||
spawnPos.m_positionX += 5.0f * cos(4.5f);
|
||||
spawnPos.m_positionY += 5.0f * sin(4.5f);
|
||||
spawnPos.m_positionY += 5.0f * std::sin(4.5f);
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
if (me->SummonCreature(NPC_SCOURGE_ZOMBIE, spawnPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 2000))
|
||||
{
|
||||
spawnPos.m_positionX += 2.5f * cos(4.5f);
|
||||
spawnPos.m_positionY += 2.5f * sin(4.5f);
|
||||
spawnPos.m_positionY += 2.5f * std::sin(4.5f);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -335,13 +335,13 @@ public:
|
||||
Position spawnPos = c->GetPosition();
|
||||
spawnPos.m_orientation = 5.80f;
|
||||
spawnPos.m_positionX += 7.0f * cos(4.0f);
|
||||
spawnPos.m_positionY += 7.0f * sin(4.0f);
|
||||
spawnPos.m_positionY += 7.0f * std::sin(4.0f);
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
if (Creature* s = me->SummonCreature(NPC_GHOUL_INVADER, spawnPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 2000))
|
||||
{
|
||||
s->CastSpell(s, 66947, false); // emerge effect
|
||||
spawnPos.m_positionX += 4.0f * cos(4.5f);
|
||||
spawnPos.m_positionY += 4.0f * sin(4.5f);
|
||||
spawnPos.m_positionY += 4.0f * std::sin(4.5f);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -350,13 +350,13 @@ public:
|
||||
Position spawnPos = c->GetPosition();
|
||||
spawnPos.m_orientation = 5.80f;
|
||||
spawnPos.m_positionX += 8.0f * cos(4.0f);
|
||||
spawnPos.m_positionY += 8.0f * sin(4.0f);
|
||||
spawnPos.m_positionY += 8.0f * std::sin(4.0f);
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
if (Creature* s = me->SummonCreature(NPC_CRYPT_RAIDER, spawnPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 2000))
|
||||
{
|
||||
s->CastSpell(s, 66947, false); // emerge effect
|
||||
spawnPos.m_positionX += 4.0f * cos(4.5f);
|
||||
spawnPos.m_positionY += 4.0f * sin(4.5f);
|
||||
spawnPos.m_positionY += 4.0f * std::sin(4.5f);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user