From 725b7b2374f43582a2d78b2cae3f8303359651b8 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 10 十一月 2025 14:30:53 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/OfficialRank/OfficialUpWin.cs | 39
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA340_tagSCSuccessInfoList.cs.meta | 2
Main/Config/PartialConfigs/SuccessConfig.cs.meta | 2
Main/System/Battle/BoneFieldBattleWin.cs | 23
Main/System/Redpoint/MainRedDot.cs | 11
Main/Component/UI/Core/GradientText.cs.meta | 2
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA342_tagSCSuccessAwardRecordList.cs.meta | 2
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA342_tagSCSuccessAwardRecordList.cs.meta | 2
Main/System/BattlePass/BattlePassManager.cs | 125 ++
Main/System/DayMission/SignManager.cs | 72 +
Main/System/DayMission/MissionHeroRoadWin.cs | 66 +
Main/Utility/EnumHelper.cs | 2
Main/System/FirstCharge/FirstChargeManager.cs | 15
Main/System/BillboardRank/PlayerRankCell.cs | 6
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA342_tagSCSuccessAwardRecordList.cs | 29
Main/System/DayMission/WeekBattlePassCell.cs | 4
Main/System/BattlePass/BattlePassCommonCell.cs.meta | 2
Main/System/TianziBillborad/TianziBillboradPlayerTop3Cell.cs | 40
Main/System/DayMission/DayMissionBaseWin.cs | 2
Main/Config/Configs/LLMJConfig.cs | 53
Main/System/Battle/StoryBossBattleWin.cs | 21
Main/Config/Configs/SuccessConfig.cs | 71 -
Main/System/DayMission/SignCell.cs.meta | 2
Main/System/Achievement/AchievementManager.cs.meta | 2
Main/System/DayMission/MissionHeroRoadCell.cs | 75 +
Main/System/NewBieGuidance/NewBieCenter.cs | 28
Main/System/BattlePass/BattlePassBaseWin.cs | 55
Main/System/Equip/EquipModel.cs | 10
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA340_tagSCSuccessInfoList.cs | 33
Main/System/TianziBillborad/TianziBillboradPlayerRankCell.cs | 75 +
Main/System/DayMission/DayMissionCell.cs | 30
Main/System/OfficialRank/OfficialRankManager.cs | 35
Main/Core/NetworkPackage/ClientPack/CA5_Function/CA509_tagCSDaySign.cs | 18
Main/System/Recharge/ExpSecretCollectionCell.cs | 67 +
Main/System/Equip/EquipExchangeCell.cs | 15
Main/Config/Configs/LLMJConfig.cs.meta | 2
Main/System/Recharge/ExpSecretCollectionWin.cs.meta | 2
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs.meta | 2
Main/System/BillboardRank/PlayerTop3Cell.cs | 5
Main/System/FirstCharge/FirstChargeWin.cs | 4
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA340_tagSCSuccessInfoList.cs.meta | 2
Main/System/BillboardRank/PlayerRankWin.cs | 2
Main/System/Recharge/ExpSecretCollectionManager.cs.meta | 2
Main/Config/Configs/SignInConfig.cs | 41
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs | 12
Main/System/BattlePass/BattlePassManager.Common.cs | 79 +
Main/System/BoneField/BoneFieldChallengeButton.cs | 3
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA30D_tagSCDaySignInfo.cs.meta | 2
Main/System/Battle/BattleField/TianziBillboradBattleField.cs | 8
Main/Component/UI/Core/GradientText.cs | 260 ++++
Main/System/BattlePass/BattlePassCommonCell.cs | 97 +
Main/System/BattlePass/BattlePassCommonWin.cs | 173 ++
Main/System/Achievement.meta | 8
Main/System/Settlement/BattleFailWin.cs | 1
Main/Component/UI/Effect/EllipseMask.cs | 307 +++++
Main/System/DayMission/SignManager.cs.meta | 2
Main/Component/UI/Effect/EllipseMask.cs.meta | 2
Main/System/BattlePass/BattlePassBaseCell.cs.meta | 2
Main/System/Main/RightFuncInHome.cs | 35
Main/System/BattlePass/BattlePassManager.Common.cs.meta | 2
Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs | 4
Main/System/Equip/ItemsOnFloor.cs | 32
Main/Config/Configs/SignInConfig.cs.meta | 2
Main/Config/PartialConfigs/MainLevelConfig.cs | 8
Main/Component/UI/Common/IntensifySmoothSlider.cs | 24
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA30D_tagSCDaySignInfo.cs.meta | 2
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA30D_tagSCDaySignInfo.cs | 19
Main/Config/Configs/CTGConfig.cs | 6
Main/System/Recharge/ExpSecretCollectionCell.cs.meta | 2
Main/System/Battle/BattleObject/BattleObject.cs | 10
Main/System/Achievement/AchievementManager.cs | 196 +++
Main/System/BillboardRank/RankModel.cs | 19
Main/System/DayMission/MissionHeroRoadCell.cs.meta | 2
Main/System/Tip/ConfirmCancel.cs | 1
Main/System/Recharge/ExpSecretCollectionManager.cs | 65 +
Main/System/BoneField/BoneFieldWin.cs | 4
Main/System/BattlePass/BattlePassManager.Week.cs | 10
Main/System/Recharge/RechargeManager.cs | 2
Main/System/Redpoint/RedpointCenter.cs | 12
Main/System/BattlePass/BattlePassCommonWin.cs.meta | 2
Main/System/DayMission/SignCell.cs | 131 ++
Main/Config/PartialConfigs/SuccessConfig.cs | 33
Main/System/OfficialRank/OfficialUpCell.cs | 30
Main/System/TianziBillborad/TianziBillboradPlayerRankCell.cs.meta | 2
Main/System/TianziBillborad/TianziBillboradPlayerTop3Cell.cs.meta | 2
Main/System/DayMission/SignWin.cs | 35
Main/System/HeroUI/HeroUIManager.OnTeam.cs | 46
Main/Config/ConfigManager.cs | 6
Main/System/DayMission/MissionHeroRoadWin.cs.meta | 2
Main/System/Arena/ArenaBattleFailWin.cs | 1
Main/System/BattlePass/BattlePassBaseCell.cs | 30
Main/Core/NetworkPackage/ClientPack/CA5_Function/CA509_tagCSDaySign.cs.meta | 2
Main/System/Battle/TianziBillboradBattleWin.cs | 90 -
Main/System/DayMission/DayMissionWin.cs | 11
Main/Config/Configs/DailyTaskConfig.cs | 6
Main/System/Message/RichTableEvent.cs | 26
Main/System/Main/HomeWin.cs | 18
Main/System/BattlePass/BattlePassBaseWin.cs.meta | 2
Main/Main.cs | 2
Main/System/HeroUI/HeroFormationCell.cs | 2
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA340_tagSCSuccessInfoList.cs | 12
Main/System/PhantasmPavilion/AvatarCell.cs | 14
Main/System/Recharge/DailySpecialsModel.cs | 2
Main/System/TianziBillborad/TianziDamageBar.cs | 192 --
Main/System/TianziBillborad/TianziBillboradBox.cs | 7
Main/System/Battle/BattleManager.cs | 2
Main/System/DayMission/WeekBattlePassWin.cs | 12
Main/System/TianziBillborad/TianziBillboradRankWin.cs | 6
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs | 23
/dev/null | 48
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs.meta | 2
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA30D_tagSCDaySignInfo.cs | 12
Main/System/DayMission/SignWin.cs.meta | 2
Main/System/Settlement/BoneBattleFailWin.cs | 1
Main/System/Recharge/ExpSecretCollectionWin.cs | 98 +
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA342_tagSCSuccessAwardRecordList.cs | 12
Main/System/TianziBillborad/TianziBillboradManager.cs | 92 +
Main/System/Battle/ArenaBattleWin.cs | 4
118 files changed, 2,995 insertions(+), 536 deletions(-)
diff --git a/Main/Component/UI/Common/IntensifySmoothSlider.cs b/Main/Component/UI/Common/IntensifySmoothSlider.cs
index 97cb452..5d5f3a4 100644
--- a/Main/Component/UI/Common/IntensifySmoothSlider.cs
+++ b/Main/Component/UI/Common/IntensifySmoothSlider.cs
@@ -170,14 +170,34 @@
private void CheckForValueChangeNotification(float currentSliderValue)
{
int currentSegment = GetCurrentSegment(currentSliderValue);
-
+
// 濡傛灉褰撳墠鐨勫垎娈电储寮曚笌涓婃瑙﹀彂浜嬩欢鏃剁殑绱㈠紩涓嶅悓锛岃鏄庡凡璺ㄨ秺鍒嗘杈圭晫銆�
if (currentSegment != m_LastNotifiedSegment)
{
ValueChangeAction?.Invoke(currentSliderValue, CurrentStage);
// 鏇存柊鈥滀笂娆¤Е鍙戔�濈殑绱㈠紩涓哄綋鍓嶇储寮曪紝闃叉鏈垎娈靛唴閲嶅瑙﹀彂銆�
- m_LastNotifiedSegment = currentSegment;
+ m_LastNotifiedSegment = currentSegment;
}
}
+
+ /// <summary>
+ /// 绔嬪嵆璁剧疆婊戝潡鐨勭姸鎬侊紙鍊煎拰闃舵锛夛紝鑰屼笉瑙﹀彂浠讳綍浜嬩欢鎴栧钩婊戝姩鐢汇��
+ /// </summary>
+ /// <param name="newValue">瑕佽缃殑鏂扮洰鏍囧�� (0-1)銆�</param>
+ /// <param name="newStage">瑕佽缃殑鏂扮洰鏍囬樁娈靛拰褰撳墠闃舵銆�</param>
+ public void SetStateInstantly(float newValue, int newStage)
+ {
+ this.value = newValue;
+ this.stage = newStage;
+ this.presentStage = newStage;
+ if (m_Slider != null)
+ {
+ m_Slider.value = this.value;
+ }
+ refSpeed = 0f;
+ isMoving = false;
+ // 纭繚涓嬫 LateUpdate 涓嶄細鍥犱负绱㈠紩涓嶅尮閰嶈�岄敊璇Е鍙� ValueChangeAction
+ m_LastNotifiedSegment = GetCurrentSegment(this.value);
+ }
}
\ No newline at end of file
diff --git a/Main/Component/UI/Core/GradientText.cs b/Main/Component/UI/Core/GradientText.cs
new file mode 100644
index 0000000..8739e68
--- /dev/null
+++ b/Main/Component/UI/Core/GradientText.cs
@@ -0,0 +1,260 @@
+using UnityEngine;
+using UnityEngine.UI;
+using System.Collections.Generic;
+
+/// <summary>
+/// 鏀寔娓愬彉鏁堟灉鐨勬枃鏈粍浠�
+/// </summary>
+public class GradientText : Text
+{
+ [Header("娓愬彉璁剧疆")]
+ [SerializeField]
+ private GradientType m_GradientType = GradientType.Horizontal;
+
+ [SerializeField]
+ private Color m_TopLeftColor = Color.white;
+
+ [SerializeField]
+ private Color m_TopRightColor = Color.white;
+
+ [SerializeField]
+ private Color m_BottomLeftColor = Color.white;
+
+ [SerializeField]
+ private Color m_BottomRightColor = Color.white;
+
+ [SerializeField]
+ private bool m_UseGradient = true;
+
+ public enum GradientType
+ {
+ Horizontal, // 姘村钩娓愬彉
+ Vertical, // 鍨傜洿娓愬彉
+ Diagonal, // 瀵硅绾挎笎鍙�
+ Radial, // 寰勫悜娓愬彉
+ Custom // 鑷畾涔夊洓瑙掗鑹�
+ }
+
+ public GradientType gradientType
+ {
+ get { return m_GradientType; }
+ set
+ {
+ if (m_GradientType != value)
+ {
+ m_GradientType = value;
+ SetVerticesDirty();
+ }
+ }
+ }
+
+ public Color topLeftColor
+ {
+ get { return m_TopLeftColor; }
+ set
+ {
+ if (m_TopLeftColor != value)
+ {
+ m_TopLeftColor = value;
+ SetVerticesDirty();
+ }
+ }
+ }
+
+ public Color topRightColor
+ {
+ get { return m_TopRightColor; }
+ set
+ {
+ if (m_TopRightColor != value)
+ {
+ m_TopRightColor = value;
+ SetVerticesDirty();
+ }
+ }
+ }
+
+ public Color bottomLeftColor
+ {
+ get { return m_BottomLeftColor; }
+ set
+ {
+ if (m_BottomLeftColor != value)
+ {
+ m_BottomLeftColor = value;
+ SetVerticesDirty();
+ }
+ }
+ }
+
+ public Color bottomRightColor
+ {
+ get { return m_BottomRightColor; }
+ set
+ {
+ if (m_BottomRightColor != value)
+ {
+ m_BottomRightColor = value;
+ SetVerticesDirty();
+ }
+ }
+ }
+
+ public bool useGradient
+ {
+ get { return m_UseGradient; }
+ set
+ {
+ if (m_UseGradient != value)
+ {
+ m_UseGradient = value;
+ SetVerticesDirty();
+ }
+ }
+ }
+
+ /// <summary>
+ /// 璁剧疆姘村钩娓愬彉棰滆壊
+ /// </summary>
+ public void SetHorizontalGradient(Color leftColor, Color rightColor)
+ {
+ m_GradientType = GradientType.Horizontal;
+ m_TopLeftColor = leftColor;
+ m_BottomLeftColor = leftColor;
+ m_TopRightColor = rightColor;
+ m_BottomRightColor = rightColor;
+ SetVerticesDirty();
+ }
+
+ /// <summary>
+ /// 璁剧疆鍨傜洿娓愬彉棰滆壊
+ /// </summary>
+ public void SetVerticalGradient(Color topColor, Color bottomColor)
+ {
+ m_GradientType = GradientType.Vertical;
+ m_TopLeftColor = topColor;
+ m_TopRightColor = topColor;
+ m_BottomLeftColor = bottomColor;
+ m_BottomRightColor = bottomColor;
+ SetVerticesDirty();
+ }
+
+ /// <summary>
+ /// 璁剧疆瀵硅绾挎笎鍙橀鑹�
+ /// </summary>
+ public void SetDiagonalGradient(Color topLeftColor, Color bottomRightColor)
+ {
+ m_GradientType = GradientType.Diagonal;
+ m_TopLeftColor = topLeftColor;
+ m_BottomRightColor = bottomRightColor;
+
+ // 璁$畻涓棿棰滆壊
+ m_TopRightColor = Color.Lerp(topLeftColor, bottomRightColor, 0.5f);
+ m_BottomLeftColor = Color.Lerp(topLeftColor, bottomRightColor, 0.5f);
+ SetVerticesDirty();
+ }
+
+ /// <summary>
+ /// 璁剧疆寰勫悜娓愬彉棰滆壊
+ /// </summary>
+ public void SetRadialGradient(Color centerColor, Color edgeColor)
+ {
+ m_GradientType = GradientType.Radial;
+ m_TopLeftColor = edgeColor;
+ m_TopRightColor = edgeColor;
+ m_BottomLeftColor = edgeColor;
+ m_BottomRightColor = edgeColor;
+ // 寰勫悜娓愬彉闇�瑕佸湪椤剁偣鐫�鑹插櫒涓鐞�
+ SetVerticesDirty();
+ }
+
+ protected override void OnPopulateMesh(VertexHelper vh)
+ {
+ base.OnPopulateMesh(vh);
+
+ if (!m_UseGradient)
+ return;
+
+ if (!IsActive())
+ return;
+
+ // 鑾峰彇椤剁偣鏁版嵁
+ var vertexCount = vh.currentVertCount;
+ if (vertexCount == 0)
+ return;
+
+ // 璁$畻鏂囨湰鐨勮竟鐣屾
+ var vertices = new List<UIVertex>();
+ vh.GetUIVertexStream(vertices);
+
+ var bounds = new Bounds(vertices[0].position, Vector3.zero);
+ for (int i = 1; i < vertices.Count; i++)
+ {
+ bounds.Encapsulate(vertices[i].position);
+ }
+
+ // 搴旂敤娓愬彉棰滆壊
+ for (int i = 0; i < vertices.Count; i++)
+ {
+ var vertex = vertices[i];
+ var pos = vertex.position;
+
+ // 璁$畻鐩稿浜庤竟鐣屾鐨勫綊涓�鍖栧潗鏍�
+ var normalizedX = (pos.x - bounds.min.x) / bounds.size.x;
+ var normalizedY = (pos.y - bounds.min.y) / bounds.size.y;
+
+ Color color = CalculateGradientColor(normalizedX, normalizedY);
+ vertex.color = color;
+
+ vertices[i] = vertex;
+ }
+
+ vh.Clear();
+ vh.AddUIVertexTriangleStream(vertices);
+ }
+
+ private Color CalculateGradientColor(float x, float y)
+ {
+ switch (m_GradientType)
+ {
+ case GradientType.Horizontal:
+ return Color.Lerp(m_TopLeftColor, m_TopRightColor, x);
+
+ case GradientType.Vertical:
+ return Color.Lerp(m_TopLeftColor, m_BottomLeftColor, y);
+
+ case GradientType.Diagonal:
+ return Color.Lerp(m_TopLeftColor, m_BottomRightColor, (x + y) * 0.5f);
+
+ case GradientType.Radial:
+ var center = new Vector2(0.5f, 0.5f);
+ var distance = Vector2.Distance(new Vector2(x, y), center);
+ return Color.Lerp(m_TopLeftColor, m_BottomRightColor, distance * 2f);
+
+ case GradientType.Custom:
+ // 鍙岀嚎鎬ф彃鍊�
+ var topColor = Color.Lerp(m_TopLeftColor, m_TopRightColor, x);
+ var bottomColor = Color.Lerp(m_BottomLeftColor, m_BottomRightColor, x);
+ return Color.Lerp(topColor, bottomColor, y);
+
+ default:
+ return color;
+ }
+ }
+
+ protected override void Awake()
+ {
+ base.Awake();
+
+ // 璁剧疆榛樿棰滆壊
+ if (m_TopLeftColor == Color.white && m_TopRightColor == Color.white &&
+ m_BottomLeftColor == Color.white && m_BottomRightColor == Color.white)
+ {
+ // 璁剧疆榛樿鐨勬笎鍙橀鑹�
+ m_TopLeftColor = Color.red;
+ m_TopRightColor = Color.blue;
+ m_BottomLeftColor = Color.green;
+ m_BottomRightColor = Color.yellow;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Component/UI/Core/GradientText.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Component/UI/Core/GradientText.cs.meta
index 9fd6048..15f5e65 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Component/UI/Core/GradientText.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 9a20b8661160f064e9c0f1c76e41a05e
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Component/UI/Core/OutlineColor.cs b/Main/Component/UI/Core/OutlineColor.cs
deleted file mode 100644
index 0df0315..0000000
--- a/Main/Component/UI/Core/OutlineColor.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-锘縰sing UnityEngine.UI;
-using UnityEngine;
-using System;
-
-public class OutlineColor : Outline
-{
- [Header("鎵╁睍Outline澧炲姞棰滆壊閫夋嫨")]
- [SerializeField][HideInInspector]
- QualityTextColType m_ColorType = QualityTextColType.None;
- public QualityTextColType colorType
- {
- get { return m_ColorType; }
- set
- {
- if (m_ColorType != value)
- {
- m_ColorType = value;
- this.effectColor = UIHelper.GetUIOutlineColor(value);
- }
- }
- }
-
- [SerializeField][HideInInspector]
- Vector2 m_EffectDistanceEx = new Vector2(1.5f, -1.5f);
- public Vector2 effectDistanceEx
- {
- get { return m_EffectDistanceEx; }
- set
- {
- if (m_EffectDistanceEx != value)
- {
- m_EffectDistanceEx = value;
- effectDistance = value;
- }
- }
- }
-
-
-
-
- protected override void Awake()
- {
- this.effectDistance = m_EffectDistanceEx;
- this.effectColor = UIHelper.GetUIOutlineColor(colorType);
- }
-
-
-}
diff --git a/Main/Component/UI/Effect/EllipseMask.cs b/Main/Component/UI/Effect/EllipseMask.cs
new file mode 100644
index 0000000..b12ec51
--- /dev/null
+++ b/Main/Component/UI/Effect/EllipseMask.cs
@@ -0,0 +1,307 @@
+using UnityEngine;
+using UnityEngine.UI;
+using System.Collections.Generic;
+
+/// <summary>
+/// 妞渾褰㈤伄缃╃粍浠�
+/// 鍩轰簬妯℃澘娴嬭瘯瀹炵幇妞渾褰㈤伄缃╂晥鏋�
+/// </summary>
+[RequireComponent(typeof(RectTransform))]
+[AddComponentMenu("UI/Effects/Ellipse Mask")]
+[ExecuteInEditMode]
+public class EllipseMask : MonoBehaviour
+{
+ [Header("妞渾鍙傛暟")]
+ [SerializeField] private Vector2 m_EllipseCenter = new Vector2(0.5f, 0.5f);
+ [SerializeField] private Vector2 m_EllipseRadius = new Vector2(0.5f, 0.5f);
+ [SerializeField] [Range(0, 0.5f)] private float m_Softness = 0f; //鏆傛棤鏁堟灉
+ [SerializeField] private int m_StencilID = 1; //澶氫釜閬僵鏃�
+ [SerializeField] private bool m_ShowMaskGraphic = false;
+
+ private Material m_MaskMaterial;
+ private Image m_MaskImage;
+ private RectTransform m_RectTransform;
+ private List<Graphic> m_MaskedChildren = new List<Graphic>();
+
+ public Vector2 EllipseCenter
+ {
+ get => m_EllipseCenter;
+ set
+ {
+ if (m_EllipseCenter != value)
+ {
+ m_EllipseCenter = value;
+ UpdateMask();
+ }
+ }
+ }
+
+ public Vector2 EllipseRadius
+ {
+ get => m_EllipseRadius;
+ set
+ {
+ if (m_EllipseRadius != value)
+ {
+ m_EllipseRadius = value;
+ UpdateMask();
+ }
+ }
+ }
+
+ public float Softness
+ {
+ get => m_Softness;
+ set
+ {
+ if (m_Softness != value)
+ {
+ m_Softness = Mathf.Clamp(value, 0, 0.5f);
+ UpdateMask();
+ }
+ }
+ }
+
+ public int StencilID
+ {
+ get => m_StencilID;
+ set
+ {
+ if (m_StencilID != value)
+ {
+ m_StencilID = value;
+ UpdateMask();
+ UpdateChildrenStencil();
+ }
+ }
+ }
+
+ public bool ShowMaskGraphic
+ {
+ get => m_ShowMaskGraphic;
+ set
+ {
+ if (m_ShowMaskGraphic != value)
+ {
+ m_ShowMaskGraphic = value;
+ UpdateMaskVisibility();
+ }
+ }
+ }
+
+ protected virtual void Awake()
+ {
+ m_RectTransform = GetComponent<RectTransform>();
+
+ // 鍒涘缓閬僵鍥惧儚
+ CreateMaskImage();
+
+ // 鍒涘缓閬僵鏉愯川
+ CreateMaskMaterial();
+
+ UpdateMask();
+ }
+
+ protected virtual void OnEnable()
+ {
+ CreateMaskMaterial();
+ UpdateMask();
+
+ // 涓烘墍鏈夊瓙瀵硅薄娣诲姞妯℃澘娴嬭瘯
+ UpdateChildrenStencil();
+ }
+
+ protected virtual void OnDisable()
+ {
+ if (m_MaskMaterial != null)
+ {
+ DestroyImmediate(m_MaskMaterial);
+ m_MaskMaterial = null;
+ }
+
+ // 绉婚櫎瀛愬璞$殑妯℃澘娴嬭瘯
+ RemoveChildrenStencil();
+ }
+
+ protected virtual void OnDestroy()
+ {
+ if (m_MaskMaterial != null)
+ {
+ DestroyImmediate(m_MaskMaterial);
+ }
+ }
+
+ /// <summary>
+ /// 鍒涘缓閬僵鍥惧儚
+ /// </summary>
+ private void CreateMaskImage()
+ {
+ if (m_MaskImage == null)
+ {
+ m_MaskImage = GetComponent<Image>();
+ if (m_MaskImage == null)
+ {
+ m_MaskImage = gameObject.AddComponent<Image>();
+ m_MaskImage.color = Color.white;
+ }
+ }
+ }
+
+ /// <summary>
+ /// 鍒涘缓閬僵鏉愯川
+ /// </summary>
+ private void CreateMaskMaterial()
+ {
+ if (m_MaskMaterial == null)
+ {
+ Shader ellipseShader = Shader.Find("GUI/EllipseMask");
+ if (ellipseShader != null)
+ {
+ m_MaskMaterial = new Material(ellipseShader);
+ }
+ else
+ {
+ Debug.LogError("EllipseMask shader not found!");
+ }
+ }
+ }
+
+ /// <summary>
+ /// 鏇存柊閬僵
+ /// </summary>
+ private void UpdateMask()
+ {
+ if (m_MaskMaterial != null && m_MaskImage != null)
+ {
+ UpdateMaterialProperties();
+
+ // 璁剧疆鏉愯川鍒癐mage
+ m_MaskImage.material = m_MaskMaterial;
+
+ // 寮哄埗閲嶇粯
+ m_MaskImage.SetMaterialDirty();
+ }
+ }
+
+ /// <summary>
+ /// 鏇存柊鏉愯川灞炴��
+ /// </summary>
+ private void UpdateMaterialProperties()
+ {
+ if (m_MaskMaterial != null)
+ {
+ m_MaskMaterial.SetVector("_EllipseCenter", new Vector4(m_EllipseCenter.x, m_EllipseCenter.y, 0, 0));
+ m_MaskMaterial.SetVector("_EllipseRadius", new Vector4(m_EllipseRadius.x, m_EllipseRadius.y, 0, 0));
+ m_MaskMaterial.SetFloat("_Softness", m_Softness);
+ m_MaskMaterial.SetInt("_Stencil", m_StencilID);
+ }
+ }
+
+ /// <summary>
+ /// 鏇存柊閬僵鍙鎬�
+ /// </summary>
+ private void UpdateMaskVisibility()
+ {
+ if (m_MaskImage != null)
+ {
+ m_MaskImage.enabled = m_ShowMaskGraphic;
+ }
+ }
+
+ /// <summary>
+ /// 涓哄瓙瀵硅薄娣诲姞妯℃澘娴嬭瘯
+ /// </summary>
+ private void UpdateChildrenStencil()
+ {
+ // 娓呴櫎涔嬪墠鐨勫垪琛�
+ m_MaskedChildren.Clear();
+
+ // 鑾峰彇鎵�鏈夊瓙瀵硅薄鐨凣raphic缁勪欢
+ Graphic[] childrenGraphics = GetComponentsInChildren<Graphic>();
+ foreach (var graphic in childrenGraphics)
+ {
+ // 璺宠繃閬僵鏈韩
+ if (graphic.gameObject == this.gameObject)
+ continue;
+
+ // 涓哄瓙瀵硅薄鍒涘缓閬僵鏉愯川
+ CreateChildMaskMaterial(graphic);
+ m_MaskedChildren.Add(graphic);
+ }
+ }
+
+ /// <summary>
+ /// 涓哄瓙瀵硅薄鍒涘缓閬僵鏉愯川
+ /// </summary>
+ private void CreateChildMaskMaterial(Graphic graphic)
+ {
+ if (graphic.material == null || !graphic.material.shader.name.Contains("EllipseMaskedContent"))
+ {
+ Shader maskedShader = Shader.Find("GUI/EllipseMaskedContent");
+ if (maskedShader != null)
+ {
+ Material maskedMaterial = new Material(maskedShader);
+ maskedMaterial.SetInt("_Stencil", m_StencilID);
+ maskedMaterial.SetInt("_StencilComp", 3); // Equal
+ graphic.material = maskedMaterial;
+ }
+ }
+ else
+ {
+ // 鏇存柊鐜版湁鏉愯川鐨勬ā鏉縄D
+ graphic.material.SetInt("_Stencil", m_StencilID);
+ }
+ }
+
+ /// <summary>
+ /// 绉婚櫎瀛愬璞$殑妯℃澘娴嬭瘯
+ /// </summary>
+ private void RemoveChildrenStencil()
+ {
+ foreach (var graphic in m_MaskedChildren)
+ {
+ if (graphic != null && graphic.material != null)
+ {
+ // 閲嶇疆鏉愯川
+ graphic.material = null;
+ }
+ }
+ m_MaskedChildren.Clear();
+ }
+
+ /// <summary>
+ /// 璁剧疆妞渾鍙傛暟
+ /// </summary>
+ /// <param name="center">妞渾涓績锛堝綊涓�鍖栧潗鏍囷級</param>
+ /// <param name="radius">妞渾鍗婂緞锛堝綊涓�鍖栧潗鏍囷級</param>
+ /// <param name="softness">杈圭紭鏌斿寲绋嬪害</param>
+ public void SetEllipseParameters(Vector2 center, Vector2 radius, float softness = 0.1f)
+ {
+ m_EllipseCenter = center;
+ m_EllipseRadius = radius;
+ m_Softness = Mathf.Clamp(softness, 0, 0.5f);
+ UpdateMask();
+ }
+
+ /// <summary>
+ /// 璁剧疆鍦嗗舰鍙傛暟锛堢壒娈婃儏鍐电殑妞渾锛�
+ /// </summary>
+ /// <param name="center">鍦嗗績锛堝綊涓�鍖栧潗鏍囷級</param>
+ /// <param name="radius">鍗婂緞锛堝綊涓�鍖栧潗鏍囷級</param>
+ /// <param name="softness">杈圭紭鏌斿寲绋嬪害</param>
+ public void SetCircleParameters(Vector2 center, float radius, float softness = 0.1f)
+ {
+ SetEllipseParameters(center, new Vector2(radius, radius), softness);
+ }
+
+#if UNITY_EDITOR
+ protected virtual void OnValidate()
+ {
+ if (m_MaskMaterial != null)
+ {
+ UpdateMaterialProperties();
+ UpdateChildrenStencil();
+ }
+ }
+#endif
+}
\ No newline at end of file
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Component/UI/Effect/EllipseMask.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Component/UI/Effect/EllipseMask.cs.meta
index 9fd6048..3252759 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Component/UI/Effect/EllipseMask.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: d7b138cff435daf4e97efe03e10a756b
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Config/ConfigManager.cs b/Main/Config/ConfigManager.cs
index 7e1430b..315200f 100644
--- a/Main/Config/ConfigManager.cs
+++ b/Main/Config/ConfigManager.cs
@@ -59,6 +59,7 @@
typeof(InvestConfig),
typeof(ItemCompoundConfig),
typeof(ItemConfig),
+ typeof(LLMJConfig),
typeof(MainChapterConfig),
typeof(MainLevelConfig),
typeof(NPCConfig),
@@ -68,6 +69,7 @@
typeof(PlayerAttrConfig),
typeof(PlayerFaceConfig),
typeof(PriorBundleConfig),
+ typeof(SignInConfig),
typeof(StoreConfig),
typeof(SuccessConfig),
typeof(SysInfoConfig),
@@ -269,6 +271,8 @@
ClearConfigDictionary<ItemCompoundConfig>();
// 娓呯┖ ItemConfig 瀛楀吀
ClearConfigDictionary<ItemConfig>();
+ // 娓呯┖ LLMJConfig 瀛楀吀
+ ClearConfigDictionary<LLMJConfig>();
// 娓呯┖ MainChapterConfig 瀛楀吀
ClearConfigDictionary<MainChapterConfig>();
// 娓呯┖ MainLevelConfig 瀛楀吀
@@ -287,6 +291,8 @@
ClearConfigDictionary<PlayerFaceConfig>();
// 娓呯┖ PriorBundleConfig 瀛楀吀
ClearConfigDictionary<PriorBundleConfig>();
+ // 娓呯┖ SignInConfig 瀛楀吀
+ ClearConfigDictionary<SignInConfig>();
// 娓呯┖ StoreConfig 瀛楀吀
ClearConfigDictionary<StoreConfig>();
// 娓呯┖ SuccessConfig 瀛楀吀
diff --git a/Main/Config/Configs/CTGConfig.cs b/Main/Config/Configs/CTGConfig.cs
index d10f8ba..44e7f96 100644
--- a/Main/Config/Configs/CTGConfig.cs
+++ b/Main/Config/Configs/CTGConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: YYL
-// [ Date ]: 2025骞�8鏈�5鏃�
+// [ Date ]: 2025骞�11鏈�9鏃�
//--------------------------------------------------------
using System.Collections.Generic;
@@ -27,7 +27,7 @@
public int GainGold;
public int GainGoldPaper;
public int FirstGoldPaperPrize;
- public string GainItemList;
+ public int[][] GainItemList;
public int[][] SelectItemInfo;
public string Icon;
public int PayType;
@@ -65,7 +65,7 @@
int.TryParse(tables[10],out FirstGoldPaperPrize);
- GainItemList = tables[11];
+ GainItemList = JsonMapper.ToObject<int[][]>(tables[11].Replace("(", "[").Replace(")", "]"));
SelectItemInfo = JsonMapper.ToObject<int[][]>(tables[12].Replace("(", "[").Replace(")", "]"));
diff --git a/Main/Config/Configs/DailyTaskConfig.cs b/Main/Config/Configs/DailyTaskConfig.cs
index 4482cd1..0a3dac1 100644
--- a/Main/Config/Configs/DailyTaskConfig.cs
+++ b/Main/Config/Configs/DailyTaskConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: YYL
-// [ Date ]: 2025骞�11鏈�3鏃�
+// [ Date ]: Friday, November 7, 2025
//--------------------------------------------------------
using System.Collections.Generic;
@@ -20,7 +20,7 @@
public int TaskType;
public int[] TaskConds;
public int NeedValue;
- public int AwardLiveness;
+ public int[][] AwardItemList;
public string Title;
public int GuideID;
@@ -54,7 +54,7 @@
int.TryParse(tables[3],out NeedValue);
- int.TryParse(tables[4],out AwardLiveness);
+ AwardItemList = JsonMapper.ToObject<int[][]>(tables[4].Replace("(", "[").Replace(")", "]"));
Title = tables[5];
diff --git a/Main/Config/Configs/LLMJConfig.cs b/Main/Config/Configs/LLMJConfig.cs
new file mode 100644
index 0000000..7f487dc
--- /dev/null
+++ b/Main/Config/Configs/LLMJConfig.cs
@@ -0,0 +1,53 @@
+锘�//--------------------------------------------------------
+// [Author]: YYL
+// [ Date ]: 2025骞�11鏈�9鏃�
+//--------------------------------------------------------
+
+using System.Collections.Generic;
+using System;
+using UnityEngine;
+using LitJson;
+
+public partial class LLMJConfig : ConfigBase<int, LLMJConfig>
+{
+ static LLMJConfig()
+ {
+ // 璁块棶杩囬潤鎬佹瀯閫犲嚱鏁�
+ visit = true;
+ }
+
+ public int MJLV;
+ public int CostWarhammer;
+ public int ExpAddPer;
+ public int ExpExUpper;
+ public int DecomposeAddPer;
+ public int DecomposeExUpper;
+
+ public override int LoadKey(string _key)
+ {
+ int key = GetKey(_key);
+ return key;
+ }
+
+ public override void LoadConfig(string input)
+ {
+ try {
+ string[] tables = input.Split('\t');
+ int.TryParse(tables[0],out MJLV);
+
+ int.TryParse(tables[1],out CostWarhammer);
+
+ int.TryParse(tables[2],out ExpAddPer);
+
+ int.TryParse(tables[3],out ExpExUpper);
+
+ int.TryParse(tables[4],out DecomposeAddPer);
+
+ int.TryParse(tables[5],out DecomposeExUpper);
+ }
+ catch (Exception exception)
+ {
+ Debug.LogError(exception);
+ }
+ }
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Config/Configs/LLMJConfig.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Config/Configs/LLMJConfig.cs.meta
index 9fd6048..eb29236 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Config/Configs/LLMJConfig.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: dbdce8bad9eb8fc46bde37554698bb0f
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Config/Configs/SignInConfig.cs b/Main/Config/Configs/SignInConfig.cs
new file mode 100644
index 0000000..2ed05d1
--- /dev/null
+++ b/Main/Config/Configs/SignInConfig.cs
@@ -0,0 +1,41 @@
+锘�//--------------------------------------------------------
+// [Author]: YYL
+// [ Date ]: 2025骞�11鏈�10鏃�
+//--------------------------------------------------------
+
+using System.Collections.Generic;
+using System;
+using UnityEngine;
+using LitJson;
+
+public partial class SignInConfig : ConfigBase<int, SignInConfig>
+{
+ static SignInConfig()
+ {
+ // 璁块棶杩囬潤鎬佹瀯閫犲嚱鏁�
+ visit = true;
+ }
+
+ public int SignDay;
+ public int[][] AwardItemList;
+
+ public override int LoadKey(string _key)
+ {
+ int key = GetKey(_key);
+ return key;
+ }
+
+ public override void LoadConfig(string input)
+ {
+ try {
+ string[] tables = input.Split('\t');
+ int.TryParse(tables[0],out SignDay);
+
+ AwardItemList = JsonMapper.ToObject<int[][]>(tables[1].Replace("(", "[").Replace(")", "]"));
+ }
+ catch (Exception exception)
+ {
+ Debug.LogError(exception);
+ }
+ }
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Config/Configs/SignInConfig.cs.meta
similarity index 83%
rename from Main/Component/UI/Core/OutlineColor.cs.meta
rename to Main/Config/Configs/SignInConfig.cs.meta
index 9fd6048..4304cce 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Config/Configs/SignInConfig.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: d6304eddfd727124e9bfb7266018e81d
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Config/Configs/SuccessConfig.cs b/Main/Config/Configs/SuccessConfig.cs
index 24e8428..d40fa4a 100644
--- a/Main/Config/Configs/SuccessConfig.cs
+++ b/Main/Config/Configs/SuccessConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: YYL
-// [ Date ]: 2025骞�8鏈�5鏃�
+// [ Date ]: 2025骞�11鏈�6鏃�
//--------------------------------------------------------
using System.Collections.Generic;
@@ -18,24 +18,9 @@
public int ID;
public int Type;
- public int Group;
public int NeedCnt;
public int[] Condition;
- public string Condition2;
- public int Condition3;
- public string AwardItemList;
- public string AwardItemList2;
- public string Money;
- public int Exp;
- public int[] AwardAttribute;
- public int RedPacketID;
- public int MagicWeaponID;
- public string MagicWeaponExp;
- public string Describe;
- public int NeedGoto;
- public int Jump;
- public int ReOrder;
- public int RealmPracticeID;
+ public int[][] AwardItemList;
public override int LoadKey(string _key)
{
@@ -51,17 +36,15 @@
int.TryParse(tables[1],out Type);
- int.TryParse(tables[2],out Group);
+ int.TryParse(tables[2],out NeedCnt);
- int.TryParse(tables[3],out NeedCnt);
-
- if (tables[4].Contains("["))
+ if (tables[3].Contains("["))
{
- Condition = JsonMapper.ToObject<int[]>(tables[4]);
+ Condition = JsonMapper.ToObject<int[]>(tables[3]);
}
else
{
- string[] ConditionStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ string[] ConditionStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
Condition = new int[ConditionStringArray.Length];
for (int i=0;i<ConditionStringArray.Length;i++)
{
@@ -69,47 +52,7 @@
}
}
- Condition2 = tables[5];
-
- int.TryParse(tables[6],out Condition3);
-
- AwardItemList = tables[7];
-
- AwardItemList2 = tables[8];
-
- Money = tables[9];
-
- int.TryParse(tables[10],out Exp);
-
- if (tables[11].Contains("["))
- {
- AwardAttribute = JsonMapper.ToObject<int[]>(tables[11]);
- }
- else
- {
- string[] AwardAttributeStringArray = tables[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
- AwardAttribute = new int[AwardAttributeStringArray.Length];
- for (int i=0;i<AwardAttributeStringArray.Length;i++)
- {
- int.TryParse(AwardAttributeStringArray[i],out AwardAttribute[i]);
- }
- }
-
- int.TryParse(tables[12],out RedPacketID);
-
- int.TryParse(tables[13],out MagicWeaponID);
-
- MagicWeaponExp = tables[14];
-
- Describe = tables[15];
-
- int.TryParse(tables[16],out NeedGoto);
-
- int.TryParse(tables[17],out Jump);
-
- int.TryParse(tables[18],out ReOrder);
-
- int.TryParse(tables[19],out RealmPracticeID);
+ AwardItemList = JsonMapper.ToObject<int[][]>(tables[4].Replace("(", "[").Replace(")", "]"));
}
catch (Exception exception)
{
diff --git a/Main/Config/PartialConfigs/MainLevelConfig.cs b/Main/Config/PartialConfigs/MainLevelConfig.cs
index d7b205b..20abbb0 100644
--- a/Main/Config/PartialConfigs/MainLevelConfig.cs
+++ b/Main/Config/PartialConfigs/MainLevelConfig.cs
@@ -46,5 +46,13 @@
return waveLineupLists.Count(list => list.Length > 0);
}
+ // 鑾峰彇鐩爣鍏冲崱鐨勭储寮�
+ public static int GetToTargetLevelIndex(int targetLevel)
+ {
+ var levels = GetKeys();
+ levels.Sort();
+ return levels.IndexOf(targetLevel);
+
+ }
}
\ No newline at end of file
diff --git a/Main/Config/PartialConfigs/SuccessConfig.cs b/Main/Config/PartialConfigs/SuccessConfig.cs
new file mode 100644
index 0000000..9952c7e
--- /dev/null
+++ b/Main/Config/PartialConfigs/SuccessConfig.cs
@@ -0,0 +1,33 @@
+using System.Collections.Generic;
+public partial class SuccessConfig : ConfigBase<int, SuccessConfig>
+{
+ public static Dictionary<int, List<int>> typeToIDsDict = new Dictionary<int, List<int>>();
+ protected override void OnConfigParseCompleted()
+ {
+ if (!typeToIDsDict.ContainsKey(Type))
+ {
+ typeToIDsDict[Type] = new List<int>();
+ }
+ typeToIDsDict[Type].Add(ID);
+ }
+
+ public static List<int> GetTypeToIDDict(int type)
+ {
+ if (typeToIDsDict.ContainsKey(type))
+ {
+ return typeToIDsDict[type];
+ }
+ return null;
+ }
+
+ //鑾峰緱鎴愬氨鏉′欢锛岄粯璁や竴涓被鍨嬪彧鏈変竴绉嶆潯浠�
+ public static string GetConditionString(int type)
+ {
+ if (typeToIDsDict.ContainsKey(type))
+ {
+ var conds = Get(typeToIDsDict[type][0]).Condition;
+ return conds.IsNullOrEmpty() ? "" : string.Join("|", conds);
+ }
+ return "";
+ }
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Config/PartialConfigs/SuccessConfig.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Config/PartialConfigs/SuccessConfig.cs.meta
index 9fd6048..96808b7 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Config/PartialConfigs/SuccessConfig.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 5c9f079829a75b84587ebbbd29a56119
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA509_tagCSDaySign.cs b/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA509_tagCSDaySign.cs
new file mode 100644
index 0000000..2fca6a3
--- /dev/null
+++ b/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA509_tagCSDaySign.cs
@@ -0,0 +1,18 @@
+using UnityEngine;
+using System.Collections;
+
+//A5 09 鐜╁绛惧埌棰嗗 #tagCSDaySign
+
+public class CA509_tagCSDaySign : GameNetPackBasic {
+ public byte Day; // 绗瑇澶╋紝浠�1寮�濮�
+
+ public CA509_tagCSDaySign () {
+ combineCmd = (ushort)0x03FE;
+ _cmd = (ushort)0xA509;
+ }
+
+ public override void WriteToBytes () {
+ WriteBytes (Day, NetDataType.BYTE);
+ }
+
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA509_tagCSDaySign.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Core/NetworkPackage/ClientPack/CA5_Function/CA509_tagCSDaySign.cs.meta
index 9fd6048..2911d7b 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Core/NetworkPackage/ClientPack/CA5_Function/CA509_tagCSDaySign.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: c10a6d62687b4004ca4b36bfbde99e67
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA30D_tagSCDaySignInfo.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA30D_tagSCDaySignInfo.cs
new file mode 100644
index 0000000..f406df2
--- /dev/null
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA30D_tagSCDaySignInfo.cs
@@ -0,0 +1,12 @@
+using UnityEngine;
+using System.Collections;
+
+//A3 0D 鐜╁绛惧埌淇℃伅璁板綍 # tagSCDaySignInfo
+
+public class DTCA30D_tagSCDaySignInfo : DtcBasic {
+ public override void Done(GameNetPackBasic vNetPack) {
+ base.Done(vNetPack);
+ HA30D_tagSCDaySignInfo vNetData = vNetPack as HA30D_tagSCDaySignInfo;
+ SignManager.Instance.UpdateSignInfo(vNetData);
+ }
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA30D_tagSCDaySignInfo.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA30D_tagSCDaySignInfo.cs.meta
index 9fd6048..34f1994 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA30D_tagSCDaySignInfo.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 37443778b58334c48bbd3ebe5696ceb9
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA340_tagSCSuccessInfoList.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA340_tagSCSuccessInfoList.cs
new file mode 100644
index 0000000..fae7ad7
--- /dev/null
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA340_tagSCSuccessInfoList.cs
@@ -0,0 +1,12 @@
+using UnityEngine;
+using System.Collections;
+
+// A3 40 鎴愬氨淇℃伅鍒楄〃 #tagSCSuccessInfoList
+
+public class DTCA340_tagSCSuccessInfoList : DtcBasic {
+ public override void Done(GameNetPackBasic vNetPack) {
+ base.Done(vNetPack);
+ HA340_tagSCSuccessInfoList vNetData = vNetPack as HA340_tagSCSuccessInfoList;
+ AchievementManager.Instance.UpdateAchievement(vNetData);
+ }
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA340_tagSCSuccessInfoList.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA340_tagSCSuccessInfoList.cs.meta
index 9fd6048..ee3b5b2 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA340_tagSCSuccessInfoList.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 2349866a7124b0c488485ddc575a80b9
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA342_tagSCSuccessAwardRecordList.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA342_tagSCSuccessAwardRecordList.cs
new file mode 100644
index 0000000..3df3fba
--- /dev/null
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA342_tagSCSuccessAwardRecordList.cs
@@ -0,0 +1,12 @@
+using UnityEngine;
+using System.Collections;
+
+// A3 42 鎴愬氨棰嗗璁板綍鍒楄〃 #tagSCSuccessAwardRecordList
+
+public class DTCA342_tagSCSuccessAwardRecordList : DtcBasic {
+ public override void Done(GameNetPackBasic vNetPack) {
+ base.Done(vNetPack);
+ HA342_tagSCSuccessAwardRecordList vNetData = vNetPack as HA342_tagSCSuccessAwardRecordList;
+ AchievementManager.Instance.UpdateAchievementAward(vNetData);
+ }
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA342_tagSCSuccessAwardRecordList.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA342_tagSCSuccessAwardRecordList.cs.meta
index 9fd6048..519658a 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA342_tagSCSuccessAwardRecordList.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: b0b463773ed6e62448f3b7158f1ab2a5
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs
new file mode 100644
index 0000000..b6f81d4
--- /dev/null
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs
@@ -0,0 +1,12 @@
+using UnityEngine;
+using System.Collections;
+
+// B1 28 鍘嗙粌绉樼瑘淇℃伅 #tagSCLLMJInfo
+
+public class DTCB128_tagSCLLMJInfo : DtcBasic {
+ public override void Done(GameNetPackBasic vNetPack) {
+ base.Done(vNetPack);
+ HB128_tagSCLLMJInfo vNetData = vNetPack as HB128_tagSCLLMJInfo;
+ ExpSecretCollectionManager.Instance.OnExpSecretCollection(vNetData);
+ }
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs.meta
index 9fd6048..4c04f7b 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB128_tagSCLLMJInfo.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: b287dd194d9fd404f85bcccdaac9833f
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs b/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
index 81e9230..44d9b4e 100644
--- a/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
+++ b/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
@@ -120,6 +120,10 @@
Register(typeof(HA923_tagSCArenaPlayerInfo), typeof(DTCA923_tagSCArenaPlayerInfo));
Register(typeof(HB109_tagSCDailyTaskInfo), typeof(DTCB109_tagSCDailyTaskInfo));
Register(typeof(HB201_tagSCTianziKYInfo), typeof(DTCB201_tagSCTianziKYInfo));
+ Register(typeof(HA340_tagSCSuccessInfoList), typeof(DTCA340_tagSCSuccessInfoList));
+ Register(typeof(HA342_tagSCSuccessAwardRecordList), typeof(DTCA342_tagSCSuccessAwardRecordList));
+ Register(typeof(HB128_tagSCLLMJInfo), typeof(DTCB128_tagSCLLMJInfo));
+ Register(typeof(HA30D_tagSCDaySignInfo), typeof(DTCA30D_tagSCDaySignInfo));
}
//涓诲伐绋嬫敞鍐屽皝鍖�
diff --git a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA30D_tagSCDaySignInfo.cs b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA30D_tagSCDaySignInfo.cs
new file mode 100644
index 0000000..9545945
--- /dev/null
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA30D_tagSCDaySignInfo.cs
@@ -0,0 +1,19 @@
+using UnityEngine;
+using System.Collections;
+
+//A3 0D 鐜╁绛惧埌淇℃伅璁板綍 # tagSCDaySignInfo
+
+public class HA30D_tagSCDaySignInfo : GameNetPackBasic {
+ public byte Count;
+ public byte[] SignStateList; //姣忔棩绛惧埌鐘舵�佽褰曞垪琛� [绗�1澶╃姸鎬�, ...] 鐘舵�侊細0-涓嶅彲绛惧埌锛�1-宸茬鍒帮紱2-鍙ˉ绛撅紱3-宸查鍙�
+
+ public HA30D_tagSCDaySignInfo () {
+ _cmd = (ushort)0xA30D;
+ }
+
+ public override void ReadFromBytes (byte[] vBytes) {
+ TransBytes (out Count, vBytes, NetDataType.BYTE);
+ TransBytes (out SignStateList, vBytes, NetDataType.BYTE, Count);
+ }
+
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA30D_tagSCDaySignInfo.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Core/NetworkPackage/ServerPack/HA3_Function/HA30D_tagSCDaySignInfo.cs.meta
index 9fd6048..f4c2a78 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA30D_tagSCDaySignInfo.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 5aa3f24d1c3aa3b428eff1b075952478
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA340_tagSCSuccessInfoList.cs b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA340_tagSCSuccessInfoList.cs
new file mode 100644
index 0000000..5ce3439
--- /dev/null
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA340_tagSCSuccessInfoList.cs
@@ -0,0 +1,33 @@
+using UnityEngine;
+using System.Collections;
+
+// A3 40 鎴愬氨淇℃伅鍒楄〃 #tagSCSuccessInfoList
+
+public class HA340_tagSCSuccessInfoList : GameNetPackBasic {
+ public ushort Count; //淇℃伅涓暟
+ public tagSCSuccessInfo[] SuccessInfoList;
+
+ public HA340_tagSCSuccessInfoList () {
+ _cmd = (ushort)0xA340;
+ }
+
+ public override void ReadFromBytes (byte[] vBytes) {
+ TransBytes (out Count, vBytes, NetDataType.WORD);
+ SuccessInfoList = new tagSCSuccessInfo[Count];
+ for (int i = 0; i < Count; i ++) {
+ SuccessInfoList[i] = new tagSCSuccessInfo();
+ TransBytes (out SuccessInfoList[i].SuccType, vBytes, NetDataType.WORD);
+ TransBytes (out SuccessInfoList[i].CLen, vBytes, NetDataType.BYTE);
+ TransBytes (out SuccessInfoList[i].Conds, vBytes, NetDataType.DWORD, SuccessInfoList[i].CLen);
+ TransBytes (out SuccessInfoList[i].CurValue, vBytes, NetDataType.DWORD);
+ }
+ }
+
+ public class tagSCSuccessInfo {
+ public ushort SuccType; //鎴愬氨绫诲瀷
+ public byte CLen;
+ public uint[] Conds; // 鏉′欢鍒楄〃
+ public uint CurValue; // 杩涘害鍊硷紝鐩稿悓浠诲姟绫诲瀷鏉′欢鐨勮繘搴﹀�煎叡浜�
+ }
+
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA340_tagSCSuccessInfoList.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Core/NetworkPackage/ServerPack/HA3_Function/HA340_tagSCSuccessInfoList.cs.meta
index 9fd6048..b39bad9 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA340_tagSCSuccessInfoList.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 0da6e6a7f64979d4e9d2e102f68fef21
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA342_tagSCSuccessAwardRecordList.cs b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA342_tagSCSuccessAwardRecordList.cs
new file mode 100644
index 0000000..56b58a9
--- /dev/null
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA342_tagSCSuccessAwardRecordList.cs
@@ -0,0 +1,29 @@
+using UnityEngine;
+using System.Collections;
+
+// A3 42 鎴愬氨棰嗗璁板綍鍒楄〃 #tagSCSuccessAwardRecordList
+
+public class HA342_tagSCSuccessAwardRecordList : GameNetPackBasic {
+ public ushort RecordCnt; //璁板綍涓暟
+ public tagSCSuccessAwardRecord[] RecordList; //璁板綍鍒楄〃
+
+ public HA342_tagSCSuccessAwardRecordList () {
+ _cmd = (ushort)0xA342;
+ }
+
+ public override void ReadFromBytes (byte[] vBytes) {
+ TransBytes (out RecordCnt, vBytes, NetDataType.WORD);
+ RecordList = new tagSCSuccessAwardRecord[RecordCnt];
+ for (int i = 0; i < RecordCnt; i ++) {
+ RecordList[i] = new tagSCSuccessAwardRecord();
+ TransBytes (out RecordList[i].RecordIndex, vBytes, NetDataType.WORD);
+ TransBytes (out RecordList[i].Record, vBytes, NetDataType.DWORD);
+ }
+ }
+
+ public class tagSCSuccessAwardRecord {
+ public ushort RecordIndex; //绗嚑涓褰曞�� 姣忎釜key瀛�31涓猻uccid 0-30涓�0, 31-61涓�1..
+ public uint Record; //鏍规嵁鎴愬氨ID浣嶅垽鏂槸鍚﹀凡棰嗗彇
+ }
+
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA342_tagSCSuccessAwardRecordList.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Core/NetworkPackage/ServerPack/HA3_Function/HA342_tagSCSuccessAwardRecordList.cs.meta
index 9fd6048..a504448 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA342_tagSCSuccessAwardRecordList.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: be0a52fd85a2e37429a2ed249d0fa74f
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs b/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs
new file mode 100644
index 0000000..0e82a04
--- /dev/null
+++ b/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs
@@ -0,0 +1,23 @@
+using UnityEngine;
+using System.Collections;
+
+// B1 28 鍘嗙粌绉樼瑘淇℃伅 #tagSCLLMJInfo
+
+public class HB128_tagSCLLMJInfo : GameNetPackBasic {
+ public byte MJLV; // 绉樼瑘绛夌骇锛屾縺娲诲悗浠�1寮�濮�
+ public uint Zhanchui; // 绉樼瑘绱娑堣�楁垬閿�
+ public uint ExpEx; // 绉樼瑘浠婃棩宸查澶栬幏寰楃粡楠�
+ public uint DecomposeEx; // 绉樼瑘浠婃棩宸查澶栬幏寰楀垎瑙h揣甯�
+
+ public HB128_tagSCLLMJInfo () {
+ _cmd = (ushort)0xB128;
+ }
+
+ public override void ReadFromBytes (byte[] vBytes) {
+ TransBytes (out MJLV, vBytes, NetDataType.BYTE);
+ TransBytes (out Zhanchui, vBytes, NetDataType.DWORD);
+ TransBytes (out ExpEx, vBytes, NetDataType.DWORD);
+ TransBytes (out DecomposeEx, vBytes, NetDataType.DWORD);
+ }
+
+}
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs.meta
index 9fd6048..2868f25 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB128_tagSCLLMJInfo.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 382098446555f5c4c95c809e78e01aa6
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Main.cs b/Main/Main.cs
index 98041ca..dedde9d 100644
--- a/Main/Main.cs
+++ b/Main/Main.cs
@@ -84,6 +84,8 @@
managers.Add(DayMissionManager.Instance);
managers.Add(BattlePassManager.Instance);
managers.Add(TianziBillboradManager.Instance);
+ managers.Add(ExpSecretCollectionManager.Instance);
+ managers.Add(SignManager.Instance);
foreach (var manager in managers)
{
manager.Init();
diff --git a/Main/System/Achievement.meta b/Main/System/Achievement.meta
new file mode 100644
index 0000000..97c8dcc
--- /dev/null
+++ b/Main/System/Achievement.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 3793503c7ba33204da1ca91f1bb6aacd
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/Achievement/AchievementManager.cs b/Main/System/Achievement/AchievementManager.cs
new file mode 100644
index 0000000..e5a97f6
--- /dev/null
+++ b/Main/System/Achievement/AchievementManager.cs
@@ -0,0 +1,196 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System;
+using System.Linq;
+
+
+public partial class AchievementManager : GameSystemManager<AchievementManager>
+{
+ //鎴愬氨绫诲瀷锛氭潯浠讹紙鍙互鏄┖锛夛細杩涘害
+ Dictionary<int, Dictionary<string, int>> achivementDict = new Dictionary<int, Dictionary<string, int>>();
+ public event Action<int> OnAchievementUpdateEvent;
+ //key:绗嚑涓褰曞�� 姣忎釜key瀛�31涓猻uccid 0-30涓�0, 31-61涓�1..; value: 鏍规嵁鎴愬氨ID浣嶅垽鏂槸鍚﹀凡棰嗗彇
+ Dictionary<int, int> achivementAwardDict = new Dictionary<int, int>();
+ public override void Init()
+ {
+ DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
+ }
+
+ public override void Release()
+ {
+ DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize;
+ }
+
+ void OnBeforePlayerDataInitialize()
+ {
+ }
+
+ public void UpdateAchievement(HA340_tagSCSuccessInfoList netPack)
+ {
+ List<int> types = new List<int>();
+ for (int i = 0; i < netPack.Count; i++)
+ {
+ var info = netPack.SuccessInfoList[i];
+ if (!achivementDict.ContainsKey(info.SuccType))
+ {
+ achivementDict[info.SuccType] = new Dictionary<string, int>();
+ }
+
+ string key = info.CLen > 0 ? string.Join("|", info.Conds) : "";
+ achivementDict[info.SuccType][key] = (int)info.CurValue;
+
+ OnAchievementUpdateEvent?.Invoke(info.SuccType);
+ if (!types.Contains(info.SuccType))
+ {
+ types.Add(info.SuccType);
+ }
+ }
+ UpdateRedpoint(types);
+ }
+
+ public int GetAchievementProgress(int type)
+ {
+ if (achivementDict.ContainsKey(type))
+ {
+ var condKey = SuccessConfig.GetConditionString(type);
+ if (achivementDict[type].ContainsKey(condKey))
+ {
+ return achivementDict[type][condKey];
+ }
+ }
+ return 0;
+
+ }
+
+ public void UpdateAchievementAward(HA342_tagSCSuccessAwardRecordList netPack)
+ {
+ List<int> types = new List<int>();
+ for (int i = 0; i < netPack.RecordCnt; i++)
+ {
+ var record = netPack.RecordList[i];
+ achivementAwardDict[record.RecordIndex] = (int)record.Record;
+ var startID = record.RecordIndex * 31;
+ var endID = startID + 30;
+ for (int j = startID; j <= endID; j++)
+ {
+ if (SuccessConfig.HasKey(j))
+ {
+ var type = SuccessConfig.Get(j).Type;
+ if (!types.Contains(type))
+ {
+ types.Add(type);
+ }
+ }
+ }
+ }
+ OnAchievementUpdateEvent?.Invoke(-1);
+ UpdateRedpoint(types);
+ }
+
+ //鎴愬氨鏄惁宸查鍙�
+ //姣忎釜key瀛�31涓猻uccid 0-30涓�0, 31-61涓�1..; 鏍规嵁鎴愬氨ID浣嶅垽鏂槸鍚﹀凡棰嗗彇
+ public bool IsAchievementAwarded(int id)
+ {
+ var index = id / 31;
+ var bit = id % 31;
+ if (achivementAwardDict.ContainsKey(index))
+ {
+ return (achivementAwardDict[index] & (1 << bit)) != 0;
+ }
+ return false;
+ }
+
+ //鑾峰彇鎴愬氨鐘舵�� 0: 鏈鍙� 1: 鏈揪鎴� 2: 宸查鍙�
+ public int GetAchievementState(int id)
+ {
+ var config = SuccessConfig.Get(id);
+ var process = GetAchievementProgress(config.Type);
+ if (process < config.NeedCnt)
+ {
+ return 1;
+ }
+ if (IsAchievementAwarded(id))
+ {
+ return 2;
+ }
+ return 0;
+ }
+
+
+ //涓荤嚎绔犺妭
+ Redpoint mainLevelRedpoint = new Redpoint(MainRedDot.RedPoint_DailyKey, MainRedDot.RedPoint_MainMissionKey);
+ //绫诲瀷锛氱孩鐐筰d
+ Dictionary<int, int> redpointDict = new Dictionary<int, int>()
+ {
+ {1, MainRedDot.RedPoint_MainMissionKey}
+ };
+
+ void UpdateRedpoint(List<int> _types)
+ {
+ if (_types.IsNullOrEmpty())
+ {
+ _types = redpointDict.Keys.ToList();
+ }
+
+ foreach (var type in _types)
+ {
+ var redpoint = RedpointCenter.Instance.GetRedpoint(redpointDict[type]);
+ redpoint.state = RedPointState.None;
+ //鏍规嵁ID鍒ゆ柇鏄惁鏈夊彲棰嗗彇鐨�
+ var allAchivement = SuccessConfig.GetTypeToIDDict(type);
+ var process = GetAchievementProgress(type);
+ foreach (var id in allAchivement)
+ {
+ var config = SuccessConfig.Get(id);
+ if (config.NeedCnt <= process)
+ {
+ if (!IsAchievementAwarded(id))
+ {
+ redpoint.state = RedPointState.Simple;
+ break;
+ }
+ }
+ }
+
+ }
+ }
+
+ //鏍规嵁绫诲瀷鑾峰彇鎵�鏈夋垚灏盜D, 涓旀槸鎺掑簭鍚庣殑 鏈鍙�>鏈揪鎴�>宸查鍙�
+ public List<int> GetAchievementIDs(int type)
+ {
+ var ids = SuccessConfig.GetTypeToIDDict(type);
+ ids.Sort(CmpIds);
+ return ids;
+ }
+
+ int CmpIds(int a, int b)
+ {
+ var stateA = GetAchievementState(a);
+ var stateB = GetAchievementState(b);
+
+ if (stateA != stateB)
+ {
+ return stateA - stateB;
+ }
+
+ return a - b;
+ }
+
+ public void SendGetAward(int id)
+ {
+ var config = SuccessConfig.Get(id);
+ //绠�鍗曞垽鏂儗鍖�
+ if (PackManager.Instance.GetEmptyGridCount(PackType.Item) < config.AwardItemList.Length)
+ {
+ SysNotifyMgr.Instance.ShowTip("GeRen_lhs_202580");
+ return;
+ }
+
+ var pack = new CA504_tagCMPlayerGetReward();
+ pack.RewardType = 59;
+ pack.DataEx = (uint)id;
+ GameNetSystem.Instance.SendInfo(pack);
+ }
+}
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/Achievement/AchievementManager.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/Achievement/AchievementManager.cs.meta
index 9fd6048..e3f06ab 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/Achievement/AchievementManager.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: cf5275bc4183a394c83cbfa9707c3f13
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/Arena/ArenaBattleFailWin.cs b/Main/System/Arena/ArenaBattleFailWin.cs
index ef08868..f655d2b 100644
--- a/Main/System/Arena/ArenaBattleFailWin.cs
+++ b/Main/System/Arena/ArenaBattleFailWin.cs
@@ -32,6 +32,7 @@
}
Display();
CreateScroller();
+ FirstChargeManager.Instance.TryPopWin("ArenaBattleFailWin");
}
protected override void OnPreClose()
diff --git a/Main/System/Battle/ArenaBattleWin.cs b/Main/System/Battle/ArenaBattleWin.cs
index eafff77..ac89408 100644
--- a/Main/System/Battle/ArenaBattleWin.cs
+++ b/Main/System/Battle/ArenaBattleWin.cs
@@ -119,8 +119,8 @@
ulong myNowHp = GetNowHP(myTeam);
ulong enemyNowHp = GetNowHP(enemyTeam);
- txtMyHp.text = Language.Get("BoneField09", UIHelper.ReplaceLargeArtNum(myNowHp), UIHelper.ReplaceLargeArtNum(myMaxHp));
- txtEnemyHp.text = Language.Get("BoneField09", UIHelper.ReplaceLargeArtNum(enemyNowHp), UIHelper.ReplaceLargeArtNum(enemyMaxHp));
+ txtMyHp.text = Language.Get("BoneField09", UIHelper.ReplaceLargeNum(myNowHp), UIHelper.ReplaceLargeNum(myMaxHp));
+ txtEnemyHp.text = Language.Get("BoneField09", UIHelper.ReplaceLargeNum(enemyNowHp), UIHelper.ReplaceLargeNum(enemyMaxHp));
imgMyHp.fillAmount = Mathf.Clamp01((myMaxHp > 0) ? (float)myNowHp / myMaxHp : 0f);
imgEnemyHp.fillAmount = Mathf.Clamp01((enemyMaxHp > 0) ? (float)enemyNowHp / enemyMaxHp : 0f);
diff --git a/Main/System/Battle/BattleField/TianziBillboradBattleField.cs b/Main/System/Battle/BattleField/TianziBillboradBattleField.cs
index 2f39395..20d0ba9 100644
--- a/Main/System/Battle/BattleField/TianziBillboradBattleField.cs
+++ b/Main/System/Battle/BattleField/TianziBillboradBattleField.cs
@@ -17,6 +17,7 @@
{
base.Init(MapID, FuncLineID, extendData, _redTeamList, _blueTeamList, turnMax);
+ TianziBillboradManager.Instance.battleLineID = TianziBillboradManager.Instance.todayLineID;
int level = FuncLineID;// 鍏冲崱
extendData = _extendData;
levelConfig = MainLevelConfig.Get(level);
@@ -46,11 +47,6 @@
case 3://鎴樻枟缁撴潫
break;
case 4://缁撶畻濂栧姳
- if (extendData != null && extendData.ContainsKey("totalHurt"))
- {
- ulong totalHurt = ulong.Parse(extendData["totalHurt"].ToString());
- TianziBillboradBattleWin.TianziDamageBarEndDataAction?.Invoke(totalHurt);
- }
break;
case 5://缁撴潫鐘舵�佹爣璁�
break;
@@ -69,7 +65,7 @@
{
AutoFightModel.Instance.isPause = false;
Destroy();
-
+ TianziBillboradManager.Instance.ClearBar();
if (UIManager.Instance.IsOpened<TianziBillboradBattleWin>())
{
UIManager.Instance.CloseWindow<TianziBillboradBattleWin>();
diff --git a/Main/System/Battle/BattleManager.cs b/Main/System/Battle/BattleManager.cs
index f879dec..23bd7dc 100644
--- a/Main/System/Battle/BattleManager.cs
+++ b/Main/System/Battle/BattleManager.cs
@@ -29,6 +29,7 @@
public int fightGuideID;
public int fightGuideMainLevelLimit;
public int fightGuideNoClickSeconds;
+ public int[] challengeBossGuides;
public Action<string, BattleField> onBattleFieldCreate;
@@ -56,6 +57,7 @@
fightGuideID = int.Parse(config.Numerical1);
fightGuideMainLevelLimit = int.Parse(config.Numerical2);
fightGuideNoClickSeconds = int.Parse(config.Numerical3);
+ challengeBossGuides = JsonMapper.ToObject<int[]>(config.Numerical4);
config = FuncConfigConfig.Get("BattleButton");
passRound= int.Parse(config.Numerical1);
diff --git a/Main/System/Battle/BattleObject/BattleObject.cs b/Main/System/Battle/BattleObject/BattleObject.cs
index 266ee05..90db068 100644
--- a/Main/System/Battle/BattleObject/BattleObject.cs
+++ b/Main/System/Battle/BattleObject/BattleObject.cs
@@ -162,9 +162,9 @@
public void OnObjInfoRefresh(H0418_tagObjInfoRefresh _refreshInfo)
{
- // 澶╁瓙鐨勬寫鎴樻嫤鎴鏉¢�昏緫
+ // 澶╁瓙鐨勬寫鎴樻嫤鎴鏉�,涓嶆嫤鎴�掓皵
BattleObject boss = battleField.FindBoss();
- if (boss != null && battleField.MapID == 30020 && boss.ObjID == _refreshInfo.ObjID)
+ if (boss != null && battleField.MapID == 30020 && boss.ObjID == _refreshInfo.ObjID && _refreshInfo.RefreshType != (ushort)PlayerDataType.XP)
return;
switch ((PlayerDataType)_refreshInfo.RefreshType)
{
@@ -190,9 +190,9 @@
public void ObjPropertyRefreshView(HB418_tagSCObjPropertyRefreshView vNetData)
{
- // 澶╁瓙鐨勬寫鎴樻嫤鎴鏉¢�昏緫
+ // 澶╁瓙鐨勬寫鎴樻嫤鎴鏉�,涓嶆嫤鎴�掓皵
BattleObject boss = battleField.FindBoss();
- if (boss != null && battleField.MapID == 30020 && boss.ObjID == vNetData.ObjID)
+ if (boss != null && battleField.MapID == 30020 && boss.ObjID == vNetData.ObjID && vNetData.RefreshType != (ushort)PlayerDataType.XP)
return;
switch ((PlayerDataType)vNetData.RefreshType)
{
@@ -473,7 +473,7 @@
public void PerformDrop()
{
- if (null == m_battleDrops || m_battleDrops.dropItemPackIndex.Count == 0)
+ if (null == m_battleDrops)
return;
EventBroadcast.Instance.Broadcast<string, BattleDrops, Action>(
diff --git a/Main/System/Battle/BoneFieldBattleWin.cs b/Main/System/Battle/BoneFieldBattleWin.cs
index e20cd7c..c7c2af2 100644
--- a/Main/System/Battle/BoneFieldBattleWin.cs
+++ b/Main/System/Battle/BoneFieldBattleWin.cs
@@ -11,6 +11,8 @@
[SerializeField] public Text txtBossName;
private BattleObject bossBattleObject = null;
[SerializeField] public List<BattleBuffCell> buffCells;
+ [SerializeField] HeroCountryComponent myCountry;
+ [SerializeField] HeroCountryComponent enemyCountry;
protected override void OnPreOpen()
{
@@ -107,6 +109,14 @@
OnRoundChange(battleField.round, battleField.turnMax); // 纭繚鍥炲悎鏄剧ず琚皟鐢�
OnBuffChanged();
+
+ // 鑾峰彇鎴戞柟锛堢孩鏂癸級闃熶紞鏁版嵁
+ List<BattleObject> myTeam = battleField.battleObjMgr.GetBattleObjList(BattleCamp.Red);
+ // 鑾峰彇鏁屾柟锛堣摑鏂癸級闃熶紞鏁版嵁
+ List<BattleObject> enemyTeam = battleField.battleObjMgr.GetBattleObjList(BattleCamp.Blue);
+
+ myCountry.RefreshOnTeamCountry(GetTeamHeroList(myTeam), true);
+ enemyCountry.RefreshOnTeamCountry(GetTeamHeroList(enemyTeam), true);
}
private void OnBuffChanged()
@@ -205,4 +215,17 @@
{
return FuncOpen.Instance.IsFuncOpen(ArenaManager.Instance.BattleChangeTabFuncId);
}
+
+ List<TeamHero> GetTeamHeroList(List<BattleObject> teams)
+ {
+ List<TeamHero> teamHeroes = new List<TeamHero>();
+ if (teams.IsNullOrEmpty())
+ return teamHeroes;
+ foreach (var item in teams)
+ {
+ teamHeroes.Add(item.teamHero);
+ }
+ return teamHeroes;
+
+ }
}
\ No newline at end of file
diff --git a/Main/System/Battle/StoryBossBattleWin.cs b/Main/System/Battle/StoryBossBattleWin.cs
index c93e73f..0e5a94f 100644
--- a/Main/System/Battle/StoryBossBattleWin.cs
+++ b/Main/System/Battle/StoryBossBattleWin.cs
@@ -16,6 +16,8 @@
private BattleObject bossBattleObject = null;
[SerializeField] public List<BattleBuffCell> buffCells;
+ [SerializeField] HeroCountryComponent myCountry;
+ [SerializeField] HeroCountryComponent enemyCountry;
protected override void OnPreOpen()
{
@@ -83,6 +85,14 @@
OnRoundChange(battleField.round, battleField.turnMax); // 纭繚鍥炲悎鏄剧ず琚皟鐢�
OnBuffChanged();
+
+ // 鑾峰彇鎴戞柟锛堢孩鏂癸級闃熶紞鏁版嵁
+ List<BattleObject> myTeam = battleField.battleObjMgr.GetBattleObjList(BattleCamp.Red);
+ // 鑾峰彇鏁屾柟锛堣摑鏂癸級闃熶紞鏁版嵁
+ List<BattleObject> enemyTeam = battleField.battleObjMgr.GetBattleObjList(BattleCamp.Blue);
+
+ myCountry.RefreshOnTeamCountry(GetTeamHeroList(myTeam), true);
+ enemyCountry.RefreshOnTeamCountry(GetTeamHeroList(enemyTeam), true);
}
private void OnBuffChanged()
@@ -168,5 +178,16 @@
}
}
}
+ List<TeamHero> GetTeamHeroList(List<BattleObject> teams)
+ {
+ List<TeamHero> teamHeroes = new List<TeamHero>();
+ if (teams.IsNullOrEmpty())
+ return teamHeroes;
+ foreach (var item in teams)
+ {
+ teamHeroes.Add(item.teamHero);
+ }
+ return teamHeroes;
+ }
}
\ No newline at end of file
diff --git a/Main/System/Battle/TianziBillboradBattleWin.cs b/Main/System/Battle/TianziBillboradBattleWin.cs
index dc5beea..dbdc21a 100644
--- a/Main/System/Battle/TianziBillboradBattleWin.cs
+++ b/Main/System/Battle/TianziBillboradBattleWin.cs
@@ -1,6 +1,5 @@
锘縰sing System;
using System.Collections.Generic;
-using Cysharp.Threading.Tasks;
using LitJson;
using UnityEngine;
using UnityEngine.UI;
@@ -19,7 +18,6 @@
[SerializeField] RectTransform rectBoxEnd;
[SerializeField] UIEffectPlayer uiEffectPlayer;
- public static Action<ulong> TianziDamageBarEndDataAction;
protected override void OnPreOpen()
{
@@ -27,11 +25,9 @@
tianziDamageBar.StageUp += OnStageUp;
tianziDamageBar.ValueChangeAction += OnValueChangeAction;
tianziDamageBar.ChangeEndAction += OnChangeEndAction;
- //tianziDamageBar.IsLastHitUnLockEvent += OnIsLastHitUnLockEvent;
- TianziDamageBarEndDataAction += OnTianziDamageBarEndData;
+ TianziBillboradManager.Instance.OnUpdateBarInfoEvent += OnUpdateBarInfoEvent;
+ TianziBillboradManager.Instance.PlayUiEffectAction += OnPlayUiEffectAction;
MainWin.TabChangeEvent += OnTabChangeEvent;
- EventBroadcast.Instance.AddListener<string, JsonData>(EventName.BATTLE_END, OnSettlement);
- EventBroadcast.Instance.AddListener<HB419_tagSCObjHPRefresh>(EventName.BATTLE_TIANZI_REFRESH_HP, OnUpdateHpNum);
bool isOpenBattleChangeTab = IsOpenBattleChangeTab();
transButtons.localPosition = new Vector3(0, isOpenBattleChangeTab ? 130 : 0, 0);
if (isOpenBattleChangeTab)
@@ -44,17 +40,20 @@
}
}
+ private void OnPlayUiEffectAction()
+ {
+ uiEffectPlayer.Play();
+ }
+
protected override void OnPreClose()
{
base.OnPreClose();
tianziDamageBar.StageUp -= OnStageUp;
tianziDamageBar.ValueChangeAction -= OnValueChangeAction;
- tianziDamageBar.ChangeEndAction += OnChangeEndAction;
- //tianziDamageBar.IsLastHitUnLockEvent += OnIsLastHitUnLockEvent;
- TianziDamageBarEndDataAction -= OnTianziDamageBarEndData;
+ tianziDamageBar.ChangeEndAction -= OnChangeEndAction;
+ TianziBillboradManager.Instance.OnUpdateBarInfoEvent -= OnUpdateBarInfoEvent;
+ TianziBillboradManager.Instance.PlayUiEffectAction -= OnPlayUiEffectAction;
MainWin.TabChangeEvent -= OnTabChangeEvent;
- EventBroadcast.Instance.RemoveListener<string, JsonData>(EventName.BATTLE_END, OnSettlement);
- EventBroadcast.Instance.RemoveListener<HB419_tagSCObjHPRefresh>(EventName.BATTLE_TIANZI_REFRESH_HP, OnUpdateHpNum);
bool isOpenBattleChangeTab = IsOpenBattleChangeTab();
if (isOpenBattleChangeTab)
{
@@ -76,19 +75,19 @@
}
-
-
- private void OnTianziDamageBarEndData(ulong obj)
+ private void OnUpdateBarInfoEvent(ulong loaclNowHunt, ulong loaclMaxHp, int loaclHpNum)
{
- tianziDamageBar.Show(obj);
+ tianziDamageBar.Show(loaclNowHunt, loaclMaxHp, loaclHpNum);
}
+
+
private void OnStageUp(int stage)
{
GameObject hero = bossBattleObject.heroGo;
if (hero == null || stage <= 1)
return;
- uiEffectPlayer.Play();
+
GameObject prefab = UIUtility.CreateWidget("TianziBillboradBox", "TianziBillboradBox");
prefab.transform.SetParentEx(hero.transform, Vector3.zero, Quaternion.identity, Vector3.one);
@@ -139,8 +138,7 @@
DisplaySkillWordsList(lineupConfig);
- hpB419 = 0;
- maxHpB419 = 0;
+
tianziDamageBar.Init();
if (null != bossBattleObject)
@@ -194,63 +192,7 @@
RefreshBuff(buffList);
}
- private void OnSettlement(string _guid, JsonData data)
- {
- if (string.Empty == _guid)
- return;
- var battle = BattleManager.Instance.GetBattleField(_guid);
- if (battle == null)
- return;
- var battleName = battle.ToString();
- if (battleName != "TianziBillboradBattleField")
- return;
- if (data != null && data.ContainsKey("totalHurt"))
- {
- ulong totalHurt = ulong.Parse(data["totalHurt"].ToString());
- tianziDamageBar.Show(totalHurt);
- }
- }
-
- private void OnIsLastHitUnLockEvent()
- {
- if (bossBattleObject == null)
- return;
-
- bossBattleObject.teamHero.curHp = (long)hpB419;
- bossBattleObject.teamHero.maxHp = (long)maxHpB419;
- Debug.Log($"TianziDamageBar OnIsLastHitUnLockEvent hpB419 {hpB419} maxHpB419 {maxHpB419}");
- }
-
- ulong hpB419;
- ulong maxHpB419;
- private void OnUpdateHpNum(HB419_tagSCObjHPRefresh info)
- {
- if (bossBattleObject == null || info.ObjID != bossBattleObject.ObjID)
- return;
- ulong curHp = (ulong)GeneralDefine.GetFactValue(info.HP, info.HPEx);
- ulong maxHp = (ulong)GeneralDefine.GetFactValue(info.MaxHP, info.MaxHPEx);
- hpB419 = curHp;
- maxHpB419 = maxHp;
- //tianziDamageBar.ShowByB419(curHp, maxHp);
- }
-
- protected override void OnDamageTaken(BattleDmgInfo info)
- {
- base.OnDamageTaken(info);
-
- if (battleField == null || info.battleFieldGuid != battleField.guid)
- return;
-
- if (bossBattleObject != null && info.hurtObj.ObjID == bossBattleObject.ObjID)
- {
-
- TeamHero teamHero = bossBattleObject.teamHero;
- tianziDamageBar.Show(info);
- //tianziDamageBar.Show((ulong)teamHero.curHp, (ulong)teamHero.maxHp, info);
- }
-
- }
private void OnValueChangeAction(float nowValue, int CurrentStage)
{
diff --git a/Main/System/BattlePass/BattlePassBaseCell.cs b/Main/System/BattlePass/BattlePassBaseCell.cs
new file mode 100644
index 0000000..db08dbd
--- /dev/null
+++ b/Main/System/BattlePass/BattlePassBaseCell.cs
@@ -0,0 +1,30 @@
+锘縰sing System;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class BattlePassBaseCell : CellView
+{
+ [SerializeField] Image bg;
+ [SerializeField] Image word;
+ [SerializeField] RedpointBehaviour redPoint;
+ [SerializeField] Button btn;
+
+
+
+ public void Display(int type)
+ {
+ bg.SetSprite("BattlePassBG" + type);
+ word.SetSprite("BattlePassWord" + type);
+ redPoint.redpointId = MainRedDot.RedPoint_FundKey * 100 + type;
+ btn.AddListener(() =>
+ {
+ UIManager.Instance.OpenWindow<BattlePassCommonWin>(type);
+ });
+ }
+
+
+}
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/BattlePass/BattlePassBaseCell.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/BattlePass/BattlePassBaseCell.cs.meta
index 9fd6048..12c7b6d 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/BattlePass/BattlePassBaseCell.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 2e63901b40440a649acfb3f7757bbd02
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/BattlePass/BattlePassBaseWin.cs b/Main/System/BattlePass/BattlePassBaseWin.cs
new file mode 100644
index 0000000..36419e4
--- /dev/null
+++ b/Main/System/BattlePass/BattlePassBaseWin.cs
@@ -0,0 +1,55 @@
+锘縰sing System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+//鍩洪噾鍏ュ彛
+public class BattlePassBaseWin : UIBase
+{
+ [SerializeField] ScrollerController scroller;
+
+
+
+
+ protected override void OnPreOpen()
+ {
+ scroller.OnRefreshCell += OnRefreshCell;
+ CreateScroller();
+
+
+ }
+
+ protected override void OnPreClose()
+ {
+ scroller.OnRefreshCell -= OnRefreshCell;
+
+ }
+
+
+ void CreateScroller()
+ {
+ scroller.Refresh();
+ foreach(var type in BattlePassManager.Instance.battlePassTypeSortList)
+ {
+ if (!FuncOpen.Instance.IsFuncOpen(BattlePassManager.Instance.typeToFuncIDDict[type]))
+ {
+ continue;
+ }
+ scroller.AddCell(ScrollerDataType.Header, type);
+ }
+ scroller.Restart();
+
+ }
+
+
+ void OnRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _cell = cell as BattlePassBaseCell;
+ _cell.Display(cell.index);
+ }
+}
+
+
+
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/BattlePass/BattlePassBaseWin.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/BattlePass/BattlePassBaseWin.cs.meta
index 9fd6048..fcf60c3 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/BattlePass/BattlePassBaseWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 99d1228c0c974fc488759c06716cb89c
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/BattlePass/BattlePassCommonCell.cs b/Main/System/BattlePass/BattlePassCommonCell.cs
new file mode 100644
index 0000000..97acee5
--- /dev/null
+++ b/Main/System/BattlePass/BattlePassCommonCell.cs
@@ -0,0 +1,97 @@
+锘縰sing System;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class BattlePassCommonCell : CellView
+{
+ [SerializeField] ItemCell baseAward;
+ [SerializeField] Transform baseGotRect;
+ [SerializeField] Transform baseCanGetAwardRect;
+ [SerializeField] Transform upProcssBGRect;
+ [SerializeField] Transform upProcessRect;
+ [SerializeField] Transform downProcssBGRect;
+ [SerializeField] Transform downProcessRect;
+ [SerializeField] Text valueText;
+ [SerializeField] ItemCell[] betterAwards;
+ [SerializeField] Transform[] betterGotRects;
+ [SerializeField] Transform[] betterCanGetAwardRects;
+ [SerializeField] Transform[] betterLockRects;
+
+ [SerializeField] Transform mask;
+
+ int bpID;
+ public void Display(int id, BattlePassData battlePassData)
+ {
+ bpID = id;
+ var config = ZhanlingConfig.Get(id);
+ int freeItemID = config.FreeRewardItemList[0][0];
+ baseAward.Init(new ItemCellModel(freeItemID, false, config.FreeRewardItemList[0][1]));
+ var totalValue = BattlePassManager.Instance.GetTotalValue(config.ZhanlingType);
+ var baseAwardState = BattlePassManager.Instance.GetBPCellAwardState(battlePassData, totalValue, config.NeedValue, 0);
+ baseAward.button.AddListener(() =>
+ {
+ GetAward(battlePassData, baseAwardState, freeItemID);
+ });
+
+
+ baseGotRect.SetActive(baseAwardState == 2);
+ baseCanGetAwardRect.SetActive(baseAwardState == 1);
+ mask.SetActive(baseAwardState == 0);
+
+ var ids = ZhanlingConfig.GetTypeToIDDict(config.ZhanlingType).Values.ToList();
+ ids.Sort();
+ upProcssBGRect.SetActive(ids[0] != id);
+ upProcessRect.SetActive(baseAwardState != 0);
+
+ downProcssBGRect.SetActive(ids[ids.Count - 1] != id);
+ var nextConfig = ZhanlingConfig.Get(id + 1);
+ if (nextConfig != null)
+ {
+ downProcessRect.SetActive(totalValue >= nextConfig.NeedValue);
+ }
+ else
+ {
+ downProcessRect.SetActive(false);
+ }
+
+ if (config.ZhanlingType == (int)BattlePassType.MainLine)
+ {
+
+ valueText.text = config.NeedValue/100 + "-" + config.NeedValue%100;
+ }
+ else
+ {
+ valueText.text = config.NeedValue.ToString();
+ }
+
+ var betterAwardState = BattlePassManager.Instance.GetBPCellAwardState(battlePassData, totalValue, config.NeedValue, 1);
+ for (int i = 0; i < betterAwards.Length; i++)
+ {
+ int itemID = config.ZLRewardItemList[i][0];
+ betterAwards[i].Init(new ItemCellModel(itemID, false, config.ZLRewardItemList[i][1]));
+ betterAwards[i].button.AddListener(() =>
+ {
+ GetAward(battlePassData, betterAwardState, itemID);
+ });
+ betterGotRects[i].SetActive(betterAwardState == 2);
+ betterCanGetAwardRects[i].SetActive(betterAwardState == 1);
+ betterLockRects[i].SetActive(battlePassData.isActivite == 0);
+ }
+ }
+
+ void GetAward(BattlePassData battlePassData, int awardState, int itemID)
+ {
+ if (awardState != 1)
+ {
+ ItemTipUtility.Show(itemID);
+ return;
+ }
+ var config = ZhanlingConfig.Get(bpID);
+ var totalValue = BattlePassManager.Instance.GetTotalValue(config.ZhanlingType);
+ BattlePassManager.Instance.GetAllAward(battlePassData, config.ZhanlingType, totalValue);
+ }
+}
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/BattlePass/BattlePassCommonCell.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/BattlePass/BattlePassCommonCell.cs.meta
index 9fd6048..c20dfe5 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/BattlePass/BattlePassCommonCell.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: e29202cc898b4164e962fff7c1737ee7
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/BattlePass/BattlePassCommonWin.cs b/Main/System/BattlePass/BattlePassCommonWin.cs
new file mode 100644
index 0000000..6d2c03d
--- /dev/null
+++ b/Main/System/BattlePass/BattlePassCommonWin.cs
@@ -0,0 +1,173 @@
+锘縰sing System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+//閫氱敤鎴樹护
+public class BattlePassCommonWin : UIBase
+{
+ [SerializeField] Text titleText;
+ [SerializeField] Text welfarePerText; //绂忓埄鐧惧垎姣�
+ [SerializeField] Text itemNameText; //棰濆濂栧姳
+ [SerializeField] Text totalActivityText;
+ [SerializeField] Text tabNameText;
+ [SerializeField] Transform lockRect;
+ [SerializeField] ScrollerController scroller;
+ [SerializeField] Transform rechargeRect;
+ [SerializeField] ItemCell itemCell;
+ [SerializeField] Button buyBtn;
+ [SerializeField] Text buyText;
+
+ BattlePassData battlePassData;
+
+ int battlePasstype;
+
+ protected override void InitComponent()
+ {
+ buyBtn.AddListener(() =>
+ {
+ RechargeManager.Instance.CTG(BattlePassManager.Instance.GetCTGIDByType(battlePasstype));
+ });
+ }
+ protected override void OnPreOpen()
+ {
+ battlePasstype = functionOrder;
+ battlePassData = BattlePassManager.Instance.GetBattlePassData(battlePasstype);
+ if (battlePassData == null) return;
+ scroller.OnRefreshCell += OnRefreshCell;
+ BattlePassManager.Instance.BattlePassDataUpdateEvent += BattlePassDataUpdateEvent;
+ PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerDataRefresh;
+ BlessLVManager.Instance.OnBlessLVUpdateEvent += OnBlessLVUpdateEvent;
+ CreateScroller();
+ ShowStaticUI();
+ Display();
+
+
+ }
+
+ protected override void OnPreClose()
+ {
+ scroller.OnRefreshCell -= OnRefreshCell;
+ BattlePassManager.Instance.BattlePassDataUpdateEvent -= BattlePassDataUpdateEvent;
+ PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerDataRefresh;
+ BlessLVManager.Instance.OnBlessLVUpdateEvent -= OnBlessLVUpdateEvent;
+
+ }
+
+ void OnPlayerDataRefresh(PlayerDataType type)
+ {
+ if (type == PlayerDataType.LV || type == PlayerDataType.ExAttr1)
+ {
+ Display();
+ }
+ }
+
+ void OnBlessLVUpdateEvent()
+ {
+ Display();
+ }
+
+
+ void BattlePassDataUpdateEvent(int type)
+ {
+ if (type == battlePasstype)
+ {
+ Display();
+ }
+ }
+
+ void ShowStaticUI()
+ {
+ var ctgID = BattlePassManager.Instance.GetCTGIDByType(battlePasstype);
+ var config = CTGConfig.Get(ctgID);
+ welfarePerText.text = config.Percentage + "%";
+ if (!config.GainItemList.IsNullOrEmpty() && config.GainItemList.Length >= 2)
+ {
+ //绾﹀畾绗簩涓墿鍝�
+ itemNameText.text = Language.Get("BattlePass8", config.GainItemList[1][1], ItemConfig.Get(config.GainItemList[1][0]).ItemName);
+ }
+
+ tabNameText.text = Language.Get("BattlePassTab" + battlePasstype);
+ titleText.text = Language.Get("BattlePassTitle" + battlePasstype);
+ }
+
+
+ void Display()
+ {
+ ShowTotalValueStr();
+
+ lockRect.SetActive(battlePassData.isActivite == 0);
+ scroller.m_Scorller.RefreshActiveCellViews();
+
+ if (battlePassData.isActivite == 0)
+ {
+ rechargeRect.SetActive(true);
+ var ctgID = BattlePassManager.Instance.GetCTGIDByType(battlePasstype);
+ RechargeManager.Instance.TryGetOrderInfo(ctgID, out var orderInfoConfig);
+ buyText.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
+
+ var config = CTGConfig.Get(ctgID);
+ //绾﹀畾绗竴涓灏嗙墿鍝�
+ int itemID = config.GainItemList[0][0];
+ itemCell.Init(new ItemCellModel(itemID, false, config.GainItemList[0][1]));
+ itemCell.button.AddListener(() =>
+ {
+ ItemTipUtility.Show(itemID);
+ });
+ }
+ else
+ {
+ rechargeRect.SetActive(false);
+ }
+ }
+
+ void ShowTotalValueStr()
+ {
+ var totalValue = BattlePassManager.Instance.GetTotalValue(battlePasstype);
+ switch ((BattlePassType)battlePasstype)
+ {
+ case BattlePassType.LV:
+ case BattlePassType.BlessLV:
+ case BattlePassType.GuBao:
+ case BattlePassType.Arena:
+ {
+ totalActivityText.text = Language.Get("BattlePassValue" + battlePasstype, totalValue);
+ break;
+ }
+ case BattlePassType.MainLine:
+ {
+ totalActivityText.text = Language.Get("BattlePassValue3", totalValue / 100, totalValue % 100);
+ break;
+ }
+ }
+
+ }
+
+
+ void CreateScroller()
+ {
+ scroller.Refresh();
+ var values = ZhanlingConfig.GetTypeToIDDict(battlePasstype).Values.ToList();
+ values.Sort();
+ for (int i = 0; i < values.Count; i++)
+ {
+ scroller.AddCell(ScrollerDataType.Header, values[i]);
+ }
+ scroller.Restart();
+
+ var totalValue = BattlePassManager.Instance.GetTotalValue(battlePasstype);
+ scroller.JumpIndex(BattlePassManager.Instance.JumpIndex(battlePassData, battlePasstype, totalValue));
+ }
+
+
+ void OnRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _cell = cell as BattlePassCommonCell;
+ _cell.Display(cell.index, battlePassData);
+ }
+}
+
+
+
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/BattlePass/BattlePassCommonWin.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/BattlePass/BattlePassCommonWin.cs.meta
index 9fd6048..0e1eafa 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/BattlePass/BattlePassCommonWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 9ccc81dd25c7a8c4e9fe71b015a3e955
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/BattlePass/BattlePassManager.Common.cs b/Main/System/BattlePass/BattlePassManager.Common.cs
new file mode 100644
index 0000000..aed51fb
--- /dev/null
+++ b/Main/System/BattlePass/BattlePassManager.Common.cs
@@ -0,0 +1,79 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System;
+using System.Linq;
+
+//閫氱敤鍩洪噾鐣岄潰鎴樹护
+public partial class BattlePassManager : GameSystemManager<BattlePassManager>
+{
+
+ //鎴樹护绫诲瀷锛氱孩鐐� 閫氱敤鍩洪噾鐣岄潰
+ Dictionary<int, Redpoint> redpointCommonDict = new Dictionary<int, Redpoint>();
+
+ //閫氱敤鎴樹护瀵瑰簲鐨勫姛鑳絠d
+ public Dictionary<int, int> typeToFuncIDDict = new Dictionary<int, int>()
+ {
+ {1, 40},
+ {2, 40},
+ {3, 40},
+ {4, 28},
+ {5, 27},
+ };
+
+ public int[] battlePassTypeSortList;
+
+
+ //1-涓诲叕绛夌骇锛�2-绁濈绛夌骇锛�3-涓荤嚎鍏冲崱锛�4-鍙ゅ疂鏁伴噺锛�5-婕旀鍦烘鏁帮紱
+ void UpdateCommonBPRedpoint(int _type)
+ {
+ if (!redpointCommonDict.ContainsKey(_type))
+ {
+ return;
+ }
+ if (!FuncOpen.Instance.IsFuncOpen(typeToFuncIDDict[_type]))
+ {
+ return;
+ }
+ redpointCommonDict[_type].state = RedPointState.None;
+ battlePassDataDict.TryGetValue(_type, out BattlePassData battlePassData);
+ if (battlePassData == null) return;
+ int totalValue = 0;
+ switch ((BattlePassType)_type)
+ {
+ case BattlePassType.LV:
+ {
+ totalValue = PlayerDatas.Instance.baseData.LV;
+ break;
+ }
+ case BattlePassType.BlessLV:
+ {
+ totalValue = BlessLVManager.Instance.m_TreeLV;
+ break;
+ }
+ case BattlePassType.MainLine:
+ {
+ totalValue = PlayerDatas.Instance.baseData.ExAttr1 / 100;
+ break;
+ }
+ case BattlePassType.GuBao:
+ {
+ totalValue = (int)battlePassData.value1;
+ break;
+ }
+ case BattlePassType.Arena:
+ {
+ totalValue = (int)battlePassData.value1;
+ break;
+ }
+ }
+
+ if (HasAnyAward(_type, totalValue))
+ {
+ redpointCommonDict[_type].state = RedPointState.Simple;
+ }
+ }
+
+
+}
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/BattlePass/BattlePassManager.Common.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/BattlePass/BattlePassManager.Common.cs.meta
index 9fd6048..a99eeb5 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/BattlePass/BattlePassManager.Common.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: b1c1b8cb5fd4f9d42b87cdadae0dcce5
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/BattlePass/BattlePassManager.Week.cs b/Main/System/BattlePass/BattlePassManager.Week.cs
index d8abbc0..8fce347 100644
--- a/Main/System/BattlePass/BattlePassManager.Week.cs
+++ b/Main/System/BattlePass/BattlePassManager.Week.cs
@@ -7,18 +7,22 @@
//鍛ㄦ垬浠�
public partial class BattlePassManager : GameSystemManager<BattlePassManager>
{
- public const int WeekBattlePassType = 6;
Redpoint redpoint = new Redpoint(MainRedDot.RedPoint_DailyKey, MainRedDot.RedPoint_WeekBPFuncKey);
void UpdateWeekRedPoint()
{
+ if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.DayMission))
+ {
+ return;
+ }
+
redpoint.state = RedPointState.None;
//璐拱锛屾椿璺�
- battlePassDataDict.TryGetValue(WeekBattlePassType, out BattlePassData battlePassData);
+ battlePassDataDict.TryGetValue((int)BattlePassType.Week, out BattlePassData battlePassData);
if (battlePassData == null) return;
- if (HasAnyAward(WeekBattlePassType, (int)battlePassData.value1))
+ if (HasAnyAward((int)BattlePassType.Week, (int)battlePassData.value1))
{
redpoint.state = RedPointState.Simple;
}
diff --git a/Main/System/BattlePass/BattlePassManager.cs b/Main/System/BattlePass/BattlePassManager.cs
index 173a2fd..e8d7b86 100644
--- a/Main/System/BattlePass/BattlePassManager.cs
+++ b/Main/System/BattlePass/BattlePassManager.cs
@@ -3,6 +3,7 @@
using UnityEngine;
using System;
using System.Linq;
+using LitJson;
public partial class BattlePassManager : GameSystemManager<BattlePassManager>
@@ -11,17 +12,25 @@
Dictionary<int, BattlePassData> battlePassDataDict = new Dictionary<int, BattlePassData>();
public event Action<int> BattlePassDataUpdateEvent;
+
Dictionary<int, int[]> buyZhanlingTypeDict = new Dictionary<int, int[]>();
+
public override void Init()
{
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
+ PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerDataRefresh;
+ DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk;
+ BlessLVManager.Instance.OnBlessLVUpdateEvent += OnBlessLVUpdateEvent;
ParseConfig();
}
public override void Release()
{
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize;
+ PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerDataRefresh;
+ DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent -= OnPlayerLoginOk;
+ BlessLVManager.Instance.OnBlessLVUpdateEvent -= OnBlessLVUpdateEvent;
}
void OnBeforePlayerDataInitialize()
@@ -33,6 +42,12 @@
{
var config = FuncConfigConfig.Get("Zhanling");
buyZhanlingTypeDict = ConfigParse.ParseIntArrayDict(config.Numerical1);
+ battlePassTypeSortList = JsonMapper.ToObject<int[]>(config.Numerical5);
+
+ foreach (var type in battlePassTypeSortList)
+ {
+ redpointCommonDict[type] = new Redpoint(MainRedDot.RedPoint_FundKey, MainRedDot.RedPoint_FundKey * 100 + type);
+ }
}
@@ -54,10 +69,10 @@
HB120_tagMCZhanlingInfo.tagMCZhanling reward = netPack.RewardList[i];
if (!battlePassData.battlePassCellDict.ContainsKey((int)reward.NeedValue))
{
- battlePassData.battlePassCellDict[(int)reward.NeedValue] = new BattlePassCell();
+ battlePassData.battlePassCellDict[(int)reward.NeedValue] = new BattlePassAwardState();
}
- BattlePassCell battlePassCell = battlePassData.battlePassCellDict[(int)reward.NeedValue];
+ BattlePassAwardState battlePassCell = battlePassData.battlePassCellDict[(int)reward.NeedValue];
battlePassCell.freeRewardState = reward.FreeRewardState;
battlePassCell.zlRewardState = reward.ZLRewardState;
battlePassCell.zlRewardStateH = reward.ZLRewardStateH;
@@ -67,12 +82,51 @@
BattlePassDataUpdateEvent?.Invoke(netPack.ZhanlingType);
}
+ #region 绾㈢偣
- void UpdateRedpoint(int type)
+ void OnBlessLVUpdateEvent()
+ {
+ UpdateCommonBPRedpoint(2);
+ }
+
+ void OnPlayerDataRefresh(PlayerDataType type)
{
switch (type)
{
- case WeekBattlePassType:
+ case PlayerDataType.LV:
+ case PlayerDataType.ExAttr1:
+ {
+ UpdateCommonBPRedpoint(1);
+ UpdateCommonBPRedpoint(3);
+ break;
+ }
+ }
+ }
+
+ void OnPlayerLoginOk()
+ {
+ foreach (var type in battlePassTypeSortList)
+ {
+ UpdateCommonBPRedpoint(type);
+ }
+ }
+
+
+
+ void UpdateRedpoint(int type)
+ {
+ switch ((BattlePassType)type)
+ {
+ case BattlePassType.LV:
+ case BattlePassType.BlessLV:
+ case BattlePassType.MainLine:
+ case BattlePassType.GuBao:
+ case BattlePassType.Arena:
+ {
+ UpdateCommonBPRedpoint(type);
+ break;
+ }
+ case BattlePassType.Week:
{
UpdateWeekRedPoint();
break;
@@ -80,6 +134,9 @@
}
}
+
+
+ #endregion
//鏄惁鏈変换浣曞鍔卞彲浠ラ鍙�
public bool HasAnyAward(int type, int totalValue)
{
@@ -231,7 +288,7 @@
public int JumpIndex(BattlePassData battlePassData, int zhanLingType, int totalValue)
{
-
+
var ids = ZhanlingConfig.GetTypeToIDDict(zhanLingType).Values.ToList();
ids.Sort();
int index = -1;
@@ -255,10 +312,54 @@
}
return index;
}
+
+ //鏄惁鍏ㄩ儴瀹屾垚(濂栧姳鍏ㄩ鍙�)
+ public bool IsAllFinish(int type)
+ {
+ battlePassDataDict.TryGetValue(type, out BattlePassData battlePassData);
+ if (battlePassData == null)
+ return false;
+ if (battlePassData.allFinishTime != 0)
+ return true;
+ return false;
+ }
+
+ public int GetTotalValue(int _type)
+ {
+ battlePassDataDict.TryGetValue(_type, out BattlePassData battlePassData);
+ switch ((BattlePassType)_type)
+ {
+ case BattlePassType.LV:
+ {
+ return PlayerDatas.Instance.baseData.LV;
+ }
+ case BattlePassType.BlessLV:
+ {
+ return BlessLVManager.Instance.m_TreeLV;
+ }
+ case BattlePassType.MainLine:
+ {
+ return PlayerDatas.Instance.baseData.ExAttr1 / 100;
+ }
+ case BattlePassType.GuBao:
+ {
+ return (int)battlePassData.value1;
+ }
+ case BattlePassType.Arena:
+ {
+ return (int)battlePassData.value1;
+ }
+ case BattlePassType.Week:
+ {
+ return (int)battlePassData.value1;
+ }
+ }
+ return 0;
+ }
}
-public class BattlePassCell
+public class BattlePassAwardState
{
public byte freeRewardState; // 鍏嶈垂鎴樹护濂栧姳鏄惁宸查鍙�
public byte zlRewardState; // 鏅�氭垬浠ゅ鍔辨槸鍚﹀凡棰嗗彇
@@ -273,5 +374,15 @@
public uint allFinishTime; // 鍏ㄩ儴濂栧姳棰嗗彇瀹屾瘯鐨勬椂闂存埑锛屾湭瀹屾瘯鏃惰鍊间负0锛屽悗绔細鍦�0鐐硅繃澶╂椂妫�鏌ュ彲鍚﹂噸缃紝鍓嶇鑷鍋氬�掕鏃惰〃鐜板嵆鍙�
public uint value1; // 鎴樹护瀵瑰簲鐨勮嚜瀹氫箟鍊硷紝鍙�夛紝濡傜櫥褰曟垬浠や唬琛ㄥ紑濮嬭绠楁棩鏈熸椂闂存埑
- public Dictionary<int, BattlePassCell> battlePassCellDict = new Dictionary<int, BattlePassCell>();
+ public Dictionary<int, BattlePassAwardState> battlePassCellDict = new Dictionary<int, BattlePassAwardState>();
+}
+
+public enum BattlePassType
+{
+ LV = 1, //绛夌骇
+ BlessLV = 2, //绁濈绛夌骇
+ MainLine = 3, //涓荤嚎鍏冲崱
+ GuBao = 4, //鍙ゅ疂
+ Arena = 5, //婕旀鍦�
+ Week = 6, //鍛ㄦ垬浠�
}
\ No newline at end of file
diff --git a/Main/System/BillboardRank/PlayerRankCell.cs b/Main/System/BillboardRank/PlayerRankCell.cs
index 176ebea..e9bc30d 100644
--- a/Main/System/BillboardRank/PlayerRankCell.cs
+++ b/Main/System/BillboardRank/PlayerRankCell.cs
@@ -34,7 +34,7 @@
PlayerDatas.Instance.baseData.face,
PlayerDatas.Instance.baseData.facePic));
rankText.text = Language.Get("L1045");
- rankValueText.text = "0";//Language.Get("L1125");
+ rankValueText.text = "1-1";//Language.Get("L1125");
nameText.text = PlayerDatas.Instance.baseData.PlayerName;
officialTitleCell.InitUI(PlayerDatas.Instance.baseData.realmLevel, PlayerDatas.Instance.baseData.TitleID);
return;
@@ -46,7 +46,7 @@
officialTitleCell.SetActive(false);
avatarCell.SetActive(false);
nameText.text = Language.Get("L1124");
- rankValueText.text = "0";//Language.Get("L1125");
+ rankValueText.text = "1-1";//Language.Get("L1125");
}
else
{
@@ -55,7 +55,7 @@
avatarCell.SetActive(true);
avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)rankData.id, (int)rankData.value3, (int)rankData.value4));
nameText.text = rankData.name1;
- rankValueText.text = string.Format(valueFormat, UIHelper.ReplaceLargeNum(rankData.cmpValue2 + rankData.cmpValue * Constants.ExpPointValue));
+ rankValueText.text = RankModel.Instance.GetStoryInfo(rankData.cmpValue); ;
}
rankText.text = rank.ToString();
diff --git a/Main/System/BillboardRank/PlayerRankWin.cs b/Main/System/BillboardRank/PlayerRankWin.cs
index 4ea0c65..c58478c 100644
--- a/Main/System/BillboardRank/PlayerRankWin.cs
+++ b/Main/System/BillboardRank/PlayerRankWin.cs
@@ -53,7 +53,7 @@
public override void Refresh()
{
- cmpStrText.text = Language.Get("RankTypeName_" + rankType);
+ cmpStrText.text = Language.Get("RankTypeName_1");
ShowTop3();
CreateScroller();
ShowMyRank();
diff --git a/Main/System/BillboardRank/PlayerTop3Cell.cs b/Main/System/BillboardRank/PlayerTop3Cell.cs
index d467f04..0c724ae 100644
--- a/Main/System/BillboardRank/PlayerTop3Cell.cs
+++ b/Main/System/BillboardRank/PlayerTop3Cell.cs
@@ -20,13 +20,14 @@
var rankData = RankModel.Instance.GetRankDataByRank(rankType, rank);
if (rankData == null)
{
- rankValueText.text = "0";//Language.Get("L1125");
+ rankValueText.text = "1-1";//Language.Get("L1125");
nameText.text = Language.Get("L1124");
officialTitleCell.SetActive(false);
return;
}
officialTitleCell.SetActive(true);
- rankValueText.text = string.Format(valueFormat, UIHelper.ReplaceLargeNum(rankData.cmpValue2 + rankData.cmpValue * Constants.ExpPointValue));
+ //rankValueText.text = string.Format(valueFormat, UIHelper.ReplaceLargeNum(rankData.cmpValue2 + rankData.cmpValue * Constants.ExpPointValue));
+ rankValueText.text = RankModel.Instance.GetStoryInfo(rankData.cmpValue);
nameText.text = rankData.name1;
officialTitleCell.InitUI((int)rankData.value1, (int)rankData.value2);
model.Create((int)rankData.value5, 1);
diff --git a/Main/System/BillboardRank/RankModel.cs b/Main/System/BillboardRank/RankModel.cs
index d380716..0a39a11 100644
--- a/Main/System/BillboardRank/RankModel.cs
+++ b/Main/System/BillboardRank/RankModel.cs
@@ -7,14 +7,14 @@
{
public event Action<int> onRankRefresh;
//public event Action<int> onMyRankRefresh;
-
+
//鎺掕姒滄粴鍔ㄦ樉绀虹殑鏈�澶ф暟閲� 绫诲瀷
Dictionary<int, int> ranksShowMaxCnt = new Dictionary<int, int>();
//鍒嗛〉鏌ヨ
Dictionary<int, int> queryRankCD = new Dictionary<int, int>(); //棣栨鏌ヨCD锛屼笉褰卞搷鍚庣画鐨勫垎椤垫煡璇�
//鍒嗛〉鏌ヨ 鎺掑悕绱㈠紩鎸夊瓧娈靛瓨鍌� 1浠h〃绗竴鍚�
- Dictionary<int, Dictionary<int, RankData>> m_RankPageDatas = new Dictionary<int, Dictionary<int, RankData>>();
+ Dictionary<int, Dictionary<int, RankData>> m_RankPageDatas = new Dictionary<int, Dictionary<int, RankData>>();
//绫诲瀷锛欼D -鎺掑悕绱㈠紩锛岄�氳繃ID杩涜鎺掗噸鍒犻櫎 涓嶅悓鍚嶆 鍚孖D鐨勬暟鎹�
Dictionary<int, Dictionary<int, int>> m_RankIDToIndex = new Dictionary<int, Dictionary<int, int>>();
@@ -127,8 +127,8 @@
if (queryPageTimes.ContainsKey(page) && Time.realtimeSinceStartup - queryPageTimes[page] < queryPageCD)
return;
if (ranksServerMaxCnt.ContainsKey(type))
- {
- if(index >= ranksServerMaxCnt[type])
+ {
+ if (index >= ranksServerMaxCnt[type])
{
//瓒呰繃鏈嶅姟鍣ㄥ凡涓婃鐨勬�绘暟閲忥紝姣斿鎬绘鍗曟槸100鍚嶏紝褰撳墠鍙湁8鍚嶇帺瀹朵笂姒滐紝寰�涓嬫粴鍔ㄥ氨涓嶅啀鏌ヨ
return;
@@ -205,7 +205,7 @@
}
if (!ranksServerMaxCnt.ContainsKey(rankType))
- {
+ {
ranksServerMaxCnt.Add(rankType, package.DataTotal);
}
ranksServerMaxCnt[rankType] = package.DataTotal;
@@ -332,6 +332,15 @@
return null;
}
#endregion
+
+ public string GetStoryInfo(uint cmpValue)
+ {
+ int value = (int)cmpValue;
+ if (!MainLevelConfig.HasKey(value))
+ return string.Empty;
+ MainLevelConfig config = MainLevelConfig.Get(value);
+ return Language.Get("Arena15", config.ChapterID, config.LevelNum);
+ }
}
// 榛樿鎯呭喌锛屽悇涓鍙兘鏈夋墍鍙樺寲
diff --git a/Main/System/BoneField/BoneFieldChallengeButton.cs b/Main/System/BoneField/BoneFieldChallengeButton.cs
index b11d934..7a497f9 100644
--- a/Main/System/BoneField/BoneFieldChallengeButton.cs
+++ b/Main/System/BoneField/BoneFieldChallengeButton.cs
@@ -7,7 +7,6 @@
[SerializeField] TextEx txtChallengeYes;
[SerializeField] TextEx txtChallengeNo;
[SerializeField] ImageEx imgChallengeLVYes;
- [SerializeField] ImageEx imgChallengeLVNo;
[SerializeField] ImageEx imgChallengeIcon;
[SerializeField] ImageEx imgChallengeRed;
bool isLvOk;
@@ -29,7 +28,7 @@
txtChallengeYes.SetActive(isLvOk && isHasNextLineID);
txtChallengeNo.SetActive(!isLvOk || !isHasNextLineID);
imgChallengeLVYes.SetActive(isLvOk && isHasNextLineID);
- imgChallengeLVNo.SetActive(!isLvOk || !isHasNextLineID);
+ imgChallengeLVYes.gray = !isLvOk || !isHasNextLineID;
imgChallengeIcon.SetActive(isLvOk && isHasNextLineID);
}
private void OnClickChallenge()
diff --git a/Main/System/BoneField/BoneFieldWin.cs b/Main/System/BoneField/BoneFieldWin.cs
index 9a01d1b..b57d699 100644
--- a/Main/System/BoneField/BoneFieldWin.cs
+++ b/Main/System/BoneField/BoneFieldWin.cs
@@ -23,7 +23,7 @@
[SerializeField] BoneFieldChallengeButton btnChallenge1;
[SerializeField] BoneFieldChallengeButton btnChallenge2;
[SerializeField] ButtonEx btnSweep;
- [SerializeField] ImageEx imgSweepNo;
+ [SerializeField] ImageEx imgSweep;
[SerializeField] ButtonEx btnAds;
[SerializeField] ImageEx imgSweepRed;
[SerializeField] UIHeroController bossModel;
@@ -202,8 +202,8 @@
if (!BoneFieldManager.Instance.TryGetShowSweepCount(out showSweepMaxCount, out showrealRemainSweepCount))
return;
bool isSweepCountOk = showrealRemainSweepCount > 0;
- imgSweepNo.SetActive(!isSweepCountOk);
btnSweep.interactable = isSweepCountOk;
+ imgSweep.gray = !isSweepCountOk;
long myFightPower = PlayerDatas.Instance.baseData.FightPower;
imgSweepRed.SetActive(isSweepCountOk && myFightPower < dungeonConfig.FightPower);
txtFirstFree.SetActive(showSweepMaxCount == showrealRemainSweepCount);
diff --git a/Main/System/DayMission/DayMissionBaseWin.cs b/Main/System/DayMission/DayMissionBaseWin.cs
index c88fd30..7ccb3f8 100644
--- a/Main/System/DayMission/DayMissionBaseWin.cs
+++ b/Main/System/DayMission/DayMissionBaseWin.cs
@@ -27,7 +27,7 @@
break;
case 2:
//涓荤嚎浠诲姟锛堣嫳闆勪箣璺級
- currentSubUI = UIManager.Instance.OpenWindow<DayMissionWin>();
+ currentSubUI = UIManager.Instance.OpenWindow<MissionHeroRoadWin>();
titleText.text = Language.Get("DayMission4");
break;
default:
diff --git a/Main/System/DayMission/DayMissionCell.cs b/Main/System/DayMission/DayMissionCell.cs
index d6cec92..e99d6a6 100644
--- a/Main/System/DayMission/DayMissionCell.cs
+++ b/Main/System/DayMission/DayMissionCell.cs
@@ -5,8 +5,9 @@
public class DayMissionCell : CellView
{
+ [SerializeField] ItemCell[] itemCells;
+ [SerializeField] Transform[] gotRects;
[SerializeField] Text titleText;
- [SerializeField] Text valueText;
[SerializeField] Image processImg;
[SerializeField] Text processText;
[SerializeField] Button getBtn;
@@ -20,7 +21,6 @@
int id = DayMissionManager.Instance.dailyIDList[index];
var config = DailyTaskConfig.Get(id);
titleText.text = string.Format(config.Title, config.NeedValue);
- valueText.text = config.AwardLiveness.ToString();
var process = DayMissionManager.Instance.GetDailyTaskProcess(id);
processImg.fillAmount = (float)process / config.NeedValue;
processText.text = Math.Min(process, config.NeedValue) + "/" + config.NeedValue;
@@ -31,9 +31,10 @@
getBtn.SetActive(false);
gotoBtn.SetActive(true);
gotRect.SetActive(false);
- mask.SetActive(true);
- gotoBtn.AddListener(()=>
+ mask.SetActive(false);
+ gotoBtn.AddListener(() =>
{
+ RightFuncInHome.RemoveListenWindow();
UIManager.Instance.CloseWindow<DayMissionBaseWin>();
NewBieCenter.Instance.StartNewBieGuide(config.GuideID);
});
@@ -44,7 +45,7 @@
gotoBtn.SetActive(false);
gotRect.SetActive(false);
mask.SetActive(false);
- getBtn.AddListener(()=>
+ getBtn.AddListener(() =>
{
var pack = new CA504_tagCMPlayerGetReward();
pack.RewardType = 1;
@@ -59,6 +60,25 @@
gotRect.SetActive(true);
mask.SetActive(true);
}
+
+ for (int i = 0; i < itemCells.Length; i++)
+ {
+ if (i < config.AwardItemList.Length)
+ {
+ itemCells[i].SetActive(true);
+ int itemID = config.AwardItemList[i][0];
+ itemCells[i].Init(new ItemCellModel(config.AwardItemList[i][0], false, config.AwardItemList[i][1]));
+ itemCells[i].button.AddListener(() =>
+ {
+ ItemTipUtility.Show(itemID);
+ });
+ gotRects[i].SetActive(state == 2);
+ }
+ else
+ {
+ itemCells[i].SetActive(false);
+ }
+ }
}
diff --git a/Main/System/DayMission/DayMissionWin.cs b/Main/System/DayMission/DayMissionWin.cs
index d0f6830..e1163d9 100644
--- a/Main/System/DayMission/DayMissionWin.cs
+++ b/Main/System/DayMission/DayMissionWin.cs
@@ -13,11 +13,8 @@
[SerializeField] Text[] targetActivityText;
[SerializeField] ScrollerController scroller;
- int beforeActivity; //鐢ㄤ簬鏄剧ず娲昏穬濂栧姳
-
protected override void OnPreOpen()
{
- beforeActivity = DayMissionManager.Instance.activityTotal;
scroller.OnRefreshCell += OnRefreshCell;
DayMissionManager.Instance.OnDayMissionEvent += OnDayMissionEvent;
@@ -86,15 +83,7 @@
DayMissionManager.Instance.SortDailyTask();
Display();
scroller.m_Scorller.RefreshActiveCellViews();
- if (DayMissionManager.Instance.activityTotal != beforeActivity)
- {
- List<Item> showItems = new List<Item>();
- Item tempItem = new Item(GeneralDefine.activityItemID, DayMissionManager.Instance.activityTotal - beforeActivity);
- showItems.Add(tempItem);
- ItemLogicUtility.Instance.ShowGetItem(showItems);
- beforeActivity = DayMissionManager.Instance.activityTotal;
- }
}
void ShowAward(int id)
diff --git a/Main/System/DayMission/MissionHeroRoadCell.cs b/Main/System/DayMission/MissionHeroRoadCell.cs
new file mode 100644
index 0000000..27c209d
--- /dev/null
+++ b/Main/System/DayMission/MissionHeroRoadCell.cs
@@ -0,0 +1,75 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class MissionHeroRoadCell : CellView
+{
+ [SerializeField] Text nameText;
+ [SerializeField] Image processImg;
+ [SerializeField] Text processText;
+ [SerializeField] ItemCell[] itemCells;
+ [SerializeField] Transform[] gotRects;
+
+ [SerializeField] Button getBtn;
+ [SerializeField] Button gotoBtn;
+ [SerializeField] Transform gotRect;
+ [SerializeField] Transform mask;
+
+
+ public void Display(int id)
+ {
+ var config = SuccessConfig.Get(id);
+ nameText.text = Language.Get("Achievement1", config.NeedCnt / 100, config.NeedCnt % 100);
+
+ var targetLevel = MainLevelConfig.GetToTargetLevelIndex(config.NeedCnt) + 1;
+ var curLevel = MainLevelConfig.GetToTargetLevelIndex(AchievementManager.Instance.GetAchievementProgress(config.Type)) + 1;
+
+ processImg.fillAmount = (float)curLevel / targetLevel;
+ processText.text = Math.Min(targetLevel, curLevel) + "/" + targetLevel;
+
+ var state = AchievementManager.Instance.GetAchievementState(id);
+ for (int i = 0; i < itemCells.Length; i++)
+ {
+ if (i < config.AwardItemList.Length)
+ {
+ itemCells[i].SetActive(true);
+ int itemID = config.AwardItemList[i][0];
+ itemCells[i].Init(new ItemCellModel(itemID, false, config.AwardItemList[i][1]));
+ itemCells[i].button.AddListener(() =>
+ {
+ ItemTipUtility.Show(itemID);
+ });
+ gotRects[i].SetActive(state == 2);
+ }
+ else
+ {
+ itemCells[i].SetActive(false);
+ }
+ }
+
+ getBtn.SetActive(state == 0);
+ gotoBtn.SetActive(state == 1);
+ gotRect.SetActive(state == 2);
+ mask.SetActive(state == 2);
+
+
+ getBtn.AddListener(() =>
+ {
+ AchievementManager.Instance.SendGetAward(id);
+ });
+
+ gotoBtn.AddListener(() =>
+ {
+ RightFuncInHome.RemoveListenWindow();
+ UIManager.Instance.CloseWindow<DayMissionBaseWin>();
+ NewBieCenter.Instance.StartNewBieGuide(BattleManager.Instance.challengeBossGuides[0]);
+ });
+ }
+
+
+}
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/DayMission/MissionHeroRoadCell.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/DayMission/MissionHeroRoadCell.cs.meta
index 9fd6048..2fc8ed3 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/DayMission/MissionHeroRoadCell.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: e5424536ae280184192560cd8373d771
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/DayMission/MissionHeroRoadWin.cs b/Main/System/DayMission/MissionHeroRoadWin.cs
new file mode 100644
index 0000000..d028288
--- /dev/null
+++ b/Main/System/DayMission/MissionHeroRoadWin.cs
@@ -0,0 +1,66 @@
+锘縰sing System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+//涓荤嚎浠诲姟锛氳嫳闆勪箣璺�
+public class MissionHeroRoadWin : UIBase
+{
+ [SerializeField] ScrollerController scroller;
+
+
+ List<int> ids = new List<int>();
+ protected override void OnPreOpen()
+ {
+ scroller.OnRefreshCell += OnRefreshCell;
+ AchievementManager.Instance.OnAchievementUpdateEvent += OnAchievementUpdateEvent;
+ CreateScroller();
+
+
+ }
+
+ protected override void OnPreClose()
+ {
+ scroller.OnRefreshCell -= OnRefreshCell;
+ AchievementManager.Instance.OnAchievementUpdateEvent -= OnAchievementUpdateEvent;
+
+ }
+
+
+
+
+
+ void OnAchievementUpdateEvent(int type)
+ {
+ if (type == 1 || type == -1)
+ {
+ ids = AchievementManager.Instance.GetAchievementIDs(1);
+ scroller.m_Scorller.RefreshActiveCellViews();
+ }
+ }
+
+ void CreateScroller()
+ {
+ ids = AchievementManager.Instance.GetAchievementIDs(1);
+ var count = ids.Count;
+ scroller.Refresh();
+ for (int i = 0; i < count; i++)
+ {
+ scroller.AddCell(ScrollerDataType.Header, i);
+ }
+ scroller.Restart();
+
+ }
+
+
+ void OnRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _cell = cell as MissionHeroRoadCell;
+ _cell.Display(ids[cell.index]);
+ }
+}
+
+
+
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/DayMission/MissionHeroRoadWin.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/DayMission/MissionHeroRoadWin.cs.meta
index 9fd6048..affa6e8 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/DayMission/MissionHeroRoadWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 803a78750ea407f49b5ddf73889160d9
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/DayMission/SignCell.cs b/Main/System/DayMission/SignCell.cs
new file mode 100644
index 0000000..7704abc
--- /dev/null
+++ b/Main/System/DayMission/SignCell.cs
@@ -0,0 +1,131 @@
+锘縰sing System;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class SignCell : MonoBehaviour
+{
+ [SerializeField] Image bgImg;
+ [SerializeField] Text dayText;
+ [SerializeField] ItemCell[] itemCells;
+ [SerializeField] Transform[] gotRects;
+ [SerializeField] Transform nowSelectRect;
+ [SerializeField] Transform repairRect;
+ [SerializeField] Button signBtn;
+
+
+
+ public void Display(int index)
+ {
+ var day = index + 1;
+ var config = SignInConfig.Get(day);
+ //鐘舵�侊細0-涓嶅彲绛惧埌锛�1-宸茬鍒帮紱2-鍙ˉ绛撅紱3-宸查鍙�
+ var state = SignManager.Instance.GetSignDayState(day);
+
+ for (int i = 0; i < itemCells.Length; i++)
+ {
+ if (i < config.AwardItemList.Length)
+ {
+ itemCells[i].SetActive(true);
+ int itemID = config.AwardItemList[i][0];
+ itemCells[i].Init(new ItemCellModel(itemID, false, config.AwardItemList[i][1]));
+ itemCells[i].button.AddListener(()=>
+ {
+ if (state == 1 || state == 2)
+ {
+ Sign(day);
+ return;
+ }
+ ItemTipUtility.Show(itemID);
+ });
+ }
+ else
+ {
+ itemCells[i].SetActive(false);
+ }
+ }
+ if (state == 1)
+ {
+ //鍙鍙�
+ bgImg.SetOrgSprite("Sign_img_54", "Sign");
+ nowSelectRect.SetActive(true);
+ for (int i = 0; i < gotRects.Length; i++)
+ {
+ gotRects[i].SetActive(false);
+ }
+ repairRect.SetActive(false);
+ }
+ else if (state == 2)
+ {
+ //琛ョ
+ bgImg.SetOrgSprite("Sign_img_58", "Sign");
+ nowSelectRect.SetActive(false);
+ for (int i = 0; i < gotRects.Length; i++)
+ {
+ gotRects[i].SetActive(false);
+ }
+ repairRect.SetActive(true);
+ }
+ else if (state == 3)
+ {
+ //宸查鍙�
+ bgImg.SetOrgSprite("Sign_img_57", "Sign");
+ nowSelectRect.SetActive(false);
+ for (int i = 0; i < gotRects.Length; i++)
+ {
+ gotRects[i].SetActive(true);
+ }
+ repairRect.SetActive(false);
+ }
+ else
+ {
+ //涓嶅彲绛惧埌
+ bgImg.SetOrgSprite("Sign_img_58", "Sign");
+ nowSelectRect.SetActive(false);
+ for (int i = 0; i < gotRects.Length; i++)
+ {
+ gotRects[i].SetActive(false);
+ }
+ repairRect.SetActive(false);
+ }
+
+ dayText.text = state == 3 ? Language.Get("Sign2") : Language.Get("SignDay" + day);
+
+ signBtn.AddListener(() =>
+ {
+ if (state == 1 || state == 2)
+ {
+ Sign(day);
+ return;
+ }
+ });
+ }
+
+ void Sign(int day)
+ {
+ var state = SignManager.Instance.GetSignDayState(day);
+ if (state == 2)
+ {
+ ConfirmCancel.MoneyIconConfirm(SignManager.Instance.repairSignMoney, SignManager.Instance.repairSignMoneyType,
+ Language.Get("Sign3", UIHelper.GetIconNameWithMoneyType(SignManager.Instance.repairSignMoneyType),
+ SignManager.Instance.repairSignMoney), (bool isOk, bool isToggle) =>
+ {
+ if (isOk)
+ {
+ var pack = new CA509_tagCSDaySign();
+ pack.Day = (byte)day;
+ GameNetSystem.Instance.SendInfo(pack);
+ }
+
+ });
+ return;
+ }
+
+ var pack = new CA509_tagCSDaySign();
+ pack.Day = (byte)day;
+ GameNetSystem.Instance.SendInfo(pack);
+ }
+}
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/DayMission/SignCell.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/DayMission/SignCell.cs.meta
index 9fd6048..79e9ebd 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/DayMission/SignCell.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 9e571a902b764294b8f222eeeb60ff3b
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/DayMission/SignManager.cs b/Main/System/DayMission/SignManager.cs
new file mode 100644
index 0000000..64cc492
--- /dev/null
+++ b/Main/System/DayMission/SignManager.cs
@@ -0,0 +1,72 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System;
+
+
+public class SignManager : GameSystemManager<SignManager>
+{
+ public int repairSignMoneyType;
+ public int repairSignMoney;
+ public byte[] signStateList = new byte[7];
+ public event Action OnSignEvent;
+
+ public override void Init()
+ {
+ DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
+
+ ParseConfig();
+ }
+
+ public override void Release()
+ {
+ DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize;
+ }
+
+ void OnBeforePlayerDataInitialize()
+ {
+ signStateList = new byte[7];
+ }
+
+
+ void ParseConfig()
+ {
+ var config = FuncConfigConfig.Get("SignInSet");
+ var arr = ConfigParse.GetMultipleStr<int>(config.Numerical1);
+ repairSignMoneyType = arr[0];
+ repairSignMoney = arr[1];
+ }
+
+ public void UpdateSignInfo(HA30D_tagSCDaySignInfo netPack)
+ {
+ signStateList = netPack.SignStateList;
+ OnSignEvent?.Invoke();
+ UpdateRedpoint();
+ }
+
+ //鐘舵�侊細0-涓嶅彲绛惧埌锛�1-宸茬鍒帮紱2-鍙ˉ绛撅紱3-宸查鍙�
+ public int GetSignDayState(int day)
+ {
+ return signStateList[day - 1];
+ }
+
+ public Redpoint redPointSign = new Redpoint(MainRedDot.RightFuncRedpoint, MainRedDot.RedPoint_SignKey);
+ void UpdateRedpoint()
+ {
+ if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.DaySign))
+ {
+ return;
+ }
+ foreach (var item in signStateList)
+ {
+ if (item == 1)
+ {
+ redPointSign.state = RedPointState.Simple;
+ return;
+ }
+ }
+ redPointSign.state = RedPointState.None;
+ }
+
+}
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/DayMission/SignManager.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/DayMission/SignManager.cs.meta
index 9fd6048..54672b6 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/DayMission/SignManager.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 216787bcde983c14fafc47d400400eed
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/DayMission/SignWin.cs b/Main/System/DayMission/SignWin.cs
new file mode 100644
index 0000000..502b5a5
--- /dev/null
+++ b/Main/System/DayMission/SignWin.cs
@@ -0,0 +1,35 @@
+锘縰sing System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+//鏃ュ父浠诲姟
+public class SignWin : UIBase
+{
+ [SerializeField] SignCell[] signCells;
+
+ protected override void OnPreOpen()
+ {
+ SignManager.Instance.OnSignEvent += Display;
+ Display();
+ }
+
+ protected override void OnPreClose()
+ {
+ SignManager.Instance.OnSignEvent -= Display;
+ }
+
+
+ void Display()
+ {
+ for (int i = 0; i < signCells.Length; i++)
+ {
+ signCells[i].Display(i);
+ }
+ }
+
+}
+
+
+
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/DayMission/SignWin.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/DayMission/SignWin.cs.meta
index 9fd6048..64682ca 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/DayMission/SignWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 49080bb35cc18c747b6c174d3e69918b
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/DayMission/WeekBattlePassCell.cs b/Main/System/DayMission/WeekBattlePassCell.cs
index bbd2629..dd557d9 100644
--- a/Main/System/DayMission/WeekBattlePassCell.cs
+++ b/Main/System/DayMission/WeekBattlePassCell.cs
@@ -39,7 +39,7 @@
baseCanGetAwardRect.SetActive(baseAwardState == 1);
mask.SetActive(baseAwardState == 0);
- var ids = ZhanlingConfig.GetTypeToIDDict(BattlePassManager.WeekBattlePassType).Values.ToList();
+ var ids = ZhanlingConfig.GetTypeToIDDict((int)BattlePassType.Week).Values.ToList();
ids.Sort();
upProcssBGRect.SetActive(ids[0] != id);
upProcessRect.SetActive(baseAwardState != 0);
@@ -81,7 +81,7 @@
return;
}
- BattlePassManager.Instance.GetAllAward(battlePassData, BattlePassManager.WeekBattlePassType, (int)battlePassData.value1);
+ BattlePassManager.Instance.GetAllAward(battlePassData, (int)BattlePassType.Week, (int)battlePassData.value1);
}
}
diff --git a/Main/System/DayMission/WeekBattlePassWin.cs b/Main/System/DayMission/WeekBattlePassWin.cs
index cd581f3..d654365 100644
--- a/Main/System/DayMission/WeekBattlePassWin.cs
+++ b/Main/System/DayMission/WeekBattlePassWin.cs
@@ -20,12 +20,12 @@
{
buyBtn.AddListener(() =>
{
- RechargeManager.Instance.CTG(BattlePassManager.Instance.GetCTGIDByType(BattlePassManager.WeekBattlePassType));
+ RechargeManager.Instance.CTG(BattlePassManager.Instance.GetCTGIDByType((int)BattlePassType.Week));
});
}
protected override void OnPreOpen()
{
- battlePassData = BattlePassManager.Instance.GetBattlePassData(BattlePassManager.WeekBattlePassType);
+ battlePassData = BattlePassManager.Instance.GetBattlePassData((int)BattlePassType.Week);
if (battlePassData == null) return;
scroller.OnRefreshCell += OnRefreshCell;
GlobalTimeEvent.Instance.secondEvent += OnSecondEvent;
@@ -60,7 +60,7 @@
void BattlePassDataUpdateEvent(int type)
{
- if (type == BattlePassManager.WeekBattlePassType)
+ if (type == (int)BattlePassType.Week)
{
Display();
}
@@ -75,7 +75,7 @@
if (battlePassData.isActivite == 0)
{
- var ctgID = BattlePassManager.Instance.GetCTGIDByType(BattlePassManager.WeekBattlePassType);
+ var ctgID = BattlePassManager.Instance.GetCTGIDByType((int)BattlePassType.Week);
RechargeManager.Instance.TryGetOrderInfo(ctgID, out var orderInfoConfig);
buyText.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
buyBtn.SetInteractable(true);
@@ -91,7 +91,7 @@
void CreateScroller()
{
scroller.Refresh();
- var values = ZhanlingConfig.GetTypeToIDDict(BattlePassManager.WeekBattlePassType).Values.ToList();
+ var values = ZhanlingConfig.GetTypeToIDDict((int)BattlePassType.Week).Values.ToList();
values.Sort();
for (int i = 0; i < values.Count; i++)
{
@@ -99,7 +99,7 @@
}
scroller.Restart();
- scroller.JumpIndex(BattlePassManager.Instance.JumpIndex(battlePassData, BattlePassManager.WeekBattlePassType, (int)battlePassData.value1));
+ scroller.JumpIndex(BattlePassManager.Instance.JumpIndex(battlePassData, (int)BattlePassType.Week, (int)battlePassData.value1));
}
diff --git a/Main/System/Equip/EquipExchangeCell.cs b/Main/System/Equip/EquipExchangeCell.cs
index 28fdc6e..3aa1f27 100644
--- a/Main/System/Equip/EquipExchangeCell.cs
+++ b/Main/System/Equip/EquipExchangeCell.cs
@@ -89,10 +89,23 @@
{
equipedText.SetActive(false);
fightPowerGO.SetActive(true);
- decomposeObject.SetActive(true);
btnsGO.SetActive(true);
decomposeCheck.isOn = isToggle;
+ if (oldEquip == null)
+ {
+ decomposeObject.SetActive(false);
+ exchangeButton.SetActive(false);
+ putonButton.SetActive(true);
+ }
+ else
+ {
+ decomposeObject.SetActive(true);
+ exchangeButton.SetActive(true);
+ putonButton.SetActive(false);
+ }
+
+
long showFightPower = FightPowerManager.Instance.GetFightPowerChange(EquipModel.Instance.selectFloorEquip);
if (showFightPower < 0)
diff --git a/Main/System/Equip/EquipModel.cs b/Main/System/Equip/EquipModel.cs
index 8828597..4b8f35d 100644
--- a/Main/System/Equip/EquipModel.cs
+++ b/Main/System/Equip/EquipModel.cs
@@ -11,7 +11,7 @@
public const int TotleEquip = 12; //瑁呭鏍忓ぇ灏�
public bool waitEquipOPPack = false; // 绌挎埓瑁呭鐨勬搷浣� 涓嶅惈鍒嗚В
public event Action<bool, int> OnEquipOPResultAction; //鏄惁鎹笂浜嗘柊瑁呭涓斿垎瑙d簡 瑁呭绱㈠紩
- public event Action<List<int>, RectTransform> OnItemDropEvent;
+ public event Action<BattleDrops> OnItemDropEvent;
//鐢ㄤ簬椋樺姩閫昏緫
// public Dictionary<int, EquipOnFloorInfo> equipFloorInfo = new Dictionary<int, EquipOnFloorInfo>(); //鐪熷疄鑳屽寘鐨勭储寮曪紝瀵瑰簲鍦版澘瑁呭鐨勪俊鎭�
@@ -98,9 +98,9 @@
if (!string.IsNullOrEmpty(guid))
return;
- lastDropIndexs = drops.dropItemPackIndex;
+ // lastDropIndexs = drops.dropItemPackIndex;
// Debug.Log("-鎺夎惤瑁呭 " + lastDropIndexs.Count + " 涓�" + JsonMapper.ToJson(lastDropIndexs));
- NotifyItemDrop(drops.dropItemPackIndex, drops.rectTransform);
+ NotifyItemDrop(drops);
action?.Invoke();
}
@@ -140,7 +140,7 @@
//鎺夎惤閫氱煡
- public void NotifyItemDrop(List<int> indexs, RectTransform rect)
+ public void NotifyItemDrop(BattleDrops drops)//(List<int> indexs, RectTransform rect)
{
// 鐣岄潰涓嶆樉绀哄垯绔嬪嵆澶勭悊
// if (!UIManager.Instance.IsOpened<HomeWin>())
@@ -154,7 +154,7 @@
// {
// OnItemDropEvent?.Invoke(indexs, rect);
// }
- OnItemDropEvent?.Invoke(indexs, rect);
+ OnItemDropEvent?.Invoke(drops);
}
public void CalcFloorEquip(int itemIndex)
diff --git a/Main/System/Equip/ItemsOnFloor.cs b/Main/System/Equip/ItemsOnFloor.cs
index 2cafd37..038d2d8 100644
--- a/Main/System/Equip/ItemsOnFloor.cs
+++ b/Main/System/Equip/ItemsOnFloor.cs
@@ -12,7 +12,7 @@
[SerializeField] FloorItemCell floorItemCell; //闈炶澶囨樉绀虹粍浠�
[SerializeField] MoneyMoveByPath moneyMoveByPathCell; //鎺夎惤鐗╅噾閽�
[SerializeField] RectTransform defaultDropRect; //榛樿鎺夎惤浣嶇疆
-
+ [SerializeField] Text[] expTexts;
FloorItemCell[] floorItemCells = new FloorItemCell[20]; //鍖呭惈闈炶澶囩殑鎴樺埄鍝佹帀钀�
MoneyMoveByPath[] moneyMoveByPathArr = new MoneyMoveByPath[20]; //鎺夎惤璐у竵锛岄噾閽憋紝缁忛獙绛�
@@ -48,6 +48,10 @@
Display(true, EquipModel.Instance.lastDropIndexs);
EquipModel.Instance.OnItemDropEvent += NotifyPlayItemDrop;
PackManager.Instance.DeleteItemEvent += DeleteDropItem;
+ for (int i = 0; i < expTexts.Length; i++)
+ {
+ expTexts[i].text = "";
+ }
}
@@ -59,11 +63,33 @@
}
- void NotifyPlayItemDrop(List<int> itemIndexs, RectTransform rect)
+ void NotifyPlayItemDrop(BattleDrops drops)
{
- Display(true, itemIndexs, rect);
+ if (drops.dropItemPackIndex.Count > 0)
+ {
+ Display(true, drops.dropItemPackIndex, drops.rectTransform);
+ }
+ DisplayExp(drops);
}
+ int expIndex = 0;
+ void DisplayExp(BattleDrops drops)
+ {
+ // startPos = new Vector2(transform.localPosition.x + UnityEngine.Random.Range(-30, 30), transform.localPosition.y + UnityEngine.Random.Range(50, 100));
+
+ if (drops.expDrops.Count > 0)
+ {
+ var nowIndex = expIndex;
+ expTexts[nowIndex].text = "E+" + (drops.expDrops[0].Exp + drops.expDrops[0].ExpPoint * Constants.ExpPointValue);
+ expTexts[nowIndex].transform.position = drops.rectTransform.position;
+ expTexts[nowIndex].transform.DOLocalMove(expTexts[nowIndex].transform.localPosition + new Vector3(0, 20, 0), 1f).SetEase(Ease.InOutSine).onComplete = () =>
+ {
+ expTexts[nowIndex].text = "";
+ };
+
+ expIndex = (expIndex + 1) % 6;
+ }
+ }
void DeleteDropItem(PackType packType, string guid, int itemID, int index, int clearType)
{
diff --git a/Main/System/FirstCharge/FirstChargeManager.cs b/Main/System/FirstCharge/FirstChargeManager.cs
index 629108f..3a5d7cd 100644
--- a/Main/System/FirstCharge/FirstChargeManager.cs
+++ b/Main/System/FirstCharge/FirstChargeManager.cs
@@ -123,6 +123,21 @@
return firstChargeInfoDict.TryGetValue(firstId, out firstChargeData);
}
+ //鎵�鏈夌殑鎴樻枟姝讳骸寮归鍏咃紝缃《鍦ㄦ垬鏂楀け璐ョ晫闈笂鍗冲彲锛岃嫢棣栧厖鍏呭畬鍒欐棤椤诲搷搴�,涓嶄細姝讳骸鐨勪笉闇�瑕�
+ public void TryPopWin(string battleName)
+ {
+ if (battleName == null || battleName == string.Empty)
+ return;
+ if (battleName == "TianziBillboradBattleField")
+ return;
+ if (!TryGetUnBuyFirstId(out int firstId))
+ return;
+ if (!UIManager.Instance.IsOpened<FirstChargeWin>())
+ {
+ UIManager.Instance.OpenWindow<FirstChargeWin>();
+ }
+ }
+
public bool TryGetUnBuyFirstId(out int firstId)
{
firstId = 0;
diff --git a/Main/System/FirstCharge/FirstChargeWin.cs b/Main/System/FirstCharge/FirstChargeWin.cs
index 1e88509..a5daae2 100644
--- a/Main/System/FirstCharge/FirstChargeWin.cs
+++ b/Main/System/FirstCharge/FirstChargeWin.cs
@@ -29,7 +29,6 @@
[Header("璐拱鍜岄鍙�")]
[SerializeField] ImageEx imgHave;
- [SerializeField] ImageEx imgNoHave;
[SerializeField] ImageEx imgRed;
[SerializeField] TextEx txtHave;
[SerializeField] ButtonEx btnHave;
@@ -287,8 +286,7 @@
int awardState = firstChargeData.GetHaveState(day);
bool isAllHave = firstChargeData.IsAllHave();
btnHave.interactable = awardState == 2;
- imgNoHave.SetActive(awardState != 2);
- imgHave.SetActive(awardState == 2);
+ imgHave.gray = awardState != 2;
imgRed.SetActive(awardState == 2);
if (awardState == 2)
{
diff --git a/Main/System/HeroUI/HeroFormationCell.cs b/Main/System/HeroUI/HeroFormationCell.cs
index 7a24f3c..2ab74ca 100644
--- a/Main/System/HeroUI/HeroFormationCell.cs
+++ b/Main/System/HeroUI/HeroFormationCell.cs
@@ -63,7 +63,7 @@
string lineText = string.Empty;
bool isActive = sameCountry && count <= result.y;
string countStr = isActive ? UIHelper.AppendColor(TextColType.Green, count.ToString()) : count.ToString();
- lineText = (k == 0 ? "" : "</r>") + Language.Get("herocard37", countStr, HeroUIManager.Instance.GetJobName(index + 1));
+ lineText = (k == 0 ? "" : "</r>") + Language.Get("herocard37", countStr, HeroUIManager.Instance.GetCountryName(index + 1));
var attrConfig = attrDict[count];
for (int i = 0; i < attrConfig.AttrIDList.Length; i++)
{
diff --git a/Main/System/HeroUI/HeroUIManager.OnTeam.cs b/Main/System/HeroUI/HeroUIManager.OnTeam.cs
index 73d39ac..7efa4f4 100644
--- a/Main/System/HeroUI/HeroUIManager.OnTeam.cs
+++ b/Main/System/HeroUI/HeroUIManager.OnTeam.cs
@@ -320,9 +320,6 @@
return selectHeroList;
}
- //锛侊紒锛佹柊鎺掑簭瑙勫垯
- //鑻ュ湪鏂版墜寮曞锛堝紩瀵糏D锛変腑锛屽鏋�5鍙蜂綅涓虹┖锛屽垯浼樺厛鏀剧疆5鍙蜂綅
- //鎸夋垬鍔涙帓搴�
int CmpHeroRecommend(string guidA, string guidB)
{
HeroInfo heroA = HeroManager.Instance.GetHero(guidA);
@@ -333,30 +330,29 @@
}
// // 鎺掑簭瑙勫垯锛氭灏嗙瓑绾э紴绐佺牬绛夌骇锛炴灏嗚閱掗樁绾э紴姝﹀皢鍝佽川锛炴灏嗗悶鍣槦绾э紴姝﹀皢ID
- // if (heroA.heroLevel != heroB.heroLevel)
- // {
- // return heroA.heroLevel > heroB.heroLevel ? -1 : 1;
- // }
- // if (heroA.breakLevel != heroB.breakLevel)
- // {
- // return heroA.breakLevel > heroB.breakLevel ? -1 : 1;
- // }
- // if (heroA.awakeLevel != heroB.awakeLevel)
- // {
- // return heroA.awakeLevel > heroB.awakeLevel ? -1 : 1;
- // }
- // if (heroA.Quality != heroB.Quality)
- // {
- // return heroA.Quality > heroB.Quality ? -1 : 1;
- // }
- // if (heroA.heroStar != heroB.heroStar)
- // {
- // return heroA.heroStar > heroB.heroStar ? -1 : 1;
- // }
+ if (heroA.heroLevel != heroB.heroLevel)
+ {
+ return heroA.heroLevel > heroB.heroLevel ? -1 : 1;
+ }
+ if (heroA.breakLevel != heroB.breakLevel)
+ {
+ return heroA.breakLevel > heroB.breakLevel ? -1 : 1;
+ }
+ if (heroA.awakeLevel != heroB.awakeLevel)
+ {
+ return heroA.awakeLevel > heroB.awakeLevel ? -1 : 1;
+ }
+ if (heroA.Quality != heroB.Quality)
+ {
+ return heroA.Quality > heroB.Quality ? -1 : 1;
+ }
+ if (heroA.heroStar != heroB.heroStar)
+ {
+ return heroA.heroStar > heroB.heroStar ? -1 : 1;
+ }
+ return heroA.heroId.CompareTo(heroB.heroId);
-
- return heroB.CalculateFightPower(false).CompareTo(heroA.CalculateFightPower(false));
}
int CmpByJob(string guidA, string guidB)
diff --git a/Main/System/Main/HomeWin.cs b/Main/System/Main/HomeWin.cs
index fdac2ad..95fce4a 100644
--- a/Main/System/Main/HomeWin.cs
+++ b/Main/System/Main/HomeWin.cs
@@ -14,6 +14,7 @@
[SerializeField] Text playerLevelText;
[SerializeField] SmoothSlider expSlider;
[SerializeField] Button officialUpBtn;
+ [SerializeField] Transform officialTip;
//浠诲姟鍖�
[SerializeField] Button taskButton; //寮曞鎴栬�呴鍙栦换鍔″鍔�
@@ -132,6 +133,7 @@
DisplayRestState();
funcColBtn.SetActive(FuncOpen.Instance.IsFuncOpen(GeneralDefine.mainRightFuncOpenFuncID));
+ officialTip.SetActive(OfficialRankManager.Instance.CanOfficialLVUP());
}
protected override void OnPreOpen()
@@ -147,6 +149,7 @@
FirstChargeManager.Instance.OnUpdateFirstChargeInfo += OnUpdateFirstChargeInfo;
GlobalTimeEvent.Instance.secondEvent += OnSecondEvent;
HeroUIManager.Instance.OnUnLockHeroCountEvent += OnUnLockHeroCountEvent;
+ OfficialRankManager.Instance.OnOfficialCanLVUpEvent += OnOfficialCanLVUpEvent;
Display();
DisplayFirstChargeBtn();
@@ -169,9 +172,15 @@
FirstChargeManager.Instance.OnUpdateFirstChargeInfo -= OnUpdateFirstChargeInfo;
GlobalTimeEvent.Instance.secondEvent -= OnSecondEvent;
HeroUIManager.Instance.OnUnLockHeroCountEvent -= OnUnLockHeroCountEvent;
+ OfficialRankManager.Instance.OnOfficialCanLVUpEvent -= OnOfficialCanLVUpEvent;
// 鍏抽棴鐨勬椂鍊欐妸鎴樻枟鐣岄潰涔熺粰鍏充簡 铏界劧鏄湪澶栭潰寮�鐨�
UIManager.Instance.CloseWindow<BattleWin>();
+ }
+
+ void OnOfficialCanLVUpEvent()
+ {
+ officialTip.SetActive(OfficialRankManager.Instance.CanOfficialLVUP());
}
private void OnClickEnterBoss()
@@ -208,6 +217,10 @@
case PlayerDataType.ExAttr1:
case PlayerDataType.ExAttr2:
DisplayLevel();
+ break;
+
+ case PlayerDataType.RealmLevel:
+ OnOfficialCanLVUpEvent();
break;
}
@@ -270,6 +283,11 @@
{
taskButton.SetActive(true);
var taskConfig = TaskConfig.Get(task.TaskID);
+ if (taskConfig == null)
+ {
+ Debug.LogError("鎵句笉鍒颁换鍔� " + task.TaskID);
+ return;
+ }
taskText.text = taskConfig.TaskDescribe;
taskNumText.text = string.Format("({0}/{1})", task.CurValue, taskConfig.NeedValue);
taskNumText.color = task.CurValue >= taskConfig.NeedValue ? UIHelper.GetUIColor(TextColType.NavyYellow) : UIHelper.GetUIColor(TextColType.Red);
diff --git a/Main/System/Main/RightFuncInHome.cs b/Main/System/Main/RightFuncInHome.cs
index 57c9b5b..9c5ec85 100644
--- a/Main/System/Main/RightFuncInHome.cs
+++ b/Main/System/Main/RightFuncInHome.cs
@@ -14,8 +14,11 @@
[SerializeField] Button storeBtn;
[SerializeField] Button monthCardBtn;
[SerializeField] Button dayMissionBtn;
+ [SerializeField] Button battlePassBtn;
+ [SerializeField] Button llmjBtn; //鍘嗙粌绉樼瑘
+ [SerializeField] Button signBtn;
- string listenWindowName = ""; //鐩戝惉鍏抽棴鏃跺啀鏄剧ず
+ static string listenWindowName = ""; //鐩戝惉鍏抽棴鏃跺啀鏄剧ず
bool isShow = false;
void Awake()
@@ -55,12 +58,37 @@
ListenWindow("DayMissionBaseWin");
UIManager.Instance.OpenWindow<DayMissionBaseWin>();
});
+
+ battlePassBtn.AddListener(() =>
+ {
+ //鐢ㄤ簬鐩戝惉鐣岄潰锛屾墦寮�鏃剁缉杩涘彸杈瑰姛鑳芥爮锛屽叧闂椂鏄剧ず
+ ListenWindow("BattlePassBaseWin");
+ UIManager.Instance.OpenWindow<BattlePassBaseWin>();
+ });
+
+ llmjBtn.AddListener(() =>
+ {
+ //鐢ㄤ簬鐩戝惉鐣岄潰锛屾墦寮�鏃剁缉杩涘彸杈瑰姛鑳芥爮锛屽叧闂椂鏄剧ず
+ ListenWindow("ExpSecretCollectionWin");
+ UIManager.Instance.OpenWindow<ExpSecretCollectionWin>();
+ });
+
+ signBtn.AddListener(() =>
+ {
+ //鐢ㄤ簬鐩戝惉鐣岄潰锛屾墦寮�鏃剁缉杩涘彸杈瑰姛鑳芥爮锛屽叧闂椂鏄剧ず
+ ListenWindow("SignWin");
+ UIManager.Instance.OpenWindow<SignWin>();
+ });
}
void ShowBtns()
{
storeBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store));
dayMissionBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.DayMission));
+ battlePassBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BattlePass));
+ llmjBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.LLMJ));
+ signBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.DaySign));
+ // monthCardBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.MonthCard));
}
@@ -91,5 +119,10 @@
listenWindowName = _listenWindowName;
}
+ public static void RemoveListenWindow()
+ {
+ listenWindowName = "";
+ }
+
}
diff --git a/Main/System/Message/RichTableEvent.cs b/Main/System/Message/RichTableEvent.cs
index c298614..b43baf6 100644
--- a/Main/System/Message/RichTableEvent.cs
+++ b/Main/System/Message/RichTableEvent.cs
@@ -224,19 +224,19 @@
// }
}
break;
- case "success":
- {
- var _id = 0;
- if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
- {
- var _cfg = SuccessConfig.Get(_id);
- if (_cfg != null)
- {
- return _cfg.Describe;
- }
- }
- }
- break;
+ // case "success":
+ // {
+ // var _id = 0;
+ // if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
+ // {
+ // var _cfg = SuccessConfig.Get(_id);
+ // if (_cfg != null)
+ // {
+ // return _cfg.Describe;
+ // }
+ // }
+ // }
+ // break;
case "treasureprivilege":
{
diff --git a/Main/System/NewBieGuidance/NewBieCenter.cs b/Main/System/NewBieGuidance/NewBieCenter.cs
index 2a45893..4344ee0 100644
--- a/Main/System/NewBieGuidance/NewBieCenter.cs
+++ b/Main/System/NewBieGuidance/NewBieCenter.cs
@@ -49,6 +49,7 @@
PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefresh;
UIManager.Instance.OnOpenWindow += OnOpenWindow;
UIManager.Instance.OnCloseWindow += OnCloseWindow;
+ OfficialRankManager.Instance.OnOfficialCanLVUpEvent += OnOfficialCanLVUpEvent;
}
public override void Release()
@@ -59,6 +60,16 @@
PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefresh;
UIManager.Instance.OnOpenWindow -= OnOpenWindow;
UIManager.Instance.OnCloseWindow -= OnCloseWindow;
+ OfficialRankManager.Instance.OnOfficialCanLVUpEvent -= OnOfficialCanLVUpEvent;
+ }
+
+ void OnOfficialCanLVUpEvent()
+ {
+ var guides = GuideConfig.GetGuideListByType((int)GuideTriggerType.Realm);
+ if (guides != null)
+ {
+ TryStartNewBieGuides(guides, true);
+ }
}
void OnOpenWindow(UIBase _ui)
@@ -183,8 +194,9 @@
return false;
}
- if (currentGuide != 0)
+ if (currentGuide != 0 && GuideConfig.Get(currentGuide).NoRecord == 0)
{
+ // 鍙噸澶嶈Е鍙戠殑寮曞灞炰簬浣庝紭鍏堢骇 浼氳鏂板紩瀵兼浛鎹�
return false;
}
@@ -238,6 +250,8 @@
Debug.LogError("璇锋鏌ュ紩瀵糹d = 0 鐨勬儏鍐�");
return false;
}
+
+ _id = ReplaceGuideID(_id);
var config = GuideConfig.Get(_id);
if (config == null)
@@ -437,6 +451,8 @@
return FuncOpen.Instance.IsFuncOpen(config.Condition);
case GuideTriggerType.Level:
return PlayerDatas.Instance.baseData.LV >= config.Condition;
+ case GuideTriggerType.Realm:
+ return PlayerDatas.Instance.baseData.realmLevel >= config.Condition && OfficialRankManager.Instance.CanOfficialLVUP();
case GuideTriggerType.OpenWindow:
return UIManager.Instance.IsOpened(config.WinName);
case GuideTriggerType.MainLineQuestCanDo:
@@ -511,7 +527,16 @@
}
}
+ //鍔ㄦ�佸彉鍖栧紩瀵�
+ public int ReplaceGuideID(int id)
+ {
+ if (id == BattleManager.Instance.challengeBossGuides[0] && MainLevelManager.Instance.CanChallengeBoss())
+ {
+ return BattleManager.Instance.challengeBossGuides[1];
+ }
+ return id;
+ }
}
@@ -524,5 +549,6 @@
MissionClick = 4, //鐐瑰嚮浠诲姟鎸変换鍔$被鍨嬪紩瀵�
OpenWindow = 5, //鎵撳紑鐣岄潰鐨勬椂鏈� 濡傝澶囨浛鎹㈢晫闈�
Level = 6, //绛夌骇婊¤冻鏉′欢
+ Realm = 7, //瀹樿亴鎵�鏈変换鍔″畬鎴愭椂瑙﹀彂寮曞锛屽6鍗�7锛�6鐨勪换鍔″叏閮ㄥ畬鎴愶紝閰嶇疆6
}
\ No newline at end of file
diff --git a/Main/System/OfficialRank/OfficialRankManager.cs b/Main/System/OfficialRank/OfficialRankManager.cs
index 08dbf62..3ea8869 100644
--- a/Main/System/OfficialRank/OfficialRankManager.cs
+++ b/Main/System/OfficialRank/OfficialRankManager.cs
@@ -13,8 +13,12 @@
int taskAwardState;
Dictionary<int, int> taskValues = new Dictionary<int, int>();
public event Action RealmMissionRefreshEvent;
+ public event Action OnOfficialCanLVUpEvent; //妫�娴嬪埌鍙互鍗囧畼鑱�
public Dictionary<int, int> mainLevelDict = new Dictionary<int, int>(); //id锛氱储寮� 鐢ㄤ簬鍒ゆ柇杩橀渶澶氬皯鍏�
+
+ public Dictionary<int, int> guideDict = new Dictionary<int, int>();
+
public override void Init()
{
PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefresh;
@@ -26,9 +30,11 @@
var levelList = MainLevelConfig.GetKeys().ToList();
levelList.Sort();
for (int i = 0; i < levelList.Count; i++)
- {
+ {
mainLevelDict[levelList[i]] = i;
}
+
+ ParseConfig();
}
public override void Release()
@@ -43,6 +49,13 @@
{
taskValues.Clear();
taskAwardState = 0;
+ }
+
+ void ParseConfig()
+ {
+ var config = FuncConfigConfig.Get("Official");
+ guideDict = ConfigParse.ParseIntDict(config.Numerical1);
+
}
@@ -97,10 +110,8 @@
return PlayerDatas.Instance.baseData.ExAttr1 / 100 > config.NeedValueList[0] ? 1 : 0;
case 3:
return taskValues.ContainsKey(missionID) && taskValues[missionID] >= config.NeedValueList[0] ? 1 : 0;
-
case 4:
return BlessLVManager.Instance.m_TreeLV >= config.NeedValueList[0] ? 1 : 0;
-
default:
return 0;
}
@@ -191,12 +202,28 @@
finish = false;
}
}
-
+
if (finish)
redpoint.state = RedPointState.Simple;
+
+ CanOfficialLVUP(true);
}
+ public bool CanOfficialLVUP(bool notifyEvent = false)
+ {
+ //鍙浠诲姟瀹屾垚鍗冲彲
+ var ids = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel);
+ foreach (var id in ids)
+ {
+ if (GetMissionState(PlayerDatas.Instance.baseData.realmLevel, id) == 0)
+ return false;
+ }
+
+ if (notifyEvent)
+ OnOfficialCanLVUpEvent?.Invoke();
+ return true;
+ }
public Color GetOfficialRankColor(int quality)
diff --git a/Main/System/OfficialRank/OfficialUpCell.cs b/Main/System/OfficialRank/OfficialUpCell.cs
index c25f777..f94e2c4 100644
--- a/Main/System/OfficialRank/OfficialUpCell.cs
+++ b/Main/System/OfficialRank/OfficialUpCell.cs
@@ -32,12 +32,13 @@
getAwardImg.SetActive(state == 1);
getAwardEffect.SetActive(state == 1);
bgImg.SetSprite(state == 0 ? "OfficialMissionBG0" : "OfficialMissionBG1");
- switch (config.TaskType)
+ var type = config.TaskType;
+ switch (type)
{
case 1:
case 3:
case 4:
- taskName.text = Language.Get("OfficialMission" + config.TaskType, config.NeedValueList[0]);
+ taskName.text = Language.Get("OfficialMission" + type, config.NeedValueList[0]);
break;
case 2:
var mainLVConfig = MainLevelConfig.Get(config.NeedValueList[0]);
@@ -53,13 +54,34 @@
taskReward.Init(new ItemCellModel(itemID, false, config.AwardItemList[0][1]));
taskReward.button.AddListener(() =>
{
- ItemTipUtility.Show(itemID);
+ if (state == 0)
+ {
+ UIManager.Instance.CloseWindow<OfficialUpWin>();
+ NewBieCenter.Instance.StartNewBieGuide(OfficialRankManager.Instance.guideDict[type]);
+ return;
+ }
+ else if (state == 2)
+ {
+ ItemTipUtility.Show(itemID);
+ return;
+ }
+
+ OfficialRankManager.Instance.RequestAllAwards(id);
+
});
getBtn.AddListener(() =>
{
- if (state != 1)
+ if (state == 0)
+ {
+ UIManager.Instance.CloseWindow<OfficialUpWin>();
+ NewBieCenter.Instance.StartNewBieGuide(OfficialRankManager.Instance.guideDict[type]);
return;
+ }
+ else if (state == 2)
+ {
+ return;
+ }
OfficialRankManager.Instance.RequestAllAwards(id);
});
diff --git a/Main/System/OfficialRank/OfficialUpWin.cs b/Main/System/OfficialRank/OfficialUpWin.cs
index cbf9e0e..478c217 100644
--- a/Main/System/OfficialRank/OfficialUpWin.cs
+++ b/Main/System/OfficialRank/OfficialUpWin.cs
@@ -15,6 +15,7 @@
[SerializeField] Image officialIcon;
[SerializeField] Image officialNextIcon;
[SerializeField] Button closeBtn;
+ [SerializeField] Text addLVText;
[SerializeField] PositionTween[] paopaoArr;
[SerializeField] Text[] paopaoTextArrName;
[SerializeField] Text[] paopaoTextArrValue;
@@ -61,9 +62,14 @@
for (int i = 0; i < paopaoArr.Length; i++)
{
paopaoArr[i].Play();
- paopaoTextArrName[i].text = PlayerPropertyConfig.Get(nextConfig.AddAttrType[i]).Name;
- paopaoTextArrValue[i].text = "+" + PlayerPropertyConfig.GetValueDescription(nextConfig.AddAttrType[i], nextConfig.AddAttrNum[i]);
+ if (i < nextConfig.AddAttrType.Length)
+ {
+ paopaoTextArrName[i].text = PlayerPropertyConfig.Get(nextConfig.AddAttrType[i]).Name;
+ paopaoTextArrValue[i].text = "+" + PlayerPropertyConfig.GetValueDescription(nextConfig.AddAttrType[i], nextConfig.AddAttrNum[i]);
+ }
}
+
+ addLVText.text = "+" + (nextConfig.LVMax - config.LVMax);
RefreshBtn();
}
@@ -81,20 +87,31 @@
}
}
- //鎵�鏈夋场娉¢鍚戞寜閽�
- for (int i = 0; i < paopaoArr.Length; i++)
- {
- paopaoArr[i].Stop();
- paopaoArr[i].transform.DOLocalMove(lvUpBtn.transform.localPosition, 0.4f);
- }
- effectPlayer.Play();
-
upEffect.onComplete = () =>
{
CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp();
GameNetSystem.Instance.SendInfo(pak);
};
- upEffect.Play();
+
+ effectPlayer.onComplete = () =>
+ {
+ upEffect.Play();
+ };
+
+ //鎵�鏈夋场娉¢鍚戞寜閽�
+ for (int i = 0; i < paopaoArr.Length; i++)
+ {
+ int index = i;
+ paopaoArr[i].Stop();
+ paopaoArr[i].transform.DOLocalMove(lvUpBtn.transform.localPosition, 0.3f).onComplete = () =>
+ {
+ if (index == 0)
+ {
+ effectPlayer.Play();
+ }
+ };
+ }
+
}
diff --git a/Main/System/PhantasmPavilion/AvatarCell.cs b/Main/System/PhantasmPavilion/AvatarCell.cs
index 1fbeaf1..4a73a2c 100644
--- a/Main/System/PhantasmPavilion/AvatarCell.cs
+++ b/Main/System/PhantasmPavilion/AvatarCell.cs
@@ -30,7 +30,7 @@
{
if (m_AvatarImage == null)
{
- m_AvatarImage = this.GetComponent<ImageEx>("AvatarCell/Img_Avatar");
+ m_AvatarImage = this.GetComponent<ImageEx>("AvatarCell/Img_BG/Img_AvatarFrame/GameObject/Img_Avatar");
}
return m_AvatarImage;
}
@@ -43,7 +43,7 @@
{
if (m_AvatarFrameImage == null)
{
- m_AvatarFrameImage = this.GetComponent<ImageEx>("AvatarCell/Img_AvatarFrame");
+ m_AvatarFrameImage = this.GetComponent<ImageEx>("AvatarCell/Img_BG/Img_AvatarFrame");
}
return m_AvatarFrameImage;
}
@@ -56,7 +56,7 @@
{
if (m_button == null)
{
- m_button = this.GetComponent<ButtonEx>("AvatarCell/Img_AvatarFrame");
+ m_button = this.GetComponent<ButtonEx>("AvatarCell/Img_BG");
}
return m_button;
}
@@ -69,7 +69,7 @@
{
if (m_AvatarUIFrame == null)
{
- m_AvatarUIFrame = this.GetComponent<UIFrame>("AvatarCell/Img_Avatar");
+ m_AvatarUIFrame = this.GetComponent<UIFrame>("AvatarCell/Img_BG/Img_AvatarFrame/GameObject/Img_Avatar");
}
return m_AvatarUIFrame;
}
@@ -82,7 +82,7 @@
{
if (m_AvatarFrameUIFrame == null)
{
- m_AvatarFrameUIFrame = this.GetComponent<UIFrame>("AvatarCell/Img_AvatarFrame");
+ m_AvatarFrameUIFrame = this.GetComponent<UIFrame>("AvatarCell/Img_BG/Img_AvatarFrame");
}
return m_AvatarFrameUIFrame;
}
@@ -95,7 +95,7 @@
{
if (m_AvatarUIEffect == null)
{
- m_AvatarUIEffect = this.GetComponent<UIEffectPlayer>("AvatarCell/Img_Avatar");
+ m_AvatarUIEffect = this.GetComponent<UIEffectPlayer>("AvatarCell/Img_BG/Img_AvatarFrame/GameObject/Img_Avatar");
}
return m_AvatarUIEffect;
}
@@ -108,7 +108,7 @@
{
if (m_AvatarFrameUIEffect == null)
{
- m_AvatarFrameUIEffect = this.GetComponent<UIEffectPlayer>("AvatarCell/Img_AvatarFrame");
+ m_AvatarFrameUIEffect = this.GetComponent<UIEffectPlayer>("AvatarCell/Img_BG/Img_AvatarFrame");
}
return m_AvatarFrameUIEffect;
}
diff --git a/Main/System/Recharge/DailySpecialsModel.cs b/Main/System/Recharge/DailySpecialsModel.cs
index 6979152..c305233 100644
--- a/Main/System/Recharge/DailySpecialsModel.cs
+++ b/Main/System/Recharge/DailySpecialsModel.cs
@@ -4,7 +4,7 @@
using LitJson;
using System;
-
+//姣忔棩鐗规儬
public class DailySpecialsModel : GameSystemManager<DailySpecialsModel>
{
public uint PackBuyTime; // 鎵撳寘璐拱鐨勬椂闂存埑锛屽鏋滄湁璇ュ�硷紝浠h〃宸茬粡涓�娆℃�ф墦鍖呰喘涔颁簡锛屽彲鏍规嵁娆℃椂闂存埑绠楀嚭褰撳墠鏄鍑犲ぉ
diff --git a/Main/System/Recharge/ExpSecretCollectionCell.cs b/Main/System/Recharge/ExpSecretCollectionCell.cs
new file mode 100644
index 0000000..d82cffb
--- /dev/null
+++ b/Main/System/Recharge/ExpSecretCollectionCell.cs
@@ -0,0 +1,67 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class ExpSecretCollectionCell : CellView
+{
+
+ [SerializeField] Text lvText;
+ [SerializeField] Image targetBGImg;
+ [SerializeField] Transform upProcessBG;
+ [SerializeField] Transform upProcessImg;
+ [SerializeField] Transform downProcessBG;
+ [SerializeField] Transform downProcessImg;
+ [SerializeField] Transform unlockRect1;
+ [SerializeField] Transform unlockRect2;
+ [SerializeField] Text unlockValueText;
+ [SerializeField] Text addExpPerText;
+ [SerializeField] Text addMoneyPerText;
+ [SerializeField] Transform mask;
+ [SerializeField] Transform canActiveRect;
+ [SerializeField] Transform activeRect;
+ [SerializeField] Button avtiveBtn;
+
+
+
+ public void Display(int id)
+ {
+ var config = LLMJConfig.Get(id);
+ var lv = config.MJLV;
+ lvText.text = Language.Get("Arena22", lv);
+ targetBGImg.SetOrgSprite(lv <= ExpSecretCollectionManager.Instance.m_MJLV ? "ExpSecret_img_43" : "ExpSecret_img_41", "LLMJ");
+
+ var ids = LLMJConfig.GetKeys();
+ ids.Sort();
+ upProcessBG.SetActive(ids[0] != id);
+ upProcessImg.SetActive(ExpSecretCollectionManager.Instance.m_MJLV >= lv);
+
+ downProcessBG.SetActive(ids[ids.Count - 1] != id);
+ downProcessImg.SetActive(ExpSecretCollectionManager.Instance.m_MJLV > lv);
+
+ unlockRect1.SetActive(lv == 1);
+ unlockRect2.SetActive(lv != 1);
+
+ unlockValueText.text = config.CostWarhammer.ToString();
+ addExpPerText.text = Language.Get("LLMJ6", config.ExpAddPer);
+ addMoneyPerText.text = Language.Get("LLMJ7", config.DecomposeAddPer);
+ mask.SetActive(ExpSecretCollectionManager.Instance.m_MJLV < lv);
+ activeRect.SetActive(ExpSecretCollectionManager.Instance.m_MJLV == lv);
+ canActiveRect.SetActive(ExpSecretCollectionManager.Instance.m_MJLV != 0 &&
+ ExpSecretCollectionManager.Instance.m_MJLV + 1 == lv && ExpSecretCollectionManager.Instance.m_Zhanchui >= config.CostWarhammer);
+
+ avtiveBtn.AddListener(() =>
+ {
+ if (ExpSecretCollectionManager.Instance.m_MJLV != 0 &&
+ ExpSecretCollectionManager.Instance.m_MJLV + 1 == lv && ExpSecretCollectionManager.Instance.m_Zhanchui >= config.CostWarhammer)
+ {
+ var pack = new CA504_tagCMPlayerGetReward();
+ pack.RewardType = 2;
+ GameNetSystem.Instance.SendInfo(pack);
+ SysNotifyMgr.Instance.ShowTip("Success");
+ }
+ });
+ }
+
+}
\ No newline at end of file
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/Recharge/ExpSecretCollectionCell.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/Recharge/ExpSecretCollectionCell.cs.meta
index 9fd6048..8b12d71 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/Recharge/ExpSecretCollectionCell.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 01c0ae104c52aa9498987271cc2d2e7b
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/Recharge/ExpSecretCollectionManager.cs b/Main/System/Recharge/ExpSecretCollectionManager.cs
new file mode 100644
index 0000000..669eec8
--- /dev/null
+++ b/Main/System/Recharge/ExpSecretCollectionManager.cs
@@ -0,0 +1,65 @@
+锘縰sing System.Collections.Generic;
+using UnityEngine.UI;
+using System.Linq;
+using LitJson;
+using System;
+
+// 鍘嗙粌绉樼瑘
+public class ExpSecretCollectionManager : GameSystemManager<ExpSecretCollectionManager>
+{
+ public int ctgID;
+
+ public byte m_MJLV; // 绉樼瑘绛夌骇锛屾縺娲诲悗浠�1寮�濮�
+ public uint m_Zhanchui; // 绉樼瑘绱娑堣�楁垬閿�
+ public uint m_ExpEx; // 绉樼瑘浠婃棩宸查澶栬幏寰楃粡楠�
+ public uint m_DecomposeEx; // 绉樼瑘浠婃棩宸查澶栬幏寰楀垎瑙h揣甯�
+
+ public event Action UpdateExpSecretCollectionEvent;
+
+ public override void Init()
+ {
+ DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
+ var config = FuncConfigConfig.Get("LLMJ");
+ ctgID = int.Parse(config.Numerical1);
+ }
+
+ public override void Release()
+ {
+ DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize;
+ }
+
+ void OnBeforePlayerDataInitialize()
+ {
+ m_MJLV = 0;
+ m_Zhanchui = 0;
+ m_ExpEx = 0;
+ m_DecomposeEx = 0;
+ }
+
+ public void OnExpSecretCollection(HB128_tagSCLLMJInfo netPack)
+ {
+ m_MJLV = netPack.MJLV;
+ m_Zhanchui = netPack.Zhanchui;
+ m_ExpEx = netPack.ExpEx;
+ m_DecomposeEx = netPack.DecomposeEx;
+ UpdateExpSecretCollectionEvent?.Invoke();
+ UpdateRedpoint();
+ }
+
+ public Redpoint redPointLLMJ = new Redpoint(MainRedDot.RightFuncRedpoint, MainRedDot.RedPoint_LLMJKey);
+ void UpdateRedpoint()
+ {
+ if (m_MJLV == 0) return;
+ var nextConfig = LLMJConfig.Get(m_MJLV + 1);
+ if (nextConfig == null) return;
+ if (m_Zhanchui >= nextConfig.CostWarhammer)
+ {
+ redPointLLMJ.state = RedPointState.Simple;
+ }
+ else
+ {
+ redPointLLMJ.state = RedPointState.None;
+ }
+ }
+}
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/Recharge/ExpSecretCollectionManager.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/Recharge/ExpSecretCollectionManager.cs.meta
index 9fd6048..689bd8a 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/Recharge/ExpSecretCollectionManager.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 37633ce5681dc8540baa735cdc7b4c2d
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/Recharge/ExpSecretCollectionWin.cs b/Main/System/Recharge/ExpSecretCollectionWin.cs
new file mode 100644
index 0000000..963dfae
--- /dev/null
+++ b/Main/System/Recharge/ExpSecretCollectionWin.cs
@@ -0,0 +1,98 @@
+using System;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+//鍘嗙粌绉樼瑘
+public class ExpSecretCollectionWin : UIBase
+{
+ [SerializeField] Text costzcText;
+ [SerializeField] Text addExpText;
+ [SerializeField] Text addMoneyText;
+ [SerializeField] ScrollerController scroller;
+ [SerializeField] Button buyBtn;
+ [SerializeField] Text buyText;
+ [SerializeField] Transform buyYetRect;
+
+
+ protected override void InitComponent()
+ {
+ buyBtn.AddListener(() =>
+ {
+ RechargeManager.Instance.CTG(ExpSecretCollectionManager.Instance.ctgID);
+ });
+ }
+
+ protected override void OnPreOpen()
+ {
+
+ ExpSecretCollectionManager.Instance.UpdateExpSecretCollectionEvent += OnExpSecretCollectionEvent;
+ scroller.OnRefreshCell += OnRefreshCell;
+ CreateScroller();
+ Display();
+ }
+
+
+ protected override void OnPreClose()
+ {
+ ExpSecretCollectionManager.Instance.UpdateExpSecretCollectionEvent -= OnExpSecretCollectionEvent;
+ scroller.OnRefreshCell -= OnRefreshCell;
+ }
+
+ void CreateScroller()
+ {
+ scroller.Refresh();
+ var keys = LLMJConfig.GetKeys();
+ keys.Sort();
+ foreach (var key in keys)
+ {
+ scroller.AddCell(ScrollerDataType.Header, key);
+ }
+ scroller.Restart();
+ scroller.JumpIndex(ExpSecretCollectionManager.Instance.m_MJLV - 1);
+ }
+
+ void OnRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _cell = cell as ExpSecretCollectionCell;
+ _cell.Display(cell.index);
+ }
+
+ void OnExpSecretCollectionEvent()
+ {
+ Display();
+ }
+
+ void Display()
+ {
+ costzcText.text = ExpSecretCollectionManager.Instance.m_Zhanchui >= 1000000 ?
+ UIHelper.ReplaceLargeNum(ExpSecretCollectionManager.Instance.m_Zhanchui) :
+ ExpSecretCollectionManager.Instance.m_Zhanchui.ToString();
+
+ var config = LLMJConfig.Get(ExpSecretCollectionManager.Instance.m_MJLV);
+
+ if (ExpSecretCollectionManager.Instance.m_MJLV == 0)
+ {
+ addExpText.text = "0";
+ addMoneyText.text = "0";
+ }
+ else
+ {
+ addExpText.text = ExpSecretCollectionManager.Instance.m_ExpEx + "/" + config.ExpExUpper;
+ addMoneyText.text = ExpSecretCollectionManager.Instance.m_DecomposeEx + "/" + config.DecomposeExUpper;
+ }
+
+ buyBtn.SetActive(ExpSecretCollectionManager.Instance.m_MJLV == 0);
+ RechargeManager.Instance.TryGetOrderInfo(ExpSecretCollectionManager.Instance.ctgID, out var orderInfoConfig);
+ buyText.text = Language.Get("PayMoneyNum", orderInfoConfig.PayRMBNumOnSale);
+ buyYetRect.SetActive(ExpSecretCollectionManager.Instance.m_MJLV != 0);
+
+ scroller.m_Scorller.RefreshActiveCellViews();
+ }
+
+}
+
+
+
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/Recharge/ExpSecretCollectionWin.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/Recharge/ExpSecretCollectionWin.cs.meta
index 9fd6048..210d4dd 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/Recharge/ExpSecretCollectionWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 9b8d1a65440f5424daa7a543d9213479
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/Recharge/RechargeManager.cs b/Main/System/Recharge/RechargeManager.cs
index 5bf1598..20563eb 100644
--- a/Main/System/Recharge/RechargeManager.cs
+++ b/Main/System/Recharge/RechargeManager.cs
@@ -197,7 +197,7 @@
{
#endif
var ctg = CTGConfig.Get(configs[i].CTGID);
- var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(ctg.GainItemList);
+ var _itemArray = ctg.GainItemList;
if (_itemArray != null && _itemArray.Length > 0)
{
var _itemList = new List<Item>();
diff --git a/Main/System/Redpoint/MainRedDot.cs b/Main/System/Redpoint/MainRedDot.cs
index 53b63cd..73b5bdc 100644
--- a/Main/System/Redpoint/MainRedDot.cs
+++ b/Main/System/Redpoint/MainRedDot.cs
@@ -49,7 +49,18 @@
public const int RedPoint_WeekBPFuncKey = 1042; //鍛ㄥ鍔憋紙鎴樹护锛�
public const int RedPoint_MainMissionKey = 1043; //涓荤嚎浠诲姟濂栧姳锛堟垚灏憋級
+ //鍩洪噾锛堟垬浠わ級
+ public const int RedPoint_FundKey = 105;
+ public Redpoint redPointFund = new Redpoint(RightFuncRedpoint, RedPoint_FundKey);
+ //鍘嗙粌绉樼瑘
+ public const int RedPoint_LLMJKey = 106;
+
+ //绛惧埌
+ public const int RedPoint_SignKey = 107;
+
+
+
//姝﹀皢鍗�
public const int HeroCardRedpoint = 200;
public Redpoint HeroListRedpoint = new Redpoint(MainHerosRedpoint, HeroCardRedpoint);
diff --git a/Main/System/Redpoint/RedpointCenter.cs b/Main/System/Redpoint/RedpointCenter.cs
index c0a7f71..9447982 100644
--- a/Main/System/Redpoint/RedpointCenter.cs
+++ b/Main/System/Redpoint/RedpointCenter.cs
@@ -107,7 +107,7 @@
{
TestParentValue(_redpoint.parent);
}
-
+
if (_redpoint.otherParent > 0)
{
TestParentValue(_redpoint.otherParent);
@@ -176,4 +176,14 @@
}
}
+ public Redpoint GetRedpoint(int _id)
+ {
+ Redpoint redpoint = null;
+ if (this.redpoints.TryGetValue(_id, out redpoint))
+ {
+ return redpoint;
+ }
+
+ return null;
+ }
}
diff --git a/Main/System/Settlement/BattleFailWin.cs b/Main/System/Settlement/BattleFailWin.cs
index 98b65fc..e2d0a99 100644
--- a/Main/System/Settlement/BattleFailWin.cs
+++ b/Main/System/Settlement/BattleFailWin.cs
@@ -28,6 +28,7 @@
protected override void OnPreOpen()
{
+ FirstChargeManager.Instance.TryPopWin("BattleFailWin");
}
diff --git a/Main/System/Settlement/BoneBattleFailWin.cs b/Main/System/Settlement/BoneBattleFailWin.cs
index bb0319d..342254d 100644
--- a/Main/System/Settlement/BoneBattleFailWin.cs
+++ b/Main/System/Settlement/BoneBattleFailWin.cs
@@ -30,6 +30,7 @@
{
int funcId = BoneFieldManager.Instance.funcId;
txtFuncName.text = FuncOpenLVConfig.HasKey(funcId) ? FuncOpenLVConfig.Get(funcId).Name : string.Empty;
+ FirstChargeManager.Instance.TryPopWin("BoneBattleFailWin");
}
diff --git a/Main/System/TianziBillborad/TianziBillboradBox.cs b/Main/System/TianziBillborad/TianziBillboradBox.cs
index 425c65e..a4ca57d 100644
--- a/Main/System/TianziBillborad/TianziBillboradBox.cs
+++ b/Main/System/TianziBillborad/TianziBillboradBox.cs
@@ -35,15 +35,15 @@
[SerializeField]
[Tooltip("鎶涘皠鐨勫姬褰㈡渶楂樼偣锛岀浉瀵逛簬璧风偣鐨勯珮搴︼紙鍍忕礌鍗曚綅锛夈��")]
- float throwArcHeight = 150f;
+ float throwArcHeight = 150f;
[SerializeField]
[Tooltip("鎶涘皠钀藉湴鐨勬渶灏忓瀭鐩磋窛绂伙紙鍍忕礌鍗曚綅锛夛紝鍗虫瘮璧风偣浣庡灏戙��")]
- float minThrowVerticalDrop = 120f;
+ float minThrowVerticalDrop = 120f;
[SerializeField]
[Tooltip("鎶涘皠钀藉湴鐨勬渶澶у瀭鐩磋窛绂伙紙鍍忕礌鍗曚綅锛夛紝鍗虫瘮璧风偣浣庡灏戙��")]
- float maxThrowVerticalDrop = 180f;
+ float maxThrowVerticalDrop = 180f;
[Header("2. 寮硅烦闃舵")]
@@ -237,6 +237,7 @@
{
if (this != null && gameObject != null)
{
+ TianziBillboradManager.Instance.PlayUiEffectAction?.Invoke();
Destroy(gameObject);
}
});
diff --git a/Main/System/TianziBillborad/TianziBillboradManager.cs b/Main/System/TianziBillborad/TianziBillboradManager.cs
index 37fe6d1..e4673cb 100644
--- a/Main/System/TianziBillborad/TianziBillboradManager.cs
+++ b/Main/System/TianziBillborad/TianziBillboradManager.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using LitJson;
+using UnityEngine;
public class TianziBillboradManager : GameSystemManager<TianziBillboradManager>
{
public readonly int rankType = 2; // 姒滃崟绫诲瀷
@@ -13,10 +14,13 @@
public ulong todayHurt; //鏈�冮獙浠婃棩鏈�澶т激瀹�
public bool isSkipSweepTip = false;
public event Action UpdateTianziKYInfoExent;
+ public Action PlayUiEffectAction;
public Dictionary<int, int[][]> rankAwards;// 姣忔棩鎺掕濂栧姳 {"鍚嶆":[[鐗╁搧ID, 涓暟,鏄惁鎷嶅搧], ...], ...} 閰嶇疆鐨勫悕娆ey锛岃嚜鍔ㄦ寜灏忎簬绛変簬瀵瑰簲鍚嶆缁欏鍔�
public Redpoint parentRedpoint = new Redpoint(MainRedDot.MainChallengeRedpoint, MainRedDot.TianziBillboradRepoint);
public override void Init()
{
+ EventBroadcast.Instance.AddListener<BattleDmgInfo>(EventName.BATTLE_DAMAGE_TAKEN, OnDamageTaken);
+ EventBroadcast.Instance.AddListener<string, JsonData>(EventName.BATTLE_END, OnSettlement);
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitializeEvent;
DungeonManager.Instance.UpdateFBInfoChangeEvent += OnUpdateFBInfoChangeEvent;
AdsManager.Instance.OnAdsInfoListUpdateEvent += OnAdsInfoListUpdateEvent;
@@ -30,6 +34,8 @@
public override void Release()
{
+ EventBroadcast.Instance.RemoveListener<BattleDmgInfo>(EventName.BATTLE_DAMAGE_TAKEN, OnDamageTaken);
+ EventBroadcast.Instance.RemoveListener<string, JsonData>(EventName.BATTLE_END, OnSettlement);
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitializeEvent;
DungeonManager.Instance.UpdateFBInfoChangeEvent -= OnUpdateFBInfoChangeEvent;
AdsManager.Instance.OnAdsInfoListUpdateEvent -= OnAdsInfoListUpdateEvent;
@@ -44,9 +50,86 @@
todayLineID = 0;
historyHurt = 0;
todayHurt = 0;
-
+ ClearBar();
isSkipSweepTip = false;
}
+
+ public int battleLineID; //姝e湪鎴樻枟涓殑LineID
+ public ulong loaclNowHunt = 0;
+ public ulong loaclAllHunt = 0;
+ public ulong loaclMaxHp = 0;
+ public int loaclHpNum = 0;
+ public event Action<ulong, ulong, int> OnUpdateBarInfoEvent;
+
+ private void OnDamageTaken(BattleDmgInfo info)
+ {
+ BattleField battleField = BattleManager.Instance.GetBattleFieldByMapID(DataMapID);
+ if (info == null || battleField == null || battleField.guid != info.battleFieldGuid)
+ return;
+ BattleObject boss = battleField.FindBoss();
+ if (boss == null || boss.ObjID != info.hurtObj.ObjID)
+ return;
+ ShowBar(info);
+ }
+
+ public void ShowBar(BattleDmgInfo info)
+ {
+ if (info == null)
+ return;
+ //闂伩鍜屽洖琛�绫讳笉绠椾激瀹�
+ if (info.IsType(DamageType.Dodge) || info.IsType(DamageType.Recovery))
+ return;
+ var damages = info.damageList;
+ for (int i = 0; i < damages.Count; i++)
+ {
+ ulong hunt = (ulong)damages[i];
+ loaclAllHunt += hunt;
+ if (!TryGetBossConfig(DataMapID, battleLineID, out DungeonConfig dungeonConfig, out NPCLineupConfig npcLineupConfig, out NPCConfig npcConfig))
+ return;
+ int bossId = npcConfig.NPCID;
+ if (!TianziConfig.TryGetTianziConfigByBossIDAndDamage(bossId, loaclAllHunt, out TianziConfig tianziConfig))
+ return;
+ loaclMaxHp = (ulong)tianziConfig.MaxHP;
+ loaclHpNum = tianziConfig.HPNum;
+ loaclNowHunt = TianziConfig.GetCurrentHPDamage(bossId, loaclAllHunt);
+ OnUpdateBarInfoEvent?.Invoke(loaclNowHunt, loaclMaxHp, loaclHpNum);
+ //Debug.Log($"TianziDamageBar hunt {hunt} loaclAllHunt {loaclNowHunt} loaclMaxHp {loaclMaxHp} loaclHpNum {loaclHpNum} 鏃堕棿: {DateTime.Now:HH:mm:ss}");
+ }
+ }
+
+ public void ClearBar()
+ {
+ battleLineID = 0;
+ loaclNowHunt = 0;
+ loaclAllHunt = 0;
+ loaclMaxHp = 0;
+ loaclHpNum = 0;
+ }
+ private void OnSettlement(string _guid, JsonData data)
+ {
+ if (string.Empty == _guid)
+ return;
+ var battle = BattleManager.Instance.GetBattleField(_guid);
+ if (battle == null)
+ return;
+ var battleName = battle.ToString();
+ if (battleName != "TianziBillboradBattleField")
+ return;
+ if (data == null || !data.ContainsKey("totalHurt"))
+ return;
+ ulong totalHurt = ulong.Parse(data["totalHurt"].ToString());
+ if (!TryGetBossConfig(DataMapID, battleLineID, out DungeonConfig dungeonConfig, out NPCLineupConfig npcLineupConfig, out NPCConfig npcConfig))
+ return;
+ int bossId = npcConfig.NPCID;
+ if (!TianziConfig.TryGetTianziConfigByBossIDAndDamage(bossId, totalHurt, out TianziConfig tianziConfig))
+ return;
+ ulong endNowHunt = TianziConfig.GetCurrentHPDamage(bossId, totalHurt);
+ ulong endMaxHp = (ulong)tianziConfig.MaxHP;
+ int endHpNum = tianziConfig.HPNum;
+ OnUpdateBarInfoEvent?.Invoke(endNowHunt, endMaxHp, endHpNum);
+ //Debug.Log($"TianziDamageBar end nowHpNum {endHpNum} nowHunt {endNowHunt} nowHpMax{endMaxHp} 鏃堕棿: {DateTime.Now:HH:mm:ss}");
+ }
+
private void OnUpdateTianziKYInfoExent()
{
@@ -248,15 +331,16 @@
if (vNetData.Msg == null)
return;
JsonData jsonData = JsonMapper.ToObject(vNetData.Msg);
- int isSweep = int.Parse(jsonData["isSweep"].ToString());
int dataMapID = int.Parse(jsonData["dataMapID"].ToString());
+ if (dataMapID != DataMapID)
+ return;
+ int isSweep = int.Parse(jsonData["isSweep"].ToString());
totalHurtSweep = ulong.Parse(jsonData["totalHurt"].ToString());
int lineID = int.Parse(jsonData["lineID"].ToString());
todayHurtTotalSweep = ulong.Parse(jsonData["todayHurtTotal"].ToString());
int isPass = int.Parse(jsonData["isPass"].ToString());
- if (dataMapID != DataMapID)
- return;
+
isSweepVictory = true;
itemInfos.Clear();
diff --git a/Main/System/TianziBillborad/TianziBillboradPlayerRankCell.cs b/Main/System/TianziBillborad/TianziBillboradPlayerRankCell.cs
new file mode 100644
index 0000000..4e614d6
--- /dev/null
+++ b/Main/System/TianziBillborad/TianziBillboradPlayerRankCell.cs
@@ -0,0 +1,75 @@
+锘�//--------------------------------------------------------
+// [Author]: 鐜╀釜娓告垙
+// [ Date ]: Wednesday, September 26, 2018
+//--------------------------------------------------------
+using UnityEngine;
+using UnityEngine.UI;
+
+//鐜╁閫氱敤鎺掑悕
+public class TianziBillboradPlayerRankCell : MonoBehaviour
+{
+ [SerializeField] AvatarCell avatarCell;
+ [SerializeField] Text rankText;
+ [SerializeField] Text rankValueText; //鎺掑悕姣旇緝鍐呭
+ [SerializeField] Text nameText;
+ [SerializeField] OfficialTitleCell officialTitleCell;
+ [SerializeField] Button queryPlayerBtn; //鍚庣画娣诲姞鐐瑰嚮鏌ョ湅鐜╁璇︽儏
+
+
+ // rank 涓�0 浠h〃鐜╁鑷繁
+ public void Display(int rankType, int rank, string valueFormat)
+ {
+ RankData rankData = null;
+ if (rank != 0)
+ {
+ rankData = RankModel.Instance.GetRankDataByRank(rankType, rank);
+ }
+ else
+ {
+ rankData = RankModel.Instance.GetMyRank(rankType);
+ if (rankData == null)
+ {
+ //鍙栫帺瀹惰嚜宸辩殑鏁版嵁
+ avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)PlayerDatas.Instance.baseData.PlayerID,
+ PlayerDatas.Instance.baseData.face,
+ PlayerDatas.Instance.baseData.facePic));
+ rankText.text = Language.Get("L1045");
+ rankValueText.text = "0";//Language.Get("L1125");
+ nameText.text = PlayerDatas.Instance.baseData.PlayerName;
+ officialTitleCell.InitUI(PlayerDatas.Instance.baseData.realmLevel, PlayerDatas.Instance.baseData.TitleID);
+ return;
+ }
+ rank = rankData.rank;
+ }
+ if (rankData == null)
+ {
+ officialTitleCell.SetActive(false);
+ avatarCell.SetActive(false);
+ nameText.text = Language.Get("L1124");
+ rankValueText.text = "0";//Language.Get("L1125");
+ }
+ else
+ {
+ officialTitleCell.SetActive(true);
+ officialTitleCell.InitUI((int)rankData.value1, (int)rankData.value2);
+ avatarCell.SetActive(true);
+ avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)rankData.id, (int)rankData.value3, (int)rankData.value4));
+ nameText.text = rankData.name1;
+ rankValueText.text = string.Format(valueFormat, UIHelper.ReplaceLargeNum(rankData.cmpValue2 + rankData.cmpValue * Constants.ExpPointValue));
+ }
+
+ rankText.text = rank.ToString();
+ if (queryPlayerBtn != null)
+ {
+ queryPlayerBtn.AddListener(() =>
+ {
+
+ });
+ }
+ }
+}
+
+
+
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/TianziBillborad/TianziBillboradPlayerRankCell.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/TianziBillborad/TianziBillboradPlayerRankCell.cs.meta
index 9fd6048..41e302b 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/TianziBillborad/TianziBillboradPlayerRankCell.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 74766b21066229640a700f4283986c9e
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/TianziBillborad/TianziBillboradPlayerTop3Cell.cs b/Main/System/TianziBillborad/TianziBillboradPlayerTop3Cell.cs
new file mode 100644
index 0000000..a7d192b
--- /dev/null
+++ b/Main/System/TianziBillborad/TianziBillboradPlayerTop3Cell.cs
@@ -0,0 +1,40 @@
+锘�//--------------------------------------------------------
+// [Author]: 鐜╀釜娓告垙
+// [ Date ]: Wednesday, September 26, 2018
+//--------------------------------------------------------
+using UnityEngine;
+using UnityEngine.UI;
+
+//鐜╁閫氱敤鐨勫墠3鎺掑悕
+public class TianziBillboradPlayerTop3Cell : MonoBehaviour
+{
+ //[SerializeField] Model 鏄剧ずNPC 姝﹀皢妯″瀷
+ [SerializeField] Text rankValueText; //鎺掑悕姣旇緝鍐呭
+ [SerializeField] Text nameText;
+ [SerializeField] OfficialTitleCell officialTitleCell;
+ [SerializeField] Button queryPlayerBtn; //鍚庣画娣诲姞鐐瑰嚮鏌ョ湅鐜╁璇︽儏
+ [SerializeField] UIHeroController model;
+
+ public void Display(int rankType, int rank, string valueFormat = "{0}")
+ {
+ var rankData = RankModel.Instance.GetRankDataByRank(rankType, rank);
+ if (rankData == null)
+ {
+ rankValueText.text = "0";//Language.Get("L1125");
+ nameText.text = Language.Get("L1124");
+ officialTitleCell.SetActive(false);
+ return;
+ }
+ officialTitleCell.SetActive(true);
+ rankValueText.text = string.Format(valueFormat, UIHelper.ReplaceLargeNum(rankData.cmpValue2 + rankData.cmpValue * Constants.ExpPointValue));
+ nameText.text = rankData.name1;
+ officialTitleCell.InitUI((int)rankData.value1, (int)rankData.value2);
+ model.Create((int)rankData.value5, 1);
+ }
+
+
+}
+
+
+
+
diff --git a/Main/Component/UI/Core/OutlineColor.cs.meta b/Main/System/TianziBillborad/TianziBillboradPlayerTop3Cell.cs.meta
similarity index 83%
copy from Main/Component/UI/Core/OutlineColor.cs.meta
copy to Main/System/TianziBillborad/TianziBillboradPlayerTop3Cell.cs.meta
index 9fd6048..410845e 100644
--- a/Main/Component/UI/Core/OutlineColor.cs.meta
+++ b/Main/System/TianziBillborad/TianziBillboradPlayerTop3Cell.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 73475911b65888b44a39a57cca0bcac3
+guid: 7c586be984f58be4d8d46e703f21a7c9
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/TianziBillborad/TianziBillboradRankWin.cs b/Main/System/TianziBillborad/TianziBillboradRankWin.cs
index 7562fa0..77c663c 100644
--- a/Main/System/TianziBillborad/TianziBillboradRankWin.cs
+++ b/Main/System/TianziBillborad/TianziBillboradRankWin.cs
@@ -9,14 +9,14 @@
[SerializeField] Transform transAward;
[SerializeField] ButtonEx btnClose;
[SerializeField] TextEx txtTitle;
- [SerializeField] PlayerRankCell myRankCell;
+ [SerializeField] TianziBillboradPlayerRankCell myRankCell;
[HideInInspector] public string valueFormat = "{0}";
[Header("濂栧姳")]
[SerializeField] TextEx txtCountdown;
[SerializeField] ScrollerController scrAward;
[Header("鎺掕")]
- [SerializeField] List<PlayerTop3Cell> playerTop3Cells;
+ [SerializeField] List<TianziBillboradPlayerTop3Cell> playerTop3Cells;
[SerializeField] ScrollerController scrollerController;
[HideInInspector] public int groupValue1 = 0; //涓�鑸敤浜庤法鏈�
[HideInInspector] public int groupValue2 = 0; //涓�鑸敤浜庤法鏈�
@@ -127,7 +127,7 @@
void OnRefreshCell(ScrollerDataType type, CellView cell)
{
- var _cell = cell.GetComponent<PlayerRankCell>();
+ var _cell = cell.GetComponent<TianziBillboradPlayerRankCell>();
_cell.Display(model.rankType, cell.index + 1, valueFormat);
RankModel.Instance.ListenRankPage(model.rankType, cell.index, groupValue1, groupValue2);
}
diff --git a/Main/System/TianziBillborad/TianziDamageBar.cs b/Main/System/TianziBillborad/TianziDamageBar.cs
index c418908..9ac69ad 100644
--- a/Main/System/TianziBillborad/TianziDamageBar.cs
+++ b/Main/System/TianziBillborad/TianziDamageBar.cs
@@ -58,167 +58,45 @@
public void Init()
{
- int dataMapID = TianziBillboradManager.Instance.DataMapID;
- int lineID = TianziBillboradManager.Instance.todayLineID;
- if (!TianziBillboradManager.Instance.TryGetBossConfig(dataMapID, lineID, out DungeonConfig dungeonConfig, out NPCLineupConfig npcLineupConfig, out NPCConfig npcConfig))
- return;
- bossId = npcConfig.NPCID;
- nowHpNum = 1; // 榛樿浠庣1鏉¤寮�濮�
- if (!TianziConfig.TryGetTianziConfigByBossIDAndHPNum(bossId, nowHpNum, out TianziConfig tianziConfig))
- return;
- m_IntensifySlider.stage = 0;
- m_IntensifySlider.ResetStage();
- nowHunt = 0; // 鍒濆琛�閲忎负0
- nowHpMax = (ulong)tianziConfig.MaxHP;
- m_BoxCount.text = Language.Get("TianziBillborad07", 0);
- // 闄ら浂淇濇姢
- float percentage = 0f;
- if (nowHpMax > 0)
+ if (TianziBillboradManager.Instance.loaclMaxHp > 0)
{
- percentage = Mathf.Clamp(nowHunt, 0, nowHpMax) / (float)nowHpMax;
+ nowHunt = TianziBillboradManager.Instance.loaclNowHunt;
+ nowHpMax = TianziBillboradManager.Instance.loaclMaxHp;
+ nowHpNum = TianziBillboradManager.Instance.loaclHpNum;
+ Show(nowHunt, nowHpMax, nowHpNum);
}
-
- m_IntensifySlider.value = percentage;
- m_IntensifySlider.stage = nowHpNum; // 璁剧疆褰撳墠闃舵
- m_HurtInfo.text = Language.Get("BoneField09", nowHunt, UIHelper.ReplaceLargeNum(nowHpMax));
- }
-
-
- // public event Action IsLastHitUnLockEvent;
- // public void Show(ulong hp, ulong maxHp, BattleDmgInfo info) // 鏄剧ず浼ゅ鏉�
- // {
- // if (!TianziConfig.TryGetTianziConfigByBossIDAndMaxHP(bossId, (long)maxHp, out TianziConfig tianziConfig))
- // return;
- // if (info.isLastHit && isLock)
- // {
- // isLock = false;
- // IsLastHitUnLockEvent?.Invoke();
- // }
-
- // int hpNum = tianziConfig.HPNum;
- // ulong hunt = maxHp - hp;
-
- // if (maxHp < nowHpMax)
- // {
- // Debug.LogWarning($"TianziDamageBar SkillID {info.skillConfig.SkillID} hp {hp} maxHp {maxHp} hunt {hunt} nowHpNum {nowHpNum} nowHunt {nowHunt} nowHpMax {nowHpMax} 鏃堕棿: {DateTime.Now:HH:mm:ss}");
- // return;
- // }
-
- // if (!isLock)
- // {
- // // 鏍规嵁maxHp鑾峰緱褰撳墠鏄鍑犳潯琛�
- // nowHpNum = hpNum;
- // nowHunt = hunt;
- // nowHpMax = maxHp;
- // // 闄ら浂淇濇姢
- // float percentage = 0f;
- // if (nowHpMax > 0)
- // {
- // percentage = Mathf.Clamp(nowHunt, 0, nowHpMax) / (float)nowHpMax;
- // }
- // m_IntensifySlider.value = percentage;
- // m_IntensifySlider.stage = nowHpNum; // 璁剧疆褰撳墠闃舵
- // Debug.Log($"TianziDamageBar SkillID {info.skillConfig.SkillID} hp {hp} maxHp {maxHp} hunt {hunt} nowHpNum {nowHpNum} nowHunt {nowHunt} nowHpMax {nowHpMax} 鏃堕棿: {DateTime.Now:HH:mm:ss}");
- // }
- // }
-
- // bool isLock = false;
- // public void ShowByB419(ulong hp, ulong maxHp)
- // {
- // if (!TianziConfig.TryGetTianziConfigByBossIDAndMaxHP(bossId, (long)maxHp, out TianziConfig tianziConfig))
- // return;
-
- // isLock = true;
-
- // int hpNum = tianziConfig.HPNum;
- // ulong hunt = maxHp - hp;
-
- // if (maxHp < nowHpMax)
- // {
- // Debug.LogWarning($"TianziDamageBar B419 hp {hp} maxHp {maxHp} hunt {hunt} nowHpNum {nowHpNum} nowHunt {nowHunt} nowHpMax {nowHpMax} 鏃堕棿: {DateTime.Now:HH:mm:ss}");
- // return;
- // }
- // nowHpNum = hpNum;
- // nowHunt = hunt;
- // nowHpMax = maxHp;
- // // 闄ら浂淇濇姢
- // float percentage = 0f;
- // if (nowHpMax > 0)
- // {
- // percentage = Mathf.Clamp(nowHunt, 0, nowHpMax) / (float)nowHpMax;
- // }
- // m_IntensifySlider.value = percentage;
- // m_IntensifySlider.stage = nowHpNum; // 璁剧疆褰撳墠闃舵
- // Debug.Log($"TianziDamageBar B419 hp {hp} maxHp {maxHp} hunt {hunt} nowHpNum {nowHpNum} nowHunt {nowHunt} nowHpMax{nowHpMax} 鏃堕棿: {DateTime.Now:HH:mm:ss}");
- // }
-
-
- public void Show(ulong totalHP) // 鏄剧ず浼ゅ鏉�
- {
- if (!TianziConfig.TryGetTianziConfigByBossIDAndDamage(bossId, totalHP, out TianziConfig tianziConfig))
- return;
- ulong endMaxHp = (ulong)tianziConfig.MaxHP;
- int endHpNum = tianziConfig.HPNum;
- ulong endNowHunt = TianziConfig.GetCurrentHPDamage(bossId, totalHP);
-
- nowHpNum = endHpNum;
- nowHunt = endNowHunt;
- nowHpMax = endMaxHp;
-
- // 闄ら浂淇濇姢
- float percentage = 0f;
- if (nowHpMax > 0)
+ else
{
- percentage = Mathf.Clamp(nowHunt, 0, nowHpMax) / (float)nowHpMax;
- }
- m_IntensifySlider.value = percentage;
- m_IntensifySlider.stage = nowHpNum; // 璁剧疆褰撳墠闃舵
- //Debug.Log($"TianziDamageBar end nowHpNum {nowHpNum} nowHunt {nowHunt} nowHpMax{nowHpMax} 鏃堕棿: {DateTime.Now:HH:mm:ss}");
- }
-
- ulong loaclNowHunt = 0;
- ulong loaclAllHunt = 0;
- ulong loaclMaxHp = 0;
- int loaclHpNum = 0;
- public void Show(BattleDmgInfo _damageInfo)
- {
- //闂伩鍜屽洖琛�绫讳笉绠椾激瀹�
- if (_damageInfo.IsType(DamageType.Dodge) || _damageInfo.IsType(DamageType.Recovery))
- return;
- var damages = _damageInfo.damageList;
- for (int i = 0; i < damages.Count; i++)
- {
- ulong hunt = (ulong)damages[i];
- loaclAllHunt += hunt;
- if (!TianziConfig.TryGetTianziConfigByBossIDAndDamage(bossId, loaclAllHunt, out TianziConfig tianziConfig))
+ int dataMapID = TianziBillboradManager.Instance.DataMapID;
+ int lineID = TianziBillboradManager.Instance.todayLineID;
+ if (!TianziBillboradManager.Instance.TryGetBossConfig(dataMapID, lineID, out DungeonConfig dungeonConfig, out NPCLineupConfig npcLineupConfig, out NPCConfig npcConfig))
return;
- loaclMaxHp = (ulong)tianziConfig.MaxHP;
- loaclHpNum = tianziConfig.HPNum;
- loaclNowHunt = TianziConfig.GetCurrentHPDamage(bossId, loaclAllHunt);
-
- // if (loaclMaxHp < nowHpMax || loaclHpNum < nowHpNum)
- // {
- // Debug.LogWarning($"TianziDamageBar hunt {hunt} loaclAllHunt {loaclAllHunt} loaclHpNum {loaclHpNum} loaclNowHunt {loaclNowHunt} nowHpNum {nowHpNum} nowHunt {nowHunt} nowHpMax{nowHpMax} 鏃堕棿: {DateTime.Now:HH:mm:ss}");
- // return;
- // }
-
- // if (loaclNowHunt < nowHunt)
- // {
- // Debug.LogWarning($"TianziDamageBar hunt {hunt} loaclAllHunt {loaclAllHunt} loaclHpNum {loaclHpNum} loaclNowHunt {loaclNowHunt} nowHpNum {nowHpNum} nowHunt {nowHunt} nowHpMax{nowHpMax} 鏃堕棿: {DateTime.Now:HH:mm:ss}");
- // return;
- // }
- nowHunt = loaclNowHunt;
- nowHpMax = loaclMaxHp;
- nowHpNum = loaclHpNum;
- // 闄ら浂淇濇姢
- float percentage = 0f;
- if (nowHpMax > 0)
- {
- percentage = Mathf.Clamp(nowHunt, 0, nowHpMax) / (float)nowHpMax;
- }
- m_IntensifySlider.value = percentage;
- m_IntensifySlider.stage = nowHpNum;
- //Debug.Log($"TianziDamageBar hunt {hunt} loaclAllHunt {loaclAllHunt} loaclHpNum {loaclHpNum} loaclNowHunt {loaclNowHunt} nowHpNum {nowHpNum} nowHunt {nowHunt} nowHpMax{nowHpMax} 鏃堕棿: {DateTime.Now:HH:mm:ss}");
+ bossId = npcConfig.NPCID;
+ nowHpNum = 1; // 榛樿浠庣1鏉¤寮�濮�
+ if (!TianziConfig.TryGetTianziConfigByBossIDAndHPNum(bossId, nowHpNum, out TianziConfig tianziConfig))
+ return;
+ m_IntensifySlider.stage = 0;
+ m_IntensifySlider.ResetStage();
+ nowHunt = 0; // 鍒濆琛�閲忎负0
+ nowHpMax = (ulong)tianziConfig.MaxHP;
+ m_BoxCount.text = Language.Get("TianziBillborad07", 0);
+ Show(nowHunt, nowHpMax, nowHpNum);
}
}
+
+ public void Show(ulong hunt, ulong maxHp, int hpNum)
+ {
+ nowHunt = hunt;
+ nowHpMax = maxHp;
+ nowHpNum = hpNum;
+ // 闄ら浂淇濇姢
+ float percentage = 0f;
+ if (nowHpMax > 0)
+ {
+ percentage = Mathf.Clamp(nowHunt, 0, nowHpMax) / (float)nowHpMax;
+ }
+ m_IntensifySlider.value = percentage;
+ m_IntensifySlider.stage = nowHpNum;
+ m_HurtInfo.text = Language.Get("BoneField09", nowHunt, UIHelper.ReplaceLargeNum(nowHpMax));
+ }
}
\ No newline at end of file
diff --git a/Main/System/Tip/ConfirmCancel.cs b/Main/System/Tip/ConfirmCancel.cs
index 6fa1683..29a0b92 100644
--- a/Main/System/Tip/ConfirmCancel.cs
+++ b/Main/System/Tip/ConfirmCancel.cs
@@ -333,6 +333,7 @@
public static void MoneyIconConfirm(int moneyCnt, int _moneyType, string content, Action<bool, bool> func)
{
generalContent = content;
+ toggleContent = "";
OnToggleConfirmEvent = func;
moneyType = _moneyType;
moneyNeedCount = moneyCnt;
diff --git a/Main/Utility/EnumHelper.cs b/Main/Utility/EnumHelper.cs
index 764f659..e473b27 100644
--- a/Main/Utility/EnumHelper.cs
+++ b/Main/Utility/EnumHelper.cs
@@ -833,6 +833,8 @@
Chat = 19,//鑱婂ぉ
AutoFight = 20,//鑷姩鎴樻枟
Recharge = 22,//鍏呭��
+ BattlePass = 40, //鍩洪噾锛堟垬浠わ級
+ LLMJ = 41, //鍘嗙粌绉樼瑘
}
--
Gitblit v1.8.0