少年修仙传客户端代码仓库
client_Zxw
2019-03-19 3f5bd28f945ad002cae7308f589396ce659e9bd7
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
22个文件已修改
656 ■■■■ 已修改文件
Core/GameEngine/Model/Player/PlayerDatas.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/DropItemManager.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/PlayerDatasWrap.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIEquipModelWrap.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIItemLogicUtilityWrap.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Auction/AuctionShelfWin.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialDungeonSelectBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipFrameWin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipModel.cs 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipSet.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipSuitPropertyWidget.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/RealmEquipWin.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemTip/TipBaseInfoWidget.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemLogicUtility.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemTipsModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PackModel.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/New/CommonItemBaisc.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmAnimationBehaviour.cs 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmLevelUpBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmModel.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmWin.cs 89 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/EnumHelper.cs 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -928,9 +928,9 @@
    /// 是否是装备, 这里的装备指的是: 武器, 帽子, 衣服, 下装, 鞋子, 腰带
    /// </summary>
    /// <returns></returns>
    public bool IsEquip(E_ItemType itemType)
    public bool IsEquip(E_DropItemType itemType)
    {
        return itemType >= E_ItemType.Equip_Weapon && itemType <= E_ItemType.Equip_Shoes;
        return itemType >= E_DropItemType.Equip_Weapon && itemType <= E_DropItemType.Equip_Shoes;
    }
    public void RequestWorldTick()
Fight/Stage/Dungeon/DropItemManager.cs
@@ -30,8 +30,7 @@
    private static Dictionary<int, UIEffect> dropEffectDict = new Dictionary<int, UIEffect>();
    static PackModel _playerPack;
    static PackModel playerPack
    {
    static PackModel playerPack {
        get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
    }
@@ -435,8 +434,8 @@
        // 背包已满,且不是铜钱不拾取
        if (playerPack.GetEmptyGridCount(PackType.Item) == 0
            && _itemModel.Type != (int)E_ItemType.DropCopper
            && _itemModel.Type != (int)E_ItemType.Copper)
            && _itemModel.Type != (int)E_DropItemType.DropCopper
            && _itemModel.Type != (int)E_DropItemType.Copper)
        {
            return false;
        }
@@ -451,7 +450,7 @@
            }
            // 对装备是否拾取的判断
            if (PlayerDatas.Instance.IsEquip((E_ItemType)_itemModel.Type))
            if (PlayerDatas.Instance.IsEquip((E_DropItemType)_itemModel.Type))
            {
                //Debug.LogFormat("检测装备: {0} 是否可以拾取, 颜色: {1}", _itemModel.ID, (E_ItemColor)_itemModel.ItemColor);
                // 是否配置了白色,蓝色装备不捡
@@ -472,27 +471,31 @@
                }
            }
            // 项链或者仙器
            else if (((E_ItemType)_itemModel.Type == E_ItemType.Necklace || (E_ItemType)_itemModel.Type == E_ItemType.Fariy)
            else if (
               ((E_DropItemType)_itemModel.Type == E_DropItemType.Equip_FairyCan1
                || (E_DropItemType)_itemModel.Type == E_DropItemType.Equip_FairyCan2
                || (E_DropItemType)_itemModel.Type == E_DropItemType.Equip_Jade
                || (E_DropItemType)_itemModel.Type == E_DropItemType.Equip_Neck)
                && HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.necklaces))
            {
                //Debug.Log(" |-- 配置了项链或者仙器不拾取, 这个是项链或者仙器, 不拾取");
                return true;
            }
            // 宝石
            else if ((E_ItemType)_itemModel.Type == E_ItemType.Gemstone
            else if ((E_DropItemType)_itemModel.Type == E_DropItemType.Gemstone
                  && HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.gem))
            {
                //Debug.Log(" |-- 配置了项链或者仙器不拾取, 这个是项链或者仙器, 不拾取");
                return true;
            }
            // 药品
            else if ((E_ItemType)_itemModel.Type == E_ItemType.Drugs
            else if ((E_DropItemType)_itemModel.Type == E_DropItemType.Drugs
                  && HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.drug))
            {
                return true;
            }
            // 金币
            else if ((E_ItemType)_itemModel.Type == E_ItemType.DropCopper
            else if ((E_DropItemType)_itemModel.Type == E_DropItemType.DropCopper
                  && HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.coins))
            {
                return true;
@@ -500,12 +503,14 @@
            // 其他
            else
            {
                if ((E_ItemType)_itemModel.Type != E_ItemType.DropCopper
                 && (E_ItemType)_itemModel.Type != E_ItemType.Drugs
                 && (E_ItemType)_itemModel.Type != E_ItemType.Gemstone
                 && (E_ItemType)_itemModel.Type != E_ItemType.Necklace
                 && (E_ItemType)_itemModel.Type != E_ItemType.Fariy
                 && !PlayerDatas.Instance.IsEquip((E_ItemType)_itemModel.Type)
                if ((E_DropItemType)_itemModel.Type != E_DropItemType.DropCopper
                 && (E_DropItemType)_itemModel.Type != E_DropItemType.Drugs
                 && (E_DropItemType)_itemModel.Type != E_DropItemType.Gemstone
                 && (E_DropItemType)_itemModel.Type != E_DropItemType.Equip_Neck
                 && (E_DropItemType)_itemModel.Type != E_DropItemType.Equip_FairyCan1
                 && (E_DropItemType)_itemModel.Type != E_DropItemType.Equip_Jade
                 && (E_DropItemType)_itemModel.Type != E_DropItemType.Equip_FairyCan2
                 && !PlayerDatas.Instance.IsEquip((E_DropItemType)_itemModel.Type)
                 // 以上类型都不是且开启了其他拾取的时候
                 && HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.other))
                {
Lua/Gen/PlayerDatasWrap.cs
@@ -405,7 +405,7 @@
            
                
                {
                    E_ItemType _itemType;translator.Get(L, 2, out _itemType);
                    E_DropItemType _itemType;translator.Get(L, 2, out _itemType);
                    
                        bool gen_ret = gen_to_be_invoked.IsEquip( _itemType );
                        LuaAPI.lua_pushboolean(L, gen_ret);
Lua/Gen/SnxxzUIEquipModelWrap.cs
@@ -670,11 +670,6 @@
            
                
                {
                    string _equipGuid = LuaAPI.lua_tostring(L, 2);
                    gen_to_be_invoked.PutOn( _equipGuid );
                    
                    return 0;
                }
@@ -698,12 +693,6 @@
            
                
                {
                    int _level = LuaAPI.xlua_tointeger(L, 2);
                    int _place = LuaAPI.xlua_tointeger(L, 3);
                    gen_to_be_invoked.TakeOff( _level, _place );
                    
                    return 0;
                }
Lua/Gen/SnxxzUIItemLogicUtilityWrap.cs
@@ -508,12 +508,6 @@
                }
                if(gen_param_count == 2&& translator.Assignable<Snxxz.UI.ItemModel>(L, 2)) 
                {
                    Snxxz.UI.ItemModel _model = (Snxxz.UI.ItemModel)translator.GetObject(L, 2, typeof(Snxxz.UI.ItemModel));
                        bool gen_ret = gen_to_be_invoked.IsEquip( _model );
                        LuaAPI.lua_pushboolean(L, gen_ret);
                    
                    return 1;
                }
System/Auction/AuctionShelfWin.cs
@@ -53,10 +53,7 @@
        private void OnClickUseBtn()
        {
            CloseImmediately();
            ItemOperateUtility.Instance.GotoUseItem(auctionHelpModel.ItemModel.itemInfo.index);
            //itemTipsModel.SetItemTipsModel(PackType.Item, auctionHelpModel.ItemModel.guid, false, true);
            //itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
            //itemTipsModel.ShowUICtrl();
            ItemOperateUtility.Instance.UseItem(auctionHelpModel.ItemModel.guid);
        }
        private void OnClickAuction()
        {
System/Dungeon/TrialDungeonSelectBehaviour.cs
@@ -72,7 +72,7 @@
            var requirePetHorseLevel = trialDungeonModel.GetDungeonRequirePetHorseLevel(_dungeon.lineId);
            var petHorseLevel = trialDungeonModel.GetPetHorseLevel();
            m_PetHorseLevel.text = Language.Get("Z1024", requirePetHorseLevel);
            m_PetHorseLevel.text = requirePetHorseLevel.ToString();
            m_PetHorseLevel.color = petHorseLevel >= requirePetHorseLevel ?
                UIHelper.GetUIColor(TextColType.Green, true) : UIHelper.GetUIColor(TextColType.Red, true);
System/Equip/EquipFrameWin.cs
@@ -63,7 +63,6 @@
        protected override void OnAfterClose()
        {
            model.ResetOperateParams();
        }
        protected override void OnActived()
System/Equip/EquipModel.cs
@@ -24,6 +24,8 @@
        public readonly LogicList<CandidateEquip> candidateEquips = new LogicList<CandidateEquip>();
        public readonly LogicList<int> getWays = new LogicList<int>();
        public readonly LogicBool isAppearanceLevel = new LogicBool();
        public readonly LogicList<int> suitPlaces = new LogicList<int>();
        public readonly LogicStruct<EquipSuitProperty> suitProperty = new LogicStruct<EquipSuitProperty>();
        static Dictionary<int, string> equipSetNames = new Dictionary<int, string>();
        Dictionary<int, EquipSet> equipSets = new Dictionary<int, EquipSet>();
@@ -124,6 +126,14 @@
            }
            UpdateAppearanceState(level);
            UpdateSuitPlaces(level);
            UpdateSuitProperty(level, selectedStarLevel.value);
        }
        public void SelectSuitStarLevel(int star)
        {
            selectedStarLevel.value = star;
            UpdateSuitProperty(selectedLevel.value, star);
        }
        public void ResetOperateParams()
@@ -132,6 +142,8 @@
            selectedStarLevel.value = 0;
            fightPoint.value = 0;
            appearance.value = default(EquipAppearance);
            suitProperty.value = default(EquipSuitProperty);
            suitPlaces.Clear();
            candidateEquips.Clear();
            getWays.Clear();
        }
@@ -364,40 +376,6 @@
            getWays.Clear();
        }
        public void PutOn(string equipGuid)
        {
            var item = packModel.GetItemByGuid(equipGuid);
            if (item == null)
            {
                return;
            }
            var level = item.config.LV;
            if (!equipSets.ContainsKey(level))
            {
                return;
            }
            var set = equipSets[level];
            if (!set.unLocked)
            {
                return;
            }
            set.PutOn(equipGuid);
        }
        public void TakeOff(int level, int place)
        {
            if (!equipSets.ContainsKey(level))
            {
                return;
            }
            var slot = equipSets[level];
            slot.TakeOff(place);
        }
        public int CompareToCurrent(string equipGuid)
        {
            var item = packModel.GetItemByGuid(equipGuid);
@@ -485,6 +463,8 @@
                        appearance.value = GetAppearance(selectedLevel.value);
                        fightPoint.value = GetFightPoint(selectedLevel.value);
                        RefreshCandidateEquips(selectedLevel.value);
                        UpdateSuitPlaces(selectedLevel.value);
                        UpdateSuitProperty(selectedLevel.value, selectedStarLevel.value);
                    }
                    break;
                default:
