mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 08:16:08 +00:00
feat(Core/Position): own file (#10505)
This commit is contained in:
committed by
GitHub
parent
b0b9fece99
commit
93520f6466
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1533,7 +1533,7 @@ public:
|
||||
{
|
||||
if (id == 1)
|
||||
{
|
||||
me->SetFacingTo(PosTalkLocations[talkWing].m_orientation);
|
||||
me->SetFacingTo(PosTalkLocations[talkWing].GetOrientation());
|
||||
TurnAudience();
|
||||
|
||||
switch (talkWing)
|
||||
|
||||
Reference in New Issue
Block a user