コード例 #1
0
        private object OnEquipChange(params object[] objs)
        {
            uint[] equipIDs = null;
            if (objs.Length >= 1)
            {
                equipIDs       = (uint[])objs[0];
                Owner.EquipIDs = equipIDs;
            }
            else
            {
                equipIDs = new uint[16];
            }

            string moduleID = "01";
            string str      = "";

            str += Owner.property.roleType;
            str += "|face|" + Owner.property.roleType + "_" + moduleID + "_face";

            int equ_num = 1;

            for (int i = 0; i < equipIDs.Length; ++i)
            {
                if (ItemConstant.ROLE_CATEGORY_NAME[i] != "")
                {
                    /*if (ItemConstant.ROLE_CATEGORY_NAME[i].CompareTo("pad") == 0 &&  Owner.property.roleType.CompareTo("p3")==0)
                     * {
                     *      reducing = true;
                     *      continue;
                     * }*/
                    equ_num++;
                    if (equipIDs[i] == 0)
                    {
                        str += "|" + ItemConstant.ROLE_CATEGORY_NAME[i] + "|" + Owner.property.roleType + "_" + moduleID + "_" + ItemConstant.ROLE_CATEGORY_NAME[i];
                    }
                    else
                    {
                        KTabLineEquip    item     = ItemLocator.GetInstance().GetEquip((int)equipIDs[i]);
                        KTabLineShowInfo showInfo = ItemLocator.GetInstance().GetEquipShowInfo(item.ShowID);
                        if (showInfo != null)
                        {
                            str += "|" + ItemConstant.ROLE_CATEGORY_NAME[i] + "|" + Owner.property.roleType + "_" + showInfo.OrderNumber + "_" + showInfo.Category;
                        }
                    }
                }
            }
            if (Owner.property.roleType.CompareTo("p4") == 0)
            {
                equ_num++;
                str += "|lianzi|" + Owner.property.roleType + "_" + moduleID + "_lianzi";
                equ_num++;
                str += "|lianzi001|" + Owner.property.roleType + "_" + moduleID + "_lianzi001";
            }
            generator.PrepareConfig(str);
            generator.LoadConfigComplete += CheckModelIsLoaded;
            generator.LoadConfig(equ_num, Owner.Loader);
            if (IntensifyLogic.GetInstance().GetIntensifyUI() != null && IntensifyLogic.GetInstance().GetIntensifyUI().isOpen())
            {
                IntensifyLogic.GetInstance().UpdataIntensify(0, true);
            }
            return(null);
        }