From f9eb041827d72023021c33938c3485893343d538 Mon Sep 17 00:00:00 2001 From: whipowill Date: Fri, 20 May 2022 14:04:16 -0500 Subject: [PATCH] Compile bug fixes. --- src/strategy/actions/MovementActions.cpp | 2 +- src/strategy/values/AttackerCountValues.cpp | 2 +- src/strategy/values/AttackersValue.cpp | 8 ++++---- src/strategy/values/TargetValue.cpp | 2 +- src/strategy/values/ThreatValues.cpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/strategy/actions/MovementActions.cpp b/src/strategy/actions/MovementActions.cpp index 6a350bf7..7b363929 100644 --- a/src/strategy/actions/MovementActions.cpp +++ b/src/strategy/actions/MovementActions.cpp @@ -1048,7 +1048,7 @@ bool MovementAction::Flee(Unit *target) } } - HostileReference* ref = target->getThreatMgr().getCurrentVictim(); + HostileReference* ref = target->GetThreatMgr().getCurrentVictim(); if (ref && ref->getTarget() == bot) // bot is target - try to flee to tank or master { if (Group* group = bot->GetGroup()) diff --git a/src/strategy/values/AttackerCountValues.cpp b/src/strategy/values/AttackerCountValues.cpp index dccf9ea3..f022ee26 100644 --- a/src/strategy/values/AttackerCountValues.cpp +++ b/src/strategy/values/AttackerCountValues.cpp @@ -31,7 +31,7 @@ bool HasAggroValue::Calculate() ref = ref->next(); } - ref = target->getThreatMgr().getCurrentVictim(); + ref = target->GetThreatMgr().getCurrentVictim(); if (ref) { if (Unit* victim = ref->getTarget()) diff --git a/src/strategy/values/AttackersValue.cpp b/src/strategy/values/AttackersValue.cpp index 5d788e8d..bc94d045 100644 --- a/src/strategy/values/AttackersValue.cpp +++ b/src/strategy/values/AttackersValue.cpp @@ -72,7 +72,7 @@ void AttackersValue::AddAttackersOf(Player* player, std::set& targets) { if (!player->GetGroup()) { - if (!unit->getThreatMgr().getThreat(player) && (!unit->getThreatMgr().getCurrentVictim() || unit->getThreatMgr().getCurrentVictim()->getTarget() != player)) + if (!unit->GetThreatMgr().getThreat(player) && (!unit->GetThreatMgr().getCurrentVictim() || unit->GetThreatMgr().getCurrentVictim()->getTarget() != player)) continue; } @@ -107,7 +107,7 @@ bool AttackersValue::IsPossibleTarget(Unit* attacker, Player* bot, float range) bool leaderHasThreat = false; if (attacker && bot->GetGroup() && botAI->GetMaster()) - leaderHasThreat = attacker->getThreatMgr().getThreat(botAI->GetMaster()); + leaderHasThreat = attacker->GetThreatMgr().getThreat(botAI->GetMaster()); bool isMemberBotGroup = false; if (bot->GetGroup() && botAI->GetMaster()) @@ -131,7 +131,7 @@ bool AttackersValue::IsPossibleTarget(Unit* attacker, Player* bot, float range) bool AttackersValue::IsValidTarget(Unit *attacker, Player *bot) { - return IsPossibleTarget(attacker, bot) && (attacker->getThreatMgr().getCurrentVictim() || attacker->GetGuidValue(UNIT_FIELD_TARGET) || + return IsPossibleTarget(attacker, bot) && (attacker->GetThreatMgr().getCurrentVictim() || attacker->GetGuidValue(UNIT_FIELD_TARGET) || attacker->GetGUID().IsPlayer() || attacker->GetGUID() == GET_PLAYERBOT_AI(bot)->GetAiObjectContext()->GetValue("pull target")->Get()); } bool PossibleAddsValue::Calculate() @@ -146,7 +146,7 @@ bool PossibleAddsValue::Calculate() if (Unit* add = botAI->GetUnit(guid)) { - if (!add->GetTarget() && !add->getThreatMgr().getCurrentVictim() && add->IsHostileTo(bot)) + if (!add->GetTarget() && !add->GetThreatMgr().getCurrentVictim() && add->IsHostileTo(bot)) { for (ObjectGuid const attackerGUID : attackers) { diff --git a/src/strategy/values/TargetValue.cpp b/src/strategy/values/TargetValue.cpp index facd11b4..f56bdc99 100644 --- a/src/strategy/values/TargetValue.cpp +++ b/src/strategy/values/TargetValue.cpp @@ -21,7 +21,7 @@ Unit* TargetValue::FindTarget(FindTargetStrategy* strategy) if (!unit) continue; - ThreatMgr &ThreatMgr = unit->getThreatMgr(); + ThreatMgr &ThreatMgr = unit->GetThreatMgr(); strategy->CheckAttacker(unit, &ThreatMgr); } diff --git a/src/strategy/values/ThreatValues.cpp b/src/strategy/values/ThreatValues.cpp index 6a5af135..39b9a885 100644 --- a/src/strategy/values/ThreatValues.cpp +++ b/src/strategy/values/ThreatValues.cpp @@ -42,7 +42,7 @@ uint8 ThreatValue::Calculate(Unit* target) if (!group) return 0; - float botThreat = target->getThreatMgr().getThreat(bot); + float botThreat = target->GetThreatMgr().getThreat(bot); float maxThreat = -1.0f; bool hasTank = false; @@ -55,7 +55,7 @@ uint8 ThreatValue::Calculate(Unit* target) if (botAI->IsTank(player)) { hasTank = true; - float threat = target->getThreatMgr().getThreat(player); + float threat = target->GetThreatMgr().getThreat(player); if (maxThreat < threat) maxThreat = threat; }