mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885)
This commit is contained in:
@@ -25,9 +25,6 @@ public:
|
||||
_statuePhase = 0;
|
||||
_defendersKilled = 0;
|
||||
memset(&_encounters, 0, sizeof(_encounters));
|
||||
|
||||
_forcefieldGUID = 0;
|
||||
_jammalanGUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
@@ -39,7 +36,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (creature->IsAlive() && creature->GetDBTableGUIDLow() && creature->GetCreatureType() == CREATURE_TYPE_DRAGONKIN && creature->GetEntry() != NPC_SHADE_OF_ERANIKUS)
|
||||
if (creature->IsAlive() && creature->GetSpawnId() && creature->GetCreatureType() == CREATURE_TYPE_DRAGONKIN && creature->GetEntry() != NPC_SHADE_OF_ERANIKUS)
|
||||
_dragonkinList.push_back(creature->GetGUID());
|
||||
}
|
||||
|
||||
@@ -99,9 +96,9 @@ public:
|
||||
}
|
||||
break;
|
||||
case DATA_ERANIKUS_FIGHT:
|
||||
for (std::list<uint64>::const_iterator itr = _dragonkinList.begin(); itr != _dragonkinList.end(); ++itr)
|
||||
for (ObjectGuid const guid : _dragonkinList)
|
||||
{
|
||||
if (Creature* creature = instance->GetCreature(*itr))
|
||||
if (Creature* creature = instance->GetCreature(guid))
|
||||
if (instance->IsGridLoaded(creature->GetPositionX(), creature->GetPositionY()))
|
||||
creature->SetInCombatWithZone();
|
||||
}
|
||||
@@ -180,9 +177,9 @@ public:
|
||||
uint32 _defendersKilled;
|
||||
uint32 _encounters[MAX_ENCOUNTERS];
|
||||
|
||||
uint64 _forcefieldGUID;
|
||||
uint64 _jammalanGUID;
|
||||
std::list<uint64> _dragonkinList;
|
||||
ObjectGuid _forcefieldGUID;
|
||||
ObjectGuid _jammalanGUID;
|
||||
GuidList _dragonkinList;
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user