mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 13:22:48 +01:00
Core: "Initial support for C++11 compilers"
This commit is contained in:
@@ -201,8 +201,8 @@ public:
|
||||
float z = player->GetPositionZ();
|
||||
float ang = player->GetOrientation();
|
||||
|
||||
float rot2 = sin(ang/2);
|
||||
float rot3 = cos(ang/2);
|
||||
float rot2 = std::sin(ang/2);
|
||||
float rot3 = std::cos(ang/2);
|
||||
|
||||
uint32 objectId = atoi(id);
|
||||
|
||||
|
||||
@@ -210,16 +210,16 @@ public:
|
||||
pAttumen->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
float angle = me->GetAngle(pAttumen);
|
||||
float distance = me->GetDistance2d(pAttumen);
|
||||
float newX = me->GetPositionX() + cos(angle)*(distance/2);
|
||||
float newY = me->GetPositionY() + sin(angle)*(distance/2);
|
||||
float newX = me->GetPositionX() + std::cos(angle)*(distance/2);
|
||||
float newY = me->GetPositionY() + std::sin(angle)*(distance/2);
|
||||
float newZ = 50;
|
||||
//me->Relocate(newX, newY, newZ, angle);
|
||||
//me->SendMonsterMove(newX, newY, newZ, 0, true, 1000);
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(0, newX, newY, newZ);
|
||||
distance += 10;
|
||||
newX = me->GetPositionX() + cos(angle)*(distance/2);
|
||||
newY = me->GetPositionY() + sin(angle)*(distance/2);
|
||||
newX = me->GetPositionX() + std::cos(angle)*(distance/2);
|
||||
newY = me->GetPositionY() + std::sin(angle)*(distance/2);
|
||||
pAttumen->GetMotionMaster()->Clear();
|
||||
pAttumen->GetMotionMaster()->MovePoint(0, newX, newY, newZ);
|
||||
//pAttumen->Relocate(newX, newY, newZ, -angle);
|
||||
|
||||
@@ -774,8 +774,8 @@ public:
|
||||
for (uint8 i = 1; i < Phase; ++i)
|
||||
{
|
||||
float sx, sy;
|
||||
sx = ShieldOrbLocations[0][0] + sin(ShieldOrbLocations[i][0]);
|
||||
sy = ShieldOrbLocations[0][1] + sin(ShieldOrbLocations[i][1]);
|
||||
sx = ShieldOrbLocations[0][0] + std::sin(ShieldOrbLocations[i][0]);
|
||||
sy = ShieldOrbLocations[0][1] + std::sin(ShieldOrbLocations[i][1]);
|
||||
me->SummonCreature(CREATURE_SHIELD_ORB, sx, sy, SHIELD_ORB_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
|
||||
}
|
||||
Timer[TIMER_SUMMON_SHILEDORB] = urand(30000, 60000); // 30-60seconds cooldown
|
||||
@@ -1207,13 +1207,13 @@ public:
|
||||
{
|
||||
if (bClockwise)
|
||||
{
|
||||
y = my - r * sin(c);
|
||||
x = mx - r * cos(c);
|
||||
y = my - r * std::sin(c);
|
||||
x = mx - r * std::cos(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
y = my + r * sin(c);
|
||||
x = mx + r * cos(c);
|
||||
y = my + r * std::sin(c);
|
||||
x = mx + r * std::cos(c);
|
||||
}
|
||||
bPointReached = false;
|
||||
uiCheckTimer = 1000;
|
||||
|
||||
@@ -140,8 +140,8 @@ public:
|
||||
{
|
||||
float angle, x, y;
|
||||
angle = pSpheres[0]->GetAngle(pSphereTarget);
|
||||
x = pSpheres[0]->GetPositionX() + DATA_SPHERE_DISTANCE * cos(angle);
|
||||
y = pSpheres[0]->GetPositionY() + DATA_SPHERE_DISTANCE * sin(angle);
|
||||
x = pSpheres[0]->GetPositionX() + DATA_SPHERE_DISTANCE * std::cos(angle);
|
||||
y = pSpheres[0]->GetPositionY() + DATA_SPHERE_DISTANCE * std::sin(angle);
|
||||
pSpheres[0]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[0]->GetPositionZ());
|
||||
}
|
||||
if (IsHeroic())
|
||||
@@ -154,12 +154,12 @@ public:
|
||||
{
|
||||
float angle, x, y;
|
||||
angle = pSpheres[1]->GetAngle(pSphereTarget) + DATA_SPHERE_ANGLE_OFFSET;
|
||||
x = pSpheres[1]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * cos(angle);
|
||||
y = pSpheres[1]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * sin(angle);
|
||||
x = pSpheres[1]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * std::cos(angle);
|
||||
y = pSpheres[1]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * std::sin(angle);
|
||||
pSpheres[1]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[1]->GetPositionZ());
|
||||
angle = pSpheres[2]->GetAngle(pSphereTarget) - DATA_SPHERE_ANGLE_OFFSET;
|
||||
x = pSpheres[2]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * cos(angle);
|
||||
y = pSpheres[2]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * sin(angle);
|
||||
x = pSpheres[2]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * std::cos(angle);
|
||||
y = pSpheres[2]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * std::sin(angle);
|
||||
pSpheres[2]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[2]->GetPositionZ());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,14 +129,14 @@ public:
|
||||
{
|
||||
if (uiCrystalSpikesTimer2 <= diff)
|
||||
{
|
||||
fSpikeXY[0][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO));
|
||||
fSpikeXY[0][1] = fBaseY+(SPIKE_DISTANCE*uiCrystalSpikesCount*sin(fBaseO));
|
||||
fSpikeXY[1][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO));
|
||||
fSpikeXY[1][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount*sin(fBaseO));
|
||||
fSpikeXY[2][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO-(M_PI/2)));
|
||||
fSpikeXY[2][1] = fBaseY+(SPIKE_DISTANCE*uiCrystalSpikesCount*sin(fBaseO-(M_PI/2)));
|
||||
fSpikeXY[3][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO-(M_PI/2)));
|
||||
fSpikeXY[3][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount*sin(fBaseO-(M_PI/2)));
|
||||
fSpikeXY[0][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO));
|
||||
fSpikeXY[0][1] = fBaseY+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO));
|
||||
fSpikeXY[1][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO));
|
||||
fSpikeXY[1][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO));
|
||||
fSpikeXY[2][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO-(M_PI/2)));
|
||||
fSpikeXY[2][1] = fBaseY+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO-(M_PI/2)));
|
||||
fSpikeXY[3][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO-(M_PI/2)));
|
||||
fSpikeXY[3][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO-(M_PI/2)));
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
me->SummonCreature(MOB_CRYSTAL_SPIKE, fSpikeXY[i][0], fSpikeXY[i][1], fBaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7*IN_MILLISECONDS);
|
||||
if (++uiCrystalSpikesCount >= 13)
|
||||
|
||||
@@ -181,8 +181,8 @@ class boss_warp_splinter : public CreatureScript
|
||||
{
|
||||
float angle = (M_PI / 3) * i;
|
||||
|
||||
float X = Treant_Spawn_Pos_X + TREANT_SPAWN_DIST * cos(angle);
|
||||
float Y = Treant_Spawn_Pos_Y + TREANT_SPAWN_DIST * sin(angle);
|
||||
float X = Treant_Spawn_Pos_X + TREANT_SPAWN_DIST * std::cos(angle);
|
||||
float Y = Treant_Spawn_Pos_Y + TREANT_SPAWN_DIST * std::sin(angle);
|
||||
float O = - me->GetAngle(X, Y);
|
||||
|
||||
if (Creature* pTreant = me->SummonCreature(CREATURE_TREANT, treant_pos[i][0], treant_pos[i][1], treant_pos[i][2], O, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000))
|
||||
|
||||
@@ -1954,8 +1954,8 @@ public:
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY|MOVEMENTFLAG_ASCENDING|MOVEMENTFLAG_FLYING);
|
||||
me->SetSpeed(MOVE_FLIGHT, 0.75f, true);
|
||||
me->SetSpeed(MOVE_RUN, 0.75f, true);
|
||||
float x = me->GetPositionX() + 20 * cos(me->GetOrientation());
|
||||
float y = me->GetPositionY() + 20 * sin(me->GetOrientation());
|
||||
float x = me->GetPositionX() + 20 * std::cos(me->GetOrientation());
|
||||
float y = me->GetPositionY() + 20 * std::sin(me->GetOrientation());
|
||||
float z = me->GetPositionZ() + 40;
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
|
||||
Reference in New Issue
Block a user