[9038] Update highest threat enemy at move to offline list.

It will restored if still highest at move back and fix
at least visual bug with GM-mode on still show for GM
as highest threat enemy for creature.
This commit is contained in:
VladimirMangos 2009-12-20 22:37:11 +03:00
parent 15de428242
commit 6adfd75040
2 changed files with 3 additions and 2 deletions

View file

@ -512,6 +512,7 @@ void ThreatManager::processThreatEvent(ThreatRefStatusChangeEvent* threatRefStat
setCurrentVictim(NULL); setCurrentVictim(NULL);
setDirty(true); setDirty(true);
} }
iOwner->SendThreatRemove(hostileReference);
iThreatContainer.remove(hostileReference); iThreatContainer.remove(hostileReference);
iUpdateNeed = true; iUpdateNeed = true;
iThreatOfflineContainer.addReference(hostileReference); iThreatOfflineContainer.addReference(hostileReference);
@ -531,9 +532,9 @@ void ThreatManager::processThreatEvent(ThreatRefStatusChangeEvent* threatRefStat
setCurrentVictim(NULL); setCurrentVictim(NULL);
setDirty(true); setDirty(true);
} }
iOwner->SendThreatRemove(hostileReference);
if(hostileReference->isOnline()) if(hostileReference->isOnline())
{ {
iOwner->SendThreatRemove(hostileReference);
iThreatContainer.remove(hostileReference); iThreatContainer.remove(hostileReference);
iUpdateNeed = true; iUpdateNeed = true;
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9037" #define REVISION_NR "9038"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__