From 47f25afc8218349d6d5ee78cd3cbf3a95f158fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Lu=C3=ADs=20Lucarelo=20Lamonato?= Date: Fri, 8 Mar 2024 13:38:06 -0300 Subject: [PATCH] fix: manage storages talkaction (#2394) --- data/scripts/talkactions/god/manage_storage.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/scripts/talkactions/god/manage_storage.lua b/data/scripts/talkactions/god/manage_storage.lua index 27a153e6d70..929ef7b4417 100644 --- a/data/scripts/talkactions/god/manage_storage.lua +++ b/data/scripts/talkactions/god/manage_storage.lua @@ -26,13 +26,13 @@ function Player.getStorageValueTalkaction(self, param) if storageKey == nil then -- Get the key for this storage name local storageName = tostring(split[2]) - local storageValue = self:getStorageValueByName(storageName) + local storageValue = target:getStorageValueByName(storageName) self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The storage with id: " .. storageName .. " from player " .. split[1] .. " is: " .. storageValue .. ".") - return true + else + local storageValue = target:getStorageValue(storageKey) + self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The storage with id: " .. storageKey .. " from player " .. split[1] .. " is: " .. storageValue .. ".") end - local storageValue = self:getStorageValue(storageKey) - self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The storage with id: " .. storageKey .. " from player " .. split[1] .. " is: " .. storageValue .. ".") return true end