yyl
2025-08-04 41f2e6da67fb92e18e9d054276de78718c64c5f4
Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
15个文件已修改
8个文件已添加
786 ■■■■ 已修改文件
Main/Config/Configs/ItemConfig.cs 255 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB124_tagSCLineupInfo.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB124_tagSCLineupInfo.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB124_tagSCLineupInfo.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB124_tagSCLineupInfo.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/ResModule/UILoader.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/ItemTip/ItemTipUtility.cs 176 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/ItemTip/ItemTipWin.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/ItemTip/ItemTipWin.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/Logic/ComposeGirdCell.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/Logic/ComposeGirdCell.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/Logic/ItemLogicUtility.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/Logic/PackGirdCell.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/Logic/PackGirdCell.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/Logic/RolePackWin.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/Logic/SinglePack.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/Logic/composeLineCell.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/New/CommonItemBaisc.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/PackManager.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/HomeWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Team/TeamManager.cs 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/ComponentExtersion.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/ItemConfig.cs
@@ -20,21 +20,11 @@
    public string ItemName;
    public int Type;
    public int EquipPlace;
    public int CanRepair;
    public int PackCount;
    public int UseLV;
    public int CanSell;
    public int CanTrade;
    public int[] JumpComposeCondi;
    public int CanDrop;
    public int CanBind;
    public int CDTypeEx;
    public int CDType;
    public int CDTime;
    public int GoldPrice;
    public int GoldPaperPrice;
    public int SilverPrice;
    public int UseTag;
    public int Effect1;
    public int EffectValueA1;
    public int EffectValueB1;
@@ -58,34 +48,17 @@
    public int AddSkill1;
    public int AddSkill2;
    public int JobLimit;
    public int RealmLimit;
    public int ItemColor;
    public int StarLevel;
    public int MaxHoleCount;
    public int CanBreak;
    public int MaxEndure;
    public int EndureReduceType;
    public int BindType;
    public int MaxSkillCnt;
    public int ExpireTime;
    public int MaxFitLV;
    public int SuiteiD;
    public string DropinstantEffName;
    public string IconKey;
    public int ChangeOrd;
    public string Description;
    public string QualityName;
    public int LimitSTR;
    public int LimitPHY;
    public int LimitPNE;
    public string Template;
    public int DropItemPattern;
    public int SellTip;
    public int BatchUse;
    public int Jump;
    public int[] GetWay;
    public string ItemTypeName;
    public int[] UseCondiType;
    public int BaseEffectID;
    public override int LoadKey(string _key)
