Core/Combat: rename getThreatMgr() to GetThreatMgr() (#11758)

This commit is contained in:
Maelthyr
2022-05-18 10:36:57 +02:00
committed by GitHub
parent 8c058791ed
commit c5368816fa
67 changed files with 129 additions and 129 deletions

View File

@@ -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();