[Avoid aoe] Position selection

This commit is contained in:
Yunfan Li
2024-06-29 21:57:28 +08:00
parent b9b4362bdd
commit 55515f0ec5
5 changed files with 45 additions and 27 deletions

View File

@@ -2511,7 +2511,7 @@ void PlayerbotFactory::InitAmmo()
uint32 entry = sRandomItemMgr->GetAmmo(level, subClass);
uint32 count = bot->GetItemCount(entry);
uint32 maxCount = 5000;
uint32 maxCount = 6000;
if (count < maxCount / 2)
{
@@ -3878,10 +3878,9 @@ float PlayerbotFactory::CalculateItemScore(uint32 item_id, Player* bot)
score *= 0.1;
}
// spec with double hand
// fury with titan's grip, fury without duel wield, arms, bear, retribution, blood dk
if (isDoubleHand &&
((cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && bot->CanTitanGrip()) ||
(cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && !bot->CanDualWield()) ||
// fury without duel wield, arms, bear, retribution, blood dk
if (isDoubleHand &&
((cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && !bot->CanDualWield()) ||
(cls == CLASS_WARRIOR && tab == WARRIOR_TAB_ARMS) ||
(cls == CLASS_DRUID && tab == 1) ||
(cls == CLASS_PALADIN && tab == 2) ||
@@ -3889,6 +3888,11 @@ float PlayerbotFactory::CalculateItemScore(uint32 item_id, Player* bot)
(cls == CLASS_SHAMAN && tab == 1 && !bot->CanDualWield()))) {
score *= 10;
}
// fury with titan's grip
if (isDoubleHand && proto->SubClass != ITEM_SUBCLASS_WEAPON_POLEARM &&
(cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && bot->CanTitanGrip())) {
score *= 0.1;
}
}
if (proto->Class == ITEM_CLASS_WEAPON) {
if (cls == CLASS_HUNTER && proto->SubClass == ITEM_SUBCLASS_WEAPON_THROWN) {