@@ -108,151 +81,89 @@
            int.TryParse(tables[4],out EquipPlace); 
            int.TryParse(tables[5],out CanRepair);
            int.TryParse(tables[5],out PackCount);
            int.TryParse(tables[6],out PackCount);
            int.TryParse(tables[6],out UseLV);
            int.TryParse(tables[7],out UseLV);
            int.TryParse(tables[7],out CDTypeEx);
            int.TryParse(tables[8],out CanSell);
            int.TryParse(tables[8],out CDType);
            int.TryParse(tables[9],out CanTrade);
            int.TryParse(tables[9],out CDTime);
            if (tables[10].Contains("["))
            int.TryParse(tables[10],out Effect1);
            int.TryParse(tables[11],out EffectValueA1);
            int.TryParse(tables[12],out EffectValueB1);
            int.TryParse(tables[13],out EffectValueC1);
            int.TryParse(tables[14],out Effect2);
            int.TryParse(tables[15],out EffectValueA2);
            int.TryParse(tables[16],out EffectValueB2);
            int.TryParse(tables[17],out EffectValueC2);
            int.TryParse(tables[18],out Effect3);
            int.TryParse(tables[19],out EffectValueA3);
            int.TryParse(tables[20],out EffectValueB3);
            int.TryParse(tables[21],out EffectValueC3);
            int.TryParse(tables[22],out Effect4);
            int.TryParse(tables[23],out EffectValueA4);
            int.TryParse(tables[24],out EffectValueB4);
            int.TryParse(tables[25],out EffectValueC4);
            int.TryParse(tables[26],out Effect5);
            int.TryParse(tables[27],out EffectValueA5);
            int.TryParse(tables[28],out EffectValueB5);
            int.TryParse(tables[29],out EffectValueC5);
            int.TryParse(tables[30],out AddSkill1);
            int.TryParse(tables[31],out AddSkill2);
            int.TryParse(tables[32],out JobLimit);
            int.TryParse(tables[33],out ItemColor);
            int.TryParse(tables[34],out StarLevel);
            int.TryParse(tables[35],out EndureReduceType);
            int.TryParse(tables[36],out MaxSkillCnt);
            int.TryParse(tables[37],out ExpireTime);
            int.TryParse(tables[38],out SuiteiD);
            IconKey = tables[39];
            Description = tables[40];
            int.TryParse(tables[41],out BatchUse);
            int.TryParse(tables[42],out Jump);
            if (tables[43].Contains("["))
            {
                JumpComposeCondi = JsonMapper.ToObject<int[]>(tables[10]);
                GetWay = JsonMapper.ToObject<int[]>(tables[43]);
            }
            else
            {
                string[] JumpComposeCondiStringArray = tables[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                JumpComposeCondi = new int[JumpComposeCondiStringArray.Length];
                for (int i=0;i<JumpComposeCondiStringArray.Length;i++)
                {
                     int.TryParse(JumpComposeCondiStringArray[i],out JumpComposeCondi[i]);
                }
            }
            int.TryParse(tables[11],out CanDrop);
            int.TryParse(tables[12],out CanBind);
            int.TryParse(tables[13],out CDTypeEx);
            int.TryParse(tables[14],out CDType);
            int.TryParse(tables[15],out CDTime);
            int.TryParse(tables[16],out GoldPrice);
            int.TryParse(tables[17],out GoldPaperPrice);
            int.TryParse(tables[18],out SilverPrice);
            int.TryParse(tables[19],out UseTag);
            int.TryParse(tables[20],out Effect1);
            int.TryParse(tables[21],out EffectValueA1);
            int.TryParse(tables[22],out EffectValueB1);
            int.TryParse(tables[23],out EffectValueC1);
            int.TryParse(tables[24],out Effect2);
            int.TryParse(tables[25],out EffectValueA2);
            int.TryParse(tables[26],out EffectValueB2);
            int.TryParse(tables[27],out EffectValueC2);
            int.TryParse(tables[28],out Effect3);
            int.TryParse(tables[29],out EffectValueA3);
            int.TryParse(tables[30],out EffectValueB3);
            int.TryParse(tables[31],out EffectValueC3);
            int.TryParse(tables[32],out Effect4);
            int.TryParse(tables[33],out EffectValueA4);
            int.TryParse(tables[34],out EffectValueB4);
            int.TryParse(tables[35],out EffectValueC4);
            int.TryParse(tables[36],out Effect5);
            int.TryParse(tables[37],out EffectValueA5);
            int.TryParse(tables[38],out EffectValueB5);
            int.TryParse(tables[39],out EffectValueC5);
            int.TryParse(tables[40],out AddSkill1);
            int.TryParse(tables[41],out AddSkill2);
            int.TryParse(tables[42],out JobLimit);
            int.TryParse(tables[43],out RealmLimit);
            int.TryParse(tables[44],out ItemColor);
            int.TryParse(tables[45],out StarLevel);
            int.TryParse(tables[46],out MaxHoleCount);
            int.TryParse(tables[47],out CanBreak);
            int.TryParse(tables[48],out MaxEndure);
            int.TryParse(tables[49],out EndureReduceType);
            int.TryParse(tables[50],out BindType);
            int.TryParse(tables[51],out MaxSkillCnt);
            int.TryParse(tables[52],out ExpireTime);
            int.TryParse(tables[53],out MaxFitLV);
            int.TryParse(tables[54],out SuiteiD);
            DropinstantEffName = tables[55];
            IconKey = tables[56];
            int.TryParse(tables[57],out ChangeOrd);
            Description = tables[58];
            QualityName = tables[59];
            int.TryParse(tables[60],out LimitSTR);
            int.TryParse(tables[61],out LimitPHY);
            int.TryParse(tables[62],out LimitPNE);
            Template = tables[63];
            int.TryParse(tables[64],out DropItemPattern);
            int.TryParse(tables[65],out SellTip);
            int.TryParse(tables[66],out BatchUse);
            int.TryParse(tables[67],out Jump);
            if (tables[68].Contains("["))
            {
                GetWay = JsonMapper.ToObject<int[]>(tables[68]);
            }
            else
            {
                string[] GetWayStringArray = tables[68].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                string[] GetWayStringArray = tables[43].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                GetWay = new int[GetWayStringArray.Length];
                for (int i=0;i<GetWayStringArray.Length;i++)
                {
@@ -260,23 +171,7 @@
                }
            }
            ItemTypeName = tables[69];
            if (tables[70].Contains("["))
            {
                UseCondiType = JsonMapper.ToObject<int[]>(tables[70]);
            }
            else
            {
                string[] UseCondiTypeStringArray = tables[70].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                UseCondiType = new int[UseCondiTypeStringArray.Length];
                for (int i=0;i<UseCondiTypeStringArray.Length;i++)
                {
                     int.TryParse(UseCondiTypeStringArray[i],out UseCondiType[i]);
                }
            }
            int.TryParse(tables[71],out BaseEffectID);
            int.TryParse(tables[44],out BaseEffectID);
        }
        catch (Exception exception)
        {
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB124_tagSCLineupInfo.cs
New file
@@ -0,0 +1,13 @@
using UnityEngine;
using System.Collections;
// B1 24 阵容信息 #tagSCLineupInfo
public class DTCB124_tagSCLineupInfo : DtcBasic {
    public override void Done(GameNetPackBasic vNetPack)
    {
        base.Done(vNetPack);
        HB124_tagSCLineupInfo vNetData = vNetPack as HB124_tagSCLineupInfo;
        TeamManager.Instance.OnHeroChangeEvent(vNetData);
    }
}
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB124_tagSCLineupInfo.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c1fd0ec2c9c912c459b80695e2be32fb
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
@@ -102,6 +102,7 @@
        Register(typeof(H0407_tagNPCDisappear), typeof(DTC0407_tagNPCDisappear));
        Register(typeof(H0423_tagObjPropertyRefreshView), typeof(DTC0423_tagObjPropertyRefreshView));
        Register(typeof(H0604_tagUseSkillAttack), typeof(DTC0604_tagUseSkillAttack));
        Register(typeof(HB124_tagSCLineupInfo), typeof(DTCB124_tagSCLineupInfo));
    }
    //主工程注册封包
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB124_tagSCLineupInfo.cs
New file
@@ -0,0 +1,33 @@
using UnityEngine;
using System.Collections;
// B1 24 阵容信息 #tagSCLineupInfo
public class HB124_tagSCLineupInfo : GameNetPackBasic {
    public byte LineupCnt;
    public  tagSCLineup[] LineupList;
    public HB124_tagSCLineupInfo () {
        _cmd = (ushort)0xB124;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out LineupCnt, vBytes, NetDataType.BYTE);
        LineupList = new tagSCLineup[LineupCnt];
        for (int i = 0; i < LineupCnt; i ++) {
            LineupList[i] = new tagSCLineup();
            TransBytes (out LineupList[i].LineupID, vBytes, NetDataType.BYTE);
            TransBytes (out LineupList[i].ShapeType, vBytes, NetDataType.BYTE);
            TransBytes (out LineupList[i].HeroCnt, vBytes, NetDataType.BYTE);
            TransBytes (out LineupList[i].HeroItemIndexList, vBytes, NetDataType.WORD, LineupList[i].HeroCnt);
        }
    }
    public struct tagSCLineup {
        public byte LineupID;        // 阵容ID
        public byte ShapeType;        // 阵型
        public byte HeroCnt;
        public  ushort[] HeroItemIndexList;        // 所在武将背包索引+1列表 [站位1物品索引+1, 站位2, ...],站位无武将时为0
    }
}
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB124_tagSCLineupInfo.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3a1dae8baba38b64b823a74ae91865ed
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/ResModule/UILoader.cs
@@ -24,6 +24,7 @@
        ResManager.Instance.UnloadAsset(ResourcesPath.UI_PREFAB_SUFFIX, _assetName);
    }
    //通过ICON表加载
    public static Sprite LoadSprite(string _iconKey)
    {
        var iconConfig = IconConfig.Get(_iconKey);
Main/System/ItemTip/ItemTipUtility.cs
@@ -64,7 +64,6 @@
            public int auctionSurplusTime;
            public int overdueSurplusTime;
            public int levelLimit;
            public int realmLimit;
            public int moneyLimit;
            public int evolveLevel;
        }
