mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 04:02:53 -04:00
Core/Misc: Remove Unit::Get* wrappers for ObjectAccessor::Get*
This commit is contained in:
@@ -37,7 +37,7 @@ void SummonList::DoZoneInCombat(uint32 entry)
|
||||
{
|
||||
for (StorageType::iterator i = storage_.begin(); i != storage_.end();)
|
||||
{
|
||||
Creature* summon = Unit::GetCreature(*me, *i);
|
||||
Creature* summon = ObjectAccessor::GetCreature(*me, *i);
|
||||
++i;
|
||||
if (summon && summon->IsAIEnabled
|
||||
&& (!entry || summon->GetEntry() == entry))
|
||||
@@ -51,7 +51,7 @@ void SummonList::DespawnEntry(uint32 entry)
|
||||
{
|
||||
for (StorageType::iterator i = storage_.begin(); i != storage_.end();)
|
||||
{
|
||||
Creature* summon = Unit::GetCreature(*me, *i);
|
||||
Creature* summon = ObjectAccessor::GetCreature(*me, *i);
|
||||
if (!summon)
|
||||
i = storage_.erase(i);
|
||||
else if (summon->GetEntry() == entry)
|
||||
@@ -68,7 +68,7 @@ void SummonList::DespawnAll()
|
||||
{
|
||||
while (!storage_.empty())
|
||||
{
|
||||
Creature* summon = Unit::GetCreature(*me, storage_.front());
|
||||
Creature* summon = ObjectAccessor::GetCreature(*me, storage_.front());
|
||||
storage_.pop_front();
|
||||
if (summon)
|
||||
summon->DespawnOrUnsummon();
|
||||
@@ -79,7 +79,7 @@ void SummonList::RemoveNotExisting()
|
||||
{
|
||||
for (StorageType::iterator i = storage_.begin(); i != storage_.end();)
|
||||
{
|
||||
if (Unit::GetCreature(*me, *i))
|
||||
if (ObjectAccessor::GetCreature(*me, *i))
|
||||
++i;
|
||||
else
|
||||
i = storage_.erase(i);
|
||||
@@ -90,7 +90,7 @@ bool SummonList::HasEntry(uint32 entry) const
|
||||
{
|
||||
for (StorageType::const_iterator i = storage_.begin(); i != storage_.end(); ++i)
|
||||
{
|
||||
Creature* summon = Unit::GetCreature(*me, *i);
|
||||
Creature* summon = ObjectAccessor::GetCreature(*me, *i);
|
||||
if (summon && summon->GetEntry() == entry)
|
||||
return true;
|
||||
}
|
||||
@@ -271,7 +271,7 @@ void ScriptedAI::DoResetThreat()
|
||||
|
||||
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
|
||||
{
|
||||
Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if (unit && DoGetThreat(unit))
|
||||
DoModifyThreatPercent(unit, -100);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user