hch
21 小时以前 efeccf8296000f1a4777ad27b33fb95e0a221981
197 子 【内政】淘金系统 / 【内政】淘金系统-客户端
4个文件已修改
34 ■■■■ 已修改文件
Main/System/InternalAffairs/GoldRushLeader.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/InternalAffairs/GoldRushManager.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/InternalAffairs/GoldRushTentCell.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/InternalAffairs/GoldRushWorkCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/InternalAffairs/GoldRushLeader.cs
@@ -23,7 +23,7 @@
    Action<bool> OnComplete;
    public void Init(GoldRushPosEvent[] _leaderPathPointArr, float waitTime, int _tendID, bool isBack, Action<bool> _OnComplete)
    public void Init(GoldRushPosEvent[] _leaderPathPointArr, float waitTime, int _tendID, int index, bool isBack, Action<bool> _OnComplete)
    {
        tendID = _tendID;
        leaderPathPointArr = _leaderPathPointArr;
@@ -36,7 +36,7 @@
                                leaderPathPointArr[leaderPathPointArr.Length - 1].transform.localPosition;
        OnComplete = _OnComplete;
        this.SetActive(true);
        leader.Create(GoldRushManager.Instance.GetRandommSkinID(), leaderScale);
        leader.Create(GoldRushManager.Instance.GetRandommSkinID(GoldRushManager.Instance.GetCampLastGoldID(tendID), index), leaderScale);
        Go(waitTime, isBack).Forget();
    }
Main/System/InternalAffairs/GoldRushManager.cs
@@ -1,4 +1,4 @@
using System;
using System;
using LitJson;
using System.Collections.Generic;
@@ -15,6 +15,7 @@
    public int housekeeperEndTime;   // 自动管家到期时间戳,有值同时也代表免费试用已使用
    public byte[] warehouseIDList;  //完成的,包含0空,主要用于领取的索引
    public Dictionary<int, HB037_tagSCGoldRushCampInfo.tagSCGoldRushCamp> campInfoDict = new Dictionary<int, HB037_tagSCGoldRushCampInfo.tagSCGoldRushCamp>();
    public Dictionary<int, int> tmpCampIDToGoldID = new Dictionary<int, int>(); //最后一次营地淘金对应的物品,纯粹用于显示模型
    public event Action<int> OnGoldRushCampEvent;    //服务端通知营地信息
    public event Action OnGoldRushInfoEvent;
@@ -218,10 +219,11 @@
    }
    public int GetRandommSkinID()
    public int GetRandommSkinID(int goldID, int index)
    {
        return skinIDs[(goldID % skinIDs.Count + index) % skinIDs.Count]; ;
        //从已解锁中随机
        return skinIDs[UnityEngine.Random.Range(0, skinIDs.Count)];
        // return skinIDs[UnityEngine.Random.Range(0, skinIDs.Count)];
    }
    void RefreshUnLockSkinID()
@@ -258,8 +260,13 @@
    {
        for (int i = 0; i < netPack.CampCnt; i++)
        {
            campInfoDict[netPack.CampList[i].CampID] = netPack.CampList[i]; ;
            campInfoDict[netPack.CampList[i].CampID] = netPack.CampList[i];
            if (netPack.CampList[i].GoldID != 0)
            {
                tmpCampIDToGoldID[netPack.CampList[i].CampID] = netPack.CampList[i].GoldID;
            }
            OnGoldRushCampEvent?.Invoke(netPack.CampList[i].CampID);
        }
        UpdateRedpoint();
@@ -297,6 +304,15 @@
        return 0;
    }
    public int GetCampLastGoldID(int campID)
    {
        if (tmpCampIDToGoldID.ContainsKey(campID))
        {
            return tmpCampIDToGoldID[campID];
        }
        return 0;
    }
    //获取营地工人
    public int GetCampWorkerCnt(int campID)
    {
Main/System/InternalAffairs/GoldRushTentCell.cs
@@ -429,7 +429,7 @@
            float waitTime = i * 0.6f;
            var newLeader = RequestLeader();
            workingLeaderList.Add(newLeader);
            newLeader.Init(leaderPathPointArr, waitTime, campID, false, (bool value) =>
            newLeader.Init(leaderPathPointArr, waitTime, campID, i, false, (bool value) =>
            {
                if (!value)
                {
@@ -487,7 +487,7 @@
                float waitTime = i * 0.6f;
                var newLeader = RequestLeader();
                callBackLeaderList.Add(newLeader);
                newLeader.Init(leaderPathPointArr, waitTime, campID, true, (bool value) =>
                newLeader.Init(leaderPathPointArr, waitTime, campID, i, true, (bool value) =>
                {
                    if (value)
                    {
Main/System/InternalAffairs/GoldRushWorkCell.cs
@@ -76,7 +76,7 @@
                if (i < workCnt)
                {
                    heroModels[i].SetActive(true);
                    var skinID = GoldRushManager.Instance.skinIDs[(goldID % skinCnt + i) % skinCnt];
                    var skinID = GoldRushManager.Instance.GetRandommSkinID(goldID, i);
                    heroModels[i].Create(skinID, 0.5f);
                }
                else