From 5a278ef4ecb694e63d9eafd541b81b9ec5fdd0b0 Mon Sep 17 00:00:00 2001 From: BeniS Date: Tue, 22 Jan 2013 13:40:46 +1300 Subject: [PATCH] Few minor fixes. * Fixed count window. * Other small things. --- modules/game_interface/styles/countwindow.otui | 1 + src/client/game.cpp | 4 ++-- src/client/localplayer.cpp | 2 +- src/client/localplayer.h | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/game_interface/styles/countwindow.otui b/modules/game_interface/styles/countwindow.otui index c7353db2..e5c2dbd9 100644 --- a/modules/game_interface/styles/countwindow.otui +++ b/modules/game_interface/styles/countwindow.otui @@ -11,6 +11,7 @@ CountWindow < MainWindow height: 0 phantom: true padding-bottom: -40 + focusable: true Item id: item diff --git a/src/client/game.cpp b/src/client/game.cpp index 388abb2a..c8f775ba 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -761,9 +761,9 @@ void Game::use(const ThingPtr& thing) Position pos = thing->getPosition(); if(!pos.isValid()) // virtual item - pos = Position(0xFFFF, 0, 0); // means that is a item in inventory + pos = Position(0xFFFF, 0, 0); // inventory item - // some itens, e.g. parcel, are not set as containers but they are. + // some items, e.g. parcel, are not set as containers but they are. // always try to use these items in free container slots. m_protocolGame->sendUseItem(pos, thing->getId(), thing->getStackPos(), findEmptyContainerId()); } diff --git a/src/client/localplayer.cpp b/src/client/localplayer.cpp index dafdc268..2e678534 100644 --- a/src/client/localplayer.cpp +++ b/src/client/localplayer.cpp @@ -223,7 +223,7 @@ void LocalPlayer::stopWalk() m_lastPrewalkDestionation = Position(); } -std::vector LocalPlayer::calculateAutoWalk(std::vector& dirs) +std::vector& LocalPlayer::calculateAutoWalk(std::vector& dirs) { if(dirs.size() > Otc::MAX_AUTOWALK_DIST) { // populate auto walk queue diff --git a/src/client/localplayer.h b/src/client/localplayer.h index 242e9bd6..29ba04ee 100644 --- a/src/client/localplayer.h +++ b/src/client/localplayer.h @@ -41,7 +41,7 @@ public: void updateAutoWalkSteps(bool walkFailed = false); bool autoWalk(const Position& destination); bool canWalk(Otc::Direction direction); - std::vector calculateAutoWalk(std::vector& dirs); + std::vector& calculateAutoWalk(std::vector& dirs); void setStates(int states); void setSkill(Otc::Skill skill, int level, int levelPercent);