少年修仙传客户端代码仓库
client_Zxw
2018-09-25 4dba76710a47cb8c83c5cf7f7b96702c702c5039
3833 【前端】坐骑、灵宠红点优化
2个文件已修改
28 ■■■■■ 已修改文件
System/Mount/PlayerMountDatas.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/PlayerPetDatas.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Mount/PlayerMountDatas.cs
@@ -61,6 +61,7 @@
    public bool Wait = true;//等待回包(使用坐骑丹)
    public static Action<int, bool> MultipleEvent;
    public static event Action PlayerLoginOKData;
    private Dictionary<int, int> DicDefaultMount = new Dictionary<int, int>();
    public override void Init()
    {     
        ToAddSorting();     
@@ -75,6 +76,8 @@
        {
            ListEffectSkill.Add(listeffect[i]);
        }
        string MountRedDotstr = Config.Instance.Get<FuncConfigConfig>("MountPetRedDot").Numerical1;
        DicDefaultMount = ConfigParse.GetDic<int, int>(MountRedDotstr);
    }
    public override void UnInit()
@@ -278,6 +281,7 @@
        int GetMountID = 0;
        int GetMountLv = 0;
        for (int i = 0; i < SortMount.Count; i++)
        {
            int horseID = SortMount[i].HorseID;
@@ -300,6 +304,16 @@
        ItemConfig _tagchine = Config.Instance.Get<ItemConfig>(int.Parse(_tagfun.Numerical1));
        HorseConfig horsecon = Config.Instance.Get<HorseConfig>(GetMountID);
        int number = playerPack.GetItemCountByID(PackType.rptItem, _tagchine.ID);
        foreach (var key in _DicHorse.Keys)//因为有成就任务限制所有 第一只坐骑红点逻辑特殊写
        {
            if (DicDefaultMount.ContainsKey(key) && DicDefaultMount[key] > _DicHorse[key].Lv
                && number > 0 && ASingleFeedRedPoint.ContainsKey(key))
            {
                ASingleFeedRedPoint[key].state = RedPointState.Simple;
                return;
            }
        }
        if (ASingleFeedRedPoint.ContainsKey(GetMountID) && number > 0 && GetMountLv < horsecon.MaxLV)
        {
            if (PlayerDatas.Instance.baseData.LV >= 1500)
@@ -315,7 +329,6 @@
                ASingleFeedRedPoint[GetMountID].state = RedPointState.Simple;
                return;
            }
        }
    }
System/Pet/PlayerPetDatas.cs
@@ -66,6 +66,7 @@
    public int petUpgradeToolId { get; set; }
    public event Action PlayerLoginOkData;
    private Dictionary<int, int> DicDefaultPet = new Dictionary<int, int>();
    public override void Init()
    {
@@ -95,6 +96,8 @@
        {
            ListEffectSkill.Add(listeffect[i]);
        }
        string PetRedDotstr = Config.Instance.Get<FuncConfigConfig>("MountPetRedDot").Numerical2;
        DicDefaultPet = ConfigParse.GetDic<int, int>(PetRedDotstr);
    }
    public override void UnInit()
@@ -353,6 +356,16 @@
            }
        }
        int itemCount = playerPack.GetItemCountByID(PackType.rptItem, 4151);
        foreach (var key in _DicPetBack.Keys)//因为有成就任务限制所有 第一只坐骑红点逻辑特殊写
        {
            if (DicDefaultPet.ContainsKey(key) && DicDefaultPet[key] > _DicPetBack[key].PetClass
                && itemCount > 0 && CultivateRedPoint.ContainsKey(key))
            {
                CultivateRedPoint[key].state = RedPointState.Simple;
                CanEssence = true;
                return;
            }
        }
        PetInfoConfig petinfo = Config.Instance.Get<PetInfoConfig>(GetPetId);
        if (PlayerDatas.Instance.baseData.LV >= 1500)
        {