From 3ed464624bf49010511c3313d4de6509d44cf0e7 Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 19 Feb 2024 13:09:51 -0300 Subject: [PATCH] ops.. --- data-otservbr-global/lib/core/storages.lua | 1 - data/libs/core/global_storage.lua | 1 + data/scripts/actions/items/cobra_flask.lua | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 4cfc904c716..65fa630c48c 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -3089,7 +3089,6 @@ GlobalStorage = { OberonEventTime = 65009, PrinceDrazzakEventTime = 65010, ScarlettEtzelEventTime = 65011, - CobraBastionFlask = 65012, Inquisition = 65013, Yasir = 65014, IceCrack = 65016, diff --git a/data/libs/core/global_storage.lua b/data/libs/core/global_storage.lua index 778073f3ca6..686595ae312 100644 --- a/data/libs/core/global_storage.lua +++ b/data/libs/core/global_storage.lua @@ -25,5 +25,6 @@ Global = { Storage = { FamiliarSummonEvent10 = 30054, FamiliarSummonEvent60 = 30055, + CobraFlask = 30055, }, } diff --git a/data/scripts/actions/items/cobra_flask.lua b/data/scripts/actions/items/cobra_flask.lua index 8a5b8a5f542..02ffb7ee526 100644 --- a/data/scripts/actions/items/cobra_flask.lua +++ b/data/scripts/actions/items/cobra_flask.lua @@ -2,11 +2,11 @@ local applyCobraFlaskEffectOnMonsterSpawn = EventCallback() applyCobraFlaskEffectOnMonsterSpawn.monsterOnSpawn(monster, position) if table.contains({"cobra scout", "cobra vizier", "cobra assassin"}, monster:getName():lower()) then - if Game.getStorageValue(GlobalStorage.CobraBastionFlask) >= os.time() then + if Game.getStorageValue(Global.Storage.CobraFlask) >= os.time() then monster:setHealth(monster:getMaxHealth() * 0.75) monster:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS) else - Game.setStorageValue(GlobalStorage.CobraBastionFlask, -1) + Game.setStorageValue(Global.Storage.CobraFlask, -1) end end return true @@ -21,7 +21,7 @@ function cobraFlask.onUse(player, item, fromPosition, target, toPosition, isHotk target:getPosition():sendMagicEffect(CONST_ME_GREENSMOKE) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You carefully pour just a tiny, little, finely dosed... and there goes the whole content of the bottle. Stand back!") item:transform(31297) - Game.setStorageValue(GlobalStorage.CobraBastionFlask, os.time() + 30 * 60) + Game.setStorageValue(Global.Storage.CobraFlask, os.time() + 30 * 60) end return true end