Fixed access issue on NPC vendors

If an item on an NPC vendor is no trade you can get a permissions error when you attempt to purchase the item. Aconite gave me this fix, and I am including it from my private repo.
This commit is contained in:
HeronAlexandria
2022-03-12 01:15:06 -06:00
committed by GitHub
parent 4117b14087
commit b862114e8c

View File

@@ -101,6 +101,13 @@ public class vendor extends script.base_script
{
objectForSale = createObjectOverloaded(item, containerList[idx]);
}
if(hasObjVar(objectForSale, "noTrade"))
{
removeObjVar(objectForSale, "noTrade");
attachScript(objectForSale, "item.special.nomove");
}
setObjVar(objectForSale, OBJECT_FOR_SALE_CASH_COST, creditCost);
setObjVar(objectForSale, OBJECT_FOR_SALE_TOKEN_COST, tokenCost);
if (hasObjVar(self, VENDOR_TOKEN_TYPE))