mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-12-01 21:12:50 +08:00
[Warnings] Fix
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user