feat(Core/Position): own file (#10505)

This commit is contained in:
IntelligentQuantum
2022-02-08 11:42:42 +03:30
committed by GitHub
parent b0b9fece99
commit 93520f6466
15 changed files with 561 additions and 496 deletions

View File

@@ -505,7 +505,7 @@ public:
if (caster->IsWithinLOS(nx, ny, z))
{
caster->m_orientation = angle;
caster->SetOrientation(angle);
caster->CastSpell(nx, ny, z, uint32(GetEffectValue()), true);
}
}
@@ -602,7 +602,7 @@ public:
float ny = y + 2.5f * std::sin((M_PI / 4) + (i * (M_PI / 2)));
if (caster->IsWithinLOS(nx, ny, z))
{
caster->m_orientation = (M_PI / 4) + (i * (M_PI / 2));
caster->SetOrientation((M_PI / 4) + (i * (M_PI / 2)));
caster->CastSpell(nx, ny, z, uint32(GetEffectValue() + i), true);
}
}

View File

@@ -487,7 +487,7 @@ public:
pos.m_positionX = CenterPos.GetPositionX() + cos(angle) * 40.0f;
pos.m_positionY = CenterPos.GetPositionY() + std::sin(angle) * 40.0f;
pos.m_positionZ = CenterPos.GetPositionZ() + 20.0f;
pos.m_orientation = pos.GetAngle(&CenterPos);
pos.SetOrientation(pos.GetAngle(&CenterPos));
if (Creature* vp = me->SummonCreature(NPC_WORLD_TRIGGER_LAOI, pos, TEMPSUMMON_TIMED_DESPAWN, 14000))
{
@@ -506,7 +506,7 @@ public:
plrpos.m_positionX = CenterPos.GetPositionX() + cos(playerAngle) * 5.0f;
plrpos.m_positionY = CenterPos.GetPositionY() + std::sin(playerAngle) * 5.0f;
plrpos.m_positionZ = CenterPos.GetPositionZ() + 18.0f;
plrpos.m_orientation = plrpos.GetAngle(&CenterPos);
plrpos.SetOrientation(plrpos.GetAngle(&CenterPos));
if (Creature* c = me->SummonCreature(NPC_VORTEX, plrpos, TEMPSUMMON_TIMED_DESPAWN, 15000))
{
@@ -880,7 +880,7 @@ public:
pos.m_positionX = CenterPos.GetPositionX() + VORTEX_RADIUS * cos(angle);
pos.m_positionY = CenterPos.GetPositionY() + VORTEX_RADIUS * std::sin(angle);
pos.m_positionZ = CenterPos.GetPositionZ() + h;
pos.m_orientation = pos.GetAngle(&CenterPos);
pos.SetOrientation(pos.GetAngle(&CenterPos));
me->SetPosition(pos);
timer = 0;
despawnTimer = 9500;

View File

@@ -2470,9 +2470,9 @@ public:
break;
case EVENT_EMERGENCY_BOT_CHECK:
events.RepeatEvent(15000); // just in case, will be rescheduled
if( Creature* flame = me->FindNearestCreature(NPC_FLAMES_SPREAD, 150.0f, true) )
if (Creature* flame = me->FindNearestCreature(NPC_FLAMES_SPREAD, 150.0f, true))
{
me->m_orientation = me->GetAngle(flame->GetPositionX(), flame->GetPositionY());
me->SetOrientation(me->GetAngle(flame->GetPositionX(), flame->GetPositionY()));
float dist = me->GetExactDist2d(flame);
if (dist <= 5.0f)
events.ScheduleEvent(EVENT_EMERGENCY_BOT_ATTACK, 0);

View File

@@ -1533,7 +1533,7 @@ public:
{
if (id == 1)
{
me->SetFacingTo(PosTalkLocations[talkWing].m_orientation);
me->SetFacingTo(PosTalkLocations[talkWing].GetOrientation());
TurnAudience();
switch (talkWing)