rename useHotkey to useInventoryItem

This commit is contained in:
Eduardo Bart 2012-01-17 20:53:06 -02:00
parent cb1e833e6e
commit a1cee1e855
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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);

View File

@ -197,7 +197,7 @@ void OTClient::registerLuaFunctions()
g_lua.bindClassStaticFunction<Game>("open", std::bind(&Game::open, &g_game, _1, _2));
g_lua.bindClassStaticFunction<Game>("use", std::bind(&Game::use, &g_game, _1));
g_lua.bindClassStaticFunction<Game>("useWith", std::bind(&Game::useWith, &g_game, _1, _2));
g_lua.bindClassStaticFunction<Game>("useHotkey", std::bind(&Game::useHotkey, &g_game, _1, _2));
g_lua.bindClassStaticFunction<Game>("useInventoryItem", std::bind(&Game::useInventoryItem, &g_game, _1, _2));
g_lua.bindClassStaticFunction<Game>("walk", std::bind(&Game::walk, &g_game, _1));
g_lua.bindClassStaticFunction<Game>("forceWalk", std::bind(&Game::forceWalk, &g_game, _1));
g_lua.bindClassStaticFunction<Game>("attack", std::bind(&Game::attack, &g_game, _1));