Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-09-26 10:01:10 -06:00
committed by GitHub
82 changed files with 1459 additions and 245 deletions

View File

@@ -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().ModifyThreatByPercent(victim, -100); // Reset threat to zero.
m_owner.GetThreatMgr().AddThreat(victim, m_threatValue); // Set to the previous value it had, first before modification.
}
}
@@ -839,13 +839,13 @@ void Creature::Update(uint32 diff)
}
};
if (GetThreatMgr().getThreatList().size() <= 1)
if (GetThreatMgr().GetThreatListSize() <= 1)
{
EnterEvade();
}
else
{
if (HostileReference* ref = GetThreatMgr().getOnlineContainer().getReferenceByTarget(m_cannotReachTarget))
if (HostileReference* ref = GetThreatMgr().GetOnlineContainer().getReferenceByTarget(m_cannotReachTarget))
{
ref->removeReference();
SetCannotReachTarget();
@@ -3627,11 +3627,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().ModifyThreatByPercent(victim, percent);
}
TemporaryThreatModifierEvent* pEvent = new TemporaryThreatModifierEvent(*this, victim->GetGUID(), currentThreat);