@@ -494,23 +474,19 @@
        private void OnItemCountRefresh(PackType type, int index, int itemId)
        {
            var dirty = false;
            var itemDirty = false;
            var equipDirty = false;
            switch (type)
            {
                case PackType.Item:
                    var config = ItemConfig.Get(itemId);
                    var level = config.LV;
                    if (equipSets.ContainsKey(level))
                    if (ItemLogicUtility.Instance.IsEquip(itemId))
                    {
                        var item = packModel.GetItemByIndex(PackType.Item, index);
                        if (item != null)
                        var config = ItemConfig.Get(itemId);
                        var level = config.LV;
                        UpdateRedpoint(level);
                        if (selectedLevel.value > 0 && selectedLevel.value == level)
                        {
                            equipSets[level].UpdateRedPoint(item.guid);
                        }
                        if (selectedLevel.value > 0)
                        {
                            dirty = true;
                            itemDirty = true;
                        }
                    }
                    break;
@@ -521,6 +497,12 @@
                    appearance.value = GetAppearance(selectedLevel.value);
                    fightPoint.value = GetFightPoint(selectedLevel.value);
                    if (clientPlace.x == selectedLevel.value)
                    {
                        equipDirty = true;
                    }
                    if (clientPlace.x == PlayerDatas.Instance.baseData.equipShowSwitch / 10)
                    {
                        if (appearanceChangeEvent != null)
@@ -532,10 +514,15 @@
                    break;
            }
            if (dirty)
            if (itemDirty)
            {
                RefreshCandidateEquips(selectedLevel.value);
                UpdateRedpoint(selectedLevel.value);
            }
            if (equipDirty)
            {
                UpdateSuitPlaces(selectedLevel.value);
                UpdateSuitProperty(selectedLevel.value, selectedStarLevel.value);
            }
        }
@@ -599,6 +586,41 @@
        private void UpdateAppearanceState(int level)
        {
            isAppearanceLevel.value = level == PlayerDatas.Instance.baseData.equipShowSwitch / 10;
        }
        private void UpdateSuitPlaces(int level)
        {
            suitPlaces.Clear();
            for (int i = 1; i <= 8; i++)
            {
                var equip = packModel.GetItemByGuid(GetEquip(new Int2(level, i)));
                var hasSuit = equip != null && equip.config.SuiteiD > 0;
                if (hasSuit)
                {
                    suitPlaces.Add(i);
                }
            }
        }
        private void UpdateSuitProperty(int level, int star)
        {
            var property = new EquipSuitProperty();
            property.twoSuit = GetEquipSuitEntry(level, star, EquipSuitType.TwoSuit);
            property.fiveSuit = GetEquipSuitEntry(level, star, EquipSuitType.FiveSuit);
            var configs = EquipSuitConfig.GetConfigs(PlayerDatas.Instance.baseData.Job, level, EquipSuitType.EightSuit);
            for (int i = 0; i < configs.Count; i++)
            {
                var config = configs[i];
                if (config.star == star)
                {
                    property.eightSuitId = config.id;
                }
            }
            property.eightActived = GetSuitLevel(level, EquipSuitType.EightSuit) >= star;
            this.suitProperty.value = property;
        }
        private void ParseConfig()
@@ -690,5 +712,13 @@
        public List<Int2> properties;
    }
    public struct EquipSuitProperty
    {
        public EquipSuitPropertyEntry twoSuit;
        public EquipSuitPropertyEntry fiveSuit;
        public int eightSuitId;
        public bool eightActived;
    }
}
System/Equip/EquipSet.cs
@@ -38,14 +38,6 @@
            }
        }
        public void SelectPlace(int place)
        {
            foreach (var item in equipSlots.Values)
            {
                item.selected.value = item.equipPosition.y == place;
            }
        }
        public bool IsSlotUnLocked(int place)
        {
            if (!equipSlots.ContainsKey(place))
@@ -84,45 +76,6 @@
            }
            return equipSlots[place].equip.value;
        }
        public void PutOn(string equipGuid)
        {
            var equip = packModel.GetItemByGuid(equipGuid);
            if (equip == null)
            {
                return;
            }
            var place = equip.config.EquipPlace;
            if (!equipSlots.ContainsKey(place))
            {
                return;
            }
            var slot = equipSlots[place];
            if (!slot.unLocked)
            {
                return;
            }
            if (!IsPlaceCompatible(place, equip.config.EquipPlace))
            {
                return;
            }
            slot.equip.value = equipGuid;
        }
        public void TakeOff(int place)
        {
            if (!equipSlots.ContainsKey(place))
            {
                return;
            }
            var slot = equipSlots[place];
            slot.equip.value = null;
        }
        public EquipAppearance GetAppearance()
@@ -191,16 +144,6 @@
            }
            return item.score.CompareTo(currentEquip.score);
        }
        public void UpdateRedPoint(string equipGuid)
        {
        }
        private bool IsPlaceCompatible(int slotPlace, int equipPlace)
        {
            return slotPlace == equipPlace;
        }
        public static Int2 ServerPlaceToClientPlace(int serverPlace)
