mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[7620] Make GCC happy. Restore build at Unix/Linux.
This commit is contained in:
parent
0f23722eb8
commit
2c06d207a7
3 changed files with 26 additions and 17 deletions
|
|
@ -97,7 +97,11 @@ void HostilReference::addThreat(float pMod)
|
||||||
if(!isOnline())
|
if(!isOnline())
|
||||||
updateOnlineStatus();
|
updateOnlineStatus();
|
||||||
if(pMod != 0.0f)
|
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)
|
if(isValid() && pMod >= 0)
|
||||||
{
|
{
|
||||||
Unit* victim_owner = getTarget()->GetOwner();
|
Unit* victim_owner = getTarget()->GetOwner();
|
||||||
|
|
@ -153,7 +157,9 @@ void HostilReference::setOnlineOfflineState(bool pIsOnline)
|
||||||
iOnline = pIsOnline;
|
iOnline = pIsOnline;
|
||||||
if(!iOnline)
|
if(!iOnline)
|
||||||
setAccessibleState(false); // if not online that not accessable as well
|
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)
|
if(iAccessible != pIsAccessible)
|
||||||
{
|
{
|
||||||
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()
|
void HostilReference::removeReference()
|
||||||
{
|
{
|
||||||
invalidate();
|
invalidate();
|
||||||
fireStatusChanged(ThreatRefStatusChangeEvent(UEV_THREAT_REF_REMOVE_FROM_LIST, this));
|
|
||||||
|
ThreatRefStatusChangeEvent event(UEV_THREAT_REF_REMOVE_FROM_LIST, this);
|
||||||
|
fireStatusChanged(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
|
||||||
|
|
@ -43,20 +43,8 @@ class ThreatCalcHelper
|
||||||
};
|
};
|
||||||
|
|
||||||
//==============================================================
|
//==============================================================
|
||||||
|
|
||||||
class MANGOS_DLL_SPEC HostilReference : public Reference<Unit, ThreatManager>
|
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:
|
public:
|
||||||
HostilReference(Unit* pUnit, ThreatManager *pThreatManager, float pThreat);
|
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)
|
// Tell our refFrom (source) object, that the link is cut (Target destroyed)
|
||||||
void sourceObjectDestroyLink();
|
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
//==============================================================
|
//==============================================================
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7619"
|
#define REVISION_NR "7620"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue