mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 18:30:27 +00:00
Fix: Updated to work with newer commits of AzerothCore
This commit is contained in:
@@ -62,7 +62,7 @@ uint8 BalancePercentValue::Calculate()
|
||||
if (!player || !player->IsAlive())
|
||||
continue;
|
||||
|
||||
playerLevel += player->getLevel();
|
||||
playerLevel += player->GetLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ uint8 BalancePercentValue::Calculate()
|
||||
if (!creature || !creature->IsAlive())
|
||||
continue;
|
||||
|
||||
uint32 level = creature->getLevel();
|
||||
uint32 level = creature->GetLevel();
|
||||
|
||||
switch (creature->GetCreatureTemplate()->rank)
|
||||
{
|
||||
|
||||
@@ -143,7 +143,7 @@ uint32 MoneyNeededForValue::Calculate()
|
||||
|
||||
uint32 moneyWanted = 0;
|
||||
|
||||
uint32 level = bot->getLevel();
|
||||
uint32 level = bot->GetLevel();
|
||||
|
||||
switch (needMoneyFor)
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ Unit* GrindTargetValue::FindTargetForGrinding(uint32 assistCount)
|
||||
//if (!bot->InBattleground() && master && master->GetDistance(unit) >= sPlayerbotAIConfig->grindDistance && !sRandomPlayerbotMgr->IsRandomBot(bot))
|
||||
//continue;
|
||||
|
||||
if (!bot->InBattleground() && (int)unit->getLevel() - (int)bot->getLevel() > 4 && !unit->GetGUID().IsPlayer())
|
||||
if (!bot->InBattleground() && (int)unit->GetLevel() - (int)bot->GetLevel() > 4 && !unit->GetGUID().IsPlayer())
|
||||
continue;
|
||||
|
||||
// if (needForQuestMap.find(unit->GetEntry()) == needForQuestMap.end())
|
||||
@@ -160,7 +160,7 @@ bool GrindTargetValue::needForQuest(Unit* target)
|
||||
{
|
||||
QuestStatusData* questStatus = sTravelMgr->getQuestStatus(bot, questId);
|
||||
|
||||
if (questTemplate->GetQuestLevel() > bot->getLevel())
|
||||
if (questTemplate->GetQuestLevel() > bot->GetLevel())
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < QUEST_OBJECTIVES_COUNT; j++)
|
||||
|
||||
@@ -190,7 +190,7 @@ ItemUsage ItemUsageValue::QueryItemUsageForEquip(ItemTemplate const* itemProto)
|
||||
|
||||
if (itemProto->Class == ITEM_CLASS_WEAPON && !sRandomItemMgr->CanEquipWeapon(bot->getClass(), itemProto))
|
||||
shouldEquip = false;
|
||||
if (itemProto->Class == ITEM_CLASS_ARMOR && !sRandomItemMgr->CanEquipArmor(bot->getClass(), bot->getLevel(), itemProto))
|
||||
if (itemProto->Class == ITEM_CLASS_ARMOR && !sRandomItemMgr->CanEquipArmor(bot->getClass(), bot->GetLevel(), itemProto))
|
||||
shouldEquip = false;
|
||||
|
||||
Item* oldItem = bot->GetItemByPos(dest);
|
||||
@@ -228,7 +228,7 @@ ItemUsage ItemUsageValue::QueryItemUsageForEquip(ItemTemplate const* itemProto)
|
||||
if (oldItemProto->Class == ITEM_CLASS_WEAPON && !sRandomItemMgr->CanEquipWeapon(bot->getClass(), oldItemProto))
|
||||
existingShouldEquip = false;
|
||||
|
||||
if (oldItemProto->Class == ITEM_CLASS_ARMOR && !sRandomItemMgr->CanEquipArmor(bot->getClass(), bot->getLevel(), oldItemProto))
|
||||
if (oldItemProto->Class == ITEM_CLASS_ARMOR && !sRandomItemMgr->CanEquipArmor(bot->getClass(), bot->GetLevel(), oldItemProto))
|
||||
existingShouldEquip = false;
|
||||
|
||||
// uint32 oldItemPower = sRandomItemMgr->GetLiveStatWeight(bot, oldItemProto->ItemId);
|
||||
|
||||
@@ -177,7 +177,7 @@ BattlegroundTypeId RpgBgTypeValue::Calculate()
|
||||
if (!bg)
|
||||
continue;
|
||||
|
||||
if (bot->getLevel() < bg->GetMinLevel())
|
||||
if (bot->GetLevel() < bg->GetMinLevel())
|
||||
continue;
|
||||
|
||||
// check if already in queue
|
||||
|
||||
@@ -136,7 +136,7 @@ questGiverMap QuestGiversValue::Calculate()
|
||||
|
||||
std::vector<GuidPosition> ActiveQuestGiversValue::Calculate()
|
||||
{
|
||||
questGiverMap qGivers = GAI_VALUE2(questGiverMap, "quest givers", bot->getLevel());
|
||||
questGiverMap qGivers = GAI_VALUE2(questGiverMap, "quest givers", bot->GetLevel());
|
||||
|
||||
std::vector<GuidPosition> retQuestGivers;
|
||||
|
||||
@@ -406,7 +406,7 @@ uint32 DialogStatusValue::getDialogStatus(Player* bot, int32 questgiver, uint32
|
||||
{
|
||||
dialogStatusNew = DIALOG_STATUS_REWARD_REP;
|
||||
}
|
||||
else if (lowLevelDiff < 0 || bot->getLevel() <= bot->GetQuestLevel(pQuest) + uint32(lowLevelDiff))
|
||||
else if (lowLevelDiff < 0 || bot->GetLevel() <= bot->GetQuestLevel(pQuest) + uint32(lowLevelDiff))
|
||||
{
|
||||
dialogStatusNew = DIALOG_STATUS_AVAILABLE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user