System/Equip/EquipSuitPropertyWidget.cs
@@ -21,35 +21,32 @@
        [SerializeField] Text m_EightSuitTitle;
        [SerializeField] Text m_EightSuitDescription;
        EquipModel model { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
        EquipStarModel starModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        public void Init(int level)
        {
            m_SuitName.text = EquipSuitConfig.GetConfigs(PlayerDatas.Instance.baseData.Job, level, EquipSuitType.TwoSuit)[0].name;
            var maxLevel = EquipStarModel.GetMaxStarLevel(level);
            m_StarToggles[3].SetActive(maxLevel >= 9);
            m_StarToggles[2].SetActive(maxLevel >= 6);
            m_StarToggles[1].SetActive(maxLevel >= 3);
            m_StarToggles[0].SetActive(true);
        }
        public void DisplaySuitPlaces(List<int> places)
        {
            for (int i = 1; i <= 8; i++)
            {
                var equip = packModel.GetItemByGuid(model.GetEquip(new Int2(level, i)));
                var hasSuit = equip != null && equip.config.SuiteiD > 0;
                var hasSuit = places.Contains(i);
                m_SuitEquipNames[i - 1].color = UIHelper.GetUIColor(hasSuit ? TextColType.Green : TextColType.White, true);
                m_SuitEquipNames[i - 1].text = UIHelper.GetEquipPlaceName(i);
            }
            var maxLevel = EquipStarModel.GetMaxStarLevel(level);
            m_StarToggles[0].SetActive(true);
            m_StarToggles[1].SetActive(maxLevel >= 3);
            m_StarToggles[2].SetActive(maxLevel >= 6);
            m_StarToggles[3].SetActive(maxLevel >= 9);
        }
        public void Display(int level, int star)
        public void DisplayProperty(EquipSuitProperty property)
        {
            m_TwoSuit.Display(model.GetEquipSuitEntry(level, star, EquipSuitType.TwoSuit));
            m_FiveSuit.Display(model.GetEquipSuitEntry(level, star, EquipSuitType.FiveSuit));
            m_EightSuitDescription.text = GetEightSuitDescription(level, star);
            var eightSuitLevel = model.GetSuitLevel(level, EquipSuitType.EightSuit);
            var color = UIHelper.GetUIColor(eightSuitLevel >= star ? TextColType.Green : TextColType.White, true);
            m_TwoSuit.Display(property.twoSuit);
            m_FiveSuit.Display(property.fiveSuit);
            m_EightSuitDescription.text = GetEightSuitDescription(property.eightSuitId);
            var color = UIHelper.GetUIColor(property.eightActived ? TextColType.Green : TextColType.White, true);
            m_EightSuitTitle.color = color;
            m_EightSuitDescription.color = color;
        }
@@ -59,31 +56,17 @@
        }
        private string GetEightSuitDescription(int level, int star)
        private string GetEightSuitDescription(int suitId)
        {
            var configs = EquipSuitConfig.GetConfigs(PlayerDatas.Instance.baseData.Job, level, EquipSuitType.EightSuit);
            for (int i = 0; i < configs.Count; i++)
            var config = EquipSuitConfig.Get(suitId);
            if (config.skillID > 0)
            {
                var config = configs[i];
                if (config.star == star)
                {
                    var description = string.Empty;
                    if (config.skillID > 0)
                    {
                        description = config.description;
                    }
                    else
                    {
                        var propertyConfig = PlayerPropertyConfig.Get(config.attr[0].x);
                        var propertyDescription = PlayerPropertyConfig.GetValueDescription(config.attr[0].x, config.attr[0].y);
                        description = StringUtility.Contact(propertyConfig.Name, " +", propertyDescription);
                    }
                    return description;
                }
                return config.description;
            }
            return string.Empty;
            else
            {
                return PlayerPropertyConfig.GetFullDescription(config.attr[0]);
            }
        }
        [System.Serializable]
@@ -114,7 +97,7 @@
            {
                if (value)
                {
                    model.selectedStarLevel.value = star;
                    model.SelectSuitStarLevel(star);
                }
            }
System/Equip/RealmEquipWin.cs
@@ -110,9 +110,14 @@
                m_CandidateEquipWidget.Display(model.selectedLevel.value, candidates);
            }
            if (force || model.selectedStarLevel.dirty)
            if (force || model.suitPlaces.dirty)
            {
                m_SuitPropertyWidget.Display(model.selectedLevel.value, model.selectedStarLevel.Fetch());
                m_SuitPropertyWidget.DisplaySuitPlaces(model.suitPlaces.Fetch());
            }
            if (force || model.suitProperty.dirty)
            {
                m_SuitPropertyWidget.DisplayProperty(model.suitProperty.Fetch());
            }
            if (force || model.getWays.dirty)
System/ItemTip/TipBaseInfoWidget.cs
@@ -25,12 +25,12 @@
            if (baseInfo.isEquiped)
            {
                m_Label.gameObject.SetActive(true);
                m_Label.SetSprite("");
                m_Label.SetSprite("Equiped_a");
            }
            else if (baseInfo.isAuction)
            {
                m_Label.gameObject.SetActive(true);
                m_Label.SetSprite("");
                m_Label.SetSprite("Item_Auction_2");
            }
            else
            {
System/KnapSack/Logic/ItemLogicUtility.cs
@@ -905,8 +905,8 @@
        public int SetSellItemOrder(ItemModel startModel, ItemModel endModel)
        {
            bool startIsEquip = IsEquip(startModel);
            bool endIsEquip = IsEquip(endModel);
            bool startIsEquip = IsEquip(startModel.itemId);
            bool endIsEquip = IsEquip(endModel .itemId);
            if (startIsEquip.CompareTo(endIsEquip) != 0) return -startIsEquip.CompareTo(endIsEquip);
            int order1 = startModel.config.Type;
            int order2 = endModel.config.Type;
@@ -918,11 +918,6 @@
            int code2 = endModel.itemId;
            if (code1.CompareTo(code2) != 0) return -code1.CompareTo(code2);
            return 0;
        }
        public bool IsEquip(ItemModel model)
        {
            return model.config.EquipPlace != 0;
        }
        public void GetOneKeySellModel()
System/KnapSack/Logic/ItemTipsModel.cs
@@ -633,6 +633,15 @@
                    }
                }
            }
            if (!string.IsNullOrEmpty(attrData.guid))
            {
                var item = playerPack.GetItemByGuid(attrData.guid);
                if (item.isAuction)
                {
                    attrData.SetTipsFuncBtn(ItemOperateType.putAway, (ItemWinBtnType, ItemAttrData) => { ItemOperateUtility.Instance.PutAway(attrData.guid); });
                }
            }
        }
        /// <summary>
@@ -1773,7 +1782,6 @@
        public bool isHavePutLimit { get; private set; }
        StrengthenModel strengthengmodel { get { return ModelCenter.Instance.GetModel<StrengthenModel>(); } }
        ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        RuneModel runeModel { get { return ModelCenter.Instance.GetModel<RuneModel>(); } }
        GodBeastModel beastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
System/KnapSack/Logic/PackModel.cs
@@ -317,7 +317,7 @@
                guid = itemModel.guid;
                int itemId = itemModel.itemId;
                DeleteItemDictByGUID( itemModel.guid);
                DeleteItemDictByGUID(type, itemModel.guid);
                singlePack.RemoveItem(clearItem.ItemIndex);
                if (refreshItemCountEvent != null)
@@ -414,11 +414,14 @@
            }
        }
        void DeleteItemDictByGUID(string guid)
        void DeleteItemDictByGUID(PackType type, string guid)
        {
            if (itemGUIDDict.ContainsKey(guid))
            {
                itemGUIDDict.Remove(guid);
                if (itemGUIDDict[guid].packType == type)
                {
                    itemGUIDDict.Remove(guid);
                }
            }
        }
System/KnapSack/New/CommonItemBaisc.cs
@@ -33,7 +33,7 @@
            get {
                if (m_AuctionIcon == null)
                {
                    m_AuctionIcon = this.transform.GetComponent<Image>("BindBG");
                    m_AuctionIcon = this.transform.GetComponent<Image>("Img_Auction");
                }
                return m_AuctionIcon;
            }
System/Realm/RealmAnimationBehaviour.cs
@@ -17,10 +17,12 @@
        [SerializeField] UIEffect m_EffectLevelUp;
        [SerializeField] UIEffect m_EffectBoss;
        [SerializeField] UIEffect m_EffectBase;
        [SerializeField] UIEffect m_EffectCover;
        [SerializeField, Header("小境界升级特效时长")] float m_NormalLevelUpEffectTime = 1.5f;
        [SerializeField, Header("大境界升级特效时长")] float m_SpecialLevelUpEffectTime = 4.5f;
        [SerializeField, Header("Boss特效时长")] float m_BossEffectTime = 2f;
        [SerializeField, Header("罩子消失时机"), Range(0, 2f)] float m_CoverDisappearTime = 1.0f;
        [SerializeField, Header("罩子切换时机")] float m_CoverChangeTime = 3.0f;
        Coroutine m_RotateCoroutine = null;
@@ -28,10 +30,12 @@
        public bool rotating { get; private set; }
        public bool isPlayingAnimation { get; private set; }
        public bool isPlayingBossEffect { get; private set; }
        public event Action onRotateComplete;
        public event Action onLevelUpComplete;
        public event Action onBossAppearComplete;
        public event Action onCoverChange;
        RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
@@ -39,6 +43,7 @@
        {
            rotating = false;
            isPlayingAnimation = false;
            isPlayingBossEffect = false;
            m_ContainerLine.gameObject.SetActive(false);
            for (int i = 0; i < m_RealmStages.Length; i++)
            {
@@ -125,7 +130,19 @@
            m_EffectLevelUp.effect = levelUpEffectId;
            m_EffectLevelUp.Play();
            var effectTime = config.BossID != 0 ? m_SpecialLevelUpEffectTime : m_NormalLevelUpEffectTime;
            yield return WaitingForSecondConst.GetWaitForSeconds(effectTime);
            if (config.BossID != 0)
            {
                yield return WaitingForSecondConst.GetWaitForSeconds(m_CoverChangeTime);
                if (onCoverChange != null)
                {
                    onCoverChange();
                }
                yield return WaitingForSecondConst.GetWaitForSeconds(effectTime - m_CoverChangeTime);
            }
            else
            {
                yield return WaitingForSecondConst.GetWaitForSeconds(effectTime);
            }
            if (index != -1)
            {
@@ -147,32 +164,11 @@
                StartRotate();
            }
            config = RealmConfig.Get(model.displayRealmLevel);
            if (config.BossID != 0)
            if (model.SatisfyChallengeBoss(model.displayRealmLevel))
            {
                m_EffectBoss.Play();
                Animator animator = null;
                if (m_EffectBoss.target != null)
                {
                    animator = m_EffectBoss.target.GetAnimator();
                    animator.Play("Effect_JingJieBJ_02", 0, 0);
                }
                if (m_EffectBase.target != null)
                {
                    var obj = m_EffectBase.target.transform.Find("GameObject/b/b (3)");
                    if (obj != null)
                    {
                        obj.gameObject.SetActive(false);
                    }
                }
                yield return WaitingForSecondConst.GetWaitForSeconds(m_BossEffectTime);
                if (onBossAppearComplete != null)
                {
                    onBossAppearComplete();
                }
                yield return WaitingForSecondConst.GetWaitForSeconds(Mathf.Max(0f, 3.1f - m_BossEffectTime));
                StartBossEffectShow();
                model.SetBossEffectShow(model.displayRealmLevel);
                yield return WaitingForSecondConst.WaitMS3000;
            }
            isPlayingAnimation = false;
@@ -205,15 +201,42 @@
            m_RotateCoroutine = StartCoroutine(Co_Rotate());
        }
        public void Dispose()
        public void StartBossEffectShow()
        {
            rotating = false;
            isPlayingAnimation = false;
            StopAllCoroutines();
            if (m_RotateCoroutine != null)
            StartCoroutine(Co_BossEffectShow());
        }
        IEnumerator Co_BossEffectShow()
        {
            isPlayingBossEffect = true;
            m_EffectBoss.Play();
            Animator animator = null;
            if (m_EffectBoss.target != null)
            {
                StopCoroutine(m_RotateCoroutine);
                m_RotateCoroutine = null;
                animator = m_EffectBoss.target.GetAnimator();
                animator.Play("Effect_JingJieBJ_02", 0, 0);
            }
            if (m_EffectBase.target != null)
            {
                var obj = m_EffectBase.target.transform.Find("GameObject/b/b (3)");
                if (obj != null)
                {
                    obj.gameObject.SetActive(false);
                }
            }
            yield return WaitingForSecondConst.GetWaitForSeconds(m_CoverDisappearTime);
            if (m_EffectCover.IsPlaying)
            {
                m_EffectCover.StopImediatly();
            }
            yield return WaitingForSecondConst.GetWaitForSeconds(2f - m_CoverDisappearTime);
            isPlayingBossEffect = false;
            if (onBossAppearComplete != null)
            {
                onBossAppearComplete();
            }
        }
@@ -283,6 +306,19 @@
            }
        }
        public void Dispose()
        {
            rotating = false;
            isPlayingAnimation = false;
            isPlayingBossEffect = false;
            StopAllCoroutines();
            if (m_RotateCoroutine != null)
            {
                StopCoroutine(m_RotateCoroutine);
                m_RotateCoroutine = null;
            }
        }
        [ContextMenu("Reset")]
        void TestReset()
        {
System/Realm/RealmLevelUpBehaviour.cs
@@ -118,7 +118,7 @@
        public void DisplayBoss(int realmLevel)
        {
            var config = RealmConfig.Get(realmLevel);
            var config = RealmConfig.Get(realmLevel + 1);
            var label = UIHelper.GetRealmColorByLv(realmLevel, StringUtility.Contact("[", config.Name, "]"));
            m_Condition.text = Language.Get("RealmConditionBoss", label);
            var progress = model.isBossPass ? 1 : 0;
System/Realm/RealmModel.cs
@@ -283,6 +283,28 @@
            return 7039;
        }
        public bool GetBossEffectShow(int realmLevel)
        {
            var playerId = PlayerDatas.Instance.baseData.PlayerID;
            return LocalSave.GetBool(StringUtility.Contact("RealmBossEffect_", realmLevel, "_", playerId));
        }
        public void SetBossEffectShow(int realmLevel)
        {
            var playerId = PlayerDatas.Instance.baseData.PlayerID;
            LocalSave.SetBool(StringUtility.Contact("RealmBossEffect_", realmLevel, "_", playerId), true);
        }
        public bool SatisfyChallengeBoss(int reamLevel)
        {
            var config = RealmConfig.Get(reamLevel);
            if (config != null)
            {
                return config.BossID != 0 && !isBossPass && PlayerDatas.Instance.baseData.LV >= config.NeedLV;
            }
            return false;
        }
        public void SendLevelUpRealm()
        {
            CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp();
@@ -373,7 +395,7 @@
                if (realmLevel < realmMaxLevel)
                {
                    var config = RealmConfig.Get(realmLevel);
                    if (config.BossID != 0 && !isBossPass)
                    if (SatisfyChallengeBoss(realmLevel))
                    {
                        challengeable = PlayerDatas.Instance.baseData.FightPoint >= config.FightPower;
                    }
System/Realm/RealmWin.cs
@@ -36,6 +36,7 @@
        int cacheRealmLevel = 0;
        long cacheFightPower = 0;
        long customUpPower = 0;
        bool tweenOnStart = false;
        const int REALM_STAGE_COUNT = 5;
@@ -100,6 +101,7 @@
            m_RealmAnimation.onRotateComplete += OnRotateComplete;
            m_RealmAnimation.onLevelUpComplete += OnLevelUpComplete;
            m_RealmAnimation.onBossAppearComplete += OnBossAppearComplete;
            m_RealmAnimation.onCoverChange += OnCoverChange;
            mainDateModel.customDisplayPower += CustomDisplayPower;
            cacheRealmLevel = PlayerDatas.Instance.baseData.realmLevel;
@@ -113,16 +115,15 @@
            m_RealmState = RealmState.LevelUp;
            HideRealmBoss();
            DisplayRealmUp();
            m_RealmBriefTween.Play();
            var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
            var requireLevelUp = realmLevel < model.realmMaxLevel && model.selectRealm > realmLevel;
            if (requireLevelUp)
            tweenOnStart = true;
            m_RealmBriefTween.SetStartState();
            m_RealmLevelUpTween.SetStartState();
            if (!m_RealmAnimation.isPlayingBossEffect)
            {
                m_RealmLevelUpTween.Play();
                StartTween();
            }
        }
@@ -138,6 +139,7 @@
            m_RealmAnimation.onLevelUpComplete -= OnLevelUpComplete;
            m_RealmAnimation.onBossAppearComplete -= OnBossAppearComplete;
            mainDateModel.customDisplayPower -= CustomDisplayPower;
            m_RealmAnimation.onCoverChange -= OnCoverChange;
            HideRealmUp();
        }
@@ -171,7 +173,20 @@
            DisplayRealmBrief();
            DisplayUnlockEquip();
            DisplayCover();
            DisplayEffectBoss();
            if (model.SatisfyChallengeBoss(model.displayRealmLevel))
            {
                if (model.GetBossEffectShow(model.displayRealmLevel))
                {
                    DisplayEffectBoss();
                }
                else
                {
                    m_RealmAnimation.StartBossEffectShow();
                    m_GotoBoss.gameObject.SetActive(false);
                    model.SetBossEffectShow(model.displayRealmLevel);
                }
            }
        }
        void HideRealmUp()
