少年修仙传客户端代码仓库
client_Zxw
2018-08-25 b93927377a37bb636196e7d37b4140df65664f46
单号【2939】骑宠培养防护
2个文件已修改
40 ■■■■■ 已修改文件
System/Mount/PlayerMountDatas.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/PlayerPetDatas.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Mount/PlayerMountDatas.cs
@@ -98,7 +98,8 @@
    public void OnPlayerLoginOk()
    {
        GlobalTimeEvent.Instance.secondEvent -= secondEvent;
        GlobalTimeEvent.Instance.secondEvent += secondEvent;
        IsOk = true;
        SinglePackModel singPack = playerPack.GetSinglePackModel(PackType.rptEquip);
        if (singPack == null) return;
@@ -111,6 +112,24 @@
            PlayerLoginOKData();
        }
    }
    private float time = 0f;
    private void secondEvent()
    {
        if (!Wait)
        {
            time+= Time.deltaTime;
            if (time >= 1.5f)
            {
                Wait = true;
            }
        }
        else
        {
            time = 0f;
        }
    }
    private void MountNumberPreservation()//用来对坐骑个数的保存
    {
        if (mountRedpoint.Count != 0)
System/Pet/PlayerPetDatas.cs
@@ -121,7 +121,8 @@
    public void OnPlayerLoginOk()
    {
        GlobalTimeEvent.Instance.secondEvent -= secondEvent;
        GlobalTimeEvent.Instance.secondEvent += secondEvent;
        SinglePackModel singPack = playerPack.GetSinglePackModel(PackType.rptPetPack);
        if (singPack == null) return;
        foreach (var index in singPack.GetPackModelIndexDict().Keys)
@@ -134,6 +135,22 @@
            PlayerLoginOkData();
        }
    }
    private float time = 0f;
    private void secondEvent()
    {
        if (!Wait)
        {
            time += Time.deltaTime;
            if (time >= 1.5f)
            {
                Wait = true;
            }
        }
        else
        {
            time = 0f;
        }
    }
    #region 发送服务端请求
    public void SendPetSwitchQuest(int petIndex)