mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +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
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue