Skip to content

Commit

Permalink
tkdev-#house-type-item-by-quantity
Browse files Browse the repository at this point in the history
Co-authored-by: Elson Costa <[email protected]>
  • Loading branch information
LeoTKBR and elsongabriel committed Feb 29, 2024
1 parent 355fca6 commit da6f3e6
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions data/modules/scripts/gamestore/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1631,20 +1631,22 @@ function GameStore.processHouseRelatedPurchase(player, offer)
local inbox = player:getStoreInbox()
if inbox then
for _, itemId in ipairs(itemIds) do
local decoKit = inbox:addItem(ITEM_DECORATION_KIT, 1)
if decoKit then
decoKit:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "You bought this item in the Store.\nUnwrap it in your own house to create a <" .. ItemType(itemId):getName() .. ">.")
decoKit:setCustomAttribute("unWrapId", itemId)
if isCaskItem(itemId) then
decoKit:setAttribute(ITEM_ATTRIBUTE_DATE, offer.count)
end
for i = 1, offer.count do
local decoKit = inbox:addItem(ITEM_DECORATION_KIT, 1)
if decoKit then
decoKit:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "You bought this item in the Store.\nUnwrap it in your own house to create a <" .. ItemType(itemId):getName() .. ">.")
decoKit:setCustomAttribute("unWrapId", itemId)
if isCaskItem(itemId) then
decoKit:setAttribute(ITEM_ATTRIBUTE_DATE, offer.count)
end

if offer.movable ~= true then
decoKit:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime())
if offer.movable ~= true then
decoKit:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime())
end
end
end
player:sendUpdateContainer(inbox)
end
player:sendUpdateContainer(inbox)
end
end

Expand Down

0 comments on commit da6f3e6

Please sign in to comment.