@@ -230,10 +245,8 @@
                m_RealmLevelUp.Display(model.selectRealm);
            }
            var config = RealmConfig.Get(model.selectRealm - 1);
            m_GotoBoss.gameObject.SetActive(!model.isBossPass
                && model.selectRealm == model.displayRealmLevel + 1
                && config != null && config.BossID != 0);
            m_GotoBoss.gameObject.SetActive(model.displayRealmLevel == model.selectRealm - 1 &&
                model.SatisfyChallengeBoss(model.selectRealm - 1));
        }
        void DisplayRealmBrief()
@@ -255,7 +268,7 @@
                    if (model.displayRealmLevel < level && model.selectRealm != level
                        && model.IsUnlockEquipRealm(level, out equipSet))
                    {
                        var index = realms.IndexOf(level);
                        var index = i;
                        m_ContainerUnlockEquip.gameObject.SetActive(true);
                        foreach (var realmStage in m_RealmStages)
                        {
@@ -287,7 +300,7 @@
            else
            {
                var config = RealmConfig.Get(model.displayRealmLevel);
                var isBossExist = config != null && config.BossID != 0 && !model.isBossPass;
                var isBossExist = model.SatisfyChallengeBoss(model.displayRealmLevel);
                if (isBossExist)
                {
                    return;
@@ -307,8 +320,7 @@
        {
            bool requireBossEffect = false;
            m_EffectBoss.StopImediatly();
            var config = RealmConfig.Get(model.displayRealmLevel);
            if (config.BossID != 0 && !model.isBossPass)
            if (model.SatisfyChallengeBoss(model.displayRealmLevel))
            {
                requireBossEffect = true;
                m_EffectBoss.Play();
@@ -328,7 +340,20 @@
                    obj.gameObject.SetActive(!requireBossEffect);
                }
            }
        }
        void StartTween()
        {
            m_RealmBriefTween.Play();
            var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
            var requireLevelUp = realmLevel < model.realmMaxLevel && model.selectRealm > realmLevel;
            if (requireLevelUp)
            {
                m_RealmLevelUpTween.Play();
            }
            tweenOnStart = false;
        }
        private void PlayerDataRefreshEvent(PlayerDataType dataType)
@@ -352,6 +377,20 @@
                    customUpPower += (PlayerDatas.Instance.baseData.FightPoint - cacheFightPower);
                }
                cacheFightPower = PlayerDatas.Instance.baseData.FightPoint;
            }
            else if (dataType == PlayerDataType.LV)
            {
                m_RealmLevelUp.DisplayCondition();
                if (m_RealmAnimation.isPlayingAnimation || m_RealmAnimation.rotating)
                {
                    return;
                }
                if (model.SatisfyChallengeBoss(model.displayRealmLevel)
                    && !model.GetBossEffectShow(model.displayRealmLevel))
                {
                    model.SetBossEffectShow(model.displayRealmLevel);
                    m_RealmAnimation.StartBossEffectShow();
                }
            }
        }
@@ -445,6 +484,24 @@
        public void OnBossAppearComplete()
        {
            m_GotoBoss.gameObject.SetActive(true);
            if (tweenOnStart)
            {
                StartTween();
            }
            if (m_EffectCover.IsPlaying)
            {
                m_EffectCover.StopImediatly();
            }
        }
        private void OnCoverChange()
        {
            var id = model.GetRealmCoverEffect(model.displayRealmLevel + 1);
            m_EffectCover.StopImediatly();
            m_EffectCover.effect = id;
            m_EffectCover.Play();
        }
        private bool CustomDisplayPower()
