From a1cee1e85588a92cde2c4809b34abe59ff12a5f1 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Tue, 17 Jan 2012 20:53:06 -0200 Subject: [PATCH] rename useHotkey to useInventoryItem --- src/otclient/core/game.cpp | 4 ++-- src/otclient/core/game.h | 2 +- src/otclient/luafunctions.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/otclient/core/game.cpp b/src/otclient/core/game.cpp index 277a9103..4e089856 100644 --- a/src/otclient/core/game.cpp +++ b/src/otclient/core/game.cpp @@ -278,12 +278,12 @@ void Game::useWith(const ThingPtr& fromThing, const ThingPtr& toThing) } } -void Game::useHotkey(int itemId, const ThingPtr& toThing) +void Game::useInventoryItem(int itemId, const ThingPtr& toThing) { if(!m_online || !toThing || !checkBotProtection()) return; - Position pos = Position(0xFFFF, 0, 0); // means that is a hotkey use + Position pos = Position(0xFFFF, 0, 0); // means that is a item in inventory int toStackpos = getThingStackpos(toThing); if(toStackpos == -1) return; diff --git a/src/otclient/core/game.h b/src/otclient/core/game.h index 878fc222..1dac207b 100644 --- a/src/otclient/core/game.h +++ b/src/otclient/core/game.h @@ -64,7 +64,7 @@ public: void open(const ThingPtr& thing, int containerId); void use(const ThingPtr& thing); void useWith(const ThingPtr& fromThing, const ThingPtr& toThing); - void useHotkey(int itemId, const ThingPtr& toThing); + void useInventoryItem(int itemId, const ThingPtr& toThing); // attack/follow related void attack(const CreaturePtr& creature); diff --git a/src/otclient/luafunctions.cpp b/src/otclient/luafunctions.cpp index f0df3b01..dfda580b 100644 --- a/src/otclient/luafunctions.cpp +++ b/src/otclient/luafunctions.cpp @@ -197,7 +197,7 @@ void OTClient::registerLuaFunctions() g_lua.bindClassStaticFunction("open", std::bind(&Game::open, &g_game, _1, _2)); g_lua.bindClassStaticFunction("use", std::bind(&Game::use, &g_game, _1)); g_lua.bindClassStaticFunction("useWith", std::bind(&Game::useWith, &g_game, _1, _2)); - g_lua.bindClassStaticFunction("useHotkey", std::bind(&Game::useHotkey, &g_game, _1, _2)); + g_lua.bindClassStaticFunction("useInventoryItem", std::bind(&Game::useInventoryItem, &g_game, _1, _2)); g_lua.bindClassStaticFunction("walk", std::bind(&Game::walk, &g_game, _1)); g_lua.bindClassStaticFunction("forceWalk", std::bind(&Game::forceWalk, &g_game, _1)); g_lua.bindClassStaticFunction("attack", std::bind(&Game::attack, &g_game, _1));