Merge pull request #287 from liyunfan1223/dev0624

Dev0624
This commit is contained in:
Yunfan Li
2024-07-02 20:39:36 +08:00
committed by GitHub
24 changed files with 210 additions and 71 deletions

View File

@@ -2502,8 +2502,7 @@ void PlayerbotFactory::InitAmmo()
case ITEM_SUBCLASS_WEAPON_CROSSBOW:
subClass = ITEM_SUBCLASS_ARROW;
break;
case ITEM_SUBCLASS_WEAPON_THROWN:
subClass = ITEM_SUBCLASS_THROWN;
default:
break;
}
@@ -2512,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)
{
@@ -3879,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) ||
@@ -3890,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 *= 10;
}
}
if (proto->Class == ITEM_CLASS_WEAPON) {
if (cls == CLASS_HUNTER && proto->SubClass == ITEM_SUBCLASS_WEAPON_THROWN) {