aboutsummaryrefslogtreecommitdiff
path: root/src/game/HostilRefManager.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-18 18:38:46 -0700
committermaximius <none@none>2009-10-18 18:38:46 -0700
commitd22768a6b5aa3eae1c58a418425eca08905cd677 (patch)
treed229851a558defcbaf3fb010947a80726d01c8c6 /src/game/HostilRefManager.cpp
parent864b3f31e94e46077634ec6bfcad1769f4f2c889 (diff)
*Cleanup
--HG-- branch : trunk
Diffstat (limited to 'src/game/HostilRefManager.cpp')
-rw-r--r--src/game/HostilRefManager.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/game/HostilRefManager.cpp b/src/game/HostilRefManager.cpp
index 4a51d54248d..48938dff71b 100644
--- a/src/game/HostilRefManager.cpp
+++ b/src/game/HostilRefManager.cpp
@@ -34,33 +34,33 @@ HostilRefManager::~HostilRefManager()
// The pVictim is hated than by them as well
// use for buffs and healing threat functionality
-void HostilRefManager::threatAssist(Unit *pVictim, float pThreat, SpellEntry const *pThreatSpell, bool pSingleTarget)
+void HostilRefManager::threatAssist(Unit *pVictim, float fThreat, SpellEntry const *pThreatSpell, bool pSingleTarget)
{
HostilReference* ref;
- uint32 size = pSingleTarget ? 1 : getSize(); // if pSingleTarget do not devide threat
+ float size = pSingleTarget ? 1.0f : getSize(); // if pSingleTarget do not divide threat
ref = getFirst();
while(ref != NULL)
{
- float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, pThreat, (pThreatSpell ? GetSpellSchoolMask(pThreatSpell) : SPELL_SCHOOL_MASK_NORMAL), pThreatSpell);
+ float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, fThreat, (pThreatSpell ? GetSpellSchoolMask(pThreatSpell) : SPELL_SCHOOL_MASK_NORMAL), pThreatSpell);
if(pVictim == getOwner())
- ref->addThreat(float (threat) / size); // It is faster to modify the threat durectly if possible
+ ref->addThreat(threat / size); // It is faster to modify the threat durectly if possible
else
- ref->getSource()->addThreat(pVictim, float (threat) / size);
+ ref->getSource()->addThreat(pVictim, threat / size);
ref = ref->next();
}
}
//=================================================
-void HostilRefManager::addThreatPercent(int32 pValue)
+void HostilRefManager::addThreatPercent(int32 iPercent)
{
HostilReference* ref;
ref = getFirst();
- while(ref != NULL)
+ while (ref != NULL)
{
- ref->addThreatPercent(pValue);
+ ref->addThreatPercent(iPercent);
ref = ref->next();
}
}
@@ -68,14 +68,14 @@ void HostilRefManager::addThreatPercent(int32 pValue)
//=================================================
// The online / offline status is given to the method. The calculation has to be done before
-void HostilRefManager::setOnlineOfflineState(bool pIsOnline)
+void HostilRefManager::setOnlineOfflineState(bool bIsOnline)
{
HostilReference* ref;
ref = getFirst();
while(ref != NULL)
{
- ref->setOnlineOfflineState(pIsOnline);
+ ref->setOnlineOfflineState(bIsOnline);
ref = ref->next();
}
}
@@ -131,7 +131,7 @@ void HostilRefManager::deleteReference(Unit *pCreature)
//=================================================
// set state for one reference, defined by Unit
-void HostilRefManager::setOnlineOfflineState(Unit *pCreature,bool pIsOnline)
+void HostilRefManager::setOnlineOfflineState(Unit *pCreature, bool bIsOnline)
{
HostilReference* ref = getFirst();
while(ref)
@@ -139,7 +139,7 @@ void HostilRefManager::setOnlineOfflineState(Unit *pCreature,bool pIsOnline)
HostilReference* nextRef = ref->next();
if(ref->getSource()->getOwner() == pCreature)
{
- ref->setOnlineOfflineState(pIsOnline);
+ ref->setOnlineOfflineState(bIsOnline);
break;
}
ref = nextRef;