Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Item Property Removal and price comparison

DJ_WoWDJ_WoW Member Posts: 31
edited February 2019 in Builders - Scripting
Gooday all,

I am working on a crafting system and I need to loop through the Item Properties and remove a specified Item Property before adding the new Item Property with value. This is what I have. When I compare the two Values in iStartCost and iEndCost it is clear that the Item Property has not been remove. Am I missing a step here?

int iStartCost = GetGoldPieceValue(oCopy);

itemproperty  ipLoop, ipType;

ipLoop = GetFirstItemProperty(oCopy);

 while (GetIsItemPropertyValid(ipLoop))

      {if GetItemPropertyType(ipLoop)==ITEM_PROPERTY_ENHANCEMENT_BONUS)

         {RemoveItemProperty(oCopy, ipLoop);}

    ipLoop = GetNextItemProperty(oCopy);


REM: I add new Item Property to oCopy and compare prices.

int iEndCost = GetGoldPieceValue(oCopy);

Thank you for your time,


Sign In or Register to comment.