mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Core/Misc: Remove Unit::Get* wrappers for ObjectAccessor::Get*
This commit is contained in:
@@ -461,11 +461,11 @@ public:
|
||||
if (player->GetQuestStatus(QUEST_THE_LONESOME_WATCHER) != QUEST_STATUS_INCOMPLETE)
|
||||
return false;
|
||||
|
||||
Creature* stormforgedMonitor = Creature::GetCreature(*player, stormforgedMonitorGUID);
|
||||
Creature* stormforgedMonitor = ObjectAccessor::GetCreature(*player, stormforgedMonitorGUID);
|
||||
if (stormforgedMonitor)
|
||||
return false;
|
||||
|
||||
Creature* stormforgedEradictor = Creature::GetCreature(*player, stormforgedEradictorGUID);
|
||||
Creature* stormforgedEradictor = ObjectAccessor::GetCreature(*player, stormforgedEradictorGUID);
|
||||
if (stormforgedEradictor)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ public:
|
||||
{
|
||||
if (exileTimer <= diff)
|
||||
{
|
||||
if (Unit* temp = Unit::GetUnit(*me, playerGUID))
|
||||
if (Unit* temp = ObjectAccessor::GetUnit(*me, playerGUID))
|
||||
{
|
||||
temp->CastSpell(temp, SPELL_EXILE, true);
|
||||
temp->CastSpell(temp, SPELL_BANISH_TELEPORT, true);
|
||||
@@ -347,7 +347,7 @@ public:
|
||||
{
|
||||
if (exileTimer <= diff)
|
||||
{
|
||||
if (Unit* temp = Unit::GetUnit(*me, playerGUID))
|
||||
if (Unit* temp = ObjectAccessor::GetUnit(*me, playerGUID))
|
||||
{
|
||||
temp->CastSpell(temp, SPELL_EXILE, true);
|
||||
temp->CastSpell(temp, SPELL_BANISH_TELEPORT, true);
|
||||
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
|
||||
Creature* GetSummonedGuard()
|
||||
{
|
||||
Creature* creature = Unit::GetCreature(*me, SpawnedGUID);
|
||||
Creature* creature = ObjectAccessor::GetCreature(*me, SpawnedGUID);
|
||||
|
||||
if (creature && creature->IsAlive())
|
||||
return creature;
|
||||
@@ -671,7 +671,7 @@ public:
|
||||
std::list<uint64>::const_iterator itr;
|
||||
for (itr = Patients.begin(); itr != Patients.end(); ++itr)
|
||||
{
|
||||
if (Creature* patient = Unit::GetCreature((*me), *itr))
|
||||
if (Creature* patient = ObjectAccessor::GetCreature((*me), *itr))
|
||||
patient->setDeathState(JUST_DIED);
|
||||
}
|
||||
}
|
||||
@@ -768,7 +768,7 @@ public:
|
||||
|
||||
if (player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)
|
||||
if (DoctorGUID)
|
||||
if (Creature* doctor = Unit::GetCreature(*me, DoctorGUID))
|
||||
if (Creature* doctor = ObjectAccessor::GetCreature(*me, DoctorGUID))
|
||||
CAST_AI(npc_doctor::npc_doctorAI, doctor->AI())->PatientSaved(me, player, Coord);
|
||||
|
||||
//make not selectable
|
||||
@@ -814,7 +814,7 @@ public:
|
||||
me->SetFlag(UNIT_DYNAMIC_FLAGS, 32);
|
||||
|
||||
if (DoctorGUID)
|
||||
if (Creature* doctor = Unit::GetCreature((*me), DoctorGUID))
|
||||
if (Creature* doctor = ObjectAccessor::GetCreature((*me), DoctorGUID))
|
||||
CAST_AI(npc_doctor::npc_doctorAI, doctor->AI())->PatientDied(Coord);
|
||||
}
|
||||
}
|
||||
@@ -1064,7 +1064,7 @@ public:
|
||||
{
|
||||
if (RunAwayTimer <= diff)
|
||||
{
|
||||
if (Unit* unit = Unit::GetUnit(*me, CasterGUID))
|
||||
if (Unit* unit = ObjectAccessor::GetUnit(*me, CasterGUID))
|
||||
{
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
@@ -2319,7 +2319,7 @@ public:
|
||||
{
|
||||
if (jumpTimer <= diff)
|
||||
{
|
||||
if (Unit* rabbit = Unit::GetUnit(*me, rabbitGUID))
|
||||
if (Unit* rabbit = ObjectAccessor::GetUnit(*me, rabbitGUID))
|
||||
DoCast(rabbit, SPELL_SPRING_RABBIT_JUMP);
|
||||
jumpTimer = urand(5000, 10000);
|
||||
} else jumpTimer -= diff;
|
||||
|
||||
Reference in New Issue
Block a user