mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[8867] Implement expected combat stop with friendly faction
In case force reaction apply/remove.
This commit is contained in:
parent
670a2dbb4c
commit
e6efe02020
6 changed files with 69 additions and 3 deletions
|
|
@ -107,6 +107,24 @@ void HostileRefManager::deleteReferences()
|
|||
}
|
||||
}
|
||||
|
||||
//=================================================
|
||||
// delete one reference, defined by faction
|
||||
|
||||
void HostileRefManager::deleteReferencesForFaction(uint32 faction)
|
||||
{
|
||||
HostileReference* ref = getFirst();
|
||||
while(ref)
|
||||
{
|
||||
HostileReference* nextRef = ref->next();
|
||||
if(ref->getSource()->getOwner()->getFactionTemplateEntry()->faction == faction)
|
||||
{
|
||||
ref->removeReference();
|
||||
delete ref;
|
||||
}
|
||||
ref = nextRef;
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================
|
||||
// delete one reference, defined by Unit
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue