From 41f715fea96272d0bacf779a429df9a2bc8ab9c6 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Sun, 24 Mar 2024 04:20:26 -0300 Subject: [PATCH 1/5] Update game.cpp --- src/game/game.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index 6754e990595..1f4d74be1dc 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -3415,7 +3415,6 @@ void Game::playerAutoWalk(uint32_t playerId, const std::vector &listD } player->resetIdleTime(); - player->setNextWalkTask(nullptr); player->startAutoWalk(listDir, false); } @@ -3431,7 +3430,6 @@ void Game::forcePlayerAutoWalk(uint32_t playerId, const std::vector & player->setFollowCreature(nullptr); player->resetIdleTime(); - player->setNextWalkTask(nullptr); player->startAutoWalk(listDir, true); } From d51c6d131ff793843b413f357f60d0f54bbafb10 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 24 Mar 2024 07:20:57 +0000 Subject: [PATCH 2/5] Code format - (Clang-format) --- src/game/game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index 1f4d74be1dc..3e0e8ffa683 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -1649,12 +1649,12 @@ void Game::playerMoveItem(std::shared_ptr player, const Position &fromPo return; } } - + if (isTryingToStow(toPos, toCylinder)) { player->stowItem(item, count, false); return; } - + ReturnValue ret = internalMoveItem(fromCylinder, toCylinder, toIndex, item, count, nullptr, 0, player); if (ret != RETURNVALUE_NOERROR) { player->sendCancelMessage(ret); From b870c606b7067ff0ad0b92ac9dd20d969a668dd8 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Sun, 24 Mar 2024 04:23:08 -0300 Subject: [PATCH 3/5] Update player.cpp --- src/creatures/players/player.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 76ca1755c70..d0826b6480e 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -2094,18 +2094,6 @@ void Player::setNextWalkActionTask(std::shared_ptr task) { walkTask = task; } -void Player::setNextWalkTask(std::shared_ptr task) { - if (nextStepEvent != 0) { - g_dispatcher().stopEvent(nextStepEvent); - nextStepEvent = 0; - } - - if (task) { - nextStepEvent = g_dispatcher().scheduleEvent(task); - resetIdleTime(); - } -} - void Player::setNextActionTask(std::shared_ptr task, bool resetIdleTime /*= true */) { if (actionTaskEvent != 0) { g_dispatcher().stopEvent(actionTaskEvent); From 3cb5f185e8602ea1a7f25099d15772da6a823fad Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Sun, 24 Mar 2024 04:25:17 -0300 Subject: [PATCH 4/5] Update player.hpp --- src/creatures/players/player.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/creatures/players/player.hpp b/src/creatures/players/player.hpp index 592db179071..90279a71dd8 100644 --- a/src/creatures/players/player.hpp +++ b/src/creatures/players/player.hpp @@ -2623,7 +2623,6 @@ class Player final : public Creature, public Cylinder, public Bankable { void updateInventoryImbuement(); void setNextWalkActionTask(std::shared_ptr task); - void setNextWalkTask(std::shared_ptr task); void setNextActionTask(std::shared_ptr task, bool resetIdleTime = true); void setNextActionPushTask(std::shared_ptr task); void setNextPotionActionTask(std::shared_ptr task); @@ -2784,7 +2783,6 @@ class Player final : public Creature, public Cylinder, public Bankable { uint32_t actionTaskEvent = 0; uint32_t actionTaskEventPush = 0; uint32_t actionPotionTaskEvent = 0; - uint32_t nextStepEvent = 0; uint32_t walkTaskEvent = 0; uint32_t MessageBufferTicks = 0; uint32_t lastIP = 0; From afbaa54fb6859924d2ef7cf1fba73459022f13f0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 26 Apr 2024 13:01:18 +0000 Subject: [PATCH 5/5] Code format - (Clang-format) --- src/creatures/players/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 864cbb8a90b..7fd17be6229 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -1925,7 +1925,7 @@ void Player::onWalk(Direction &dir) { Creature::onWalk(dir); setNextActionTask(nullptr); - + g_callbacks().executeCallback(EventCallback_t::playerOnWalk, &EventCallback::playerOnWalk, getPlayer(), dir); }