[Warnings] Fix

This commit is contained in:
Yunfan Li
2024-07-13 11:39:06 +08:00
parent 266aa1ec88
commit 2d1fc5b932
2 changed files with 7 additions and 5 deletions

View File

@@ -46,19 +46,19 @@ void ChooseTravelTargetAction::getNewTarget(TravelTarget* newTarget, TravelTarge
foundTarget = SetNpcFlagTarget(newTarget, { UNIT_NPC_FLAG_BANKER,UNIT_NPC_FLAG_BATTLEMASTER,UNIT_NPC_FLAG_AUCTIONEER }); foundTarget = SetNpcFlagTarget(newTarget, { UNIT_NPC_FLAG_BANKER,UNIT_NPC_FLAG_BATTLEMASTER,UNIT_NPC_FLAG_AUCTIONEER });
//Grind for money //Grind for money
if (!foundTarget && AI_VALUE(bool, "should get money")) if (!foundTarget && AI_VALUE(bool, "should get money")) {
if (urand(1, 100) > 66) if (urand(1, 100) > 66)
{ {
foundTarget = SetQuestTarget(newTarget, true); //Turn in quests for money. foundTarget = SetQuestTarget(newTarget, true); //Turn in quests for money.
if (!foundTarget) if (!foundTarget)
foundTarget = SetQuestTarget(newTarget); //Do low level quests foundTarget = SetQuestTarget(newTarget); //Do low level quests
} } else if (urand(1, 100) > 50) {
else if (urand(1, 100) > 50)
foundTarget = SetGrindTarget(newTarget); //Go grind mobs for money foundTarget = SetGrindTarget(newTarget); //Go grind mobs for money
else } else {
foundTarget = SetNewQuestTarget(newTarget); //Find a low level quest to do foundTarget = SetNewQuestTarget(newTarget); //Find a low level quest to do
}
}
//Continue //Continue
if (!foundTarget && urand(1, 100) > 10) //90% chance if (!foundTarget && urand(1, 100) > 10) //90% chance

View File

@@ -147,6 +147,8 @@ RollVote LootRollAction::CalculateRollVote(ItemTemplate const* proto)
case ITEM_USAGE_VENDOR: case ITEM_USAGE_VENDOR:
needVote = GREED; needVote = GREED;
break; break;
default:
break;
} }
return StoreLootAction::IsLootAllowed(proto->ItemId, GET_PLAYERBOT_AI(bot)) ? needVote : PASS; return StoreLootAction::IsLootAllowed(proto->ItemId, GET_PLAYERBOT_AI(bot)) ? needVote : PASS;