From db294eefe2a7fffb7275306ec6e05cbae982c8cc Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期三, 03 七月 2019 15:50:30 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Skill/SkillCell.cs | 33 ++++--
Core/GameEngine/Model/Player/Skill/PlayerSkillDatas.cs | 4
Lua/Gen/DelegatesGensBridge.cs | 23 ----
System/Equip/RealmEquipWin.cs | 1
/dev/null | 12 --
System/Skill/SkillAccordWin.cs | 4
System/Skill/SkillModel.cs | 104 ++++++++++++++++++++
Fight/MapTransferUtility.cs | 4
System/FairyAu/FairyAuTaskWin.cs | 7 +
Fight/GameActor/GA_Hero.cs | 32 +++---
System/MainInterfacePanel/LowSettingTip.cs | 4
System/Role/ReikiRootResetWin.cs | 3
System/Skill/TreasureSkillModel.cs | 26 ++++
Core/AI/NavmeshPathFind/PathFinder.cs | 2
14 files changed, 190 insertions(+), 69 deletions(-)
diff --git a/Core/AI/NavmeshPathFind/PathFinder.cs b/Core/AI/NavmeshPathFind/PathFinder.cs
index 5e443a1..e71ae12 100644
--- a/Core/AI/NavmeshPathFind/PathFinder.cs
+++ b/Core/AI/NavmeshPathFind/PathFinder.cs
@@ -29,7 +29,7 @@
public static float CalculateDistance(Vector3 start, Vector3 dest)
{
- float _dis = float.MaxValue;
+ float _dis = 0;
start.y = 0;
dest.y = 0;
NavMesh.CalculatePath(start, dest, -1, _path);
diff --git a/Core/GameEngine/Model/Player/Skill/PlayerSkillDatas.cs b/Core/GameEngine/Model/Player/Skill/PlayerSkillDatas.cs
index dde9857..4eee6c6 100644
--- a/Core/GameEngine/Model/Player/Skill/PlayerSkillDatas.cs
+++ b/Core/GameEngine/Model/Player/Skill/PlayerSkillDatas.cs
@@ -199,7 +199,7 @@
public void SetQuickSkill(int pos, int id)
{
- if (model.GetXpSkillID() == id)
+ if (model.IsXpSkill(id))
{
return;
}
@@ -349,6 +349,8 @@
public void ClearSkillData()
{
+ hasInitQuickSkill = false;
+ isServerPrepare = false;
m_QuickSkills.Clear();
m_PlayerSkills.Clear();
}
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta b/Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta
deleted file mode 100644
index 56e5988..0000000
--- a/Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 3e05761d690b75440a6be79207d0fb01
-folderAsset: yes
-timeCreated: 1547643019
-licenseType: Pro
-DefaultImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta b/Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta
deleted file mode 100644
index 1044caa..0000000
--- a/Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 1d70ccd06161e0443b7a802ad94292f8
-folderAsset: yes
-timeCreated: 1547643019
-licenseType: Pro
-DefaultImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta b/Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta
deleted file mode 100644
index 314efd1..0000000
--- a/Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 71e878ac60c49ad4f964dd2dbc725739
-folderAsset: yes
-timeCreated: 1547643019
-licenseType: Pro
-DefaultImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta b/Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta
deleted file mode 100644
index 6ed37c0..0000000
--- a/Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: eed34091b0568664b9fb42f0634496c1
-folderAsset: yes
-timeCreated: 1547643019
-licenseType: Pro
-DefaultImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta b/Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta
deleted file mode 100644
index 418ee88..0000000
--- a/Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 32ceb8b7faf99f84a8b73ce53c5e3e4d
-folderAsset: yes
-timeCreated: 1547643019
-licenseType: Pro
-DefaultImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HAE_Truck.meta b/Core/NetworkPackage/ServerPack/HAE_Truck.meta
deleted file mode 100644
index ea614a3..0000000
--- a/Core/NetworkPackage/ServerPack/HAE_Truck.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 77f69c2b862d1704299a32d0d8eeb71e
-folderAsset: yes
-timeCreated: 1547643019
-licenseType: Pro
-DefaultImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HAF_Merge.meta b/Core/NetworkPackage/ServerPack/HAF_Merge.meta
deleted file mode 100644
index 86e4eea..0000000
--- a/Core/NetworkPackage/ServerPack/HAF_Merge.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: fa14960fa44b0d1439bab471a764e34f
-folderAsset: yes
-timeCreated: 1547643019
-licenseType: Pro
-DefaultImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HB0_Event.meta b/Core/NetworkPackage/ServerPack/HB0_Event.meta
deleted file mode 100644
index 95487fc..0000000
--- a/Core/NetworkPackage/ServerPack/HB0_Event.meta
+++ /dev/null
@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: d914565b65f8e8145988734c4d915834
-folderAsset: yes
-timeCreated: 1547643019
-licenseType: Pro
-DefaultImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Fight/GameActor/GA_Hero.cs b/Fight/GameActor/GA_Hero.cs
index 2f39830..a2cb2fe 100644
--- a/Fight/GameActor/GA_Hero.cs
+++ b/Fight/GameActor/GA_Hero.cs
@@ -1142,23 +1142,23 @@
return;
}
- // if (taskmodel.IsTaskMove())
- // {
- // if (Time.realtimeSinceStartup - m_CalculAutoFightTime > taskmodel.TaskAutoTime
- // && !NewBieCenter.Instance.inGuiding
- // && TaskModel.IsOPenAutoResolve())
- // {
- // if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.State == E_ActorState.AutoRun
- // && onMainModel.MoveBool)
- // {
+ if (taskmodel.IsTaskMove())
+ {
+ if (Time.realtimeSinceStartup - m_CalculAutoFightTime > taskmodel.TaskAutoTime
+ && !NewBieCenter.Instance.inGuiding
+ && TaskModel.IsOPenAutoResolve())
+ {
+ if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.State == E_ActorState.AutoRun
+ && onMainModel.MoveBool)
+ {
- // }
- // else
- // {
- // SnxxzGame.Instance.StartCoroutine(Wait());
- // }
- // }
- // }
+ }
+ else
+ {
+ SnxxzGame.Instance.StartCoroutine(Wait());
+ }
+ }
+ }
if (MapArea.IsInMapArea(CurMapArea, MapArea.E_Type.Safe)
|| MapArea.IsInMapArea(CurMapArea, MapArea.E_Type.RebornSafe))
diff --git a/Fight/MapTransferUtility.cs b/Fight/MapTransferUtility.cs
index 13b5d75..b37f540 100644
--- a/Fight/MapTransferUtility.cs
+++ b/Fight/MapTransferUtility.cs
@@ -262,8 +262,6 @@
yield break;
}
- ClientSceneManager.Instance.ExitTransStatus();
-
var sid = data.sid;
NpcID = data.npcID;
MapTransferDoType = E_MapTransferDoType.Npc;
@@ -445,6 +443,7 @@
{
break;
}
+ ClientSceneManager.Instance.ExitTransStatus();
float _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
while (_dis > 0.01f)
{
@@ -477,6 +476,7 @@
Debug.LogErrorFormat("绉诲姩鑷砃PC: {0} 鏃舵壘涓嶅埌浠讳綍璺宠穬鐐�, NextPos: {1}", NpcID, _nextPos);
break;
}
+ ClientSceneManager.Instance.ExitTransStatus();
float _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
while (_dis > 0.01f)
{
diff --git a/Lua/Gen/DelegatesGensBridge.cs b/Lua/Gen/DelegatesGensBridge.cs
index c8493f3..03de154 100644
--- a/Lua/Gen/DelegatesGensBridge.cs
+++ b/Lua/Gen/DelegatesGensBridge.cs
@@ -6347,29 +6347,6 @@
#endif
}
- public bool __Gen_Delegate_Imp275(Snxxz.UI.EquipShowSwitch.EquipShowSwitchType p0, uint p1)
- {
-#if THREAD_SAFE || HOTFIX_ENABLE
- lock (luaEnv.luaEnvLock)
- {
-#endif
- RealStatePtr L = luaEnv.rawL;
- int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference);
- ObjectTranslator translator = luaEnv.translator;
- translator.Push(L, p0);
- LuaAPI.xlua_pushuint(L, p1);
-
- PCall(L, 2, 1, errFunc);
-
-
- bool __gen_ret = LuaAPI.lua_toboolean(L, errFunc + 1);
- LuaAPI.lua_settop(L, errFunc - 1);
- return __gen_ret;
-#if THREAD_SAFE || HOTFIX_ENABLE
- }
-#endif
- }
-
public void __Gen_Delegate_Imp276(uint p0)
{
#if THREAD_SAFE || HOTFIX_ENABLE
diff --git a/System/Equip/RealmEquipWin.cs b/System/Equip/RealmEquipWin.cs
index b5f1b42..1b8614c 100644
--- a/System/Equip/RealmEquipWin.cs
+++ b/System/Equip/RealmEquipWin.cs
@@ -42,6 +42,7 @@
var titleIcon = oneLevelFrame.GetComponent<Image>("Container_BackGround/Img_Title");
titleIcon.SetSprite("OneLevelTitle_30");
+ titleIcon.SetNativeSize();
m_LevelsContainer = oneLevelFrame.GetComponent<RectTransform>("Container_Functions/Content");
m_Close = oneLevelFrame.GetComponent<Button>("Container_Buttons/Btn_Close");
diff --git a/System/FairyAu/FairyAuTaskWin.cs b/System/FairyAu/FairyAuTaskWin.cs
index a5d4c59..c2c49f8 100644
--- a/System/FairyAu/FairyAuTaskWin.cs
+++ b/System/FairyAu/FairyAuTaskWin.cs
@@ -30,6 +30,8 @@
[SerializeField] Text _ReceiveImageText;//棰嗗鍊掕鏃�2
[SerializeField] Transform m_GridLeft;//宸︿晶濂栧姳
[SerializeField] Slider m_Slider;//杩涘害鏉�
+ [SerializeField] UIEffect m_LeaveBtnEffect;
+ [SerializeField] Text m_LeaveText;
[Header("绛夊緟鏃堕棿(绉�)")]
public int Second = 20;
@@ -292,6 +294,7 @@
void FairyAuTask(int _taskID)//浠欑洘浠诲姟
{
+
if (TaskAllocation.Instance.FairyAuNumber() >= taskmodel.FairyAuTaskCount_Round)
{
Btn_Leave.gameObject.SetActive(false);
@@ -324,10 +327,13 @@
string _RewardStr = TaskAllocation.Instance.GetTaskInfo(rewardConfig.show_writing, _taskID);
RewardAnalysis.Inst.GetReward(_RewardStr, ref rewardList);
RewardInformationDisplay(rewardList);
+ m_LeaveText.text = Language.Get("CoinTaskText_8");
}
void TheDefaultTask(int _taskID)//浠欑洘浠诲姟鏈帴鍙栫壒娈婄姸鎬�
{
+ m_LeaveBtnEffect.Play();
+ m_LeaveText.text = Language.Get("CoinTaskText_11");
Btn_Finish.gameObject.SetActive(false);
Btn_Leave.gameObject.SetActive(true);
RoundText_L.text = Language.Get("FairyAuTaskWin_Text3", SetNumberOfRounds(0));
@@ -363,6 +369,7 @@
DestroyImmediate(_Grid.GetChild(i).gameObject);
}
}
+ m_LeaveText.text = Language.Get("CoinTaskText_8");
}
void RewardInformationDisplay(List<RewardAnalysis.RewardInfo> rewardList)//濂栧姳淇℃伅
{
diff --git a/System/MainInterfacePanel/LowSettingTip.cs b/System/MainInterfacePanel/LowSettingTip.cs
index 4b7a29e..9ceec3a 100644
--- a/System/MainInterfacePanel/LowSettingTip.cs
+++ b/System/MainInterfacePanel/LowSettingTip.cs
@@ -88,6 +88,10 @@
{
WindowCenter.Instance.Open<SkillWin>();
}
+ else if (skillModel.redpoint.state == RedPointState.Simple)
+ {
+ WindowCenter.Instance.Open<SkillWin>(false, 1);
+ }
else if (skillModel.passSkillRedpoint.state == RedPointState.Simple)
{
WindowCenter.Instance.Open<SkillWin>(false, 2);
diff --git a/System/Role/EquipShowSwitch.cs b/System/Role/EquipShowSwitch.cs
deleted file mode 100644
index 07da933..0000000
--- a/System/Role/EquipShowSwitch.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-namespace Snxxz.UI
-{
- [XLua.Hotfix]
- public static class EquipShowSwitch
- {
- static MagicianModel godWeaponModel
- {
- get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
- }
-
- const int GODWEAPON_EFFECT_STAGE = 3;
-
- public static bool IsGodWeaponEffectOn(uint value, out Dictionary<int, int> dict)
- {
- dict = null;
- return false;
- }
-
- public static bool IsGodWeaponEffectOn(uint value, int type, out int level)
- {
- level = 0;
- return false;
- }
-
- public static bool IsEquipShowSwitchOn(EquipShowSwitchType type, uint value)
- {
- if ((int)type >= (int)EquipShowSwitchType.max)
- {
- return false;
- }
- return MathUtility.GetBitValue(value, (ushort)type);
- }
-
- public static void SendPackage(uint value)
- {
- C032F_tagCRequestEquipShowHide pak = new C032F_tagCRequestEquipShowHide();
- pak.EquipShowSwitch = value;
- GameNetSystem.Instance.SendInfo(pak);
- }
-
- public enum EquipShowSwitchType : byte
- {
- max = 32,
- }
- }
-}
-
diff --git a/System/Role/EquipShowSwitch.cs.meta b/System/Role/EquipShowSwitch.cs.meta
deleted file mode 100644
index d42c3fc..0000000
--- a/System/Role/EquipShowSwitch.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 01dcfe375cd5cf940bd33f6b2f4db077
-timeCreated: 1547125411
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/System/Role/ReikiRootResetWin.cs b/System/Role/ReikiRootResetWin.cs
index e23d442..3169fde 100644
--- a/System/Role/ReikiRootResetWin.cs
+++ b/System/Role/ReikiRootResetWin.cs
@@ -27,6 +27,7 @@
ReikiRootModel model { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }
PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
+ SkillModel skillModel { get { return ModelCenter.Instance.GetModel<SkillModel>(); } }
#region Built-in
protected override void BindController()
{
@@ -113,6 +114,7 @@
var pak = new CB207_tagCMResetAttrPoint();
GameNetSystem.Instance.SendInfo(pak);
model.resetReikiRootRecord = true;
+ skillModel.skillMatchRedpointable = true;
CloseImmediately();
}
else
@@ -142,6 +144,7 @@
var pak = new CB207_tagCMResetAttrPoint();
GameNetSystem.Instance.SendInfo(pak);
model.resetReikiRootRecord = true;
+ skillModel.skillMatchRedpointable = true;
CloseImmediately();
}
}
diff --git a/System/Skill/SkillAccordWin.cs b/System/Skill/SkillAccordWin.cs
index 6f33f77..2e18c57 100644
--- a/System/Skill/SkillAccordWin.cs
+++ b/System/Skill/SkillAccordWin.cs
@@ -89,6 +89,10 @@
m_SkillMatch.AddListener(() =>
{
WindowCenter.Instance.Open("SkillMatchWin");
+ if (model.skillMatchRedpointable)
+ {
+ model.skillMatchRedpointable = false;
+ }
});
for (int i = 0; i < m_QuickSkills.Count; i++)
{
diff --git a/System/Skill/SkillCell.cs b/System/Skill/SkillCell.cs
index 35ace54..de26cc7 100644
--- a/System/Skill/SkillCell.cs
+++ b/System/Skill/SkillCell.cs
@@ -13,15 +13,19 @@
[SerializeField] SkillData skill;
[SerializeField] RedpointBehaviour m_Redpoint;
- public SkillData skillData {
- get {
+ public SkillData skillData
+ {
+ get
+ {
return skill;
}
}
SkillModel m_Model;
- SkillModel model {
- get {
+ SkillModel model
+ {
+ get
+ {
return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<SkillModel>());
}
}
@@ -37,13 +41,16 @@
public void OnPointerDown(PointerEventData eventData)
{
skill.m_SkillBtn.OnPointerClick(eventData);
- if (model.skillDraging) {
+ if (model.skillDraging)
+ {
return;
}
- if (PlayerDatas.Instance.skill.GetSKillById(skill.skillId) == null) {
+ if (PlayerDatas.Instance.skill.GetSKillById(skill.skillId) == null)
+ {
return;
}
- if (model.GetXpSkillID() == skill.skillId) {
+ if (model.IsXpSkill(skill.skillId))
+ {
return;
}
onPress = true;
@@ -66,10 +73,12 @@
public void Refresh(int skillId)
{
skill.SetSkillData(skillId);
- if (model.presentSltSkillID == skillId) {
+ if (model.presentSltSkillID == skillId)
+ {
skill.m_SelectImg.gameObject.SetActive(true);
}
- else {
+ else
+ {
skill.m_SelectImg.gameObject.SetActive(false);
}
@@ -96,9 +105,11 @@
private void LateUpdate()
{
- if (onPress && !model.skillDraging) {
+ if (onPress && !model.skillDraging)
+ {
m_Time += Time.deltaTime;
- if (m_Time > model.onDragDelay) {
+ if (m_Time > model.onDragDelay)
+ {
model.skillDragId = skill.skillId;
model.skillDraging = true;
m_Time = 0;
diff --git a/System/Skill/SkillModel.cs b/System/Skill/SkillModel.cs
index 8de9ba2..400b259 100644
--- a/System/Skill/SkillModel.cs
+++ b/System/Skill/SkillModel.cs
@@ -57,7 +57,18 @@
public int minTaskHole { get; private set; }
public int maxTaskHole { get; private set; }
+ public bool skillMatchRedpointable
+ {
+ get { return LocalSave.GetBool("SkillMatchRedpointable_" + PlayerDatas.Instance.baseData.PlayerID); }
+ set
+ {
+ LocalSave.SetBool("SkillMatchRedpointable_" + PlayerDatas.Instance.baseData.PlayerID, value);
+ UpdateSkillMatchRedpoint();
+ }
+ }
+
public readonly Redpoint redpoint = new Redpoint(103, 10301);
+ public readonly Redpoint skillMatchRedpoint = new Redpoint(10301, 1030101);
void ParseConfig()
{
@@ -193,6 +204,92 @@
return skill.GetSkillConfig(skill.level).SkillID;
}
return skillID;
+ }
+
+ public bool IsXpSkill(int skillId)
+ {
+ var config = SkillConfig.Get(skillId);
+ if (config != null)
+ {
+ var job = PlayerDatas.Instance.baseData.Job;
+ if (xpSkillsDic.ContainsKey(job))
+ {
+ return xpSkillsDic[job] == config.SkillTypeID;
+ }
+ }
+ return false;
+ }
+
+ void VerifyQuickSkillExistXp()
+ {
+ var quickSkills = PlayerDatas.Instance.skill.GetQuickSkills();
+ var existXp = false;
+ var lastIndex = 0;
+ foreach (var index in quickSkills.Keys)
+ {
+ if (quickSkills[index] != null)
+ {
+ if (IsXpSkill(quickSkills[index].id))
+ {
+ existXp = true;
+ QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.Skill, "***", index);
+ continue;
+ }
+ if (existXp)
+ {
+ var temp = QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.Skill, index);
+ QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.Skill, temp, index - 1);
+ QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.Skill, "***", index);
+ }
+ lastIndex = index;
+ }
+ }
+ if (existXp)
+ {
+ if (lastIndex == QUICK_SKILL_COUNT - 1)
+ {
+ var skills = GetActSkills();
+ for (int i = 0; i < skills.Count; i++)
+ {
+ if (PlayerDatas.Instance.skill.GetSKillById(skills[i]) != null
+ && !IsXpSkill(skills[i]) && PlayerDatas.Instance.skill.ContainsQuickSkill(skills[i]) == -1)
+ {
+ string value = MathUtils.Convert10To64(skills[i]);
+ QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.Skill, value, lastIndex);
+ break;
+ }
+ }
+ }
+
+ QuickSetting.Instance.SendPackage();
+ PlayerDatas.Instance.skill.SetQuickSkills();
+ }
+ }
+
+ List<int> GetActSkills()
+ {
+ List<int> skills = new List<int>();
+ var skillType = (int)Math.Pow(2, PlayerDatas.Instance.baseData.Job);
+ Dictionary<int, List<int>> dict = skillActDict[skillType];
+ foreach (int key in dict.Keys)
+ {
+ List<int> list = dict[key];
+ var skillId = list[0];
+ foreach (var id in list)
+ {
+ if (PlayerDatas.Instance.skill.GetSKillById(id) != null)
+ {
+ skillId = id;
+ break;
+ }
+ }
+ if (PlayerDatas.Instance.skill.GetFilterPlayerSkill(PlayerDatas.Instance.baseData.Job).Contains(skillId))
+ {
+ continue;
+ }
+ skills.Add(skillId);
+ }
+ return skills;
}
#endregion
@@ -545,6 +642,8 @@
}
playerLoginOk = true;
UpdateRedpoint();
+ VerifyQuickSkillExistXp();
+ UpdateSkillMatchRedpoint();
//UpdateTaskHoleRedpoint();
}
@@ -659,6 +758,11 @@
}
}
+ void UpdateSkillMatchRedpoint()
+ {
+ skillMatchRedpoint.state = skillMatchRedpointable ? RedPointState.Simple : RedPointState.None;
+ }
+
public void SetDayRemind()
{
DayRemind.Instance.SetDayRemind(DayRemind.PASS_SKILL_REDPOINT, true);
diff --git a/System/Skill/TreasureSkillModel.cs b/System/Skill/TreasureSkillModel.cs
index b4d115b..2b0030d 100644
--- a/System/Skill/TreasureSkillModel.cs
+++ b/System/Skill/TreasureSkillModel.cs
@@ -269,6 +269,27 @@
return level;
}
+ public int GetSatisfyLevelUpMinCostSkillId()
+ {
+ var minCost = int.MaxValue;
+ var minSkillId = 0;
+ foreach (var skill in treasureSkills.Values)
+ {
+ var error = 0;
+ if (TryLevelUpTreasureSkill(skill.skillId, out error)
+ && skill.level > 0)
+ {
+ var config = skill.GetSkillConfig(skill.level + 1);
+ if (config.ExAttr5 < minCost)
+ {
+ minCost = config.ExAttr5;
+ minSkillId = skill.skillId;
+ }
+ }
+ }
+ return minSkillId;
+ }
+
public void OnReceivePackage(int oldSkillID, int newSkillID)
{
var config = SkillConfig.Get(newSkillID);
@@ -565,12 +586,11 @@
void UpdateRedpoint()
{
var funcOpen = FuncOpen.Instance.IsFuncOpen(82);
+ var satisfyLevelUpMinSkillId = GetSatisfyLevelUpMinCostSkillId();
foreach (var skill in treasureSkills.Values)
{
- var error = 0;
if (requireRemind && funcOpen && FuncOpen.Instance.IsFuncOpen(177)
- && TryLevelUpTreasureSkill(skill.skillId, out error)
- && skill.level > 0)
+ && satisfyLevelUpMinSkillId == skill.skillId)
{
skill.levelUpRedpoint.state = RedPointState.Simple;
}
--
Gitblit v1.8.0