From 6dde220aad8d90ef32128c5de178db8c3d9c3e26 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 16 四月 2019 19:39:57 +0800
Subject: [PATCH] 3335 缥缈仙域
---
System/Dungeon/DungeonTargetBehaviour.cs | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/System/Dungeon/DungeonTargetBehaviour.cs b/System/Dungeon/DungeonTargetBehaviour.cs
index 068f23d..e31e67c 100644
--- a/System/Dungeon/DungeonTargetBehaviour.cs
+++ b/System/Dungeon/DungeonTargetBehaviour.cs
@@ -51,21 +51,21 @@
var desc = config.targetDescription1[step < config.targetDescription1.Length ? step : 0];
var npcId = config.NPC1ID.Length == 0 ? 0 : config.NPC1ID[step < config.NPC1ID.Length ? step : 0];
var targetValue = config.targetValue1.Length == 0 ? 0 : config.targetValue1[step < config.targetValue1.Length ? step : 0];
- GetTargetInfo(0, desc, targetValue, step, config.targetType1, npcId);
+ GetTargetInfo(0, desc, targetValue, step, config.targetType1, npcId, config.NPC1ID);
}
if (config.targetNum >= 2)
{
var desc = config.targetDescription2[step < config.targetDescription2.Length ? step : 0];
var npcId = config.NPC2ID.Length == 0 ? 0 : config.NPC2ID[step < config.NPC2ID.Length ? step : 0];
var targetValue = config.targetValue2.Length == 0 ? 0 : config.targetValue2[step < config.targetValue2.Length ? step : 0];
- GetTargetInfo(1, desc, targetValue, step, config.targetType2, npcId);
+ GetTargetInfo(1, desc, targetValue, step, config.targetType2, npcId, config.NPC2ID);
}
if (config.targetNum >= 3)
{
var desc = config.targetDescription3[step < config.targetDescription2.Length ? step : 0];
var npcId = config.NPC3ID.Length == 0 ? 0 : config.NPC3ID[step < config.NPC3ID.Length ? step : 0];
var targetValue = config.targetValue3.Length == 0 ? 0 : config.targetValue3[step < config.targetValue3.Length ? step : 0];
- GetTargetInfo(2, desc, targetValue, step, config.targetType3, npcId);
+ GetTargetInfo(2, desc, targetValue, step, config.targetType3, npcId, config.NPC3ID);
}
switch (dateMapId)
@@ -83,7 +83,7 @@
}
}
- private void GetTargetInfo(int _index, string desc, int _targetValue, int _targetStep, int _targetType, int npcId = 0)
+ private void GetTargetInfo(int _index, string desc, int _targetValue, int _targetStep, int _targetType, int npcId, int[] npcIds)
{
m_TargetDescs[_index].text = desc;
m_TargetNums[_index].text = string.Empty;
@@ -163,6 +163,19 @@
break;
}
m_TargetNums[_index].text = model.mission.step.ToString();
+ break;
+ case DungeonTargetType.Collect:
+ var collectCount = 0;
+ for (int i = 0; i < npcIds.Length; i++)
+ {
+ collectCount += model.GetDugneonNpcCollectCount(npcIds[i]);
+ }
+ if (_targetValue > 0)
+ {
+ m_TargetNums[_index].text = StringUtility.Contact(collectCount, "/", _targetValue);
+ break;
+ }
+ m_TargetNums[_index].text = collectCount.ToString();
break;
}
}
--
Gitblit v1.8.0