Implement expected combat stop with friendly faction. by VladimirMangos
--HG-- branch : trunk
This commit is contained in:
1 parent
3796af3658
commit
cd9f84aae5
5 files changed
+62
-2
No files matched your search
@@ -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