Compile bug fixes.

This commit is contained in:
whipowill
2022-05-20 14:04:16 -05:00
parent 4c0db8eda8
commit f9eb041827
5 changed files with 9 additions and 9 deletions

View File

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

View File

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

View File

@@ -72,7 +72,7 @@ void AttackersValue::AddAttackersOf(Player* player, std::set<Unit*>& 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<ObjectGuid>("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)
{

View File

@@ -21,7 +21,7 @@ Unit* TargetValue::FindTarget(FindTargetStrategy* strategy)
if (!unit)
continue;
ThreatMgr &ThreatMgr = unit->getThreatMgr();
ThreatMgr &ThreatMgr = unit->GetThreatMgr();
strategy->CheckAttacker(unit, &ThreatMgr);
}

View File

@@ -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;
}