Пример #1
0
 static int ParseCsv(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 2);
     Games.Module.Wars.MonsterConfig obj = (Games.Module.Wars.MonsterConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "Games.Module.Wars.MonsterConfig");
     string[] objs0 = LuaScriptMgr.GetArrayString(L, 2);
     obj.ParseCsv(objs0);
     return(0);
 }
Пример #2
0
    static int ToString(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        Games.Module.Wars.MonsterConfig obj = (Games.Module.Wars.MonsterConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "Games.Module.Wars.MonsterConfig");
        string o = obj.ToString();

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Пример #3
0
    static int GetPropValue(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Games.Module.Wars.MonsterConfig obj = (Games.Module.Wars.MonsterConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "Games.Module.Wars.MonsterConfig");
        int   arg0 = (int)LuaScriptMgr.GetNumber(L, 2);
        float o    = obj.GetPropValue(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Пример #4
0
    static int _CreateGames_Module_Wars_MonsterConfig(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

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

        return(0);
    }
Пример #5
0
    static int get_name(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        Games.Module.Wars.MonsterConfig obj = (Games.Module.Wars.MonsterConfig)o;

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

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

        LuaScriptMgr.Push(L, obj.name);
        return(1);
    }
Пример #6
0
    static int set_props(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        Games.Module.Wars.MonsterConfig obj = (Games.Module.Wars.MonsterConfig)o;

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

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

        obj.props = LuaScriptMgr.GetArrayObject <Games.Module.Props.Prop>(L, 3);
        return(0);
    }
Пример #7
0
    static int set_skillLevel2(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        Games.Module.Wars.MonsterConfig obj = (Games.Module.Wars.MonsterConfig)o;

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

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

        obj.skillLevel2 = (int)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
Пример #8
0
    static int set_buildType(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        Games.Module.Wars.MonsterConfig obj = (Games.Module.Wars.MonsterConfig)o;

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

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

        obj.buildType = (Games.Module.Wars.BuildType)LuaScriptMgr.GetNetObject(L, 3, typeof(Games.Module.Wars.BuildType));
        return(0);
    }
Пример #9
0
 public void AddMonsterConfig(MonsterConfig monsterConfig)
 {
     monsterConfigs.Add(monsterConfig.id, monsterConfig);
 }