Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lei Chabolan committed Sep 17, 2022
2 parents 458670a + f1a7562 commit 762bd8b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions TemplePlus/ui/ui_item_creation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,12 @@ bool UiItemCreation::CreateItemResourceCheck(objHndl crafter, objHndl objHndItem
if (itemCreationType == ItemCreationType::CraftMagicArmsAndArmor) {
craftingCostCP = MaaCpCost(CRAFT_EFFECT_INVALID);
}
// Wands & Potions
// Wands
else if (itemCreationType == ItemCreationType::CraftWand) {
itemWorth = CraftedWandWorth(objHndItem, CraftedWandCasterLevel(objHndItem)); //ItemWorthAdjustedForCasterLevel(objHndItem, CraftedWandCasterLevel(objHndItem));
craftingCostCP = itemWorth / 2;
}
// Potions
// Potions etc
else {
// current method for crafting stuff:
craftingCostCP = itemWorth / 2;
Expand Down Expand Up @@ -483,6 +483,10 @@ bool UiItemCreation::CreateItemResourceCheck(objHndl crafter, objHndl objHndItem
*insuffPrereqs = 1;
canCraft = 0;
}

// check XP
int itemXPCost = itemWorth / 2500;
xpCheck = surplusXP >= itemXPCost;
}

if (xpCheck){
Expand Down

0 comments on commit 762bd8b

Please sign in to comment.