mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 16:37:06 +00:00
Various Cleanups (game F-K)
This commit is contained in:
parent
c5c09cee3c
commit
2bd41afb3e
44 changed files with 1903 additions and 1881 deletions
|
|
@ -23,7 +23,7 @@
|
|||
#include "SpellMgr.h"
|
||||
#include "Map.h"
|
||||
|
||||
HostileRefManager::HostileRefManager( Unit *pOwner ) : iOwner(pOwner), m_redirectionMod(0.0f)
|
||||
HostileRefManager::HostileRefManager(Unit* pOwner) : iOwner(pOwner), m_redirectionMod(0.0f)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ HostileRefManager::~HostileRefManager()
|
|||
// The pVictim is hated than by them as well
|
||||
// use for buffs and healing threat functionality
|
||||
|
||||
void HostileRefManager::threatAssist(Unit *pVictim, float pThreat, SpellEntry const *pThreatSpell, bool pSingleTarget)
|
||||
void HostileRefManager::threatAssist(Unit* pVictim, float pThreat, SpellEntry const* pThreatSpell, bool pSingleTarget)
|
||||
{
|
||||
uint32 size = pSingleTarget ? 1 : getSize(); // if pSingleTarget do not devide threat
|
||||
float threat = pThreat/size;
|
||||
|
|
@ -58,7 +58,7 @@ void HostileRefManager::addThreatPercent(int32 pValue)
|
|||
HostileReference* ref;
|
||||
|
||||
ref = getFirst();
|
||||
while(ref != NULL)
|
||||
while (ref != NULL)
|
||||
{
|
||||
ref->addThreatPercent(pValue);
|
||||
ref = ref->next();
|
||||
|
|
@ -73,7 +73,7 @@ void HostileRefManager::setOnlineOfflineState(bool pIsOnline)
|
|||
HostileReference* ref;
|
||||
|
||||
ref = getFirst();
|
||||
while(ref != NULL)
|
||||
while (ref != NULL)
|
||||
{
|
||||
ref->setOnlineOfflineState(pIsOnline);
|
||||
ref = ref->next();
|
||||
|
|
@ -86,7 +86,7 @@ void HostileRefManager::setOnlineOfflineState(bool pIsOnline)
|
|||
void HostileRefManager::updateThreatTables()
|
||||
{
|
||||
HostileReference* ref = getFirst();
|
||||
while(ref)
|
||||
while (ref)
|
||||
{
|
||||
ref->updateOnlineStatus();
|
||||
ref = ref->next();
|
||||
|
|
@ -100,7 +100,7 @@ void HostileRefManager::updateThreatTables()
|
|||
void HostileRefManager::deleteReferences()
|
||||
{
|
||||
HostileReference* ref = getFirst();
|
||||
while(ref)
|
||||
while (ref)
|
||||
{
|
||||
HostileReference* nextRef = ref->next();
|
||||
ref->removeReference();
|
||||
|
|
@ -115,10 +115,10 @@ void HostileRefManager::deleteReferences()
|
|||
void HostileRefManager::deleteReferencesForFaction(uint32 faction)
|
||||
{
|
||||
HostileReference* ref = getFirst();
|
||||
while(ref)
|
||||
while (ref)
|
||||
{
|
||||
HostileReference* nextRef = ref->next();
|
||||
if(ref->getSource()->getOwner()->getFactionTemplateEntry()->faction == faction)
|
||||
if (ref->getSource()->getOwner()->getFactionTemplateEntry()->faction == faction)
|
||||
{
|
||||
ref->removeReference();
|
||||
delete ref;
|
||||
|
|
@ -130,13 +130,13 @@ void HostileRefManager::deleteReferencesForFaction(uint32 faction)
|
|||
//=================================================
|
||||
// delete one reference, defined by Unit
|
||||
|
||||
void HostileRefManager::deleteReference(Unit *pCreature)
|
||||
void HostileRefManager::deleteReference(Unit* pCreature)
|
||||
{
|
||||
HostileReference* ref = getFirst();
|
||||
while(ref)
|
||||
while (ref)
|
||||
{
|
||||
HostileReference* nextRef = ref->next();
|
||||
if(ref->getSource()->getOwner() == pCreature)
|
||||
if (ref->getSource()->getOwner() == pCreature)
|
||||
{
|
||||
ref->removeReference();
|
||||
delete ref;
|
||||
|
|
@ -149,13 +149,13 @@ void HostileRefManager::deleteReference(Unit *pCreature)
|
|||
//=================================================
|
||||
// set state for one reference, defined by Unit
|
||||
|
||||
void HostileRefManager::setOnlineOfflineState(Unit *pCreature,bool pIsOnline)
|
||||
void HostileRefManager::setOnlineOfflineState(Unit* pCreature,bool pIsOnline)
|
||||
{
|
||||
HostileReference* ref = getFirst();
|
||||
while(ref)
|
||||
while (ref)
|
||||
{
|
||||
HostileReference* nextRef = ref->next();
|
||||
if(ref->getSource()->getOwner() == pCreature)
|
||||
if (ref->getSource()->getOwner() == pCreature)
|
||||
{
|
||||
ref->setOnlineOfflineState(pIsOnline);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue