mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
[12026] Replace std containers of ObjectGuids with some predefined types
Based on patch by stfx Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
b607d6a3fd
commit
0e0a765312
27 changed files with 57 additions and 68 deletions
|
|
@ -237,7 +237,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
|
|||
|
||||
ObjectGuid auctioneerGuid;
|
||||
uint32 etime, bid, buyout, itemCount;
|
||||
std::vector<ObjectGuid> guids;
|
||||
GuidVector guids;
|
||||
std::vector<uint32> stackSizes;
|
||||
|
||||
recv_data >> auctioneerGuid;
|
||||
|
|
|
|||
|
|
@ -1473,7 +1473,7 @@ void BattleGround::OnObjectDBLoad(Creature* creature)
|
|||
|
||||
ObjectGuid BattleGround::GetSingleCreatureGuid(uint8 event1, uint8 event2)
|
||||
{
|
||||
BGCreatures::const_iterator itr = m_EventObjects[MAKE_PAIR32(event1, event2)].creatures.begin();
|
||||
GuidVector::const_iterator itr = m_EventObjects[MAKE_PAIR32(event1, event2)].creatures.begin();
|
||||
if (itr != m_EventObjects[MAKE_PAIR32(event1, event2)].creatures.end())
|
||||
return *itr;
|
||||
return ObjectGuid();
|
||||
|
|
@ -1523,7 +1523,7 @@ void BattleGround::OpenDoorEvent(uint8 event1, uint8 event2 /*=0*/)
|
|||
sLog.outError("BattleGround:OpenDoorEvent this event isn't active event1:%u event2:%u", event1, event2);
|
||||
return;
|
||||
}
|
||||
BGObjects::const_iterator itr = m_EventObjects[MAKE_PAIR32(event1, event2)].gameobjects.begin();
|
||||
GuidVector::const_iterator itr = m_EventObjects[MAKE_PAIR32(event1, event2)].gameobjects.begin();
|
||||
for(; itr != m_EventObjects[MAKE_PAIR32(event1, event2)].gameobjects.end(); ++itr)
|
||||
DoorOpen(*itr);
|
||||
}
|
||||
|
|
@ -1545,10 +1545,10 @@ void BattleGround::SpawnEvent(uint8 event1, uint8 event2, bool spawn)
|
|||
else
|
||||
m_ActiveEvents[event1] = BG_EVENT_NONE; // no event active if event2 gets despawned
|
||||
|
||||
BGCreatures::const_iterator itr = m_EventObjects[MAKE_PAIR32(event1, event2)].creatures.begin();
|
||||
GuidVector::const_iterator itr = m_EventObjects[MAKE_PAIR32(event1, event2)].creatures.begin();
|
||||
for(; itr != m_EventObjects[MAKE_PAIR32(event1, event2)].creatures.end(); ++itr)
|
||||
SpawnBGCreature(*itr, (spawn) ? RESPAWN_IMMEDIATELY : RESPAWN_ONE_DAY);
|
||||
BGObjects::const_iterator itr2 = m_EventObjects[MAKE_PAIR32(event1, event2)].gameobjects.begin();
|
||||
GuidVector::const_iterator itr2 = m_EventObjects[MAKE_PAIR32(event1, event2)].gameobjects.begin();
|
||||
for(; itr2 != m_EventObjects[MAKE_PAIR32(event1, event2)].gameobjects.end(); ++itr2)
|
||||
SpawnBGObject(*itr2, (spawn) ? RESPAWN_IMMEDIATELY : RESPAWN_ONE_DAY);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -497,11 +497,8 @@ class BattleGround
|
|||
|
||||
void HandleTriggerBuff(ObjectGuid go_guid);
|
||||
|
||||
// TODO: make this protected:
|
||||
typedef std::vector<ObjectGuid> BGObjects;
|
||||
typedef std::vector<ObjectGuid> BGCreatures;
|
||||
// TODO drop m_BGObjects
|
||||
BGObjects m_BgObjects;
|
||||
GuidVector m_BgObjects;
|
||||
void SpawnBGObject(ObjectGuid guid, uint32 respawntime);
|
||||
bool AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime = 0);
|
||||
void SpawnBGCreature(ObjectGuid guid, uint32 respawntime);
|
||||
|
|
@ -523,8 +520,8 @@ class BattleGround
|
|||
|
||||
struct EventObjects
|
||||
{
|
||||
BGObjects gameobjects;
|
||||
BGCreatures creatures;
|
||||
GuidVector gameobjects;
|
||||
GuidVector creatures;
|
||||
};
|
||||
|
||||
// cause we create it dynamicly i use a map - to avoid resizing when
|
||||
|
|
|
|||
|
|
@ -317,8 +317,7 @@ class BattleGroundEY : public BattleGround
|
|||
Team m_PointOwnedByTeam[BG_EY_NODES_MAX];
|
||||
uint8 m_PointState[BG_EY_NODES_MAX];
|
||||
int32 m_PointBarStatus[BG_EY_NODES_MAX];
|
||||
typedef std::vector<ObjectGuid> PlayersNearPointType;
|
||||
PlayersNearPointType m_PlayersNearPoint[BG_EY_NODES_MAX_WITH_SPEIAL];
|
||||
GuidVector m_PlayersNearPoint[BG_EY_NODES_MAX_WITH_SPEIAL];
|
||||
uint8 m_CurrentPointPlayersCount[2*BG_EY_NODES_MAX];
|
||||
|
||||
int32 m_PointAddingTimer;
|
||||
|
|
|
|||
|
|
@ -278,7 +278,6 @@ class Channel
|
|||
|
||||
typedef std::map<ObjectGuid, PlayerInfo> PlayerList;
|
||||
PlayerList m_players;
|
||||
typedef std::set<ObjectGuid> BannedList;
|
||||
BannedList m_banned;
|
||||
GuidSet m_banned;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2449,7 +2449,7 @@ void Creature::ApplyGameEventSpells(GameEventCreatureData const* eventData, bool
|
|||
CastSpell(this, cast_spell, true);
|
||||
}
|
||||
|
||||
void Creature::FillGuidsListFromThreatList( std::vector<ObjectGuid>& guids, uint32 maxamount /*= 0*/ )
|
||||
void Creature::FillGuidsListFromThreatList(GuidVector& guids, uint32 maxamount /*= 0*/)
|
||||
{
|
||||
if (!CanHaveThreatList())
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
bool CanTrainAndResetTalentsOf(Player* pPlayer) const;
|
||||
|
||||
bool IsOutOfThreatArea(Unit* pVictim) const;
|
||||
void FillGuidsListFromThreatList(std::vector<ObjectGuid>& guids, uint32 maxamount = 0);
|
||||
void FillGuidsListFromThreatList(GuidVector& guids, uint32 maxamount = 0);
|
||||
|
||||
bool IsImmuneToSpell(SpellEntry const* spellInfo);
|
||||
// redefine Unit::IsImmuneToSpell
|
||||
|
|
@ -767,9 +767,9 @@ class AssistDelayEvent : public BasicEvent
|
|||
private:
|
||||
AssistDelayEvent();
|
||||
|
||||
ObjectGuid m_victimGuid;
|
||||
std::vector<ObjectGuid> m_assistantGuids;
|
||||
Unit& m_owner;
|
||||
ObjectGuid m_victimGuid;
|
||||
GuidVector m_assistantGuids;
|
||||
Unit& m_owner;
|
||||
};
|
||||
|
||||
class ForcedDespawnDelayEvent : public BasicEvent
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ class CreatureLinkingHolder
|
|||
bool TryFollowMaster(Creature* pCreature);
|
||||
|
||||
private:
|
||||
typedef std::list<ObjectGuid> GuidList;
|
||||
// Structure associated to a master (entry case)
|
||||
struct InfoAndGuids
|
||||
{
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ void DynamicObject::Delete()
|
|||
void DynamicObject::Delay(int32 delaytime)
|
||||
{
|
||||
m_aliveDuration -= delaytime;
|
||||
for(AffectedSet::iterator iter = m_affected.begin(); iter != m_affected.end(); )
|
||||
for (GuidSet::iterator iter = m_affected.begin(); iter != m_affected.end(); )
|
||||
{
|
||||
Unit *target = GetMap()->GetUnit((*iter));
|
||||
if (target)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ struct SpellEntry;
|
|||
class DynamicObject : public WorldObject
|
||||
{
|
||||
public:
|
||||
typedef std::set<ObjectGuid> AffectedSet;
|
||||
explicit DynamicObject();
|
||||
|
||||
void AddToWorld();
|
||||
|
|
@ -74,7 +73,7 @@ class DynamicObject : public WorldObject
|
|||
int32 m_aliveDuration;
|
||||
float m_radius; // radius apply persistent effect, 0 = no persistent effect
|
||||
bool m_positive;
|
||||
AffectedSet m_affected;
|
||||
GuidSet m_affected;
|
||||
private:
|
||||
GridReference<DynamicObject> m_gridRef;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ void GameObject::Update(uint32 update_diff, uint32 /*p_time*/)
|
|||
|
||||
if (spellId)
|
||||
{
|
||||
for (GuidsSet::const_iterator itr = m_UniqueUsers.begin(); itr != m_UniqueUsers.end(); ++itr)
|
||||
for (GuidSet::const_iterator itr = m_UniqueUsers.begin(); itr != m_UniqueUsers.end(); ++itr)
|
||||
{
|
||||
if (Player* owner = GetMap()->GetPlayer(*itr))
|
||||
owner->CastSpell(owner, spellId, false, NULL, NULL, GetObjectGuid());
|
||||
|
|
|
|||
|
|
@ -760,15 +760,13 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
|
|||
time_t m_cooldownTime; // used as internal reaction delay time store (not state change reaction).
|
||||
// For traps/goober this: spell casting cooldown, for doors/buttons: reset time.
|
||||
|
||||
typedef std::set<ObjectGuid> GuidsSet;
|
||||
|
||||
GuidsSet m_SkillupSet; // players that already have skill-up at GO use
|
||||
GuidSet m_SkillupSet; // players that already have skill-up at GO use
|
||||
|
||||
uint32 m_useTimes; // amount uses/charges triggered
|
||||
|
||||
// collected only for GAMEOBJECT_TYPE_SUMMONING_RITUAL
|
||||
ObjectGuid m_firstUser; // first GO user, in most used cases owner, but in some cases no, for example non-summoned multi-use GAMEOBJECT_TYPE_SUMMONING_RITUAL
|
||||
GuidsSet m_UniqueUsers; // all players who use item, some items activated after specific amount unique uses
|
||||
GuidSet m_UniqueUsers; // all players who use item, some items activated after specific amount unique uses
|
||||
|
||||
GameObjectInfo const* m_goInfo;
|
||||
GameObjectDisplayInfoEntry const* m_displayInfo;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ VisibleNotifier::Notify()
|
|||
|
||||
// generate outOfRange for not iterate objects
|
||||
i_data.AddOutOfRangeGUID(i_clientGUIDs);
|
||||
for(ObjectGuidSet::iterator itr = i_clientGUIDs.begin();itr!=i_clientGUIDs.end();++itr)
|
||||
for(GuidSet::iterator itr = i_clientGUIDs.begin();itr!=i_clientGUIDs.end();++itr)
|
||||
{
|
||||
player.m_clientGUIDs.erase(*itr);
|
||||
|
||||
|
|
@ -75,8 +75,8 @@ VisibleNotifier::Notify()
|
|||
player.GetSession()->SendPacket(&packet);
|
||||
|
||||
// send out of range to other players if need
|
||||
ObjectGuidSet const& oor = i_data.GetOutOfRangeGUIDs();
|
||||
for(ObjectGuidSet::const_iterator iter = oor.begin(); iter != oor.end(); ++iter)
|
||||
GuidSet const& oor = i_data.GetOutOfRangeGUIDs();
|
||||
for(GuidSet::const_iterator iter = oor.begin(); iter != oor.end(); ++iter)
|
||||
{
|
||||
if (!iter->IsPlayer())
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace MaNGOS
|
|||
{
|
||||
Camera& i_camera;
|
||||
UpdateData i_data;
|
||||
ObjectGuidSet i_clientGUIDs;
|
||||
GuidSet i_clientGUIDs;
|
||||
std::set<WorldObject*> i_visibleNow;
|
||||
|
||||
explicit VisibleNotifier(Camera &c) : i_camera(c), i_clientGUIDs(c.GetOwner()->m_clientGUIDs) {}
|
||||
|
|
|
|||
|
|
@ -585,8 +585,8 @@ void Loot::NotifyItemRemoved(uint8 lootIndex)
|
|||
{
|
||||
// notify all players that are looting this that the item was removed
|
||||
// convert the index to the slot the player sees
|
||||
PlayersLooting::iterator i_next;
|
||||
for (PlayersLooting::iterator i = m_playersLooting.begin(); i != m_playersLooting.end(); i = i_next)
|
||||
GuidSet::iterator i_next;
|
||||
for (GuidSet::iterator i = m_playersLooting.begin(); i != m_playersLooting.end(); i = i_next)
|
||||
{
|
||||
i_next = i;
|
||||
++i_next;
|
||||
|
|
@ -600,8 +600,8 @@ void Loot::NotifyItemRemoved(uint8 lootIndex)
|
|||
void Loot::NotifyMoneyRemoved()
|
||||
{
|
||||
// notify all players that are looting this that the money was removed
|
||||
PlayersLooting::iterator i_next;
|
||||
for (PlayersLooting::iterator i = m_playersLooting.begin(); i != m_playersLooting.end(); i = i_next)
|
||||
GuidSet::iterator i_next;
|
||||
for (GuidSet::iterator i = m_playersLooting.begin(); i != m_playersLooting.end(); i = i_next)
|
||||
{
|
||||
i_next = i;
|
||||
++i_next;
|
||||
|
|
@ -619,8 +619,8 @@ void Loot::NotifyQuestItemRemoved(uint8 questIndex)
|
|||
// (other questitems can be looted by each group member)
|
||||
// bit inefficient but isnt called often
|
||||
|
||||
PlayersLooting::iterator i_next;
|
||||
for (PlayersLooting::iterator i = m_playersLooting.begin(); i != m_playersLooting.end(); i = i_next)
|
||||
GuidSet::iterator i_next;
|
||||
for (GuidSet::iterator i = m_playersLooting.begin(); i != m_playersLooting.end(); i = i_next)
|
||||
{
|
||||
i_next = i;
|
||||
++i_next;
|
||||
|
|
|
|||
|
|
@ -303,8 +303,7 @@ struct Loot
|
|||
|
||||
LootItemList m_questItems;
|
||||
|
||||
typedef std::set<ObjectGuid> PlayersLooting;
|
||||
PlayersLooting m_playersLooting;
|
||||
GuidSet m_playersLooting;
|
||||
|
||||
QuestItemMap m_playerQuestItems;
|
||||
QuestItemMap m_playerFFAItems;
|
||||
|
|
|
|||
|
|
@ -206,7 +206,10 @@ class MANGOS_DLL_SPEC ObjectGuid
|
|||
uint64 m_guid;
|
||||
};
|
||||
|
||||
typedef std::set<ObjectGuid> ObjectGuidSet;
|
||||
// Some Shared defines
|
||||
typedef std::set<ObjectGuid> GuidSet;
|
||||
typedef std::list<ObjectGuid> GuidList;
|
||||
typedef std::vector<ObjectGuid> GuidVector;
|
||||
|
||||
//minimum buffer size for packed guid is 9 bytes
|
||||
#define PACKED_GUID_MIN_BUFFER_SIZE 9
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ void PetAI::UpdateAI(const uint32 diff)
|
|||
else
|
||||
{
|
||||
bool spellUsed = false;
|
||||
for (AllySet::const_iterator tar = m_AllySet.begin(); tar != m_AllySet.end(); ++tar)
|
||||
for (GuidSet::const_iterator tar = m_AllySet.begin(); tar != m_AllySet.end(); ++tar)
|
||||
{
|
||||
Unit* Target = m_creature->GetMap()->GetUnit(*tar);
|
||||
|
||||
|
|
|
|||
|
|
@ -51,8 +51,7 @@ class MANGOS_DLL_DECL PetAI : public CreatureAI
|
|||
TimeTracker i_tracker;
|
||||
bool inCombat;
|
||||
|
||||
typedef std::set<ObjectGuid> AllySet;
|
||||
AllySet m_AllySet;
|
||||
GuidSet m_AllySet;
|
||||
uint32 m_updateAlliesTimer;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20079,13 +20079,13 @@ void Player::UpdateVisibilityOf(WorldObject const* viewPoint, WorldObject* targe
|
|||
}
|
||||
|
||||
template<class T>
|
||||
inline void UpdateVisibilityOf_helper(ObjectGuidSet& s64, T* target)
|
||||
inline void UpdateVisibilityOf_helper(GuidSet& s64, T* target)
|
||||
{
|
||||
s64.insert(target->GetObjectGuid());
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void UpdateVisibilityOf_helper(ObjectGuidSet& s64, GameObject* target)
|
||||
inline void UpdateVisibilityOf_helper(GuidSet& s64, GameObject* target)
|
||||
{
|
||||
if(!target->IsTransport())
|
||||
s64.insert(target->GetObjectGuid());
|
||||
|
|
@ -20782,7 +20782,7 @@ void Player::UpdateForQuestWorldObjects()
|
|||
|
||||
UpdateData udata;
|
||||
WorldPacket packet;
|
||||
for(ObjectGuidSet::const_iterator itr=m_clientGUIDs.begin(); itr!=m_clientGUIDs.end(); ++itr)
|
||||
for(GuidSet::const_iterator itr=m_clientGUIDs.begin(); itr!=m_clientGUIDs.end(); ++itr)
|
||||
{
|
||||
if (itr->IsGameObject())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2212,7 +2212,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
Object* GetObjectByTypeMask(ObjectGuid guid, TypeMask typemask);
|
||||
|
||||
// currently visible objects at player client
|
||||
ObjectGuidSet m_clientGUIDs;
|
||||
GuidSet m_clientGUIDs;
|
||||
|
||||
bool HaveAtClient(WorldObject const* u) { return u==this || m_clientGUIDs.find(u->GetObjectGuid())!=m_clientGUIDs.end(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket
|
|||
WorldPacket data(SMSG_QUESTGIVER_STATUS_MULTIPLE, 4);
|
||||
data << uint32(count); // placeholder
|
||||
|
||||
for(ObjectGuidSet::const_iterator itr = _player->m_clientGUIDs.begin(); itr != _player->m_clientGUIDs.end(); ++itr)
|
||||
for(GuidSet::const_iterator itr = _player->m_clientGUIDs.begin(); itr != _player->m_clientGUIDs.end(); ++itr)
|
||||
{
|
||||
uint8 dialogStatus = DIALOG_STATUS_NONE;
|
||||
|
||||
|
|
|
|||
|
|
@ -4944,7 +4944,7 @@ void Unit::RemoveDynObject(uint32 spellid)
|
|||
{
|
||||
if(m_dynObjGUIDs.empty())
|
||||
return;
|
||||
for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();)
|
||||
for (GuidList::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();)
|
||||
{
|
||||
DynamicObject* dynObj = GetMap()->GetDynamicObject(*i);
|
||||
if(!dynObj)
|
||||
|
|
@ -4973,7 +4973,7 @@ void Unit::RemoveAllDynObjects()
|
|||
|
||||
DynamicObject * Unit::GetDynObject(uint32 spellId, SpellEffectIndex effIndex)
|
||||
{
|
||||
for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();)
|
||||
for (GuidList::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();)
|
||||
{
|
||||
DynamicObject* dynObj = GetMap()->GetDynamicObject(*i);
|
||||
if(!dynObj)
|
||||
|
|
@ -4991,7 +4991,7 @@ DynamicObject * Unit::GetDynObject(uint32 spellId, SpellEffectIndex effIndex)
|
|||
|
||||
DynamicObject * Unit::GetDynObject(uint32 spellId)
|
||||
{
|
||||
for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();)
|
||||
for (GuidList::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();)
|
||||
{
|
||||
DynamicObject* dynObj = GetMap()->GetDynamicObject(*i);
|
||||
if(!dynObj)
|
||||
|
|
@ -6030,7 +6030,7 @@ void Unit::RemoveGuardians()
|
|||
|
||||
Pet* Unit::FindGuardianWithEntry(uint32 entry)
|
||||
{
|
||||
for (GuardianPetList::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end(); ++itr)
|
||||
for (GuidSet::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end(); ++itr)
|
||||
if (Pet* pet = GetMap()->GetPet(*itr))
|
||||
if (pet->GetEntry() == entry)
|
||||
return pet;
|
||||
|
|
@ -6040,7 +6040,7 @@ Pet* Unit::FindGuardianWithEntry(uint32 entry)
|
|||
|
||||
Pet* Unit::GetProtectorPet()
|
||||
{
|
||||
for (GuardianPetList::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end(); ++itr)
|
||||
for (GuidSet::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end(); ++itr)
|
||||
if (Pet* pet = GetMap()->GetPet(*itr))
|
||||
if (pet->getPetType() == PROTECTOR_PET)
|
||||
return pet;
|
||||
|
|
|
|||
|
|
@ -1062,8 +1062,6 @@ enum IgnoreUnitState
|
|||
IGNORE_UNIT_TARGET_NON_FROZEN = 126, // ignore absent of frozen state
|
||||
};
|
||||
|
||||
typedef std::set<ObjectGuid> GuardianPetList;
|
||||
|
||||
// delay time next attack to prevent client attack animation problems
|
||||
#define ATTACK_DISPLAY_DELAY 200
|
||||
#define MAX_PLAYER_STEALTH_DETECT_RANGE 45.0f // max distance for detection targets by player
|
||||
|
|
@ -1930,8 +1928,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
|
||||
SingleCastSpellTargetMap m_singleCastSpellTargets; // casted by unit single per-caster auras
|
||||
|
||||
typedef std::list<ObjectGuid> DynObjectGUIDs;
|
||||
DynObjectGUIDs m_dynObjGUIDs;
|
||||
GuidList m_dynObjGUIDs;
|
||||
|
||||
typedef std::list<GameObject*> GameObjectList;
|
||||
GameObjectList m_gameObj;
|
||||
|
|
@ -1996,7 +1993,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
|
||||
ComboPointHolderSet m_ComboPointHolders;
|
||||
|
||||
GuardianPetList m_guardianPets;
|
||||
GuidSet m_guardianPets;
|
||||
|
||||
ObjectGuid m_TotemSlot[MAX_TOTEM_SLOT];
|
||||
|
||||
|
|
@ -2030,7 +2027,7 @@ void Unit::CallForAllControlledUnits(Func const& func, uint32 controlledMask)
|
|||
|
||||
if (controlledMask & CONTROLLED_GUARDIANS)
|
||||
{
|
||||
for(GuardianPetList::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end();)
|
||||
for (GuidSet::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end();)
|
||||
if (Pet* guardian = _GetPet(*(itr++)))
|
||||
func(guardian);
|
||||
}
|
||||
|
|
@ -2063,7 +2060,7 @@ bool Unit::CheckAllControlledUnits(Func const& func, uint32 controlledMask) cons
|
|||
|
||||
if (controlledMask & CONTROLLED_GUARDIANS)
|
||||
{
|
||||
for(GuardianPetList::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end();)
|
||||
for (GuidSet::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end();)
|
||||
if (Pet const* guardian = _GetPet(*(itr++)))
|
||||
if (func(guardian))
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ UpdateData::UpdateData() : m_blockCount(0)
|
|||
{
|
||||
}
|
||||
|
||||
void UpdateData::AddOutOfRangeGUID(ObjectGuidSet& guids)
|
||||
void UpdateData::AddOutOfRangeGUID(GuidSet& guids)
|
||||
{
|
||||
m_outOfRangeGUIDs.insert(guids.begin(),guids.end());
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@ bool UpdateData::BuildPacket(WorldPacket *packet)
|
|||
buf << (uint8) UPDATETYPE_OUT_OF_RANGE_OBJECTS;
|
||||
buf << (uint32) m_outOfRangeGUIDs.size();
|
||||
|
||||
for(ObjectGuidSet::const_iterator i = m_outOfRangeGUIDs.begin(); i != m_outOfRangeGUIDs.end(); ++i)
|
||||
for(GuidSet::const_iterator i = m_outOfRangeGUIDs.begin(); i != m_outOfRangeGUIDs.end(); ++i)
|
||||
buf << i->WriteAsPacked();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,18 +54,18 @@ class UpdateData
|
|||
public:
|
||||
UpdateData();
|
||||
|
||||
void AddOutOfRangeGUID(ObjectGuidSet& guids);
|
||||
void AddOutOfRangeGUID(GuidSet& guids);
|
||||
void AddOutOfRangeGUID(ObjectGuid const &guid);
|
||||
void AddUpdateBlock(const ByteBuffer &block);
|
||||
bool BuildPacket(WorldPacket *packet);
|
||||
bool HasData() { return m_blockCount > 0 || !m_outOfRangeGUIDs.empty(); }
|
||||
void Clear();
|
||||
|
||||
ObjectGuidSet const& GetOutOfRangeGUIDs() const { return m_outOfRangeGUIDs; }
|
||||
GuidSet const& GetOutOfRangeGUIDs() const { return m_outOfRangeGUIDs; }
|
||||
|
||||
protected:
|
||||
uint32 m_blockCount;
|
||||
ObjectGuidSet m_outOfRangeGUIDs;
|
||||
GuidSet m_outOfRangeGUIDs;
|
||||
ByteBuffer m_data;
|
||||
|
||||
void Compress(void* dst, uint32 *dst_size, void* src, int src_size);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12025"
|
||||
#define REVISION_NR "12026"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue