mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-15 09:50:27 +00:00
Fix: Updated to work with newer commits of AzerothCore
This commit is contained in:
@@ -108,7 +108,7 @@ bool OutNumberedTrigger::IsActive()
|
||||
if (bot->GetGroup() && bot->GetGroup()->isRaidGroup())
|
||||
return false;
|
||||
|
||||
int32 botLevel = bot->getLevel();
|
||||
int32 botLevel = bot->GetLevel();
|
||||
uint32 friendPower = 200;
|
||||
uint32 foePower = 0;
|
||||
for (auto& attacker : botAI->GetAiObjectContext()->GetValue<GuidVector>("attackers")->Get())
|
||||
@@ -117,7 +117,7 @@ bool OutNumberedTrigger::IsActive()
|
||||
if (!creature)
|
||||
continue;
|
||||
|
||||
int32 dLevel = creature->getLevel() - botLevel;
|
||||
int32 dLevel = creature->GetLevel() - botLevel;
|
||||
if (dLevel > -10)
|
||||
foePower = std::max(100 + 10 * dLevel, dLevel * 200);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ bool OutNumberedTrigger::IsActive()
|
||||
if (!player || player == bot)
|
||||
continue;
|
||||
|
||||
int32 dLevel = player->getLevel() - botLevel;
|
||||
int32 dLevel = player->GetLevel() - botLevel;
|
||||
|
||||
if (dLevel > -10 && bot->GetDistance(player) < 10.0f)
|
||||
friendPower += std::max(200 + 20 * dLevel, dLevel * 200);
|
||||
|
||||
Reference in New Issue
Block a user