aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/BattleGround.cpp2
-rw-r--r--src/game/CMakeLists.txt4
-rw-r--r--src/game/Chat.cpp2
-rw-r--r--src/game/Chat.h2
-rw-r--r--src/game/CombatAI.cpp2
-rw-r--r--src/game/CreatureEventAI.cpp14
-rw-r--r--src/game/Debugcmds.cpp8
-rw-r--r--src/game/HostileRefManager.cpp (renamed from src/game/HostilRefManager.cpp)48
-rw-r--r--src/game/HostileRefManager.h (renamed from src/game/HostilRefManager.h)10
-rw-r--r--src/game/Level2.cpp2
-rw-r--r--src/game/OutdoorPvPWG.cpp4
-rw-r--r--src/game/PetAI.cpp2
-rw-r--r--src/game/Player.cpp12
-rw-r--r--src/game/ScriptedCreature.cpp14
-rw-r--r--src/game/Spell.cpp4
-rw-r--r--src/game/SpellAuraEffects.cpp12
-rw-r--r--src/game/SpellEffects.cpp6
-rw-r--r--src/game/ThreatManager.cpp78
-rw-r--r--src/game/ThreatManager.h42
-rw-r--r--src/game/Unit.cpp28
-rw-r--r--src/game/Unit.h14
-rw-r--r--src/game/UnitAI.cpp12
-rw-r--r--src/game/UnitAI.h6
-rw-r--r--src/game/UnitEvents.h16
-rw-r--r--src/game/WaypointMovementGenerator.cpp2
-rw-r--r--src/game/WorldSession.cpp4
26 files changed, 175 insertions, 175 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index bde132835c0..caa9549be36 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -767,7 +767,7 @@ void BattleGround::EndBattleGround(uint32 winner)
{
//needed cause else in av some creatures will kill the players at the end
plr->CombatStop();
- plr->getHostilRefManager().deleteReferences();
+ plr->getHostileRefManager().deleteReferences();
}
//this line is obsolete - team is set ALWAYS
diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt
index 48229003687..8fa5dc1b66d 100644
--- a/src/game/CMakeLists.txt
+++ b/src/game/CMakeLists.txt
@@ -125,8 +125,8 @@ SET(game_STAT_SRCS
GuildHandler.cpp
HomeMovementGenerator.cpp
HomeMovementGenerator.h
- HostilRefManager.cpp
- HostilRefManager.h
+ HostileRefManager.cpp
+ HostileRefManager.h
IdleMovementGenerator.cpp
IdleMovementGenerator.h
InstanceData.cpp
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
index b2ea766a360..d843643ad83 100644
--- a/src/game/Chat.cpp
+++ b/src/game/Chat.cpp
@@ -169,7 +169,7 @@ ChatCommand * ChatHandler::getCommandTable()
{
{ "setbit", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSet32Bit, "", NULL },
{ "threat", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugThreatList, "", NULL },
- { "hostil", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugHostilRefList, "", NULL },
+ { "hostil", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugHostileRefList, "", NULL },
{ "anim", SEC_GAMEMASTER, false, &ChatHandler::HandleDebugAnimCommand, "", NULL },
{ "arena", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugArenaCommand, "", NULL },
{ "bg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBattlegroundCommand, "", NULL },
diff --git a/src/game/Chat.h b/src/game/Chat.h
index 8ecef9bbcc2..92f7d9b87a4 100644
--- a/src/game/Chat.h
+++ b/src/game/Chat.h
@@ -162,7 +162,7 @@ class ChatHandler
bool HandleDebugSet32Bit(const char* args);
bool HandleDebugThreatList(const char * args);
- bool HandleDebugHostilRefList(const char * args);
+ bool HandleDebugHostileRefList(const char * args);
bool HandlePossessCommand(const char* args);
bool HandleUnPossessCommand(const char* args);
bool HandleBindSightCommand(const char* args);
diff --git a/src/game/CombatAI.cpp b/src/game/CombatAI.cpp
index a12f39fac1e..625fb1adcba 100644
--- a/src/game/CombatAI.cpp
+++ b/src/game/CombatAI.cpp
@@ -248,7 +248,7 @@ void TurretAI::UpdateAI(const uint32 diff)
DoSpellAttackIfReady(me->m_spells[0]);
//if(!DoSpellAttackIfReady(me->m_spells[0]))
- //if(HostilReference *ref = me->getThreatManager().getCurrentVictim())
+ //if(HostileReference *ref = me->getThreatManager().getCurrentVictim())
//ref->removeReference();
}
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp
index 6d3e0bf26a5..3b6281677f4 100644
--- a/src/game/CreatureEventAI.cpp
+++ b/src/game/CreatureEventAI.cpp
@@ -525,8 +525,8 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
break;
case ACTION_T_THREAT_ALL_PCT:
{
- std::list<HostilReference*>& threatList = m_creature->getThreatManager().getThreatList();
- for (std::list<HostilReference*>::iterator i = threatList.begin(); i != threatList.end(); ++i)
+ std::list<HostileReference*>& threatList = m_creature->getThreatManager().getThreatList();
+ for (std::list<HostileReference*>::iterator i = threatList.begin(); i != threatList.end(); ++i)
if(Unit* Temp = Unit::GetUnit(*m_creature,(*i)->getUnitGuid()))
m_creature->getThreatManager().modifyThreatPercent(Temp, action.threat_all_pct.percent);
break;
@@ -627,8 +627,8 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
break;
case ACTION_T_CAST_EVENT_ALL:
{
- std::list<HostilReference*>& threatList = m_creature->getThreatManager().getThreatList();
- for (std::list<HostilReference*>::iterator i = threatList.begin(); i != threatList.end(); ++i)
+ std::list<HostileReference*>& threatList = m_creature->getThreatManager().getThreatList();
+ for (std::list<HostileReference*>::iterator i = threatList.begin(); i != threatList.end(); ++i)
if (Unit* Temp = Unit::GetUnit(*m_creature,(*i)->getUnitGuid()))
if (Temp->GetTypeId() == TYPEID_PLAYER)
Temp->ToPlayer()->CastedCreatureOrGO(action.cast_event_all.creatureId, m_creature->GetGUID(), action.cast_event_all.spellId);
@@ -1105,9 +1105,9 @@ void CreatureEventAI::UpdateAI(const uint32 diff)
inline Unit* CreatureEventAI::SelectUnit(AttackingTarget target, uint32 position)
{
//ThreatList m_threatlist;
- std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
- std::list<HostilReference*>::iterator i = m_threatlist.begin();
- std::list<HostilReference*>::reverse_iterator r = m_threatlist.rbegin();
+ std::list<HostileReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>::iterator i = m_threatlist.begin();
+ std::list<HostileReference*>::reverse_iterator r = m_threatlist.rbegin();
if (position >= m_threatlist.size() || !m_threatlist.size())
return NULL;
diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp
index f93c8e22374..b5fc989bb61 100644
--- a/src/game/Debugcmds.cpp
+++ b/src/game/Debugcmds.cpp
@@ -665,8 +665,8 @@ bool ChatHandler::HandleDebugThreatList(const char * /*args*/)
if(!target || target->isTotem() || target->isPet())
return false;
- std::list<HostilReference*>& tlist = target->getThreatManager().getThreatList();
- std::list<HostilReference*>::iterator itr;
+ std::list<HostileReference*>& tlist = target->getThreatManager().getThreatList();
+ std::list<HostileReference*>::iterator itr;
uint32 cnt = 0;
PSendSysMessage("Threat list of %s (guid %u)",target->GetName(), target->GetGUIDLow());
for (itr = tlist.begin(); itr != tlist.end(); ++itr)
@@ -681,12 +681,12 @@ bool ChatHandler::HandleDebugThreatList(const char * /*args*/)
return true;
}
-bool ChatHandler::HandleDebugHostilRefList(const char * /*args*/)
+bool ChatHandler::HandleDebugHostileRefList(const char * /*args*/)
{
Unit* target = getSelectedUnit();
if(!target)
target = m_session->GetPlayer();
- HostilReference* ref = target->getHostilRefManager().getFirst();
+ HostileReference* ref = target->getHostileRefManager().getFirst();
uint32 cnt = 0;
PSendSysMessage("Hostil reference list of %s (guid %u)",target->GetName(), target->GetGUIDLow());
while(ref)
diff --git a/src/game/HostilRefManager.cpp b/src/game/HostileRefManager.cpp
index 8da2e566d24..efcc544c69f 100644
--- a/src/game/HostilRefManager.cpp
+++ b/src/game/HostileRefManager.cpp
@@ -18,13 +18,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "HostilRefManager.h"
+#include "HostileRefManager.h"
#include "ThreatManager.h"
#include "Unit.h"
#include "DBCStructure.h"
#include "SpellMgr.h"
-HostilRefManager::~HostilRefManager()
+HostileRefManager::~HostileRefManager()
{
deleteReferences();
}
@@ -34,9 +34,9 @@ HostilRefManager::~HostilRefManager()
// The pVictim is hated than by them as well
// use for buffs and healing threat functionality
-void HostilRefManager::threatAssist(Unit *pVictim, float fThreat, SpellEntry const *pThreatSpell, bool pSingleTarget)
+void HostileRefManager::threatAssist(Unit *pVictim, float fThreat, SpellEntry const *pThreatSpell, bool pSingleTarget)
{
- HostilReference* ref;
+ HostileReference* ref;
float size = pSingleTarget ? 1.0f : getSize(); // if pSingleTarget do not divide threat
ref = getFirst();
@@ -53,9 +53,9 @@ void HostilRefManager::threatAssist(Unit *pVictim, float fThreat, SpellEntry con
//=================================================
-void HostilRefManager::addTempThreat(float fThreat, bool apply)
+void HostileRefManager::addTempThreat(float fThreat, bool apply)
{
- HostilReference* ref = getFirst();
+ HostileReference* ref = getFirst();
while(ref != NULL)
{
@@ -74,9 +74,9 @@ void HostilRefManager::addTempThreat(float fThreat, bool apply)
//=================================================
-void HostilRefManager::addThreatPercent(int32 iPercent)
+void HostileRefManager::addThreatPercent(int32 iPercent)
{
- HostilReference* ref;
+ HostileReference* ref;
ref = getFirst();
while (ref != NULL)
@@ -89,9 +89,9 @@ void HostilRefManager::addThreatPercent(int32 iPercent)
//=================================================
// The online / offline status is given to the method. The calculation has to be done before
-void HostilRefManager::setOnlineOfflineState(bool bIsOnline)
+void HostileRefManager::setOnlineOfflineState(bool bIsOnline)
{
- HostilReference* ref;
+ HostileReference* ref;
ref = getFirst();
while(ref != NULL)
@@ -104,9 +104,9 @@ void HostilRefManager::setOnlineOfflineState(bool bIsOnline)
//=================================================
// The online / offline status is calculated and set
-void HostilRefManager::updateThreatTables()
+void HostileRefManager::updateThreatTables()
{
- HostilReference* ref = getFirst();
+ HostileReference* ref = getFirst();
while(ref)
{
ref->updateOnlineStatus();
@@ -118,12 +118,12 @@ void HostilRefManager::updateThreatTables()
// The references are not needed anymore
// tell the source to remove them from the list and free the mem
-void HostilRefManager::deleteReferences()
+void HostileRefManager::deleteReferences()
{
- HostilReference* ref = getFirst();
+ HostileReference* ref = getFirst();
while(ref)
{
- HostilReference* nextRef = ref->next();
+ HostileReference* nextRef = ref->next();
ref->removeReference();
delete ref;
ref = nextRef;
@@ -133,12 +133,12 @@ void HostilRefManager::deleteReferences()
//=================================================
// delete one reference, defined by faction
-void HostilRefManager::deleteReferencesForFaction(uint32 faction)
+void HostileRefManager::deleteReferencesForFaction(uint32 faction)
{
- HostilReference* ref = getFirst();
+ HostileReference* ref = getFirst();
while(ref)
{
- HostilReference* nextRef = ref->next();
+ HostileReference* nextRef = ref->next();
if(ref->getSource()->getOwner()->getFactionTemplateEntry()->faction == faction)
{
ref->removeReference();
@@ -151,12 +151,12 @@ void HostilRefManager::deleteReferencesForFaction(uint32 faction)
//=================================================
// delete one reference, defined by Unit
-void HostilRefManager::deleteReference(Unit *pCreature)
+void HostileRefManager::deleteReference(Unit *pCreature)
{
- HostilReference* ref = getFirst();
+ HostileReference* ref = getFirst();
while(ref)
{
- HostilReference* nextRef = ref->next();
+ HostileReference* nextRef = ref->next();
if(ref->getSource()->getOwner() == pCreature)
{
ref->removeReference();
@@ -170,12 +170,12 @@ void HostilRefManager::deleteReference(Unit *pCreature)
//=================================================
// set state for one reference, defined by Unit
-void HostilRefManager::setOnlineOfflineState(Unit *pCreature, bool bIsOnline)
+void HostileRefManager::setOnlineOfflineState(Unit *pCreature, bool bIsOnline)
{
- HostilReference* ref = getFirst();
+ HostileReference* ref = getFirst();
while(ref)
{
- HostilReference* nextRef = ref->next();
+ HostileReference* nextRef = ref->next();
if(ref->getSource()->getOwner() == pCreature)
{
ref->setOnlineOfflineState(bIsOnline);
diff --git a/src/game/HostilRefManager.h b/src/game/HostileRefManager.h
index defaea1ea12..385accb233b 100644
--- a/src/game/HostilRefManager.h
+++ b/src/game/HostileRefManager.h
@@ -26,18 +26,18 @@
class Unit;
class ThreatManager;
-class HostilReference;
+class HostileReference;
struct SpellEntry;
//=================================================
-class HostilRefManager : public RefManager<Unit, ThreatManager>
+class HostileRefManager : public RefManager<Unit, ThreatManager>
{
private:
Unit *iOwner;
public:
- explicit HostilRefManager(Unit *pOwner) { iOwner = pOwner; }
- ~HostilRefManager();
+ explicit HostileRefManager(Unit *pOwner) { iOwner = pOwner; }
+ ~HostileRefManager();
Unit* getOwner() { return iOwner; }
@@ -57,7 +57,7 @@ class HostilRefManager : public RefManager<Unit, ThreatManager>
// Remove specific faction references
void deleteReferencesForFaction(uint32 faction);
- HostilReference* getFirst() { return ((HostilReference* ) RefManager<Unit, ThreatManager>::getFirst()); }
+ HostileReference* getFirst() { return ((HostileReference* ) RefManager<Unit, ThreatManager>::getFirst()); }
void updateThreatTables();
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index 003a42cc506..74a3b5b935e 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -3596,7 +3596,7 @@ bool ChatHandler::HandleCombatStopCommand(const char* args)
return false;
target->CombatStop();
- target->getHostilRefManager().deleteReferences();
+ target->getHostileRefManager().deleteReferences();
return true;
}
diff --git a/src/game/OutdoorPvPWG.cpp b/src/game/OutdoorPvPWG.cpp
index 4d4c6590b04..018bcaa556d 100644
--- a/src/game/OutdoorPvPWG.cpp
+++ b/src/game/OutdoorPvPWG.cpp
@@ -924,7 +924,7 @@ bool OutdoorPvPWG::UpdateQuestGiverPosition(uint32 guid, Creature *creature)
if (creature->isAlive() && creature->isInCombat())
{
creature->CombatStop(true);
- creature->getHostilRefManager().deleteReferences();
+ creature->getHostileRefManager().deleteReferences();
}
creature->SetHomePosition(pos);
creature->DestroyForNearbyPlayers();
@@ -1456,7 +1456,7 @@ void OutdoorPvPWG::EndBattle()
}
(*itr)->RemoveAurasDueToSpell(SPELL_TENACITY);
(*itr)->CombatStop(true);
- (*itr)->getHostilRefManager().deleteReferences();
+ (*itr)->getHostileRefManager().deleteReferences();
}
if (m_timer == 1) // Battle End was forced so no reward.
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp
index 44571216aff..557ff5ee66c 100644
--- a/src/game/PetAI.cpp
+++ b/src/game/PetAI.cpp
@@ -65,7 +65,7 @@ void PetAI::_stopAttack()
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MoveIdle();
m_creature->CombatStop();
- m_creature->getHostilRefManager().deleteReferences();
+ m_creature->getHostileRefManager().deleteReferences();
return;
}
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 85dee7861d9..c1accd063df 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -2323,7 +2323,7 @@ void Player::SetInWater(bool apply)
// remove auras that need water/land
RemoveAurasWithInterruptFlags(apply ? AURA_INTERRUPT_FLAG_NOT_ABOVEWATER : AURA_INTERRUPT_FLAG_NOT_UNDERWATER);
- getHostilRefManager().updateThreatTables();
+ getHostileRefManager().updateThreatTables();
}
void Player::SetGameMaster(bool on)
@@ -2337,13 +2337,13 @@ void Player::SetGameMaster(bool on)
if (Pet* pet = GetPet())
{
pet->setFaction(35);
- pet->getHostilRefManager().setOnlineOfflineState(false);
+ pet->getHostileRefManager().setOnlineOfflineState(false);
}
RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
ResetContestedPvP();
- getHostilRefManager().setOnlineOfflineState(false);
+ getHostileRefManager().setOnlineOfflineState(false);
CombatStopWithPets();
SetPhaseMask(PHASEMASK_ANYWHERE,false); // see and visible in all phases
@@ -2361,7 +2361,7 @@ void Player::SetGameMaster(bool on)
if (Pet* pet = GetPet())
{
pet->setFaction(getFaction());
- pet->getHostilRefManager().setOnlineOfflineState(true);
+ pet->getHostileRefManager().setOnlineOfflineState(true);
}
// restore FFA PvP Server state
@@ -2371,7 +2371,7 @@ void Player::SetGameMaster(bool on)
// restore FFA PvP area state, remove not allowed for GM mounts
UpdateArea(m_areaUpdateId);
- getHostilRefManager().setOnlineOfflineState(true);
+ getHostileRefManager().setOnlineOfflineState(true);
}
UpdateObjectVisibility();
@@ -18909,7 +18909,7 @@ void Player::CleanupAfterTaxiFlight()
m_taxi.ClearTaxiDestinations(); // not destinations, clear source node
Unmount();
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
- getHostilRefManager().setOnlineOfflineState(true);
+ getHostileRefManager().setOnlineOfflineState(true);
}
void Player::ContinueTaxiFlight()
diff --git a/src/game/ScriptedCreature.cpp b/src/game/ScriptedCreature.cpp
index 8078d543cb9..19d8afa02ff 100644
--- a/src/game/ScriptedCreature.cpp
+++ b/src/game/ScriptedCreature.cpp
@@ -168,9 +168,9 @@ Creature* ScriptedAI::DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ,
Unit* ScriptedAI::SelectUnit(SelectAggroTarget pTarget, uint32 uiPosition)
{
//ThreatList m_threatlist;
- std::list<HostilReference*>& threatlist = m_creature->getThreatManager().getThreatList();
- std::list<HostilReference*>::iterator itr = threatlist.begin();
- std::list<HostilReference*>::reverse_iterator ritr = threatlist.rbegin();
+ std::list<HostileReference*>& threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>::iterator itr = threatlist.begin();
+ std::list<HostileReference*>::reverse_iterator ritr = threatlist.rbegin();
if (uiPosition >= threatlist.size() || !threatlist.size())
return NULL;
@@ -401,9 +401,9 @@ void ScriptedAI::DoResetThreat()
return;
}
- std::list<HostilReference*>& threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>& threatlist = m_creature->getThreatManager().getThreatList();
- for (std::list<HostilReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
+ for (std::list<HostileReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
@@ -636,8 +636,8 @@ void BossAI::TeleportCheaters()
{
float x, y, z;
me->GetPosition(x, y, z);
- std::list<HostilReference*> &m_threatlist = me->getThreatManager().getThreatList();
- for (std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr != m_threatlist.end(); ++itr)
+ std::list<HostileReference*> &m_threatlist = me->getThreatManager().getThreatList();
+ for (std::list<HostileReference*>::iterator itr = m_threatlist.begin(); itr != m_threatlist.end(); ++itr)
if((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER && !CheckBoundary((*itr)->getTarget()))
(*itr)->getTarget()->NearTeleportTo(x, y, z, 0);
}
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index edf53a56b49..f0c5acc48eb 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1160,7 +1160,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, addhealth, m_attackType, m_spellInfo, m_triggeredByAuraSpell);
int32 gain = caster->DealHeal(unitTarget, addhealth, m_spellInfo, crit);
- unitTarget->getHostilRefManager().threatAssist(caster, float(gain) * 0.5f, m_spellInfo);
+ unitTarget->getHostileRefManager().threatAssist(caster, float(gain) * 0.5f, m_spellInfo);
}
// Do damage and triggers
else if (m_damage > 0)
@@ -1325,7 +1325,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
if( unit->isInCombat() && !(m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_NO_INITIAL_AGGRO) )
{
m_caster->SetInCombatState(unit->GetCombatTimer() > 0, unit);
- unit->getHostilRefManager().threatAssist(m_caster, 0.0f);
+ unit->getHostileRefManager().threatAssist(m_caster, 0.0f);
}
}
}
diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp
index 7d2f1b343e0..5ea6a776ea3 100644
--- a/src/game/SpellAuraEffects.cpp
+++ b/src/game/SpellAuraEffects.cpp
@@ -1395,7 +1395,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
uint32 heal = uint32(caster->SpellHealingBonus(caster, GetSpellProto(), uint32(new_damage * multiplier), DOT, GetBase()->GetStackAmount()));
int32 gain = caster->DealHeal(caster, heal, GetSpellProto());
- caster->getHostilRefManager().threatAssist(caster, gain * 0.5f, GetSpellProto());
+ caster->getHostileRefManager().threatAssist(caster, gain * 0.5f, GetSpellProto());
break;
}
case SPELL_AURA_PERIODIC_HEALTH_FUNNEL: // only three spells
@@ -1470,7 +1470,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
if( BattleGround *bg = caster->ToPlayer()->GetBattleGround() )
bg->UpdatePlayerScore(caster->ToPlayer(), SCORE_HEALING_DONE, gain);
- target->getHostilRefManager().threatAssist(caster, float(gain) * 0.5f, GetSpellProto());
+ target->getHostileRefManager().threatAssist(caster, float(gain) * 0.5f, GetSpellProto());
bool haveCastItem = GetBase()->GetCastItemGUID() != 0;
@@ -1631,7 +1631,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
int32 gain = target->ModifyPower(power,amount);
if(caster)
- target->getHostilRefManager().threatAssist(caster, float(gain) * 0.5f, GetSpellProto());
+ target->getHostileRefManager().threatAssist(caster, float(gain) * 0.5f, GetSpellProto());
break;
}
case SPELL_AURA_PERIODIC_ENERGIZE:
@@ -1659,7 +1659,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
int32 gain = target->ModifyPower(power,amount);
if(caster)
- target->getHostilRefManager().threatAssist(caster, float(gain) * 0.5f, GetSpellProto());
+ target->getHostileRefManager().threatAssist(caster, float(gain) * 0.5f, GetSpellProto());
break;
}
case SPELL_AURA_POWER_BURN_MANA:
@@ -3189,7 +3189,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const * aurApp, uint8 mode, bo
if(GetCasterGUID()==target->GetGUID() && target->GetCurrentSpell(CURRENT_GENERIC_SPELL))
target->FinishSpell(CURRENT_GENERIC_SPELL, false);
target->InterruptNonMeleeSpells(true);
- target->getHostilRefManager().deleteReferences();
+ target->getHostileRefManager().deleteReferences();
}
else
{
@@ -3727,7 +3727,7 @@ void AuraEffect::HandleAuraModTotalThreat(AuraApplication const * aurApp, uint8
if (!caster || !caster->isAlive())
return;
- target->getHostilRefManager().addTempThreat(GetAmount(), apply);
+ target->getHostileRefManager().addTempThreat(GetAmount(), apply);
}
void AuraEffect::HandleModTaunt(AuraApplication const * aurApp, uint8 mode, bool apply) const
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 523ca6691ab..9a19e1ac8cd 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2909,7 +2909,7 @@ void Spell::EffectHealPct( uint32 /*i*/ )
// modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DAMAGE, addhealth, this);
int32 gain = caster->DealHeal(unitTarget, addhealth, m_spellInfo);
- unitTarget->getHostilRefManager().threatAssist(m_caster, float(gain) * 0.5f, m_spellInfo);
+ unitTarget->getHostileRefManager().threatAssist(m_caster, float(gain) * 0.5f, m_spellInfo);
}
}
@@ -4441,7 +4441,7 @@ void Spell::EffectTaunt(uint32 /*i*/)
//Set aggro victim to caster
if (!unitTarget->getThreatManager().getOnlineContainer().empty())
- if (HostilReference* forcedVictim = unitTarget->getThreatManager().getOnlineContainer().getReferenceByTarget(m_caster))
+ if (HostileReference* forcedVictim = unitTarget->getThreatManager().getOnlineContainer().getReferenceByTarget(m_caster))
unitTarget->getThreatManager().setCurrentVictim(forcedVictim);
if (unitTarget->ToCreature()->IsAIEnabled && !unitTarget->ToCreature()->HasReactState(REACT_PASSIVE))
@@ -6146,7 +6146,7 @@ void Spell::EffectSanctuary(uint32 /*i*/)
}
unitTarget->CombatStop();
- unitTarget->getHostilRefManager().deleteReferences(); // stop all fighting
+ unitTarget->getHostileRefManager().deleteReferences(); // stop all fighting
// Vanish allows to remove all threat and cast regular stealth so other spells can be used
if(m_caster->GetTypeId() == TYPEID_PLAYER
&& m_spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE
diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp
index 02665d9b55f..5d4979479d5 100644
--- a/src/game/ThreatManager.cpp
+++ b/src/game/ThreatManager.cpp
@@ -42,10 +42,10 @@ float ThreatCalcHelper::calcThreat(Unit* pHatedUnit, Unit* pHatingUnit, float fT
}
//============================================================
-//================= HostilReference ==========================
+//================= HostileReference ==========================
//============================================================
-HostilReference::HostilReference(Unit* pUnit, ThreatManager *pThreatManager, float fThreat)
+HostileReference::HostileReference(Unit* pUnit, ThreatManager *pThreatManager, float fThreat)
{
iThreat = fThreat;
iTempThreatModifier = 0.0f;
@@ -57,14 +57,14 @@ HostilReference::HostilReference(Unit* pUnit, ThreatManager *pThreatManager, flo
//============================================================
// Tell our refTo (target) object that we have a link
-void HostilReference::targetObjectBuildLink()
+void HostileReference::targetObjectBuildLink()
{
getTarget()->addHatedBy(this);
}
//============================================================
// Tell our refTo (taget) object, that the link is cut
-void HostilReference::targetObjectDestroyLink()
+void HostileReference::targetObjectDestroyLink()
{
getTarget()->removeHatedBy(this);
}
@@ -72,7 +72,7 @@ void HostilReference::targetObjectDestroyLink()
//============================================================
// Tell our refFrom (source) object, that the link is cut (Target destroyed)
-void HostilReference::sourceObjectDestroyLink()
+void HostileReference::sourceObjectDestroyLink()
{
setOnlineOfflineState(false);
}
@@ -80,7 +80,7 @@ void HostilReference::sourceObjectDestroyLink()
//============================================================
// Inform the source, that the status of the reference changed
-void HostilReference::fireStatusChanged(ThreatRefStatusChangeEvent& pThreatRefStatusChangeEvent)
+void HostileReference::fireStatusChanged(ThreatRefStatusChangeEvent& pThreatRefStatusChangeEvent)
{
if (getSource())
getSource()->processThreatEvent(&pThreatRefStatusChangeEvent);
@@ -88,7 +88,7 @@ void HostilReference::fireStatusChanged(ThreatRefStatusChangeEvent& pThreatRefSt
//============================================================
-void HostilReference::addThreat(float fModThreat)
+void HostileReference::addThreat(float fModThreat)
{
iThreat += fModThreat;
// the threat is changed. Source and target unit have to be available
@@ -112,7 +112,7 @@ void HostilReference::addThreat(float fModThreat)
//============================================================
// check, if source can reach target and set the status
-void HostilReference::updateOnlineStatus()
+void HostileReference::updateOnlineStatus()
{
bool online = false;
bool accessible = false;
@@ -147,7 +147,7 @@ void HostilReference::updateOnlineStatus()
//============================================================
// set the status and fire the event on status change
-void HostilReference::setOnlineOfflineState(bool pIsOnline)
+void HostileReference::setOnlineOfflineState(bool pIsOnline)
{
if (iOnline != pIsOnline)
{
@@ -162,7 +162,7 @@ void HostilReference::setOnlineOfflineState(bool pIsOnline)
//============================================================
-void HostilReference::setAccessibleState(bool pIsAccessible)
+void HostileReference::setAccessibleState(bool pIsAccessible)
{
if (iAccessible != pIsAccessible)
{
@@ -177,7 +177,7 @@ void HostilReference::setAccessibleState(bool pIsAccessible)
// prepare the reference for deleting
// this is called be the target
-void HostilReference::removeReference()
+void HostileReference::removeReference()
{
invalidate();
@@ -187,7 +187,7 @@ void HostilReference::removeReference()
//============================================================
-Unit* HostilReference::getSourceUnit()
+Unit* HostileReference::getSourceUnit()
{
return (getSource()->getOwner());
}
@@ -198,7 +198,7 @@ Unit* HostilReference::getSourceUnit()
void ThreatContainer::clearReferences()
{
- for (std::list<HostilReference*>::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
+ for (std::list<HostileReference*>::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
{
(*i)->unlink();
delete (*i);
@@ -207,13 +207,13 @@ void ThreatContainer::clearReferences()
}
//============================================================
-// Return the HostilReference of NULL, if not found
-HostilReference* ThreatContainer::getReferenceByTarget(Unit* pVictim)
+// Return the HostileReference of NULL, if not found
+HostileReference* ThreatContainer::getReferenceByTarget(Unit* pVictim)
{
- HostilReference* result = NULL;
+ HostileReference* result = NULL;
uint64 guid = pVictim->GetGUID();
- for (std::list<HostilReference*>::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
+ for (std::list<HostileReference*>::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
{
if((*i)->getUnitGuid() == guid)
{
@@ -228,9 +228,9 @@ HostilReference* ThreatContainer::getReferenceByTarget(Unit* pVictim)
//============================================================
// Add the threat, if we find the reference
-HostilReference* ThreatContainer::addThreat(Unit* pVictim, float fThreat)
+HostileReference* ThreatContainer::addThreat(Unit* pVictim, float fThreat)
{
- HostilReference* ref = getReferenceByTarget(pVictim);
+ HostileReference* ref = getReferenceByTarget(pVictim);
if (ref)
ref->addThreat(fThreat);
return ref;
@@ -240,13 +240,13 @@ HostilReference* ThreatContainer::addThreat(Unit* pVictim, float fThreat)
void ThreatContainer::modifyThreatPercent(Unit *pVictim, int32 iPercent)
{
- if(HostilReference* ref = getReferenceByTarget(pVictim))
+ if(HostileReference* ref = getReferenceByTarget(pVictim))
ref->addThreatPercent(iPercent);
}
//============================================================
-bool HostilReferenceSortPredicate(const HostilReference* lhs, const HostilReference* rhs)
+bool HostileReferenceSortPredicate(const HostileReference* lhs, const HostileReference* rhs)
{
// std::list::sort ordering predicate must be: (Pred(x,y)&&Pred(y,x))==false
return lhs->getThreat() > rhs->getThreat(); // reverse sorting
@@ -259,7 +259,7 @@ void ThreatContainer::update()
{
if(iDirty && iThreatList.size() >1)
{
- iThreatList.sort(HostilReferenceSortPredicate);
+ iThreatList.sort(HostileReferenceSortPredicate);
}
iDirty = false;
}
@@ -268,16 +268,16 @@ void ThreatContainer::update()
// return the next best victim
// could be the current victim
-HostilReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostilReference* pCurrentVictim)
+HostileReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostileReference* pCurrentVictim)
{
- HostilReference* currentRef = NULL;
+ HostileReference* currentRef = NULL;
bool found = false;
bool noPriorityTargetFound = false;
- std::list<HostilReference*>::const_iterator lastRef = iThreatList.end();
+ std::list<HostileReference*>::const_iterator lastRef = iThreatList.end();
lastRef--;
- for (std::list<HostilReference*>::const_iterator iter = iThreatList.begin(); iter != iThreatList.end() && !found;)
+ for (std::list<HostileReference*>::const_iterator iter = iThreatList.begin(); iter != iThreatList.end() && !found;)
{
currentRef = (*iter);
@@ -395,7 +395,7 @@ void ThreatManager::addThreat(Unit* pVictim, float fThreat, SpellSchoolMask scho
void ThreatManager::_addThreat(Unit *pVictim, float fThreat)
{
- HostilReference* ref = iThreatContainer.addThreat(pVictim, fThreat);
+ HostileReference* ref = iThreatContainer.addThreat(pVictim, fThreat);
// Ref is not in the online refs, search the offline refs next
if (!ref)
ref = iThreatOfflineContainer.addThreat(pVictim, fThreat);
@@ -403,7 +403,7 @@ void ThreatManager::_addThreat(Unit *pVictim, float fThreat)
if (!ref) // there was no ref => create a new one
{
// threat has to be 0 here
- HostilReference* hostilReference = new HostilReference(pVictim, this, 0);
+ HostileReference* hostilReference = new HostileReference(pVictim, this, 0);
iThreatContainer.addReference(hostilReference);
hostilReference->addThreat(fThreat); // now we add the real threat
if(pVictim->GetTypeId() == TYPEID_PLAYER && pVictim->ToPlayer()->isGameMaster())
@@ -423,7 +423,7 @@ void ThreatManager::modifyThreatPercent(Unit *pVictim, int32 iPercent)
Unit* ThreatManager::getHostilTarget()
{
iThreatContainer.update();
- HostilReference* nextVictim = iThreatContainer.selectNextVictim( getOwner()->ToCreature(), getCurrentVictim());
+ HostileReference* nextVictim = iThreatContainer.selectNextVictim( getOwner()->ToCreature(), getCurrentVictim());
setCurrentVictim(nextVictim);
return getCurrentVictim() != NULL ? getCurrentVictim()->getTarget() : NULL;
}
@@ -433,7 +433,7 @@ Unit* ThreatManager::getHostilTarget()
float ThreatManager::getThreat(Unit *pVictim, bool pAlsoSearchOfflineList)
{
float threat = 0.0f;
- HostilReference* ref = iThreatContainer.getReferenceByTarget(pVictim);
+ HostileReference* ref = iThreatContainer.getReferenceByTarget(pVictim);
if(!ref && pAlsoSearchOfflineList)
ref = iThreatOfflineContainer.getReferenceByTarget(pVictim);
if(ref)
@@ -445,7 +445,7 @@ float ThreatManager::getThreat(Unit *pVictim, bool pAlsoSearchOfflineList)
void ThreatManager::tauntApply(Unit* pTaunter)
{
- HostilReference* ref = iThreatContainer.getReferenceByTarget(pTaunter);
+ HostileReference* ref = iThreatContainer.getReferenceByTarget(pTaunter);
if(getCurrentVictim() && ref && (ref->getThreat() < getCurrentVictim()->getThreat()))
{
if(ref->getTempThreatModifier() == 0.0f) // Ok, temp threat is unused
@@ -457,20 +457,20 @@ void ThreatManager::tauntApply(Unit* pTaunter)
void ThreatManager::tauntFadeOut(Unit *pTaunter)
{
- HostilReference* ref = iThreatContainer.getReferenceByTarget(pTaunter);
+ HostileReference* ref = iThreatContainer.getReferenceByTarget(pTaunter);
if(ref)
ref->resetTempThreat();
}
//============================================================
-void ThreatManager::setCurrentVictim(HostilReference* pHostilReference)
+void ThreatManager::setCurrentVictim(HostileReference* pHostileReference)
{
- if (pHostilReference && pHostilReference != iCurrentVictim)
+ if (pHostileReference && pHostileReference != iCurrentVictim)
{
- iOwner->SendChangeCurrentVictimOpcode(pHostilReference);
+ iOwner->SendChangeCurrentVictimOpcode(pHostileReference);
}
- iCurrentVictim = pHostilReference;
+ iCurrentVictim = pHostileReference;
}
//============================================================
@@ -481,7 +481,7 @@ void ThreatManager::processThreatEvent(ThreatRefStatusChangeEvent* threatRefStat
{
threatRefStatusChangeEvent->setThreatManager(this); // now we can set the threat manager
- HostilReference* hostilReference = threatRefStatusChangeEvent->getReference();
+ HostileReference* hostilReference = threatRefStatusChangeEvent->getReference();
switch(threatRefStatusChangeEvent->getType())
{
@@ -540,11 +540,11 @@ bool ThreatManager::isNeedUpdateToClient(uint32 time)
// Reset all aggro without modifying the threadlist.
void ThreatManager::resetAllAggro()
{
- std::list<HostilReference*> &threatlist = getThreatList();
+ std::list<HostileReference*> &threatlist = getThreatList();
if (threatlist.empty())
return;
- for (std::list<HostilReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
+ for (std::list<HostileReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
(*itr)->setThreat(0);
}
diff --git a/src/game/ThreatManager.h b/src/game/ThreatManager.h
index e7e51ad40d7..d1635ae4372 100644
--- a/src/game/ThreatManager.h
+++ b/src/game/ThreatManager.h
@@ -47,10 +47,10 @@ class ThreatCalcHelper
};
//==============================================================
-class HostilReference : public Reference<Unit, ThreatManager>
+class HostileReference : public Reference<Unit, ThreatManager>
{
public:
- HostilReference(Unit* pUnit, ThreatManager *pThreatManager, float fThreat);
+ HostileReference(Unit* pUnit, ThreatManager *pThreatManager, float fThreat);
//=================================================
void addThreat(float fModThreat);
@@ -106,7 +106,7 @@ class HostilReference : public Reference<Unit, ThreatManager>
void setAccessibleState(bool pIsAccessible);
//=================================================
- bool operator ==(const HostilReference& pHostilReference) const { return pHostilReference.getUnitGuid() == getUnitGuid(); }
+ bool operator ==(const HostileReference& pHostileReference) const { return pHostileReference.getUnitGuid() == getUnitGuid(); }
//=================================================
@@ -119,7 +119,7 @@ class HostilReference : public Reference<Unit, ThreatManager>
//=================================================
- HostilReference* next() { return ((HostilReference* ) Reference<Unit, ThreatManager>::next()); }
+ HostileReference* next() { return ((HostileReference* ) Reference<Unit, ThreatManager>::next()); }
//=================================================
@@ -150,13 +150,13 @@ class ThreatManager;
class ThreatContainer
{
private:
- std::list<HostilReference*> iThreatList;
+ std::list<HostileReference*> iThreatList;
bool iDirty;
protected:
friend class ThreatManager;
- void remove(HostilReference* pRef) { iThreatList.remove(pRef); }
- void addReference(HostilReference* pHostilReference) { iThreatList.push_back(pHostilReference); }
+ void remove(HostileReference* pRef) { iThreatList.remove(pRef); }
+ void addReference(HostileReference* pHostileReference) { iThreatList.push_back(pHostileReference); }
void clearReferences();
// Sort the list if necessary
void update();
@@ -164,11 +164,11 @@ class ThreatContainer
ThreatContainer() { iDirty = false; }
~ThreatContainer() { clearReferences(); }
- HostilReference* addThreat(Unit* pVictim, float fThreat);
+ HostileReference* addThreat(Unit* pVictim, float fThreat);
void modifyThreatPercent(Unit *pVictim, int32 iPercent);
- HostilReference* selectNextVictim(Creature* pAttacker, HostilReference* pCurrentVictim);
+ HostileReference* selectNextVictim(Creature* pAttacker, HostileReference* pCurrentVictim);
void setDirty(bool pDirty) { iDirty = pDirty; }
@@ -176,11 +176,11 @@ class ThreatContainer
bool empty() { return(iThreatList.empty()); }
- HostilReference* getMostHated() { return iThreatList.empty() ? NULL : iThreatList.front(); }
+ HostileReference* getMostHated() { return iThreatList.empty() ? NULL : iThreatList.front(); }
- HostilReference* getReferenceByTarget(Unit* pVictim);
+ HostileReference* getReferenceByTarget(Unit* pVictim);
- std::list<HostilReference*>& getThreatList() { return iThreatList; }
+ std::list<HostileReference*>& getThreatList() { return iThreatList; }
};
//=================================================
@@ -188,7 +188,7 @@ class ThreatContainer
class ThreatManager
{
public:
- friend class HostilReference;
+ friend class HostileReference;
explicit ThreatManager(Unit *pOwner);
@@ -207,7 +207,7 @@ class ThreatManager
bool isNeedUpdateToClient(uint32 time);
- HostilReference* getCurrentVictim() { return iCurrentVictim; }
+ HostileReference* getCurrentVictim() { return iCurrentVictim; }
Unit* getOwner() { return iOwner; }
@@ -216,7 +216,7 @@ class ThreatManager
void tauntApply(Unit* pTaunter);
void tauntFadeOut(Unit *pTaunter);
- void setCurrentVictim(HostilReference* pHostilReference);
+ void setCurrentVictim(HostileReference* pHostileReference);
void setDirty(bool bDirty) { iThreatContainer.setDirty(bDirty); }
@@ -226,13 +226,13 @@ class ThreatManager
// Reset all aggro of unit in threadlist satisfying the predicate.
template<class PREDICATE> void resetAggro(PREDICATE predicate)
{
- std::list<HostilReference*> &threatlist = getThreatList();
+ std::list<HostileReference*> &threatlist = getThreatList();
if (threatlist.empty())
return;
- for (std::list<HostilReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
+ for (std::list<HostileReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
- HostilReference* ref = (*itr);
+ HostileReference* ref = (*itr);
if (predicate(ref->getTarget()))
{
@@ -244,14 +244,14 @@ class ThreatManager
// methods to access the lists from the outside to do some dirty manipulation (scriping and such)
// I hope they are used as little as possible.
- std::list<HostilReference*>& getThreatList() { return iThreatContainer.getThreatList(); }
- std::list<HostilReference*>& getOfflieThreatList() { return iThreatOfflineContainer.getThreatList(); }
+ std::list<HostileReference*>& getThreatList() { return iThreatContainer.getThreatList(); }
+ std::list<HostileReference*>& getOfflieThreatList() { return iThreatOfflineContainer.getThreatList(); }
ThreatContainer& getOnlineContainer() { return iThreatContainer; }
ThreatContainer& getOfflineContainer() { return iThreatOfflineContainer; }
private:
void _addThreat(Unit *pVictim, float fThreat);
- HostilReference* iCurrentVictim;
+ HostileReference* iCurrentVictim;
Unit* iOwner;
uint32 iUpdateTimer;
ThreatContainer iThreatContainer;
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 709ec8619db..3e75a6409f0 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -91,7 +91,7 @@ static bool isNonTriggerAura[TOTAL_AURAS];
static bool procPrepared = InitTriggerAuraData();
Unit::Unit()
-: WorldObject(), i_motionMaster(this), m_ThreatManager(this), m_HostilRefManager(this)
+: WorldObject(), i_motionMaster(this), m_ThreatManager(this), m_HostileRefManager(this)
, IsAIEnabled(false), NeedChangeAI(false)
, i_AI(NULL), i_disabledAI(NULL), m_removedAurasCount(0), m_vehicle(NULL), m_transport(NULL)
, m_ControlledByPlayer(false), m_procDeep(0), m_unitTypeMask(UNIT_MASK_NONE), m_vehicleKit(NULL)
@@ -246,7 +246,7 @@ void Unit::Update(uint32 p_time)
// Check UNIT_STAT_MELEE_ATTACKING or UNIT_STAT_CHASE (without UNIT_STAT_FOLLOW in this case) so pets can reach far away
// targets without stopping half way there and running off.
// These flags are reset after target dies or another command is given.
- if (m_HostilRefManager.isEmpty())
+ if (m_HostileRefManager.isEmpty())
{
// m_CombatTimer set at aura start and it will be freeze until aura removing
if (m_CombatTimer <= p_time)
@@ -11984,7 +11984,7 @@ void Unit::setDeathState(DeathState s)
{
CombatStop();
DeleteThreatList();
- getHostilRefManager().deleteReferences();
+ getHostileRefManager().deleteReferences();
ClearComboPointHolders(); // any combo points pointed to unit lost at it death
if (IsNonMeleeSpellCasted(false))
@@ -13108,7 +13108,7 @@ void Unit::CleanupsBeforeDelete(bool finalCleanup)
CombatStop();
ClearComboPointHolders();
DeleteThreatList();
- getHostilRefManager().setOnlineOfflineState(false);
+ getHostileRefManager().setOnlineOfflineState(false);
GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
}
@@ -15075,7 +15075,7 @@ void Unit::RemoveCharmedBy(Unit *charmer)
CastStop();
CombatStop(); //TODO: CombatStop(true) may cause crash (interrupt spells)
- getHostilRefManager().deleteReferences();
+ getHostileRefManager().deleteReferences();
DeleteThreatList();
RestoreFaction();
GetMotionMaster()->InitDefault();
@@ -16103,8 +16103,8 @@ void Unit::SendThreatListUpdate()
WorldPacket data(SMSG_THREAT_UPDATE, 8 + count * 8);
data.append(GetPackGUID());
data << uint32(count);
- std::list<HostilReference*>& tlist = getThreatManager().getThreatList();
- for (std::list<HostilReference*>::const_iterator itr = tlist.begin(); itr != tlist.end(); ++itr)
+ std::list<HostileReference*>& tlist = getThreatManager().getThreatList();
+ for (std::list<HostileReference*>::const_iterator itr = tlist.begin(); itr != tlist.end(); ++itr)
{
data.appendPackGUID((*itr)->getUnitGuid());
data << uint32((*itr)->getThreat());
@@ -16113,17 +16113,17 @@ void Unit::SendThreatListUpdate()
}
}
-void Unit::SendChangeCurrentVictimOpcode(HostilReference* pHostilReference)
+void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
{
if (uint32 count = getThreatManager().getThreatList().size())
{
sLog.outDebug( "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message" );
WorldPacket data(SMSG_HIGHEST_THREAT_UPDATE, 8 + 8 + count * 8);
data.append(GetPackGUID());
- data.appendPackGUID(pHostilReference->getUnitGuid());
+ data.appendPackGUID(pHostileReference->getUnitGuid());
data << uint32(count);
- std::list<HostilReference*>& tlist = getThreatManager().getThreatList();
- for (std::list<HostilReference*>::const_iterator itr = tlist.begin(); itr != tlist.end(); ++itr)
+ std::list<HostileReference*>& tlist = getThreatManager().getThreatList();
+ for (std::list<HostileReference*>::const_iterator itr = tlist.begin(); itr != tlist.end(); ++itr)
{
data.appendPackGUID((*itr)->getUnitGuid());
data << uint32((*itr)->getThreat());
@@ -16140,12 +16140,12 @@ void Unit::SendClearThreatListOpcode()
SendMessageToSet(&data, false);
}
-void Unit::SendRemoveFromThreatListOpcode(HostilReference* pHostilReference)
+void Unit::SendRemoveFromThreatListOpcode(HostileReference* pHostileReference)
{
sLog.outDebug( "WORLD: Send SMSG_THREAT_REMOVE Message" );
WorldPacket data(SMSG_THREAT_REMOVE, 8 + 8);
data.append(GetPackGUID());
- data.appendPackGUID(pHostilReference->getUnitGuid());
+ data.appendPackGUID(pHostileReference->getUnitGuid());
SendMessageToSet(&data, false);
}
@@ -16208,7 +16208,7 @@ void Unit::StopAttackFaction(uint32 faction_id)
++itr;
}
- getHostilRefManager().deleteReferencesForFaction(faction_id);
+ getHostileRefManager().deleteReferencesForFaction(faction_id);
for(ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
(*itr)->StopAttackFaction(faction_id);
diff --git a/src/game/Unit.h b/src/game/Unit.h
index a35657890fa..0bdb3e573e0 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -28,7 +28,7 @@
#include "UpdateFields.h"
#include "SharedDefines.h"
#include "ThreatManager.h"
-#include "HostilRefManager.h"
+#include "HostileRefManager.h"
#include "FollowerReference.h"
#include "FollowerRefManager.h"
#include "Utilities/EventProcessor.h"
@@ -1442,9 +1442,9 @@ class Unit : public WorldObject
void SendMonsterMoveWithSpeedToCurrentDestination(Player* player = NULL);
void SendMovementFlagUpdate();
- void SendChangeCurrentVictimOpcode(HostilReference* pHostilReference);
+ void SendChangeCurrentVictimOpcode(HostileReference* pHostileReference);
void SendClearThreatListOpcode();
- void SendRemoveFromThreatListOpcode(HostilReference* pHostilReference);
+ void SendRemoveFromThreatListOpcode(HostileReference* pHostileReference);
void SendThreatListUpdate();
void BuildHeartBeatMsg(WorldPacket *data) const;
@@ -1752,9 +1752,9 @@ class Unit : public WorldObject
void TauntApply(Unit* pVictim);
void TauntFadeOut(Unit *taunter);
ThreatManager& getThreatManager() { return m_ThreatManager; }
- void addHatedBy(HostilReference* pHostilReference) { m_HostilRefManager.insertFirst(pHostilReference); };
- void removeHatedBy(HostilReference* /*pHostilReference*/ ) { /* nothing to do yet */ }
- HostilRefManager& getHostilRefManager() { return m_HostilRefManager; }
+ void addHatedBy(HostileReference* pHostileReference) { m_HostileRefManager.insertFirst(pHostileReference); };
+ void removeHatedBy(HostileReference* /*pHostileReference*/ ) { /* nothing to do yet */ }
+ HostileRefManager& getHostileRefManager() { return m_HostileRefManager; }
VisibleAuraMap const *GetVisibleAuras() { return &m_visibleAuras; }
AuraApplication * GetVisibleAura(uint8 slot)
@@ -2064,7 +2064,7 @@ class Unit : public WorldObject
// Manage all Units threatening us
// ThreatManager m_ThreatManager;
// Manage all Units that are threatened by us
- HostilRefManager m_HostilRefManager;
+ HostileRefManager m_HostileRefManager;
FollowerRefManager m_FollowingRefManager;
diff --git a/src/game/UnitAI.cpp b/src/game/UnitAI.cpp
index 6a3f7b1157a..3eecf6a1c54 100644
--- a/src/game/UnitAI.cpp
+++ b/src/game/UnitAI.cpp
@@ -127,13 +127,13 @@ Unit* UnitAI::SelectTarget(SelectAggroTarget targetType, uint32 position, float
void UnitAI::SelectTargetList(std::list<Unit*> &targetList, uint32 num, SelectAggroTarget targetType, float dist, bool playerOnly, int32 aura)
{
- const std::list<HostilReference*> &threatlist = me->getThreatManager().getThreatList();
+ const std::list<HostileReference*> &threatlist = me->getThreatManager().getThreatList();
if (threatlist.empty())
return;
DefaultTargetSelector targetSelector(me, dist,playerOnly, aura);
- for (std::list<HostilReference*>::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
+ for (std::list<HostileReference*>::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
if (targetSelector((*itr)->getTarget()))
targetList.push_back((*itr)->getTarget());
@@ -167,8 +167,8 @@ void UnitAI::DoAddAuraToAllHostilePlayers(uint32 spellid)
{
if (me->isInCombat())
{
- std::list<HostilReference*>& threatlist = me->getThreatManager().getThreatList();
- for (std::list<HostilReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
+ std::list<HostileReference*>& threatlist = me->getThreatManager().getThreatList();
+ for (std::list<HostileReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
if (Unit *pTemp = Unit::GetUnit(*me,(*itr)->getUnitGuid()))
if (pTemp->GetTypeId() == TYPEID_PLAYER)
@@ -182,8 +182,8 @@ void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered)
{
if (me->isInCombat())
{
- std::list<HostilReference*>& threatlist = me->getThreatManager().getThreatList();
- for (std::list<HostilReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
+ std::list<HostileReference*>& threatlist = me->getThreatManager().getThreatList();
+ for (std::list<HostileReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
if (Unit *pTemp = Unit::GetUnit(*me,(*itr)->getUnitGuid()))
if (pTemp->GetTypeId() == TYPEID_PLAYER)
diff --git a/src/game/UnitAI.h b/src/game/UnitAI.h
index 48d8aab385e..099b3fb88fa 100644
--- a/src/game/UnitAI.h
+++ b/src/game/UnitAI.h
@@ -72,15 +72,15 @@ class UnitAI
// predicate shall extend std::unary_function<Unit *, bool>
template<class PREDICATE> Unit* SelectTarget(SelectAggroTarget targetType, uint32 position, PREDICATE predicate)
{
- const std::list<HostilReference *> &threatlist = me->getThreatManager().getThreatList();
+ const std::list<HostileReference *> &threatlist = me->getThreatManager().getThreatList();
std::list<Unit*> targetList;
if (position >= threatlist.size())
return NULL;
- for (std::list<HostilReference*>::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
+ for (std::list<HostileReference*>::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
- HostilReference* ref = (*itr);
+ HostileReference* ref = (*itr);
if (predicate(ref->getTarget()))
targetList.push_back(ref->getTarget());
}
diff --git a/src/game/UnitEvents.h b/src/game/UnitEvents.h
index 69c66fe34b0..4e492ea144d 100644
--- a/src/game/UnitEvents.h
+++ b/src/game/UnitEvents.h
@@ -25,7 +25,7 @@
class ThreatContainer;
class ThreatManager;
-class HostilReference;
+class HostileReference;
//==============================================================
//==============================================================
@@ -87,7 +87,7 @@ class UnitBaseEvent
class ThreatRefStatusChangeEvent : public UnitBaseEvent
{
private:
- HostilReference* iHostilReference;
+ HostileReference* iHostileReference;
union
{
float iFValue;
@@ -96,13 +96,13 @@ class ThreatRefStatusChangeEvent : public UnitBaseEvent
};
ThreatManager* iThreatManager;
public:
- ThreatRefStatusChangeEvent(uint32 pType) : UnitBaseEvent(pType) { iHostilReference = NULL; }
+ ThreatRefStatusChangeEvent(uint32 pType) : UnitBaseEvent(pType) { iHostileReference = NULL; }
- ThreatRefStatusChangeEvent(uint32 pType, HostilReference* pHostilReference) : UnitBaseEvent(pType) { iHostilReference = pHostilReference; }
+ ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference) : UnitBaseEvent(pType) { iHostileReference = pHostileReference; }
- ThreatRefStatusChangeEvent(uint32 pType, HostilReference* pHostilReference, float pValue) : UnitBaseEvent(pType) { iHostilReference = pHostilReference; iFValue = pValue; }
+ ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference, float pValue) : UnitBaseEvent(pType) { iHostileReference = pHostileReference; iFValue = pValue; }
- ThreatRefStatusChangeEvent(uint32 pType, HostilReference* pHostilReference, bool pValue) : UnitBaseEvent(pType) { iHostilReference = pHostilReference; iBValue = pValue; }
+ ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference, bool pValue) : UnitBaseEvent(pType) { iHostileReference = pHostileReference; iBValue = pValue; }
int32 getIValue() const { return iIValue; }
@@ -112,7 +112,7 @@ class ThreatRefStatusChangeEvent : public UnitBaseEvent
void setBValue(bool pValue) { iBValue = pValue; }
- HostilReference* getReference() const { return iHostilReference; }
+ HostileReference* getReference() const { return iHostileReference; }
void setThreatManager(ThreatManager* pThreatManager) { iThreatManager = pThreatManager; }
@@ -127,7 +127,7 @@ class ThreatManagerEvent : public ThreatRefStatusChangeEvent
ThreatContainer* iThreatContainer;
public:
ThreatManagerEvent(uint32 pType) : ThreatRefStatusChangeEvent(pType) {}
- ThreatManagerEvent(uint32 pType, HostilReference* pHostilReference) : ThreatRefStatusChangeEvent(pType, pHostilReference) {}
+ ThreatManagerEvent(uint32 pType, HostileReference* pHostileReference) : ThreatRefStatusChangeEvent(pType, pHostileReference) {}
void setThreatContainer(ThreatContainer* pThreatContainer) { iThreatContainer = pThreatContainer; }
diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp
index 0288b5bb5e5..06b821178a0 100644
--- a/src/game/WaypointMovementGenerator.cpp
+++ b/src/game/WaypointMovementGenerator.cpp
@@ -246,7 +246,7 @@ uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const
void FlightPathMovementGenerator::Initialize(Player &player)
{
- player.getHostilRefManager().setOnlineOfflineState(false);
+ player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
LoadPath(player);
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp
index cf487b1ca76..9a50a606b2b 100644
--- a/src/game/WorldSession.cpp
+++ b/src/game/WorldSession.cpp
@@ -311,14 +311,14 @@ void WorldSession::LogoutPlayer(bool Save)
//FIXME: logout must be delayed in case lost connection with client in time of combat
if (_player->GetDeathTimer())
{
- _player->getHostilRefManager().deleteReferences();
+ _player->getHostileRefManager().deleteReferences();
_player->BuildPlayerRepop();
_player->RepopAtGraveyard();
}
else if (!_player->getAttackers().empty())
{
_player->CombatStop();
- _player->getHostilRefManager().setOnlineOfflineState(false);
+ _player->getHostileRefManager().setOnlineOfflineState(false);
_player->RemoveAllAurasOnDeath();
// build set of player who attack _player or who have pet attacking of _player