Utility/EnumHelper.cs
@@ -633,100 +633,52 @@
    Deleted = 0, // 已删除物品,弃用
    Equip = 1, // 装备
    Item = 2, // 物品
    Recycle = 3, // 垃圾桶(回收站)
    BreakItem = 4, // 拆解物品栏
    Warehouse = 5, // 仓库
    Title = 6, // 称号背包
    Compose = 7, // 合成背包
    Identify = 8, // 鉴定背包
    BreakPrepare = 9, // 拆解准备背包
    Result = 10, // 合成结果背包
    Investiture = 11, // 封爵背包
    Horse = 12, // 坐骑背包
    AnyWhere = 13, // 万能背包
    Fabao = 14, // 法宝背包
    HorseEquip = 15, // 坐骑装备背包
    CabinetDressCoat = 16, // 衣服外套背包
    CabinetWeaponCoat = 17, // 武器外套背包
    CabinetHorse = 18, // 时装坐骑背包
    JewelMerge = 19, // 宝石合成背包
    JewelMergeResult = 20, // 宝石合成结果背包
    FineSoulSlot = 21, // 精魄槽
    PetEquip1 = 22, // 宠物装备1
    PetEquip2 = 23, // 宠物装备2
    PetEquip3 = 24, // 宠物装备3
    PetEquip4 = 25, // 宠物装备4
    PetEquip5 = 26, // 宠物装备5
    PetCabinetPet = 27, // 收集系统,宠物收纳柜背包
    InterimPack = 28,//临时交换背包
    TempItem = 29,//临时存放背包
    Treasure = 30, // 寻宝背包
    PetPack = 31, //宠物背包
    DogzItem = 32, //神兽物品背包
    DogzEquip = 33, //神兽装备背包(神兽穿戴)
    BlastFrunacePack = 253, //炼丹背包
    GatherSoul = 254,//聚魂
    RunePack = 255,//符印背包
}
public enum E_ItemType
public enum E_DropItemType
{
    Copper = 1,// 铜钱
    Drugs = 7,// 药品
    Gemstone = 25,// 宝石
    DropCopper = 43,// 掉落铜钱
    Equip_Weapon = 101,// 武器
    Equip_Secondary,// 副手
    Equip_Hat,// 帽子
    Equip_Clothes,// 衣服
    Equip_Belt,// 腰带
    Equip_Pants,// 下装
    Equip_Shoes,// 鞋子
    Necklace,// 项链
    Fariy,// 仙器
    Equip_Wing = 111,// 翅膀
    Equip_Weapon = 101,         // 主手
    Equip_Weapon2 = 102,       // 副手
    Equip_Hat = 103,                // 帽子
    Equip_Clothes = 104,          // 衣服
    Equip_Belt = 105,                // 腰带
    Equip_Trousers = 106,         // 裤子
    Equip_Shoes = 107,             // 鞋子
    Equip_Glove = 108,              //手套
    Equip_Neck = 109,               //项链
    Equip_FairyCan1 = 110,       //仙器
    Equip_FairyCan2 = 111,       //仙器
    Equip_Jade = 112,               //玉佩
    Equip_Wing = 113,// 翅膀
    Guard,// 灵守
    Accessories1,// 配饰1
    Accessories2,// 配饰2
    Accessories3,// 配饰3
    Accessories4,// 配饰4
    Accessories5,// 配饰5
    Accessories6,// 配饰6
    JadeDynasty_Cloak = 128, //诛仙披风
    JadeDynasty_FaceMask = 129, //诛仙面罩
    JadeDynasty_Glove = 130, //诛仙手套
    JadeDynasty_Ruyi = 131, //诛仙如意
    JadeDynasty_Pendant = 132, //诛仙吊坠
    JadeDynasty_Ring = 133, //诛仙戒指
    JadeDynasty_Sword1 = 134, //诛仙剑
    JadeDynasty_Sword2 = 135, //戮仙剑
    JadeDynasty_Sword3 = 136, //陷仙剑
    JadeDynasty_Sword4 = 137, //绝仙剑
}
/** 物品类型 */
public enum ItemType
{
    Buff = 9, //Buff类型
    OfflineCard = 10, //离线挂机卡
    MountDan = 21,//坐骑丹
    MakerEquipSuitMat = 34, //装备套装材料
    ComposeSuitStone = 35, //套装石碎片
    WingsMat = 39,  //合成翅膀材料,羽翼精炼材料
    DogzStrengthMat = 70, //提供神兽装备强化的经验
    VipTools = 80, //vip道具
    Box = 81, //宝箱
    Necklaces = 108, //项链
    FairyEquip = 109, //仙器
    Wings = 111, //翅膀
    SpiritAnimal = 112, //灵守
    DogzEquipType1 = 119, //神兽装备兽角
    DogzEquipType2 = 120, //神兽装备魔眼
    DogzEquipType3 = 121, //神兽装备獠牙
    DogzEquipType4 = 122, //神兽装备兽爪
    DogzEquipType5 = 123, //神兽装备鳞甲
}
/** 值为列表形式,枚举值是单数 */
@@ -1584,7 +1536,7 @@
    wingProgressValue = 42, //羽翼精炼值
    createTime = 44, // 时效物品的创建时间
    totalTime = 48, // 时效物品的剩余时间
    auctionItemCreateTime=50,//拍品创建时间
    auctionItemCreateTime = 50,//拍品创建时间
    #region 200~300 宠物数据用
    pet_NPCID = 200,  //npcID
    pet_ClassLV = 202,  // 阶级