Merge pull request #630 from Jellypowered/mining-skinning

Update Items Eligible for Professions
This commit is contained in:
Yunfan Li
2024-10-21 11:02:23 +08:00
committed by GitHub
2 changed files with 41 additions and 4 deletions

View File

@@ -237,10 +237,23 @@ bool LootObject::IsLootPossible(Player* bot)
if (reqSkillValue > skillValue)
return false;
if (skillId == SKILL_MINING && !bot->HasItemCount(2901, 1))
return false;
if (skillId == SKILL_MINING && !bot->HasItemCount(756, 1) &&
!bot->HasItemCount(778, 1) &&
!bot->HasItemCount(1819, 1) &&
!bot->HasItemCount(1893, 1) &&
!bot->HasItemCount(1959, 1) &&
!bot->HasItemCount(2901, 1) &&
!bot->HasItemCount(9465, 1) &&
!bot->HasItemCount(20723, 1) &&
!bot->HasItemCount(40772, 1) &&
!bot->HasItemCount(40892, 1) &&
!bot->HasItemCount(40893, 1) )
if (skillId == SKILL_SKINNING && !bot->HasItemCount(7005, 1))
if (skillId == SKILL_SKINNING && !bot->HasItemCount(7005, 1) &&
!bot->HasItemCount(40772, 1) &&
!bot->HasItemCount(40893, 1) &&
!bot->HasItemCount(12709, 1) &&
!bot->HasItemCount(19901, 1) )
return false;
return true;

View File

@@ -355,8 +355,28 @@ bool ItemUsageValue::IsItemNeededForSkill(ItemTemplate const* proto)
{
switch (proto->ItemId)
{
case 2901: // Mining pick
case 756: // Tunnel Pick
return botAI->HasSkill(SKILL_MINING);
case 778: // Kobold Excavation Pick
return botAI->HasSkill(SKILL_MINING);
case 1819: // Gouging Pick
return botAI->HasSkill(SKILL_MINING);
case 1893: // Miner's Revenge
return botAI->HasSkill(SKILL_MINING);
case 1959: // Cold Iron Pick
return botAI->HasSkill(SKILL_MINING);
case 2901: // Mining Pick
return botAI->HasSkill(SKILL_MINING);
case 9465: // Digmaster 5000
return botAI->HasSkill(SKILL_MINING);
case 20723: // Brann's Trusty Pick
return botAI->HasSkill(SKILL_MINING);
case 40772: // Gnomish Army Knife
return botAI->HasSkill(SKILL_MINING) || botAI->HasSkill(SKILL_ENGINEERING) || botAI->HasSkill(SKILL_BLACKSMITHING) || botAI->HasSkill(SKILL_COOKING) || botAI->HasSkill(SKILL_SKINNING);
case 40892: // Hammer Pick
return botAI->HasSkill(SKILL_MINING) || botAI->HasSkill(SKILL_BLACKSMITHING);
case 40893: // Bladed Pickaxe
return botAI->HasSkill(SKILL_MINING) || botAI->HasSkill(SKILL_SKINNING);
case 5956: // Blacksmith Hammer
return botAI->HasSkill(SKILL_BLACKSMITHING) || botAI->HasSkill(SKILL_ENGINEERING);
case 6219: // Arclight Spanner
@@ -373,6 +393,10 @@ bool ItemUsageValue::IsItemNeededForSkill(ItemTemplate const* proto)
return botAI->HasSkill(SKILL_ENCHANTING);
case 7005: // Skinning Knife
return botAI->HasSkill(SKILL_SKINNING);
case 12709:
return botAI->HasSkill(SKILL_SKINNING);
case 19901:
return botAI->HasSkill(SKILL_SKINNING);
case 4471: // Flint and Tinder
return botAI->HasSkill(SKILL_COOKING);
case 4470: // Simple Wood