@@ -348,27 +347,27 @@
            // }
        }
        // public static void Show(string guid, bool operatable = true)
        // {
        //     var item = packModel.GetItemByGuid(guid);
        //     if (item == null)
        //     {
        //         return;
        //     }
        //     PrintItemBrief(item.itemId, guid);
    public static void Show(string guid, bool operatable = true)
    {
        var item = PackManager.Instance.GetItemByGuid(guid);
        if (item == null)
        {
            return;
        }
        PrintItemBrief(item.itemId, item);
        //     secondaryData = null;
        //     var tipType = GetTipType(item.itemId);
        //     switch (tipType)
        //     {
        //         case TipType.Equip:
        //             var packType = item.packType;
        //             switch (packType)
        //             {
        //                 case PackType.Equip:
        secondaryData = null;
        var tipType = GetTipType(item.itemId);
        switch (tipType)
        {
            case TipType.Equip:
                var packType = item.packType;
                switch (packType)
                {
                    case PackType.Equip:
        //                     mainTipData = CreateNormalEquipData(guid, operatable);
        //                     break;
        //                 default:
                        break;
                    default:
        //                     if (item.isAuction)
        //                     {
        //                         mainTipData = CreateEquipAuctionData(guid, operatable);
@@ -391,34 +390,22 @@
        //                             secondaryData = CreateNormalEquipData(equipedGuid, false);
        //                         }
        //                     }
        //                     break;
        //             }
        //             break;
        //         case TipType.Dogz:
        //             mainTipData = CreateDogzEquipData(guid);
        //             break;
        //         default:
        //             mainTipData = CreateItemData(guid, operatable);
        //             break;
        //     }
                        break;
                }
                break;
        //     switch (tipType)
        //     {
            default:
                mainTipData = CreateItemData(guid, operatable);
                break;
        }
        switch (tipType)
        {
        //         case TipType.Equip:
        //             WindowCenter.Instance.Open<EquipTipWin>();
        //             break;
        //         case TipType.Dogz:
        //             WindowCenter.Instance.Open<EquipTipWin>();
        //             break;
        //         case TipType.KingTreasure:
        //             var kingTreasureShow = ModelCenter.Instance.GetModel<KingTreasureShowModel>();
        //             kingTreasureShow.SetInitData(item.itemId);
        //             break;
        //         case TipType.PetMount:
        //             WindowCenter.Instance.Open<PetMountTipWin>();
        //             break;
        //         case TipType.SpiritWeapon:
        //             WindowCenter.Instance.Open<SpiritWeaponTipWin>();
        //             break;
        //         case TipType.BoxItem:
        //             if (WindowCenter.Instance.IsOpen<ItemBoxTipWin>())
@@ -435,12 +422,12 @@
        //             TreasurePavilionModel.Instance.showTipFromPiece = item.itemId;
        //             WindowCenter.Instance.OpenIL<TreasurePavilionTipWin>();
        //             break;
        //         default:
        //             WindowCenter.Instance.Open<ItemTipWin>();
        //             break;
        //     }
            default:
                UIManager.Instance.OpenWindow<ItemTipWin>();
                break;
        }
        // }
    }
        public static void ShowGood(int goodId, int itemId)
        {
@@ -787,29 +774,29 @@
        //     };
        // }
        // static TipData CreateItemData(string guid, bool operatable)
        // {
        //     var item = packModel.GetItemByGuid(guid);
        //     if (item == null)
        //     {
        //         return default(TipData);
        //     }
    static TipData CreateItemData(string guid, bool operatable)
    {
        var item = PackManager.Instance.GetItemByGuid(guid);
        if (item == null)
        {
            return default(TipData);
        }
        //     return new TipData()
        //     {
        //         itemId = item.itemId,
        //         guid = guid,
        return new TipData()
        {
            itemId = item.itemId,
            guid = guid,
        //         baseInfo = GetBaseInfo(guid),
        //         baseProperty = GetBaseProperty(item.itemId),
            baseInfo = GetBaseInfo(guid),
            baseProperty = GetBaseProperty(item.itemId),
        //         spiritWeaponProperty = GetSpiritWeaponProperty(item.itemId),
        //         legendProperty = GetLegendProperty(guid),
        //         petMountBaseProperty = GetPetMountBaseProperty(item.itemId),
        //         operates = operatable ? GetOperates(guid) : null,
        //         refineMaterials = GetWingRefineMaterials(guid),
        //         shenProperty = GetShenProperty(item.itemId)
        //     };
        // }
        };
    }
        // static TipData CreateItemData(int itemId)
        // {
@@ -945,54 +932,52 @@
                //score = ItemLogicUtility.Instance.GetEquipScore(itemId, null, true),
                auctionSurplusTime = 0,
                levelLimit = config.UseLV,
                realmLimit = config.RealmLimit,
                moneyLimit = money,
            };
            return baseInfo;
        }
        // private static BaseInfo GetBaseInfo(string guid)
        // {
        //     var item = packModel.GetItemByGuid(guid);
    private static BaseInfo GetBaseInfo(string guid)
    {
        var item = PackManager.Instance.GetItemByGuid(guid);
        //     var level = item.config.LV;
        //     var place = item.config.EquipPlace;
        var level = item.config.LV;
        var place = item.config.EquipPlace;
        //     var isEquiped = equipModel.GetEquip(new Int2(level, place)) == guid;
        var isEquiped = false;// equipModel.GetEquip(new Int2(level, place)) == guid;
        //     var type = EquipStrengthModel.GetEquipStrengthType(place);
        //     var star = starModel.GetEquipStarLevel(new Int2(level, place));
        //     var maxStrengthenLevel = strengthenModel.GetEquipLevelMax(type, level);
        //     var placeStrengthenLevel = strengthenModel.GetStrengthLevel(level, place);
        var star = 0; //starModel.GetEquipStarLevel(new Int2(level, place));
        var maxStrengthenLevel = 0; //strengthenModel.GetEquipLevelMax(type, level);
        var placeStrengthenLevel = 0;   //strengthenModel.GetStrengthLevel(level, place);
        //     var money = 0;
        var money = 0;
        //     if (item.config.Type == 81)
        //     {
        //         var chestConfig = ChestsConfig.Get(item.itemId);
        //         money = chestConfig.OpenMoney;
        //     }
        //     var baseInfo = new BaseInfo()
        //     {
        //         itemId = item.itemId,
        //         count = item.count,
        //         isAuction = item.isAuction,
        //         isEquiped = isEquiped,
        //         isPreview = false,
        //         score = item.score,
        //         isOverdue = ItemLogicUtility.Instance.IsOverdue(guid),
        //         auctionSurplusTime = item.isAuction ? item.auctionSurplusTime : 0,
        //         overdueSurplusTime = item.overdueSurplusTime,
        //         levelLimit = item.isAuction ? 0 : item.config.UseLV,
        //         realmLimit = item.isAuction ? 0 : item.config.RealmLimit,
        //         star = isEquiped ? star : -1,
        //         strengthenLevel = isEquiped ? Mathf.Min(placeStrengthenLevel, maxStrengthenLevel) : 0,
        //         moneyLimit = money,
        //     };
        var baseInfo = new BaseInfo()
        {
            itemId = item.itemId,
            count = item.count,
            isAuction = item.isAuction,
            isEquiped = isEquiped,
            isPreview = false,
            score = item.score,
            isOverdue = ItemLogicUtility.Instance.IsOverdue(guid),
            auctionSurplusTime = item.isAuction ? item.auctionSurplusTime : 0,
            overdueSurplusTime = item.overdueSurplusTime,
            levelLimit = item.isAuction ? 0 : item.config.UseLV,
            star = isEquiped ? star : -1,
            strengthenLevel = isEquiped ? Mathf.Min(placeStrengthenLevel, maxStrengthenLevel) : 0,
            moneyLimit = money,
        };
        //     return baseInfo;
        // }
        return baseInfo;
    }
        private static BaseProperty GetBaseProperty(int itemId)
        {
@@ -1996,14 +1981,15 @@
        private static void PrintItemBrief(int itemId)
        {
            var config = ItemConfig.Get(itemId);
            Debug.LogFormat("你查看的物品是:itemId->{0} ;name->{1}", itemId, config.ItemName);
        Debug.LogFormat("查看物品:itemId->{0} ;name->{1}", itemId, config.ItemName);
        }
        [System.Diagnostics.Conditional("UNITY_EDITOR")]
        private static void PrintItemBrief(int itemId, string guid)
    private static void PrintItemBrief(int itemId, ItemModel item)
        {
            var config = ItemConfig.Get(itemId);
            Debug.LogFormat("你查看的物品是:itemId->{0};name->{1};guid->{2};", itemId, config.ItemName, string.IsNullOrEmpty(guid) ? "" : guid);
        Debug.LogFormat("查看物品:itemId->{0};name->{1};服务端索引->{3};guid->{2}",
        itemId, config.ItemName, item.guid, item.gridIndex);
        }
    }
Main/System/ItemTip/ItemTipWin.cs
New file
@@ -0,0 +1,27 @@
using System;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// 物品基础信息
/// </summary>
public class ItemTipWin : UIBase
{
    [SerializeField] ItemCell itemCell;
    [SerializeField] Text nameText;
    [SerializeField] Text descText;
    protected override void OnPreOpen()
    {
        var item = ItemTipUtility.mainTipData.baseInfo;
        itemCell.Init(new ItemCellModel(item.itemId, false, (ulong)item.count));
        var itemConfig = ItemConfig.Get(item.itemId);
        nameText.text = itemConfig.ItemName;
        descText.text = itemConfig.Description;
    }
}
Main/System/ItemTip/ItemTipWin.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 037e7adc04fdcd74ab67dcd5dc746114
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/KnapSack/Logic/ComposeGirdCell.cs
New file
@@ -0,0 +1,25 @@
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// 合成格子
/// </summary>
public class ComposeGirdCell : MonoBehaviour
{
    [SerializeField] ItemCell itemCell;
    [SerializeField] Image fillImage;
    [SerializeField] Image fullImage;
    [SerializeField] Text processText;
    public void Display(int index)
    {
        var guid = PackManager.Instance.composeItemGuidList[index];
        var item = PackManager.Instance.GetItemByGuid(guid);
        if (item == null)
            return;
        itemCell.Init(item);
        itemCell.button.AddListener(()=>
        {
            //合成界面
        });
    }
}
Main/System/KnapSack/Logic/ComposeGirdCell.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3c64a63d0c44fce40a3d1b90b18b2324
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/KnapSack/Logic/ItemLogicUtility.cs
@@ -955,7 +955,7 @@
                }
            }
            return PlayerDatas.Instance.baseData.realmLevel >= item.config.RealmLimit;
        return true;
        }
        #endregion
@@ -1362,4 +1362,6 @@
            //不清理物品,下次收到数据会自动清理,只改事件方便打开界面测试
            getItemEventName = "";
        }
    }
Main/System/KnapSack/Logic/PackGirdCell.cs
@@ -1,4 +1,5 @@
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// 背包格子
@@ -6,12 +7,18 @@
public class PackGirdCell : MonoBehaviour
{
    [SerializeField] ItemCell itemCell;
    [SerializeField] RedpointBehaviour redPoint;    // 此处红点可以用图片表示
    [SerializeField] Image redPoint;    // 用图标代替简化ID管理
    public void Display(int index)
    {
        var guid = PackManager.Instance.GetSinglePack(PackType.Item).itemGuidList[index];
        if (string.IsNullOrEmpty(guid))
            return;
        itemCell.Init(PackManager.Instance.GetItemByGuid(guid));
        itemCell.button.AddListener(()=>
        {
            ItemTipUtility.Show(guid);
        });
        redPoint.SetActive(false);
    }
}
Main/System/KnapSack/Logic/PackGirdCell.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3c64a63d0c44fce40a3d1b90b18b2324
guid: d7093aa7f47948a4c9e4a824b10f4845
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/System/KnapSack/Logic/RolePackWin.cs
@@ -8,7 +8,7 @@
{
    [SerializeField] ScrollerController packScroller;
    [SerializeField] ScrollerController composeScroller;
    [SerializeField] ScrollerController composeScroller;    //待策划确定
    [SerializeField] GroupButtonEx packBtn;
    [SerializeField] GroupButtonEx composeBtn;
@@ -98,7 +98,11 @@
    public override void Refresh()
    {
        if (functionOrder == 1)
        {
            RefreshComposeItemData();
        }
        packScroller.SetActive(functionOrder == 0);
        composeScroller.SetActive(functionOrder != 0);
        CreatePackScroller();
@@ -170,6 +174,15 @@
        {
            return;
        }
        composeScroller.Refresh();
        for (int i = 0; i < PackManager.Instance.composeItemGuidList.Count; i++)
        {
            if (i % 5 == 0)
            {
                composeScroller.AddCell(ScrollerDataType.Header, i);
            }
        }
        composeScroller.Restart();
    }
    void RefreshPackCell(ScrollerDataType type, CellView cell)
@@ -180,5 +193,12 @@
    void RefreshComposeCell(ScrollerDataType type, CellView cell)
    {
        var _cell = cell as ComposeLineCell;
        _cell.Display(cell.index);
    }
    void RefreshComposeItemData()
    {
        PackManager.Instance.composeItemGuidList.Clear();
    }
}
Main/System/KnapSack/Logic/SinglePack.cs
@@ -247,18 +247,6 @@
                continue;
            }
            //var auctionValid = filterParams.isAuction == item.isAuction;
            //if (!auctionValid)
            //{
            //    continue;
            //}
            var realmValid = filterParams.realmLimit == 0 || filterParams.realmLimit == item.config.RealmLimit;
            if (!realmValid)
            {
                continue;
            }
            list.Add(item);
        }
