| | |
| | | return; |
| | | } |
| | | |
| | | var updatedBox = false; |
| | | var updatedBigBox = false; |
| | | var updatedSmallBox = false; |
| | | var updatedElite = false; |
| | | var updatedEliteNpcIds = new List<int>(); |
| | | |
| | | for (int i = 0; i < _npcInfoes.NPCInfoList.Length; i++) |
| | | { |
| | | var npcInfo = _npcInfoes.NPCInfoList[i]; |
| | | if (npcInfo.NPCID == bigBoxNpcId) |
| | | { |
| | | dogzDungeonBox.bigBoxSurplus = (int)npcInfo.Cnt; |
| | | updatedBox = true; |
| | | updatedBigBox = true; |
| | | } |
| | | |
| | | if (npcInfo.NPCID == smallBoxNpcId) |
| | | { |
| | | dogzDungeonBox.smallBoxSurplus = (int)npcInfo.Cnt; |
| | | updatedBox = true; |
| | | updatedSmallBox = true; |
| | | } |
| | | |
| | | if (eliteMonsters.Contains((int)npcInfo.NPCID)) |
| | | { |
| | | dogzDungeonElite.UpdateEliteInfo((int)npcInfo.NPCID, (int)npcInfo.Cnt); |
| | | updatedEliteNpcIds.Add((int)npcInfo.NPCID); |
| | | updatedElite = true; |
| | | } |
| | | } |
| | | |
| | | if (updatedBox) |
| | | if (!updatedBigBox) |
| | | { |
| | | if (boxSurplusChangeEvent != null) |
| | | dogzDungeonBox.bigBoxSurplus = 0; |
| | | } |
| | | |
| | | if (!updatedSmallBox) |
| | | { |
| | | dogzDungeonBox.smallBoxSurplus = 0; |
| | | } |
| | | |
| | | if (boxSurplusChangeEvent != null) |
| | | { |
| | | boxSurplusChangeEvent(); |
| | | } |
| | | |
| | | foreach (var item in eliteMonsters) |
| | | { |
| | | if (!updatedEliteNpcIds.Contains(item)) |
| | | { |
| | | boxSurplusChangeEvent(); |
| | | dogzDungeonElite.UpdateEliteInfo(item, 0); |
| | | } |
| | | } |
| | | |
| | | if (updatedElite) |
| | | if (eliteSurplusChangeEvent != null) |
| | | { |
| | | if (eliteSurplusChangeEvent != null) |
| | | { |
| | | eliteSurplusChangeEvent(); |
| | | } |
| | | eliteSurplusChangeEvent(); |
| | | } |
| | | |
| | | } |
| | | |
| | | public void UpdateBoxOrEliteRefreshTime(HA904_tagGCDogzNPCRefreshTime _refreshTimes) |