diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp index 01ff08710..b94ce4171 100644 --- a/src/game/ThreatManager.cpp +++ b/src/game/ThreatManager.cpp @@ -97,7 +97,11 @@ void HostilReference::addThreat(float pMod) if(!isOnline()) updateOnlineStatus(); if(pMod != 0.0f) - fireStatusChanged(ThreatRefStatusChangeEvent(UEV_THREAT_REF_THREAT_CHANGE, this, pMod)); + { + ThreatRefStatusChangeEvent event(UEV_THREAT_REF_THREAT_CHANGE, this, pMod); + fireStatusChanged(event); + } + if(isValid() && pMod >= 0) { Unit* victim_owner = getTarget()->GetOwner(); @@ -153,7 +157,9 @@ void HostilReference::setOnlineOfflineState(bool pIsOnline) iOnline = pIsOnline; if(!iOnline) setAccessibleState(false); // if not online that not accessable as well - fireStatusChanged(ThreatRefStatusChangeEvent(UEV_THREAT_REF_ONLINE_STATUS, this)); + + ThreatRefStatusChangeEvent event(UEV_THREAT_REF_ONLINE_STATUS, this); + fireStatusChanged(event); } } @@ -164,7 +170,9 @@ void HostilReference::setAccessibleState(bool pIsAccessible) if(iAccessible != pIsAccessible) { iAccessible = pIsAccessible; - fireStatusChanged(ThreatRefStatusChangeEvent(UEV_THREAT_REF_ASSECCIBLE_STATUS, this)); + + ThreatRefStatusChangeEvent event(UEV_THREAT_REF_ASSECCIBLE_STATUS, this); + fireStatusChanged(event); } } @@ -175,7 +183,9 @@ void HostilReference::setAccessibleState(bool pIsAccessible) void HostilReference::removeReference() { invalidate(); - fireStatusChanged(ThreatRefStatusChangeEvent(UEV_THREAT_REF_REMOVE_FROM_LIST, this)); + + ThreatRefStatusChangeEvent event(UEV_THREAT_REF_REMOVE_FROM_LIST, this); + fireStatusChanged(event); } //============================================================ diff --git a/src/game/ThreatManager.h b/src/game/ThreatManager.h index 46c092b36..d569480f9 100644 --- a/src/game/ThreatManager.h +++ b/src/game/ThreatManager.h @@ -43,20 +43,8 @@ class ThreatCalcHelper }; //============================================================== - class MANGOS_DLL_SPEC HostilReference : public Reference { - private: - float iThreat; - float iTempThreatModifyer; // used for taunt - uint64 iUnitGuid; - bool iOnline; - bool iAccessible; - private: - // Inform the source, that the status of that reference was changed - void fireStatusChanged(ThreatRefStatusChangeEvent& pThreatRefStatusChangeEvent); - - Unit* getSourceUnit(); public: HostilReference(Unit* pUnit, ThreatManager *pThreatManager, float pThreat); @@ -123,6 +111,17 @@ class MANGOS_DLL_SPEC HostilReference : public Reference // Tell our refFrom (source) object, that the link is cut (Target destroyed) void sourceObjectDestroyLink(); + private: + // Inform the source, that the status of that reference was changed + void fireStatusChanged(ThreatRefStatusChangeEvent& pThreatRefStatusChangeEvent); + + Unit* getSourceUnit(); + private: + float iThreat; + float iTempThreatModifyer; // used for taunt + uint64 iUnitGuid; + bool iOnline; + bool iAccessible; }; //============================================================== diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 20e4dcded..b16a4c43d 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7619" + #define REVISION_NR "7620" #endif // __REVISION_NR_H__