rename useHotkey to useInventoryItem
This commit is contained in:
parent
cb1e833e6e
commit
a1cee1e855
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue