Skip to content

Commit

Permalink
Update modules.lua (#3792)
Browse files Browse the repository at this point in the history
using the it variable instead
  • Loading branch information
Evil Puncker authored and DSpeichert committed May 9, 2022
1 parent c4b9c3d commit f4ee2d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/npc/lib/npcsystem/modules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ if Modules == nil then
if it:getId() ~= 0 then
local shopItem = self:getShopItem(itemid, itemSubType)
if shopItem == nil then
self.npcHandler.shopItems[#self.npcHandler.shopItems + 1] = {id = itemid, buy = cost, sell = -1, subType = itemSubType, name = realName or ItemType(itemid):getName()}
self.npcHandler.shopItems[#self.npcHandler.shopItems + 1] = {id = itemid, buy = cost, sell = -1, subType = itemSubType, name = realName or it:getName()}
else
if cost < shopItem.sell then
print("[Warning : " .. Npc():getName() .. "] NpcSystem: Buy price lower than sell price: (".. shopItem.name ..")")
Expand Down Expand Up @@ -916,7 +916,7 @@ if Modules == nil then
if it:getId() ~= 0 then
local shopItem = self:getShopItem(itemid, itemSubType)
if shopItem == nil then
self.npcHandler.shopItems[#self.npcHandler.shopItems + 1] = {id = itemid, buy = -1, sell = cost, subType = itemSubType, name = realName or ItemType(itemid):getName()}
self.npcHandler.shopItems[#self.npcHandler.shopItems + 1] = {id = itemid, buy = -1, sell = cost, subType = itemSubType, name = realName or it:getName()}
else
if shopItem.buy > -1 and cost > shopItem.buy then
print("[Warning : " .. Npc():getName() .. "] NpcSystem: Sell price higher than buy price: (".. shopItem.name ..")")
Expand Down

0 comments on commit f4ee2d4

Please sign in to comment.