mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-17 00:54:35 +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);
|
||||
|
||||
@@ -84,7 +84,7 @@ bool BgInviteActiveTrigger::IsActive()
|
||||
if (ginfo.IsInvitedToBGInstanceGUID && ginfo.RemoveInviteTime)
|
||||
{
|
||||
LOG_INFO("playerbots", "Bot {} <{}> ({} {}) : Invited to BG but not in BG",
|
||||
bot->GetGUID().ToString().c_str(), bot->GetName(), bot->getLevel(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H");
|
||||
bot->GetGUID().ToString().c_str(), bot->GetName(), bot->GetLevel(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ bool RpgDuelTrigger::IsActive()
|
||||
return false;
|
||||
|
||||
// Less spammy duels
|
||||
if (bot->getLevel() < 3)
|
||||
if (bot->GetLevel() < 3)
|
||||
return false;
|
||||
|
||||
if (botAI->HasRealPlayerMaster())
|
||||
@@ -450,10 +450,10 @@ bool RpgDuelTrigger::IsActive()
|
||||
if (!player)
|
||||
return false;
|
||||
|
||||
if (player->getLevel() > bot->getLevel() + 3)
|
||||
if (player->GetLevel() > bot->GetLevel() + 3)
|
||||
return false;
|
||||
|
||||
if (bot->getLevel() > player->getLevel() + 10)
|
||||
if (bot->GetLevel() > player->GetLevel() + 10)
|
||||
return false;
|
||||
|
||||
// caster or target already have requested duel
|
||||
|
||||
@@ -22,7 +22,7 @@ bool MoveStuckTrigger::IsActive()
|
||||
if (posVal->LastChangeDelay() > 5 * MINUTE)
|
||||
{
|
||||
// LOG_INFO("playerbots", "Bot {} {}:{} <{}> was in the same position for {} seconds",
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ bool MoveStuckTrigger::IsActive()
|
||||
if (longLog)
|
||||
{
|
||||
// LOG_INFO("playerbots", "Bot {} {}:{} <{}> was in the same position for 10mins",
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
}
|
||||
|
||||
return longLog;
|
||||
@@ -68,7 +68,7 @@ bool MoveLongStuckTrigger::IsActive()
|
||||
if (grid.x_coord < 0 || grid.x_coord >= MAX_NUMBER_OF_GRIDS)
|
||||
{
|
||||
// LOG_INFO("playerbots", "Bot {} {}:{} <{}> was in grid {},{} on map {}",
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName(), grid.x_coord, grid.y_coord, botPos.getMapId());
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName(), grid.x_coord, grid.y_coord, botPos.getMapId());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ bool MoveLongStuckTrigger::IsActive()
|
||||
if (grid.y_coord < 0 || grid.y_coord >= MAX_NUMBER_OF_GRIDS)
|
||||
{
|
||||
// LOG_INFO("playerbots", "Bot {} {}:{} <{}> was in grid {},{} on map {}",
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName(), grid.x_coord, grid.y_coord, botPos.getMapId());
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName(), grid.x_coord, grid.y_coord, botPos.getMapId());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ bool MoveLongStuckTrigger::IsActive()
|
||||
if (cell.GridX() > 0 && cell.GridY() > 0 && !MMAP::MMapFactory::createOrGetMMapMgr()->loadMap(botPos.getMapId(), cell.GridX(), cell.GridY()))
|
||||
{
|
||||
// LOG_INFO("playerbots", "Bot {} {}:{} <{}> was in unloaded grid {},{} on map {}",
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName(), grid.x_coord, grid.y_coord, botPos.getMapId());
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName(), grid.x_coord, grid.y_coord, botPos.getMapId());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ bool MoveLongStuckTrigger::IsActive()
|
||||
if (posVal->LastChangeDelay() > 10 * MINUTE)
|
||||
{
|
||||
// LOG_INFO("playerbots", "Bot {} {}:{} <{}> was in the same position for {} seconds",
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ bool MoveLongStuckTrigger::IsActive()
|
||||
if (longLog)
|
||||
{
|
||||
// LOG_INFO("playerbots", "Bot {} {}:{} <{}> was in the same position for 15mins",
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
}
|
||||
|
||||
return longLog;
|
||||
@@ -146,7 +146,7 @@ bool CombatStuckTrigger::IsActive()
|
||||
if (combatVal->LastChangeDelay() > 5 * MINUTE)
|
||||
{
|
||||
// LOG_INFO("playerbots", "Bot {} {}:{} <{}> was in combat for {} seconds",
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ bool CombatLongStuckTrigger::IsActive()
|
||||
if (combatVal->LastChangeDelay() > 15 * MINUTE)
|
||||
{
|
||||
// LOG_INFO("playerbots", "Bot {} {}:{} <{}> was in combat for {} seconds",
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
// bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName(), posVal->LastChangeDelay());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user