Skip to content

Commit

Permalink
Update Items Eligible for Professions
Browse files Browse the repository at this point in the history
Adds several items and cases for Skinning, Mining, Blacksmithing.
  • Loading branch information
Jellypowered committed Oct 20, 2024
1 parent b234824 commit be8f529
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
21 changes: 17 additions & 4 deletions src/LootObjectStack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_SKINNING && !bot->HasItemCount(7005, 1))
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) &&
!bot->HasItemCount(40772, 1) &&
!bot->HasItemCount(40893, 1) &&
!bot->HasItemCount(12709, 1) &&
!bot->HasItemCount(19901, 1) )
return false;

return true;
Expand Down
26 changes: 25 additions & 1 deletion src/strategy/values/ItemUsageValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit be8f529

Please sign in to comment.