mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
Core/Combat: rename getThreatMgr() to GetThreatMgr() (#11758)
This commit is contained in:
@@ -207,8 +207,8 @@ bool TemporaryThreatModifierEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
||||
{
|
||||
if (m_owner.IsInCombatWith(victim))
|
||||
{
|
||||
m_owner.getThreatMgr().modifyThreatPercent(victim, -100); // Reset threat to zero.
|
||||
m_owner.getThreatMgr().addThreat(victim, m_threatValue); // Set to the previous value it had, first before modification.
|
||||
m_owner.GetThreatMgr().modifyThreatPercent(victim, -100); // Reset threat to zero.
|
||||
m_owner.GetThreatMgr().addThreat(victim, m_threatValue); // Set to the previous value it had, first before modification.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3548,11 +3548,11 @@ void Creature::ModifyThreatPercentTemp(Unit* victim, int32 percent, Milliseconds
|
||||
{
|
||||
if (victim)
|
||||
{
|
||||
float currentThreat = getThreatMgr().getThreat(victim);
|
||||
float currentThreat = GetThreatMgr().getThreat(victim);
|
||||
|
||||
if (percent != 0.0f)
|
||||
{
|
||||
getThreatMgr().modifyThreatPercent(victim, percent);
|
||||
GetThreatMgr().modifyThreatPercent(victim, percent);
|
||||
}
|
||||
|
||||
TemporaryThreatModifierEvent* pEvent = new TemporaryThreatModifierEvent(*this, victim->GetGUID(), currentThreat);
|
||||
|
||||
@@ -422,7 +422,7 @@ void Unit::Update(uint32 p_time)
|
||||
|
||||
_UpdateSpells( p_time );
|
||||
|
||||
if (CanHaveThreatList() && getThreatMgr().isNeedUpdateToClient(p_time))
|
||||
if (CanHaveThreatList() && GetThreatMgr().isNeedUpdateToClient(p_time))
|
||||
SendThreatListUpdate();
|
||||
|
||||
// update combat timer only for players and pets (only pets with PetAI)
|
||||
@@ -8915,7 +8915,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
return false;
|
||||
|
||||
if (victim && victim->IsAlive())
|
||||
victim->getThreatMgr().modifyThreatPercent(this, -10);
|
||||
victim->GetThreatMgr().modifyThreatPercent(this, -10);
|
||||
|
||||
basepoints0 = int32(CountPctFromMaxHealth(triggerAmount));
|
||||
trigger_spell_id = 31616;
|
||||
@@ -18569,8 +18569,8 @@ void Unit::SetPhaseMask(uint32 newPhaseMask, bool update)
|
||||
// modify threat lists for new phasemask
|
||||
if (GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
ThreatContainer::StorageType threatList = getThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType offlineThreatList = getThreatMgr().getOfflineThreatList();
|
||||
ThreatContainer::StorageType threatList = GetThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType offlineThreatList = GetThreatMgr().getOfflineThreatList();
|
||||
|
||||
// merge expects sorted lists
|
||||
threatList.sort();
|
||||
@@ -19521,15 +19521,15 @@ void Unit::UpdateHeight(float newZ)
|
||||
|
||||
void Unit::SendThreatListUpdate()
|
||||
{
|
||||
if (!getThreatMgr().isThreatListEmpty())
|
||||
if (!GetThreatMgr().isThreatListEmpty())
|
||||
{
|
||||
uint32 count = getThreatMgr().getThreatList().size();
|
||||
uint32 count = GetThreatMgr().getThreatList().size();
|
||||
|
||||
//LOG_DEBUG("entities.unit", "WORLD: Send SMSG_THREAT_UPDATE Message");
|
||||
WorldPacket data(SMSG_THREAT_UPDATE, 8 + count * 8);
|
||||
data << GetPackGUID();
|
||||
data << uint32(count);
|
||||
ThreatContainer::StorageType const& tlist = getThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType const& tlist = GetThreatMgr().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator itr = tlist.begin(); itr != tlist.end(); ++itr)
|
||||
{
|
||||
data << (*itr)->getUnitGuid().WriteAsPacked();
|
||||
@@ -19541,16 +19541,16 @@ void Unit::SendThreatListUpdate()
|
||||
|
||||
void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
|
||||
{
|
||||
if (!getThreatMgr().isThreatListEmpty())
|
||||
if (!GetThreatMgr().isThreatListEmpty())
|
||||
{
|
||||
uint32 count = getThreatMgr().getThreatList().size();
|
||||
uint32 count = GetThreatMgr().getThreatList().size();
|
||||
|
||||
LOG_DEBUG("entities.unit", "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message");
|
||||
WorldPacket data(SMSG_HIGHEST_THREAT_UPDATE, 8 + 8 + count * 8);
|
||||
data << GetPackGUID();
|
||||
data << pHostileReference->getUnitGuid().WriteAsPacked();
|
||||
data << uint32(count);
|
||||
ThreatContainer::StorageType const& tlist = getThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType const& tlist = GetThreatMgr().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator itr = tlist.begin(); itr != tlist.end(); ++itr)
|
||||
{
|
||||
data << (*itr)->getUnitGuid().WriteAsPacked();
|
||||
|
||||
@@ -2108,7 +2108,7 @@ public:
|
||||
void DeleteThreatList();
|
||||
void TauntApply(Unit* victim);
|
||||
void TauntFadeOut(Unit* taunter);
|
||||
ThreatMgr& getThreatMgr() { return m_ThreatMgr; }
|
||||
ThreatMgr& GetThreatMgr() { return m_ThreatMgr; }
|
||||
void addHatedBy(HostileReference* pHostileReference) { m_HostileRefMgr.insertFirst(pHostileReference); };
|
||||
void removeHatedBy(HostileReference* /*pHostileReference*/) { /* nothing to do yet */ }
|
||||
HostileRefMgr& getHostileRefMgr() { return m_HostileRefMgr; }
|
||||
|
||||
Reference in New Issue
Block a user