コード例 #1
0
    static int _CreateOneByOne_DamageDTO(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            OneByOne.DamageDTO obj = new OneByOne.DamageDTO();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: OneByOne.DamageDTO.New");
        }

        return(0);
    }
コード例 #2
0
    static int get_skill(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.DamageDTO obj = (OneByOne.DamageDTO)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name skill");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index skill on a nil value");
            }
        }

        LuaScriptMgr.Push(L, obj.skill);
        return(1);
    }
コード例 #3
0
    static int set_targetDamage(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.DamageDTO obj = (OneByOne.DamageDTO)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name targetDamage");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index targetDamage on a nil value");
            }
        }

        obj.targetDamage = LuaScriptMgr.GetArrayObject <int[]>(L, 3);
        return(0);
    }
コード例 #4
0
    static int set_id(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.DamageDTO obj = (OneByOne.DamageDTO)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name id");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index id on a nil value");
            }
        }

        obj.id = (int)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }