static int FindLast(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        List <RoleBaseData2>      obj  = (List <RoleBaseData2>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<RoleBaseData2>");
        Predicate <RoleBaseData2> arg0 = null;
        LuaTypes funcType2             = LuaDLL.lua_type(L, 2);

        if (funcType2 != LuaTypes.LUA_TFUNCTION)
        {
            arg0 = (Predicate <RoleBaseData2>)LuaScriptMgr.GetNetObject(L, 2, typeof(Predicate <RoleBaseData2>));
        }
        else
        {
            LuaFunction func = LuaScriptMgr.GetLuaFunction(L, 2);
            arg0 = (param0) =>
            {
                int top = func.BeginPCall();
                LuaScriptMgr.PushObject(L, param0);
                func.PCall(top, 1);
                object[] objs = func.PopValues(top);
                func.EndPCall(top);
                return((bool)objs[0]);
            };
        }

        RoleBaseData2 o = obj.FindLast(arg0);

        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
示例#2
0
    public void Show(int side, uint id, string text, float delay = 5f)
    {
        for (int i = 0; i < 2; ++i)
        {
            NGUITools.SetActive(dialogs[i].gameObject, i == side);
        }

        uint          shapeID    = 0;
        string        icon       = "";
        string        name       = "";
        RoleBaseData2 baseConfig = GameSystem.Instance.RoleBaseConfigData2.GetConfigData(id);

        if (baseConfig != null)
        {
            shapeID = (uint)baseConfig.shape;
            icon    = baseConfig.icon_bust;
            name    = baseConfig.name;
        }
        else
        {
            NPCConfig npcConfig = GameSystem.Instance.NPCConfigData.GetConfigData(id);
            shapeID    = npcConfig.shape;
            baseConfig = GameSystem.Instance.RoleBaseConfigData2.GetConfigData(shapeID);
            icon       = baseConfig.icon_bust;
            name       = npcConfig.name;
        }

        string portAtlas = "Atlas/icon/iconBust";

        if (shapeID >= 1000 && shapeID < 1500)
        {
            portAtlas = portAtlas;
        }
        else if (shapeID < 1800)
        {
            portAtlas += "_1";
        }
        else if (shapeID < 2000)
        {
            portAtlas += "_2";
        }
        else
        {
            Debug.Log("cannot getPortrait by id=" + shapeID);
        }

        icons[side].atlas      = ResourceLoadManager.Instance.GetAtlas(portAtlas);
        icons[side].spriteName = icon;
        icons[side].MakePixelPerfect();
        names[side].text = name;
        texts[side].text = text.Replace("%self%", MainPlayer.Instance.Name);

        NGUITools.SetActive(gameObject, true);

        StopAllCoroutines();
        if (delay > 0f)
        {
            StartCoroutine(AutoNext(delay));
        }
    }
示例#3
0
    static int _CreateRoleBaseDataKeyValuePair(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2)
        {
            uint          arg0 = (uint)LuaScriptMgr.GetNumber(L, 1);
            RoleBaseData2 arg1 = (RoleBaseData2)LuaScriptMgr.GetNetObject(L, 2, typeof(RoleBaseData2));
            KeyValuePair <uint, RoleBaseData2> obj = new KeyValuePair <uint, RoleBaseData2>(arg0, arg1);
            LuaScriptMgr.PushValue(L, obj);
            return(1);
        }
        else if (count == 0)
        {
            KeyValuePair <uint, RoleBaseData2> obj = new KeyValuePair <uint, RoleBaseData2>();
            LuaScriptMgr.PushValue(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: KeyValuePair<uint,RoleBaseData2>.New");
        }

        return(0);
    }
    static int Add(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        List <RoleBaseData2> obj  = (List <RoleBaseData2>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<RoleBaseData2>");
        RoleBaseData2        arg0 = (RoleBaseData2)LuaScriptMgr.GetNetObject(L, 2, typeof(RoleBaseData2));

        obj.Add(arg0);
        return(0);
    }
示例#5
0
    List <SkillInstance> _GetSkillList(SkillType type, RoleInfo roleInfo)
    {
        List <SkillInstance> skill_list = new List <SkillInstance>();

        foreach (SkillAttr skill in GameSystem.Instance.SkillConfig.basic_skills)
        {
            if (skill.type == type)
            {
                SkillInstance inst = new SkillInstance();
                inst.skill = skill;
                inst.level = 1;
                skill_list.Add(inst);
            }
        }

        if (roleInfo != null)
        {
            foreach (SkillSlotProto skillSlot in roleInfo.skill_slot_info)
            {
                if (skillSlot.skill_uuid == 0)
                {
                    continue;
                }

                uint skillID    = skillSlot.skill_id;
                uint skillLevel = 1;

                Goods goods = MainPlayer.Instance.GetGoods(GoodsCategory.GC_SKILL, skillSlot.skill_uuid);
                if (goods != null)
                {
                    skillLevel = goods.GetLevel();
                }

                SkillAttr attr = GameSystem.Instance.SkillConfig.GetSkill(skillID);
                if (attr.type == type)
                {
                    SkillInstance inst = new SkillInstance();
                    inst.skill = attr;
                    inst.level = skillLevel;
                    skill_list.Add(inst);
                }
            }
        }

        if (!m_player.m_bIsNPC)
        {
            RoleBaseData2 data = GameSystem.Instance.RoleBaseConfigData2.GetConfigData(m_player.m_roleInfo.id);
            MergeSkillList(type, skill_list, data.training_skill_all);
        }
        else
        {
            NPCConfig config = GameSystem.Instance.NPCConfigData.GetConfigData(m_player.m_id);
            MergeSkillList(type, skill_list, config.skills);
        }
        return(skill_list);
    }
    static int get_Item(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Dictionary <uint, RoleBaseData2> obj = (Dictionary <uint, RoleBaseData2>)LuaScriptMgr.GetNetObjectSelf(L, 1, "Dictionary<uint,RoleBaseData2>");
        uint          arg0 = (uint)LuaScriptMgr.GetNumber(L, 2);
        RoleBaseData2 o    = obj[arg0];

        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
    static int Add(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        Dictionary <uint, RoleBaseData2> obj = (Dictionary <uint, RoleBaseData2>)LuaScriptMgr.GetNetObjectSelf(L, 1, "Dictionary<uint,RoleBaseData2>");
        uint          arg0 = (uint)LuaScriptMgr.GetNumber(L, 2);
        RoleBaseData2 arg1 = (RoleBaseData2)LuaScriptMgr.GetNetObject(L, 3, typeof(RoleBaseData2));

        obj.Add(arg0, arg1);
        return(0);
    }
    static int ContainsValue(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Dictionary <uint, RoleBaseData2> obj = (Dictionary <uint, RoleBaseData2>)LuaScriptMgr.GetNetObjectSelf(L, 1, "Dictionary<uint,RoleBaseData2>");
        RoleBaseData2 arg0 = (RoleBaseData2)LuaScriptMgr.GetNetObject(L, 2, typeof(RoleBaseData2));
        bool          o    = obj.ContainsValue(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
    static int get_Item(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        List <RoleBaseData2> obj = (List <RoleBaseData2>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<RoleBaseData2>");
        int           arg0       = (int)LuaScriptMgr.GetNumber(L, 2);
        RoleBaseData2 o          = obj[arg0];

        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
    static int Remove(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        List <RoleBaseData2> obj  = (List <RoleBaseData2>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<RoleBaseData2>");
        RoleBaseData2        arg0 = (RoleBaseData2)LuaScriptMgr.GetNetObject(L, 2, typeof(RoleBaseData2));
        bool o = obj.Remove(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
    static int Insert(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        List <RoleBaseData2> obj = (List <RoleBaseData2>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<RoleBaseData2>");
        int           arg0       = (int)LuaScriptMgr.GetNumber(L, 2);
        RoleBaseData2 arg1       = (RoleBaseData2)LuaScriptMgr.GetNetObject(L, 3, typeof(RoleBaseData2));

        obj.Insert(arg0, arg1);
        return(0);
    }
示例#12
0
    static int GetConfigData(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        BaseDataConfig2 obj  = (BaseDataConfig2)LuaScriptMgr.GetNetObjectSelf(L, 1, "BaseDataConfig2");
        uint            arg0 = (uint)LuaScriptMgr.GetNumber(L, 2);
        RoleBaseData2   o    = obj.GetConfigData(arg0);

        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
    void Start()
    {
        int           shapeID = 0;
        RoleBaseData2 data    = GameSystem.Instance.RoleBaseConfigData2.GetConfigData(player.m_roleInfo.id);
        LuaComponent  iconLua = icon.transform.GetComponent <LuaComponent>();

        if (data != null)
        {
            //icon.spriteName = data.icon;
            //shapeID = data.shape;
        }
        else
        {
            NPCConfig npc = GameSystem.Instance.NPCConfigData.GetConfigData(player.m_roleInfo.id);
            //icon.spriteName = npc.icon;
            //shapeID = (int)npc.shape;
            iconLua.table.Set("npc", true);
        }
        iconLua.table.Set("id", player.m_roleInfo.id);
        iconLua.table.Set("showPosition", false);

        //if (1000 <= shapeID && shapeID < 1500)
        //    icon.atlas = ResourceLoadManager.Instance.GetAtlas("Atlas/icon/iconPortrait");
        //else if (1500 <= shapeID && shapeID < 1800)
        //    icon.atlas = ResourceLoadManager.Instance.GetAtlas("Atlas/icon/iconPortrait_1");
        //else if (1800 <= shapeID && shapeID < 2000)
        //    icon.atlas = ResourceLoadManager.Instance.GetAtlas("Atlas/icon/iconPortrait_2");
        //else
        //    icon.atlas = ResourceLoadManager.Instance.GetAtlas("Atlas/icon/iconPortrait_3");
        background.spriteName = bgPrefix + matchAchievement.level;
        name.text             = player.m_name;
        title.text            = matchAchievement.title;
        intro.text            = string.Format(matchAchievement.intro, player.mStatistics.GetStatValue(matchAchievement.type));

        if (matchAchievement.level == 3)
        {
            NGUITools.SetActive(glow, true);
            NGUITools.SetActive(tail.gameObject, true);
            tail.enabled = true;
            if (!moveUp.enabled)
            {
                slideIn.enabled = true;
            }
        }
        else
        {
            NGUITools.SetActive(glow, false);
            NGUITools.SetActive(tail.gameObject, false);
            tail.enabled     = false;
            slideIn.enabled  = false;
            fadeAway.enabled = true;
        }
    }
    static int TryGetValue(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        Dictionary <uint, RoleBaseData2> obj = (Dictionary <uint, RoleBaseData2>)LuaScriptMgr.GetNetObjectSelf(L, 1, "Dictionary<uint,RoleBaseData2>");
        uint          arg0 = (uint)LuaScriptMgr.GetNumber(L, 2);
        RoleBaseData2 arg1 = null;
        bool          o    = obj.TryGetValue(arg0, out arg1);

        LuaScriptMgr.Push(L, o);
        LuaScriptMgr.PushObject(L, arg1);
        return(2);
    }
    private void InstantiateRoleItem(string prefab_name, Transform parent, uint role_id)
    {
        GameObject   item   = GameSystem.Instance.mClient.mUIManager.CreateUI(prefab_name, parent);
        Transform    grid   = item.transform.FindChild("Icon");
        LuaComponent luaCom = CommonFunction.InstantiateObject("Prefab/GUI/careerRoleIcon", grid).GetComponent <LuaComponent>();

        luaCom.table.Set("id", role_id);
        luaCom.table.Set("showPosition", false);
        RoleBaseData2 data = GameSystem.Instance.RoleBaseConfigData2.GetConfigData(role_id);

        item.transform.FindChild("Name").GetComponent <UILabel>().text = data.name;
        item.transform.FindChild("Profession").GetComponent <UISprite>().spriteName = ((PositionType)data.position).ToString().Substring(3);
    }
示例#16
0
    static int _CreateRoleBaseData2(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

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

        return(0);
    }
    private void _RefreshLoadingItem(Transform role, RoleInfo ri, bool bMySide = true)
    {
        RoleBaseData2 data = GameSystem.Instance.RoleBaseConfigData2.GetConfigData(ri.id);

        role.transform.FindChild("Name").GetComponent <UILabel>().text            = data.name;
        role.transform.FindChild("Position").GetComponent <UISprite>().spriteName = "PT_" + ((PositionType)data.position).ToString().Substring(3);

        LuaComponent loadingItem = role.GetComponent <LuaComponent>();

        loadingItem.table.Set("id", data.id);
        loadingItem.table.Set("loadingState", CommonFunction.GetConstString("STR_LOADING") + "0%");

        loadingItem.table.Set("power", ri.fight_power);
        LuaComponent luaCom = role.FindChild("Icon/CareerRoleIcon").GetComponent <LuaComponent>();

        luaCom.table.Set("showPosition", false);
        luaCom.table.Set("npc", false);
        if (pvp)
        {
            luaCom.table.Set("otherInfo", ri);
        }

        List <LuaComponent> items;

        if (!mapPlayerIdLoadingState.TryGetValue(ri.acc_id, out items))
        {
            items = new List <LuaComponent>();
            items.Add(loadingItem);
            mapPlayerIdLoadingState.Add(ri.acc_id, items);
        }
        else
        {
            items.Add(loadingItem);
            mapPlayerIdLoadingState[ri.acc_id] = items;
        }

        if (MainPlayer.Instance.inPvpJoining &&
            MainPlayer.Instance.AccountID != ri.acc_id)
        {
            items.ForEach((LuaComponent item) =>
            {
                item.table.Set("loadingState", CommonFunction.GetConstString("STR_LOAD_COMPLETE"));
                item.table.Set("loadDone", true);
            });
        }
    }
 private void OnCreateSlotMachineItem(GameObject item, int index)
 {
     items[index] = item;
     if (index % 2 == 0)
     {
         item.transform.FindChild("Name").GetComponent <UILabel>().text = match.mainRole.m_name;
         RoleBaseData2 data = GameSystem.Instance.RoleBaseConfigData2.GetConfigData(match.mainRole.m_roleInfo.id);
         item.transform.FindChild("Icon").GetComponent <UISprite>().spriteName = data.icon;
         string position = ((PositionType)data.position).ToString();
         item.transform.FindChild("Position").GetComponent <UISprite>().spriteName = position;
     }
     else
     {
         item.transform.FindChild("Name").GetComponent <UILabel>().text = match.npc.m_name;
         NPCConfig config = GameSystem.Instance.NPCConfigData.GetConfigData(match.npc.m_roleInfo.id);
         item.transform.FindChild("Icon").GetComponent <UISprite>().spriteName = config.icon;
         string position = ((PositionType)config.position).ToString();
         item.transform.FindChild("Position").GetComponent <UISprite>().spriteName = position;
     }
 }
示例#19
0
    private void OnCreateSlotMachineItem(GameObject item, int index)
    {
        items[index] = item;
        Player player = match.players[index];

        item.transform.FindChild("Name").GetComponent <UILabel>().text = player.m_name;
        int icon;

        if (index == 0)
        {
            RoleBaseData2 data = GameSystem.Instance.RoleBaseConfigData2.GetConfigData(player.m_roleInfo.id);
            item.transform.FindChild("Icon").GetComponent <UISprite>().spriteName = data.icon;
            string position = ((PositionType)data.position).ToString();
            item.transform.FindChild("Position").GetComponent <UISprite>().spriteName = position;
            icon = data.shape;
        }
        else
        {
            NPCConfig config = GameSystem.Instance.NPCConfigData.GetConfigData(player.m_roleInfo.id);
            item.transform.FindChild("Icon").GetComponent <UISprite>().spriteName = config.icon;
            string position = ((PositionType)config.position).ToString();
            item.transform.FindChild("Position").GetComponent <UISprite>().spriteName = position;
            icon = (int)config.shape;
        }
        UIAtlas atlas = null;

        if (1000 <= icon && icon <= 1499)
        {
            atlas = ResourceLoadManager.Instance.GetAtlas("Atlas/icon/iconPortrait");
        }
        else if (1500 <= icon && icon <= 1799)
        {
            atlas = ResourceLoadManager.Instance.GetAtlas("Atlas/icon/iconPortrait_1");
        }
        else if (1800 <= icon && icon <= 1999)
        {
            atlas = ResourceLoadManager.Instance.GetAtlas("Atlas/icon/iconPortrait_2");
        }
        item.transform.FindChild("Icon").GetComponent <UISprite>().atlas = atlas;
    }
示例#20
0
    static int get_specialityInfo(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        LuaScriptMgr.Push(L, obj.specialityInfo);
        return(1);
    }
示例#21
0
    static int set_recruit_consume(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        obj.recruit_consume = (Dictionary <uint, uint>)LuaScriptMgr.GetNetObject(L, 3, typeof(Dictionary <uint, uint>));
        return(0);
    }
示例#22
0
    static int set_recruit_output_id(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        obj.recruit_output_id = (uint)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
示例#23
0
    static int set_player_sound(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        obj.player_sound = (List <string>)LuaScriptMgr.GetNetObject(L, 3, typeof(List <string>));
        return(0);
    }
示例#24
0
    static int set_attrs_symbol(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        obj.attrs_symbol = (Dictionary <string, uint>)LuaScriptMgr.GetNetObject(L, 3, typeof(Dictionary <string, uint>));
        return(0);
    }
示例#25
0
    static int set_icon(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        obj.icon = LuaScriptMgr.GetString(L, 3);
        return(0);
    }
示例#26
0
    static int set_bias(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        obj.bias = (int)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
示例#27
0
    static int get_match_msg_ids(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        LuaScriptMgr.PushObject(L, obj.match_msg_ids);
        return(1);
    }
示例#28
0
    static int get_display_effect(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        LuaScriptMgr.Push(L, obj.display_effect);
        return(1);
    }
示例#29
0
    static int get_recruit_output_value(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        LuaScriptMgr.Push(L, obj.recruit_output_value);
        return(1);
    }
示例#30
0
    static int get_training_skill_show(IntPtr L)
    {
        object        o   = LuaScriptMgr.GetLuaObject(L, 1);
        RoleBaseData2 obj = (RoleBaseData2)o;

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

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

        LuaScriptMgr.PushObject(L, obj.training_skill_show);
        return(1);
    }