@@ -376,7 +364,6 @@
        public List<int> qualitys;
        public List<int> itemTypes;
        public List<int> equipTypes;
        public int realmLimit;
        public bool isAuction;
        public List<int> jobs;
    }
Main/System/KnapSack/Logic/composeLineCell.cs
@@ -3,12 +3,22 @@
/// <summary>
/// 合成格子行
/// </summary>
public class composeLineCell : CellView
public class ComposeLineCell : CellView
{
    [SerializeField] PackGirdCell[] itemCell;
    [SerializeField] ComposeGirdCell[] itemCell;
    public void Display(int index)
    {
        for (int i = 0; i < itemCell.Length; i++)
        {
            if (index + i < PackManager.Instance.composeItemGuidList.Count)
            {
                itemCell[i].SetActive(true);
                itemCell[i].Display(index + i);
            }
            else
            {
                itemCell[i].SetActive(false);
            }
        }
    }
}
Main/System/KnapSack/New/CommonItemBaisc.cs
@@ -214,7 +214,7 @@
        itemIcon.SetActive(true);
        bgIcon.SetActive(true);
        itemIcon.SetSprite(config.IconKey);
        itemIcon.SetOrgSprite(config.IconKey);
        ItemConfig itemConfig = ItemConfig.Get(itemId);
        bgIcon.SetItemBackGround(ItemLogicUtility.Instance.GetItemQuality(itemId, useDataDic));
        if (packModel.textCountShow.ContainsKey(itemId))
