diff options
Diffstat (limited to 'src/server/game/Combat/ThreatManager.cpp')
-rw-r--r-- | src/server/game/Combat/ThreatManager.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index c858314dc16..005e8fad2a8 100644 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -44,7 +44,7 @@ float ThreatCalcHelper::calcThreat(Unit* hatedUnit, Unit* /*hatingUnit*/, float return threat; if (Player* modOwner = hatedUnit->GetSpellModOwner()) - modOwner->ApplySpellMod<SPELLMOD_THREAT>(threatSpell->Id, threat); + modOwner->ApplySpellMod(threatSpell->Id, SPELLMOD_THREAT, threat); } return hatedUnit->ApplyTotalThreatModifier(threat, schoolMask); @@ -266,7 +266,7 @@ void ThreatContainer::clearReferences() HostileReference* ThreatContainer::getReferenceByTarget(Unit* victim) const { if (!victim) - return NULL; + return nullptr; ObjectGuid guid = victim->GetGUID(); for (ThreatContainer::StorageType::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i) @@ -276,7 +276,7 @@ HostileReference* ThreatContainer::getReferenceByTarget(Unit* victim) const return ref; } - return NULL; + return nullptr; } //============================================================ @@ -315,7 +315,7 @@ void ThreatContainer::update() HostileReference* ThreatContainer::selectNextVictim(Creature* attacker, HostileReference* currentVictim) const { - HostileReference* currentRef = NULL; + HostileReference* currentRef = nullptr; bool found = false; bool noPriorityTargetFound = false; @@ -380,7 +380,7 @@ HostileReference* ThreatContainer::selectNextVictim(Creature* attacker, HostileR ++iter; } if (!found) - currentRef = NULL; + currentRef = nullptr; return currentRef; } @@ -389,7 +389,7 @@ HostileReference* ThreatContainer::selectNextVictim(Creature* attacker, HostileR //=================== ThreatManager ========================== //============================================================ -ThreatManager::ThreatManager(Unit* owner) : iCurrentVictim(NULL), iOwner(owner), iUpdateTimer(THREAT_UPDATE_INTERVAL) { } +ThreatManager::ThreatManager(Unit* owner) : iCurrentVictim(nullptr), iOwner(owner), iUpdateTimer(THREAT_UPDATE_INTERVAL) { } //============================================================ @@ -397,7 +397,7 @@ void ThreatManager::clearReferences() { iThreatContainer.clearReferences(); iThreatOfflineContainer.clearReferences(); - iCurrentVictim = NULL; + iCurrentVictim = nullptr; iUpdateTimer = THREAT_UPDATE_INTERVAL; } @@ -465,7 +465,7 @@ Unit* ThreatManager::getHostilTarget() iThreatContainer.update(); HostileReference* nextVictim = iThreatContainer.selectNextVictim(GetOwner()->ToCreature(), getCurrentVictim()); setCurrentVictim(nextVictim); - return getCurrentVictim() != NULL ? getCurrentVictim()->getTarget() : NULL; + return getCurrentVictim() != nullptr ? getCurrentVictim()->getTarget() : nullptr; } //============================================================ @@ -535,7 +535,7 @@ void ThreatManager::processThreatEvent(ThreatRefStatusChangeEvent* threatRefStat { if (hostilRef == getCurrentVictim()) { - setCurrentVictim(NULL); + setCurrentVictim(nullptr); setDirty(true); } iOwner->SendRemoveFromThreatListOpcode(hostilRef); @@ -553,7 +553,7 @@ void ThreatManager::processThreatEvent(ThreatRefStatusChangeEvent* threatRefStat case UEV_THREAT_REF_REMOVE_FROM_LIST: if (hostilRef == getCurrentVictim()) { - setCurrentVictim(NULL); + setCurrentVictim(nullptr); setDirty(true); } iOwner->SendRemoveFromThreatListOpcode(hostilRef); |