More binds to lua

This commit is contained in:
Ahmed Samy 2013-12-15 04:59:45 +02:00
parent e32607b05c
commit 22f97aa00b
2 changed files with 20 additions and 0 deletions

View File

@ -109,9 +109,19 @@ public:
void setDoorId(uint8 doorId) { m_attribs.set(ATTR_HOUSEDOORID, doorId); }
uint8 getDoorId() { return m_attribs.get<uint8>(ATTR_HOUSEDOORID); }
uint16 getUniqueId() { return m_attribs.get<uint16>(ATTR_ACTION_ID); }
uint16 getActionId() { return m_attribs.get<uint16>(ATTR_UNIQUE_ID); }
void setActionId(uint16 actionId) { m_attribs.set(ATTR_ACTION_ID, actionId); }
void setUniqueId(uint16 uniqueId) { m_attribs.set(ATTR_UNIQUE_ID, uniqueId); }
std::string getText() { return m_attribs.get<std::string>(ATTR_TEXT); }
std::string getDescription() { return m_attribs.get<std::string>(ATTR_DESC); }
void setDescription(std::string desc) { m_attribs.set(ATTR_DESC, desc); }
void setText(std::string txt) { m_attribs.set(ATTR_TEXT, txt); }
Position getTeleportDestination() { return m_attribs.get<Position>(ATTR_TELE_DEST); }
void setTeleportDestination(const Position& pos) { m_attribs.set(ATTR_TELE_DEST, pos); }
void setAsync(bool enable) { m_async = enable; }
bool isHouseDoor() { return m_attribs.has(ATTR_HOUSEDOORID); }

View File

@ -469,6 +469,16 @@ void Client::registerLuaFunctions()
g_lua.bindClassMemberFunction<Item>("getId", &Item::getId);
g_lua.bindClassMemberFunction<Item>("getServerId", &Item::getServerId);
g_lua.bindClassMemberFunction<Item>("getName", &Item::getName);
g_lua.bindClassMemberFunction<Item>("getDescription", &Item::getDescription);
g_lua.bindClassMemberFunction<Item>("getText", &Item::getText);
g_lua.bindClassMemberFunction<Item>("setDescription", &Item::setDescription);
g_lua.bindClassMemberFunction<Item>("setText", &Item::setText);
g_lua.bindClassMemberFunction<Item>("getUniqueId", &Item::getUniqueId);
g_lua.bindClassMemberFunction<Item>("getActionId", &Item::getActionId);
g_lua.bindClassMemberFunction<Item>("setUniqueId", &Item::setUniqueId);
g_lua.bindClassMemberFunction<Item>("setActionId", &Item::setActionId);
g_lua.bindClassMemberFunction<Item>("getTeleportDestination", &Item::getTeleportDestination);
g_lua.bindClassMemberFunction<Item>("setTeleportDestination", &Item::setTeleportDestination);
g_lua.bindClassMemberFunction<Item>("isStackable", &Item::isStackable);
g_lua.bindClassMemberFunction<Item>("isMarketable", &Item::isMarketable);
g_lua.bindClassMemberFunction<Item>("isFluidContainer", &Item::isFluidContainer);