mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Implement expected combat stop with friendly faction. by VladimirMangos
--HG-- branch : trunk
This commit is contained in:
@@ -109,6 +109,24 @@ void HostilRefManager::deleteReferences()
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================
|
||||
// delete one reference, defined by faction
|
||||
|
||||
void HostilRefManager::deleteReferencesForFaction(uint32 faction)
|
||||
{
|
||||
HostilReference* ref = getFirst();
|
||||
while(ref)
|
||||
{
|
||||
HostilReference* nextRef = ref->next();
|
||||
if(ref->getSource()->getOwner()->getFactionTemplateEntry()->faction == faction)
|
||||
{
|
||||
ref->removeReference();
|
||||
delete ref;
|
||||
}
|
||||
ref = nextRef;
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================
|
||||
// delete one reference, defined by Unit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user