Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Before
- LuaScriptInterface(const std::string& interfaceName);
- //Add this
- static void setFieldBool(lua_State* L, const char* index, bool value);
- static int32_t luaDoPlayerSetCastPassword(lua_State* L);
- static int32_t luaDoPlayerSetCastState(lua_State* L);
- static int32_t luaGetPlayerCast(lua_State* L);
- //After
- static void pushCallback(lua_State* L, int32_t callback);
- //Add this
- static bool popBoolean(lua_State* L);
- //After
- static Player* getPlayer(lua_State* L, int32_t arg);
- //Add this
- template<typename T> //Cast System Felipe Monteiro
- static T popNumber(lua_State* L) { //Cast System Felipe Monteiro
- if (lua_gettop(L) == 0) {
- return static_cast<T>(0);
- }
- T ret = static_cast<T>(lua_tonumber(L, -1));
- lua_pop(L, 1);
- return ret;
- }
Advertisement
Add Comment
Please, Sign In to add comment