mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
(cherry picked from commit 4692e10ca2)
This commit is contained in:
@@ -306,7 +306,7 @@ public:
|
||||
me->UseDoorOrButton();
|
||||
int Random = rand32() % (sizeof(NpcPrisonEntry) / sizeof(uint32));
|
||||
|
||||
if (Creature* creature = player->SummonCreature(NpcPrisonEntry[Random], me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetAngle(player),
|
||||
if (Creature* creature = player->SummonCreature(NpcPrisonEntry[Random], me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetAbsoluteAngle(player),
|
||||
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
{
|
||||
if (!creature->IsHostileTo(player))
|
||||
@@ -366,7 +366,7 @@ public:
|
||||
me->UseDoorOrButton();
|
||||
int Random = rand32() % (sizeof(NpcStasisEntry) / sizeof(uint32));
|
||||
|
||||
player->SummonCreature(NpcStasisEntry[Random], me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetAngle(player),
|
||||
player->SummonCreature(NpcStasisEntry[Random], me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetAbsoluteAngle(player),
|
||||
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
|
||||
return false;
|
||||
@@ -1250,8 +1250,8 @@ public:
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
player->SendLoot(me->GetGUID(), LOOT_CORPSE);
|
||||
me->SummonCreature(NPC_HIVE_AMBUSHER, me->GetPositionX() + 1, me->GetPositionY(), me->GetPositionZ(), me->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
me->SummonCreature(NPC_HIVE_AMBUSHER, me->GetPositionX(), me->GetPositionY() + 1, me->GetPositionZ(), me->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
me->SummonCreature(NPC_HIVE_AMBUSHER, me->GetPositionX() + 1, me->GetPositionY(), me->GetPositionZ(), me->GetAbsoluteAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
me->SummonCreature(NPC_HIVE_AMBUSHER, me->GetPositionX(), me->GetPositionY() + 1, me->GetPositionZ(), me->GetAbsoluteAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2481,7 +2481,7 @@ class npc_train_wrecker : public CreatureScript
|
||||
_isSearching = false;
|
||||
_target = target->GetGUID();
|
||||
me->SetWalk(true);
|
||||
me->GetMotionMaster()->MovePoint(MOVEID_CHASE, target->GetNearPosition(3.0f, target->GetAngle(me)));
|
||||
me->GetMotionMaster()->MovePoint(MOVEID_CHASE, target->GetNearPosition(3.0f, target->GetAbsoluteAngle(me)));
|
||||
}
|
||||
else
|
||||
_timer = 3 * IN_MILLISECONDS;
|
||||
|
||||
Reference in New Issue
Block a user