[7620] Make GCC happy. Restore build at Unix/Linux.

This commit is contained in:
VladimirMangos 2009-04-05 19:50:49 +04:00
parent 0f23722eb8
commit 2c06d207a7
3 changed files with 26 additions and 17 deletions

View file

@ -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);
}
//============================================================

View file

@ -43,20 +43,8 @@ class ThreatCalcHelper
};
//==============================================================
class MANGOS_DLL_SPEC HostilReference : public Reference<Unit, ThreatManager>
{
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<Unit, ThreatManager>
// 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;
};
//==============================================================

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7619"
#define REVISION_NR "7620"
#endif // __REVISION_NR_H__