private static int GetCanCastSkill(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 0); bool canCastSkill = FightLogic.GetCanCastSkill(); LuaDLL.lua_pushboolean(L, canCastSkill); result = 1; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }