From a820101006406d6d28d8a676e1f4718c85e5887f Mon Sep 17 00:00:00 2001 From: Mirkaan <98285577+Mirkaanks@users.noreply.github.com> Date: Fri, 26 Apr 2024 09:34:58 -0300 Subject: [PATCH] fix: typo in gamestore function and remove cooldown for item usage while walking (#2485) --- data/modules/scripts/gamestore/init.lua | 4 ++-- src/creatures/players/player.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/data/modules/scripts/gamestore/init.lua b/data/modules/scripts/gamestore/init.lua index e53bab813f0..7d9081df1fb 100644 --- a/data/modules/scripts/gamestore/init.lua +++ b/data/modules/scripts/gamestore/init.lua @@ -479,7 +479,7 @@ function parseBuyStoreOffer(playerId, msg) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_SEXCHANGE then GameStore.processSexChangePurchase(player) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_EXPBOOST then - GameStore.processExpBoostPuchase(player) + GameStore.processExpBoostPurchase(player) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_HUNTINGSLOT then GameStore.processTaskHuntingThirdSlot(player) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_PREYSLOT then @@ -1742,7 +1742,7 @@ function GameStore.processSexChangePurchase(player) player:toggleSex() end -function GameStore.processExpBoostPuchase(player) +function GameStore.processExpBoostPurchase(player) local currentExpBoostTime = player:getExpBoostStamina() local expBoostCount = player:getStorageValue(GameStore.Storages.expBoostCount) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 516ed7b5cfa..1f0c9b45dce 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -1925,8 +1925,7 @@ void Player::onWalk(Direction &dir) { Creature::onWalk(dir); setNextActionTask(nullptr); - setNextAction(OTSYS_TIME() + getStepDuration(dir)); - + g_callbacks().executeCallback(EventCallback_t::playerOnWalk, &EventCallback::playerOnWalk, getPlayer(), dir); }