@@ -265,6 +265,7 @@
        //         break;
        // }
        //待策划确定
        if (config.Type == (int)ItemType.Hero)
        {
            var heroConfig = HeroConfig.Get(itemId);
@@ -276,7 +277,7 @@
        {
            countryIcon.SetActive(false);
        }
        // pieceIcon.SetActive(); //待策划确定
        // pieceIcon.SetActive();
    }
    // / <summary>
Main/System/KnapSack/PackManager.cs
@@ -12,6 +12,7 @@
    public Dictionary<int, int> PackInitCountDict = new Dictionary<int, int>(); //背包类型:初始数量
    public int initBagGridCount { get; private set; } //初始物品背包格子数
    public int[] itemPackSortTyps { get; private set; }    //背包物品的按类型排序
    public List<string> composeItemGuidList = new List<string>();  //合成列表物品guid
    public static string StrengthAttrShift_RecordKey = "";
    public const string RecordKnapsackTitle = "RecordKnapsackTitle";
Main/System/Main/HomeWin.cs
@@ -125,7 +125,7 @@
            taskNumText.text = string.Format("({0}/{1})", task.CurValue, taskConfig.NeedValue);
            taskNumText.color = task.CurValue >= taskConfig.NeedValue ? UIHelper.GetUIColor(TextColType.NavyYellow) :  UIHelper.GetUIColor(TextColType.Red);
            taskEffect.SetActive(TaskManager.Instance.GetMainTaskState() == 2);
            awardIcon.SetSprite(ItemConfig.Get(taskConfig.AwardItemList[0][0]).IconKey);
            awardIcon.SetOrgSprite(ItemConfig.Get(taskConfig.AwardItemList[0][0]).IconKey);
            awardCnt.text = taskConfig.AwardItemList[0][1].ToString();
        }
    }
Main/System/Team/TeamManager.cs
@@ -12,17 +12,13 @@
    {
        base.Init();
        
        HeroManager.Instance.onHeroChangeEvent += onHeroChangeEvent;
        HeroManager.Instance.onHeroDeleteEvent += onHeroDeleteEvent;
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
    }
    public override void Release()
    {
        base.Release();
        HeroManager.Instance.onHeroChangeEvent += onHeroChangeEvent;
        HeroManager.Instance.onHeroDeleteEvent += onHeroDeleteEvent;
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize;
    }
    protected void OnBeforePlayerDataInitialize()
@@ -30,114 +26,36 @@
        teamDict.Clear();
    }
    protected void onHeroChangeEvent(HeroInfo heroInfo)
    public void OnHeroChangeEvent(HB124_tagSCLineupInfo vNetData)
    {
        //  英雄当前所有在的队伍
        List<int> heroTeams = heroInfo.itemHero.GetUseData(81);
        //  当前英雄所在的队伍信息 <队伍类型, <队形, 位置>>
        Dictionary<TeamType, KeyValuePair<int, int>> teamTypeShapeTypePositionDict = new Dictionary<TeamType, KeyValuePair<int, int>>();
        //  处理当前记录在英雄信息里的队伍信息
        if (null != heroTeams)
        var heroPack = PackManager.Instance.GetSinglePack(PackType.Hero);
        for (int i = 0; i < vNetData.LineupCnt; i++)
        {
            foreach (var teamMsg in heroTeams)
            var team = GetTeam((TeamType)vNetData.LineupList[i].LineupID);
            for (int j = 0; j < vNetData.LineupList[i].HeroCnt; j++)
            {
                // 所在阵容信息列表 [阵容类型*10000+阵型类型*100+位置编号, ...]
                int teamType = teamMsg / 10000;
                int shapeType = (teamMsg % 10000) / 100;
                int positionIndex = teamMsg % 100 - 1;    //布阵位置:服务端为 1  客户端为0
                if (teamTypeShapeTypePositionDict.ContainsKey((TeamType)teamType))
                int index = vNetData.LineupList[i].HeroItemIndexList[j];
                HeroInfo hero;
                if (index == 0)
                {
                    //  队伍类型相同,更新阵型和位置
                    Debug.LogError("当前英雄拥有两个相同的队伍信息: " + teamType + " " + shapeType + " " + positionIndex + ", hero guid is " + heroInfo.itemHero.guid);
                    hero = null;
                }
                else
                {
                    //  队伍类型不同,添加新的
                    KeyValuePair<int, int> shapeTypePosition = new KeyValuePair<int, int>(shapeType, positionIndex);
                    teamTypeShapeTypePositionDict.Add((TeamType)teamType, shapeTypePosition);
                    var item = heroPack.GetItemByIndex(vNetData.LineupList[i].HeroItemIndexList[j] - 1);
                    if (item == null)
                    {
                        hero = null;
                        Debug.LogError("没有对应的武将数据!");
                    }
                    hero = HeroManager.Instance.GetHero(item.guid);
                }
                team.RefreshServerData(vNetData.LineupList[i].ShapeType, j, hero);
                }
            }
        }
        //  遍历当前所有队伍 判断当前队伍里是否有该英雄
        //  如果有的话 根据英雄里的信息当前是否该英雄还在队伍里 是否发生变化
        //      =>1.阵型发生变化 2.位置发生变化
        //  如果没有的话 就说明该英雄被移出队伍了
        foreach (var team in teamDict.Values)
        {
            //  检查一下当前队伍是否有该英雄
            //  如果有的话 读取一下当前是否该英雄还在队伍里 位置是否发生变化
            TeamHero teamHero = team.GetHero(heroInfo.itemHero.guid);
            if (teamHero != null)
            {
                if ((teamTypeShapeTypePositionDict.ContainsKey(team.teamType)))
                {
                    KeyValuePair<int, int> shapeTypePosition = teamTypeShapeTypePositionDict[team.teamType];
                    //  更新队伍信息
                    // 可以判断teamHero的positionNum是否跟shapeTypePosition.Value一致 判断是否变位置了
                    // 可以判断teamHero的ServerShapeType是否跟shapeTypePosition.Key一致 判断是否变阵型了
                    team.RefreshServerData(shapeTypePosition.Key, shapeTypePosition.Value, heroInfo);
                }
                else
                {
                    //  队伍里有这个英雄,但是在队伍信息里没有了 置空 (被移出队伍)
                    team.RemoveHero(teamHero.positionNum);
                }
            }
            //    原来队伍里没这个英雄
            else
            {
                //  如果当前队伍类型在英雄的所在阵容信息列表里有的话
                //    就说明队伍里新增了这个英雄 (新增进队伍)
                if (teamTypeShapeTypePositionDict.ContainsKey(team.teamType))
                {
                    KeyValuePair<int, int> shapeTypePosition = teamTypeShapeTypePositionDict[team.teamType];
                    team.RefreshServerData(shapeTypePosition.Key, shapeTypePosition.Value, heroInfo);
                }
            }
        }
        //  遍历英雄所在的队伍信息列表 新增一下当前储存的队伍里没有的队伍
        foreach (var teamTypeShapeTypePosition in teamTypeShapeTypePositionDict)
        {
            //  如果当前队伍类型在队伍字典里没有的话
            if (!teamDict.ContainsKey(teamTypeShapeTypePosition.Key))
            {
                //  新建一个队伍
                TeamBase team = new TeamBase(teamTypeShapeTypePosition.Key);
                team.RefreshServerData(teamTypeShapeTypePosition.Value.Key, teamTypeShapeTypePosition.Value.Value, heroInfo);
                teamDict.Add(teamTypeShapeTypePosition.Key, team);
            }
        }
    }
    protected void onHeroDeleteEvent(HeroInfo heroInfo)
    {
        List<int> heroTeams = heroInfo.itemHero.GetUseData(81);
        foreach (int teamMsg in heroTeams)
        {
            // 所在阵容信息列表 [阵容类型*10000+阵型类型*100+位置编号, ...]
            int teamType = teamMsg / 10000;
            int shapeType = (teamMsg % 10000) / 100;
            int positionIndex = teamMsg % 100 - 1; //布阵位置:服务端为 1  客户端为0
            TeamBase team = GetTeam((TeamType)teamType);
            if (team != null)
            {
                team.RefreshServerData(shapeType, positionIndex, null);
            }
        }
    }
    public bool HasTeam(TeamType teamType)
    {
Main/Utility/ComponentExtersion.cs
@@ -270,7 +270,7 @@
        }
    }
    //通过ICON表加载
    public static void SetSprite(this Image _image, string _id)
    {
        if (_image == null)
@@ -294,6 +294,17 @@
        _textImage.sprite = sprite;
    }
    //通过图片名加载
    public static void SetOrgSprite(this Image _image, string iconName, string folderName = "icon")
    {
        if (_image == null)
        {
            return;
        }
        var sprite = UILoader.LoadSprite(folderName, iconName);
        _image.overrideSprite = sprite;
    }
    public static void SetActive(this Component compoent, bool active)
    {