From 5fdcc5ca68ea7fb1722555281e45f29db5157ae9 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 19 二月 2019 16:38:31 +0800
Subject: [PATCH] 6242 子 【开发】【2.0】法宝界面调整 / 【前端】【2.0】法宝调整
---
System/Achievement/AchievementGotoPart1.cs | 80
System/Treasure/TreasureCollectBriefInfoBehaviour.cs | 7
System/Tip/PromoteDetailsWin.cs | 18
System/Treasure/TreasureAchievement.cs | 3
Lua/Gen/DelegatesGensBridge.cs | 137 --
System/Treasure/TreasureComponent.cs | 232 ----
System/MainInterfacePanel/FlyingShoesTask.cs | 2
System/RolePromote/RolePromoteModel.cs | 37
System/MainInterfacePanel/PlayerMainDate.cs | 4
/dev/null | 12
System/Treasure/PotentialItemUseWin.cs | 28
System/Treasure/TreasureData.cs | 127 --
Core/NetworkPackage/DTCFile/ServerPack/H03_MainCharacter/DTC0310_tagRoleSkillChange.cs | 2
Fight/Actor/Skill/SkillHelper.cs | 1
System/Treasure/PotentialItemBehaviour.cs | 2
Lua/Gen/SnxxzUITreasureModelWrap.cs | 1207 ------------------------
System/Treasure/TreasureSelectWin.cs | 53
System/Treasure/UI3DTreasureSelectStage.cs | 91 -
System/Treasure/TreasureModel.cs | 809 ----------------
System/Achievement/AchievementModel.cs | 42
20 files changed, 120 insertions(+), 2,774 deletions(-)
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H03_MainCharacter/DTC0310_tagRoleSkillChange.cs b/Core/NetworkPackage/DTCFile/ServerPack/H03_MainCharacter/DTC0310_tagRoleSkillChange.cs
index da86987..892b2e1 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H03_MainCharacter/DTC0310_tagRoleSkillChange.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H03_MainCharacter/DTC0310_tagRoleSkillChange.cs
@@ -39,7 +39,7 @@
onMainModel.XpSkill(vNetData.NewSkillID, vNetData.RemainTime);
- model.UpdateTreasurePotentialInfo(vNetData.OldSkillID, vNetData.NewSkillID);
+ //model.UpdateTreasurePotentialInfo(vNetData.OldSkillID, vNetData.NewSkillID);
ModelCenter.Instance.GetModel<TalentModel>().UpdateTalentSkill(vNetData.OldSkillID, vNetData.NewSkillID);
ModelCenter.Instance.GetModel<JadeDynastySkillModel>().OnReceivePackage(vNetData);
if (vNetData != null)
diff --git a/Fight/Actor/Skill/SkillHelper.cs b/Fight/Actor/Skill/SkillHelper.cs
index 222288b..bcd358a 100644
--- a/Fight/Actor/Skill/SkillHelper.cs
+++ b/Fight/Actor/Skill/SkillHelper.cs
@@ -26,7 +26,6 @@
}
Snxxz.UI.TreasureModel _model = Snxxz.UI.ModelCenter.Instance.GetModel<Snxxz.UI.TreasureModel>();
- _model.potentialLevelUpdate += OnSpSkillChange;
}
public void OnSpSkillChange(int skillTypeID, int level)
diff --git a/Lua/Gen/DelegatesGensBridge.cs b/Lua/Gen/DelegatesGensBridge.cs
index 80674bb..59ed408 100644
--- a/Lua/Gen/DelegatesGensBridge.cs
+++ b/Lua/Gen/DelegatesGensBridge.cs
@@ -6711,30 +6711,7 @@
#endif
}
- public UnityEngine.Vector3 __Gen_Delegate_Imp290(object p0, int 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.PushAny(L, p0);
- LuaAPI.xlua_pushinteger(L, p1);
-
- PCall(L, 2, 1, errFunc);
-
-
- UnityEngine.Vector3 __gen_ret;translator.Get(L, errFunc + 1, out __gen_ret);
- LuaAPI.lua_settop(L, errFunc - 1);
- return __gen_ret;
-#if THREAD_SAFE || HOTFIX_ENABLE
- }
-#endif
- }
-
- public UnityEngine.Vector3 __Gen_Delegate_Imp291(object p0, UnityEngine.Vector3 p1)
+ public UnityEngine.Vector3 __Gen_Delegate_Imp290(object p0, UnityEngine.Vector3 p1)
{
#if THREAD_SAFE || HOTFIX_ENABLE
lock (luaEnv.luaEnvLock)
@@ -6757,78 +6734,7 @@
#endif
}
- public void __Gen_Delegate_Imp292(object p0, bool p1, bool p2)
- {
-#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.PushAny(L, p0);
- LuaAPI.lua_pushboolean(L, p1);
- LuaAPI.lua_pushboolean(L, p2);
-
- PCall(L, 3, 0, errFunc);
-
-
-
- LuaAPI.lua_settop(L, errFunc - 1);
-
-#if THREAD_SAFE || HOTFIX_ENABLE
- }
-#endif
- }
-
- public void __Gen_Delegate_Imp293(object p0, Snxxz.UI.TreasureAnimation.TreasureShowStep 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.PushAny(L, p0);
- translator.Push(L, p1);
-
- PCall(L, 2, 0, errFunc);
-
-
-
- LuaAPI.lua_settop(L, errFunc - 1);
-
-#if THREAD_SAFE || HOTFIX_ENABLE
- }
-#endif
- }
-
- public void __Gen_Delegate_Imp294(object p0, bool p1, int p2)
- {
-#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.PushAny(L, p0);
- LuaAPI.lua_pushboolean(L, p1);
- LuaAPI.xlua_pushinteger(L, p2);
-
- PCall(L, 3, 0, errFunc);
-
-
-
- LuaAPI.lua_settop(L, errFunc - 1);
-
-#if THREAD_SAFE || HOTFIX_ENABLE
- }
-#endif
- }
-
- public UnityEngine.Vector3 __Gen_Delegate_Imp295(object p0)
+ public UnityEngine.Vector3 __Gen_Delegate_Imp291(object p0)
{
#if THREAD_SAFE || HOTFIX_ENABLE
lock (luaEnv.luaEnvLock)
@@ -6850,7 +6756,7 @@
#endif
}
- public Treasure3DConfig.TreasureParam __Gen_Delegate_Imp296(object p0)
+ public Treasure3DConfig.TreasureParam __Gen_Delegate_Imp292(object p0)
{
#if THREAD_SAFE || HOTFIX_ENABLE
lock (luaEnv.luaEnvLock)
@@ -6872,7 +6778,7 @@
#endif
}
- public Snxxz.UI.UI3DTreasureSelectStage __Gen_Delegate_Imp297()
+ public Snxxz.UI.UI3DTreasureSelectStage __Gen_Delegate_Imp293()
{
#if THREAD_SAFE || HOTFIX_ENABLE
lock (luaEnv.luaEnvLock)
@@ -6893,7 +6799,7 @@
#endif
}
- public TreasureCategory __Gen_Delegate_Imp298(object p0)
+ public TreasureCategory __Gen_Delegate_Imp294(object p0)
{
#if THREAD_SAFE || HOTFIX_ENABLE
lock (luaEnv.luaEnvLock)
@@ -6915,7 +6821,7 @@
#endif
}
- public void __Gen_Delegate_Imp299(object p0, bool p1, TreasureCategory p2)
+ public void __Gen_Delegate_Imp295(object p0, bool p1, TreasureCategory p2)
{
#if THREAD_SAFE || HOTFIX_ENABLE
lock (luaEnv.luaEnvLock)
@@ -6939,7 +6845,7 @@
#endif
}
- public System.Collections.IEnumerator __Gen_Delegate_Imp300(object p0, TreasureCategory p1, object p2)
+ public System.Collections.IEnumerator __Gen_Delegate_Imp296(object p0, TreasureCategory p1, object p2)
{
#if THREAD_SAFE || HOTFIX_ENABLE
lock (luaEnv.luaEnvLock)
@@ -6963,7 +6869,7 @@
#endif
}
- public void __Gen_Delegate_Imp301(object p0, TreasureCategory p1, bool p2)
+ public void __Gen_Delegate_Imp297(object p0, TreasureCategory p1, bool p2)
{
#if THREAD_SAFE || HOTFIX_ENABLE
lock (luaEnv.luaEnvLock)
@@ -6987,7 +6893,30 @@
#endif
}
- public System.Collections.IEnumerator __Gen_Delegate_Imp302(object p0, object p1, float p2)
+ public UnityEngine.Vector3 __Gen_Delegate_Imp298(object p0, int 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.PushAny(L, p0);
+ LuaAPI.xlua_pushinteger(L, p1);
+
+ PCall(L, 2, 1, errFunc);
+
+
+ UnityEngine.Vector3 __gen_ret;translator.Get(L, errFunc + 1, out __gen_ret);
+ LuaAPI.lua_settop(L, errFunc - 1);
+ return __gen_ret;
+#if THREAD_SAFE || HOTFIX_ENABLE
+ }
+#endif
+ }
+
+ public System.Collections.IEnumerator __Gen_Delegate_Imp299(object p0, object p1, float p2)
{
#if THREAD_SAFE || HOTFIX_ENABLE
lock (luaEnv.luaEnvLock)
@@ -7011,7 +6940,7 @@
#endif
}
- public Snxxz.UI.SignInModel __Gen_Delegate_Imp303(object p0)
+ public Snxxz.UI.SignInModel __Gen_Delegate_Imp300(object p0)
{
#if THREAD_SAFE || HOTFIX_ENABLE
lock (luaEnv.luaEnvLock)
diff --git a/Lua/Gen/SnxxzUITreasureModelWrap.cs b/Lua/Gen/SnxxzUITreasureModelWrap.cs
index b8f3ad2..113c3ff 100644
--- a/Lua/Gen/SnxxzUITreasureModelWrap.cs
+++ b/Lua/Gen/SnxxzUITreasureModelWrap.cs
@@ -21,7 +21,7 @@
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(Snxxz.UI.TreasureModel);
- Utils.BeginObjectRegister(type, L, translator, 0, 63, 31, 20);
+ Utils.BeginObjectRegister(type, L, translator, 0, 37, 20, 12);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit);
@@ -30,16 +30,8 @@
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayerLoginOk", _m_OnPlayerLoginOk);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckReguluPop", _m_CheckReguluPop);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureUnlockShow", _m_GetTreasureUnlockShow);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPotentialUnlockShow", _m_GetPotentialUnlockShow);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetPotentialUnlockShow", _m_SetPotentialUnlockShow);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSpAnim", _m_GetSpAnim);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetSpAnim", _m_SetSpAnim);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureFinishAnim", _m_GetTreasureFinishAnim);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTreasureFinishAnim", _m_SetTreasureFinishAnim);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetUnlockShowTreasure", _m_TryGetUnlockShowTreasure);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTreasureUnlockShow", _m_SetTreasureUnlockShow);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTreasureStageShow", _m_SetTreasureStageShow);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureStageShow", _m_GetTreasureStageShow);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetTreasure", _m_TryGetTreasure);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetTreasureDungeon", _m_TryGetTreasureDungeon);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetTreasureUnlockAchievement", _m_TryGetTreasureUnlockAchievement);
@@ -47,97 +39,60 @@
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureCategory", _m_GetTreasureCategory);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetActiveTreasureCategory", _m_GetActiveTreasureCategory);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureIdByMapIdAndLineId", _m_GetTreasureIdByMapIdAndLineId);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillLevelUpType", _m_GetSkillLevelUpType);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestPotentialUpgrade", _m_RequestPotentialUpgrade);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateTreasureCollectState", _m_UpdateTreasureCollectState);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateTreasurePotentialInfo", _m_UpdateTreasurePotentialInfo);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillLevelUpRedpointTreasure", _m_GetSkillLevelUpRedpointTreasure);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "TreasureStageUpLimit", _m_TreasureStageUpLimit);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckOpenTreasureNewGot", _m_CheckOpenTreasureNewGot);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "SatisfyLevelUpUnlock", _m_SatisfyLevelUpUnlock);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "SatisyPotentialLevelUp", _m_SatisyPotentialLevelUp);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateTreasureLevelInfo", _m_UpdateTreasureLevelInfo);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "HumanTreasureStateChange", _m_HumanTreasureStateChange);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetFurnacesAchievements", _m_GetFurnacesAchievements);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsVersionUnOpenTreasure", _m_IsVersionUnOpenTreasure);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMapIdByTreasure", _m_GetMapIdByTreasure);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureFightPower", _m_GetTreasureFightPower);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetExtensionPower", _m_GetExtensionPower);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetPotentialGetSkill", _m_TryGetPotentialGetSkill);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsPotentialUnlock", _m_IsPotentialUnlock);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPotentialInitialPower", _m_GetPotentialInitialPower);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SatisfyEntranceOpen", _m_SatisfyEntranceOpen);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayEntranceLimitHint", _m_DisplayEntranceLimitHint);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPotentialNextTargetLevel", _m_GetPotentialNextTargetLevel);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "DemonDungeonChallengeNext", _m_DemonDungeonChallengeNext);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureBySkillId", _m_GetTreasureBySkillId);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "treasureCollectProgressUpdateEvent", _e_treasureCollectProgressUpdateEvent);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "treasureSelectedEvent", _e_treasureSelectedEvent);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "potentialBookSelectEvent", _e_potentialBookSelectEvent);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "collectingTreasureChangeEvent", _e_collectingTreasureChangeEvent);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "treasureStateChangeEvent", _e_treasureStateChangeEvent);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "onPotentialLevelUpResultEvent", _e_onPotentialLevelUpResultEvent);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "potentialLevelChangeEvent", _e_potentialLevelChangeEvent);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "potentialLevelUpdate", _e_potentialLevelUpdate);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "vipKillNPCTreasureEvent", _e_vipKillNPCTreasureEvent);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "treasureLevelProgressUpdateEvent", _e_treasureLevelProgressUpdateEvent);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "treasureStageUpEvent", _e_treasureStageUpEvent);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "humanTreasureStateChangeEvent", _e_humanTreasureStateChangeEvent);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "demonTreasureDungeonUpdate", _e_demonTreasureDungeonUpdate);
- Utils.RegisterFunc(L, Utils.METHOD_IDX, "skillLevelUpRedpointUpdate", _e_skillLevelUpRedpointUpdate);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "demonDungeonChallengeNext", _e_demonDungeonChallengeNext);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "stoveRedpoint", _g_get_stoveRedpoint);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedTreasure", _g_get_selectedTreasure);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedPotential", _g_get_selectedPotential);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureStepUpShow", _g_get_treasureStepUpShow);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureStageUpShow", _g_get_treasureStageUpShow);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "currentCategory", _g_get_currentCategory);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "collectingHuman", _g_get_collectingHuman);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "collectingDemon", _g_get_collectingDemon);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedPotentialBook", _g_get_selectedPotentialBook);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "fairyTreasureGetDict", _g_get_fairyTreasureGetDict);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "serverInited", _g_get_serverInited);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "newGotTreasureId", _g_get_newGotTreasureId);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "newGotShowing", _g_get_newGotShowing);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureEntranceShowId", _g_get_treasureEntranceShowId);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureCollectingShowId", _g_get_treasureCollectingShowId);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureGotoId", _g_get_treasureGotoId);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "openFromTreasureSoul", _g_get_openFromTreasureSoul);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "openFromTreasureUnlockShow", _g_get_openFromTreasureUnlockShow);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "openFromTreasureCollect", _g_get_openFromTreasureCollect);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "openFromTreasureList", _g_get_openFromTreasureList);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "openFromTaskId", _g_get_openFromTaskId);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "inPotentialModifyPower", _g_get_inPotentialModifyPower);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "castSoulGuideTaskIds", _g_get_castSoulGuideTaskIds);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "guideTreasures", _g_get_guideTreasures);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureBackLvLimit", _g_get_treasureBackLvLimit);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureBackPercent", _g_get_treasureBackPercent);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureExitLvLimit", _g_get_treasureExitLvLimit);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "exitRecord", _g_get_exitRecord);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "entranceOpenCondition", _g_get_entranceOpenCondition);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "cacheGotAchievements", _g_get_cacheGotAchievements);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "vipKillNPCTreasure", _g_get_vipKillNPCTreasure);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedTreasure", _s_set_selectedTreasure);
- Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedPotential", _s_set_selectedPotential);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "treasureStepUpShow", _s_set_treasureStepUpShow);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "treasureStageUpShow", _s_set_treasureStageUpShow);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "currentCategory", _s_set_currentCategory);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "collectingHuman", _s_set_collectingHuman);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "collectingDemon", _s_set_collectingDemon);
- Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedPotentialBook", _s_set_selectedPotentialBook);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "newGotTreasureId", _s_set_newGotTreasureId);
- Utils.RegisterFunc(L, Utils.SETTER_IDX, "treasureEntranceShowId", _s_set_treasureEntranceShowId);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "treasureCollectingShowId", _s_set_treasureCollectingShowId);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "treasureGotoId", _s_set_treasureGotoId);
- Utils.RegisterFunc(L, Utils.SETTER_IDX, "openFromTreasureSoul", _s_set_openFromTreasureSoul);
- Utils.RegisterFunc(L, Utils.SETTER_IDX, "openFromTreasureUnlockShow", _s_set_openFromTreasureUnlockShow);
- Utils.RegisterFunc(L, Utils.SETTER_IDX, "openFromTreasureCollect", _s_set_openFromTreasureCollect);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "openFromTreasureList", _s_set_openFromTreasureList);
- Utils.RegisterFunc(L, Utils.SETTER_IDX, "openFromTaskId", _s_set_openFromTaskId);
- Utils.RegisterFunc(L, Utils.SETTER_IDX, "inPotentialModifyPower", _s_set_inPotentialModifyPower);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "exitRecord", _s_set_exitRecord);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "vipKillNPCTreasure", _s_set_vipKillNPCTreasure);
@@ -145,9 +100,8 @@
Utils.EndObjectRegister(type, L, translator, null, null,
null, null, null);
- Utils.BeginClassRegister(type, L, __CreateInstance, 6, 1, 1);
- Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSkillLevelUpId", _m_GetSkillLevelUpId_xlua_st_);
-
+ Utils.BeginClassRegister(type, L, __CreateInstance, 5, 1, 1);
+
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TREASURE_DATAMAPID", Snxxz.UI.TreasureModel.TREASURE_DATAMAPID);
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TREASURE_MAPID", Snxxz.UI.TreasureModel.TREASURE_MAPID);
@@ -384,222 +338,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_GetPotentialUnlockShow(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
-
- bool gen_ret = gen_to_be_invoked.GetPotentialUnlockShow( __treasureId );
- LuaAPI.lua_pushboolean(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_SetPotentialUnlockShow(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
- int gen_param_count = LuaAPI.lua_gettop(L);
-
- if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
- bool __value = LuaAPI.lua_toboolean(L, 3);
-
- gen_to_be_invoked.SetPotentialUnlockShow( __treasureId, __value );
-
-
-
- return 0;
- }
- if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
-
- gen_to_be_invoked.SetPotentialUnlockShow( __treasureId );
-
-
-
- return 0;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.SetPotentialUnlockShow!");
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_GetSpAnim(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
-
- bool gen_ret = gen_to_be_invoked.GetSpAnim( __treasureId );
- LuaAPI.lua_pushboolean(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_SetSpAnim(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
- int gen_param_count = LuaAPI.lua_gettop(L);
-
- if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
- bool _anim = LuaAPI.lua_toboolean(L, 3);
-
- gen_to_be_invoked.SetSpAnim( __treasureId, _anim );
-
-
-
- return 0;
- }
- if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
-
- gen_to_be_invoked.SetSpAnim( __treasureId );
-
-
-
- return 0;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.SetSpAnim!");
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_GetTreasureFinishAnim(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
-
- bool gen_ret = gen_to_be_invoked.GetTreasureFinishAnim( __treasureId );
- LuaAPI.lua_pushboolean(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_SetTreasureFinishAnim(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
- int gen_param_count = LuaAPI.lua_gettop(L);
-
- if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
- bool _anim = LuaAPI.lua_toboolean(L, 3);
-
- gen_to_be_invoked.SetTreasureFinishAnim( __treasureId, _anim );
-
-
-
- return 0;
- }
- if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
-
- gen_to_be_invoked.SetTreasureFinishAnim( __treasureId );
-
-
-
- return 0;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.SetTreasureFinishAnim!");
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_TryGetUnlockShowTreasure(RealStatePtr L)
{
try {
@@ -651,64 +389,6 @@
return 0;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_SetTreasureStageShow(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int __id = LuaAPI.xlua_tointeger(L, 2);
- int __stage = LuaAPI.xlua_tointeger(L, 3);
-
- gen_to_be_invoked.SetTreasureStageShow( __id, __stage );
-
-
-
- return 0;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_GetTreasureStageShow(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int __id = LuaAPI.xlua_tointeger(L, 2);
-
- int gen_ret = gen_to_be_invoked.GetTreasureStageShow( __id );
- LuaAPI.xlua_pushinteger(L, gen_ret);
-
-
-
- return 1;
}
} catch(System.Exception gen_e) {
@@ -949,65 +629,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_GetSkillLevelUpType(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int __skillId = LuaAPI.xlua_tointeger(L, 2);
-
- int gen_ret = gen_to_be_invoked.GetSkillLevelUpType( __skillId );
- LuaAPI.xlua_pushinteger(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_RequestPotentialUpgrade(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
- int __potentialId = LuaAPI.xlua_tointeger(L, 3);
- int __costIndex = LuaAPI.xlua_tointeger(L, 4);
-
- gen_to_be_invoked.RequestPotentialUpgrade( __treasureId, __potentialId, __costIndex );
-
-
-
- return 0;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_UpdateTreasureCollectState(RealStatePtr L)
{
try {
@@ -1020,9 +641,9 @@
{
- uint[] __gotTreasures = (uint[])translator.GetObject(L, 2, typeof(uint[]));
+ uint[] _collecteds = (uint[])translator.GetObject(L, 2, typeof(uint[]));
- gen_to_be_invoked.UpdateTreasureCollectState( __gotTreasures );
+ gen_to_be_invoked.UpdateTreasureCollectState( _collecteds );
@@ -1032,108 +653,6 @@
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_UpdateTreasurePotentialInfo(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int __oldSkillId = LuaAPI.xlua_tointeger(L, 2);
- int __newSkillId = LuaAPI.xlua_tointeger(L, 3);
-
- gen_to_be_invoked.UpdateTreasurePotentialInfo( __oldSkillId, __newSkillId );
-
-
-
- return 0;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_GetSkillLevelUpRedpointTreasure(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
-
- int gen_ret = gen_to_be_invoked.GetSkillLevelUpRedpointTreasure( );
- LuaAPI.xlua_pushinteger(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_TreasureStageUpLimit(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
- int gen_param_count = LuaAPI.lua_gettop(L);
-
- if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
- bool __tip = LuaAPI.lua_toboolean(L, 3);
-
- bool gen_ret = gen_to_be_invoked.TreasureStageUpLimit( __treasureId, __tip );
- LuaAPI.lua_pushboolean(L, gen_ret);
-
-
-
- return 1;
- }
- if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
- {
- int __treasureId = LuaAPI.xlua_tointeger(L, 2);
-
- bool gen_ret = gen_to_be_invoked.TreasureStageUpLimit( __treasureId );
- LuaAPI.lua_pushboolean(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.TreasureStageUpLimit!");
}
@@ -1165,69 +684,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_SatisfyLevelUpUnlock(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int _treasureId = LuaAPI.xlua_tointeger(L, 2);
- int _index = LuaAPI.xlua_tointeger(L, 3);
-
- bool gen_ret = gen_to_be_invoked.SatisfyLevelUpUnlock( _treasureId, _index );
- LuaAPI.lua_pushboolean(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_SatisyPotentialLevelUp(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int _treasureId = LuaAPI.xlua_tointeger(L, 2);
- int _potentialId = LuaAPI.xlua_tointeger(L, 3);
- Snxxz.UI.Item _item;
-
- bool gen_ret = gen_to_be_invoked.SatisyPotentialLevelUp( _treasureId, _potentialId, out _item );
- LuaAPI.lua_pushboolean(L, gen_ret);
- translator.Push(L, _item);
-
-
-
-
- return 2;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_UpdateTreasureLevelInfo(RealStatePtr L)
{
try {
@@ -1243,34 +699,6 @@
HA352_tagMCMagicWeaponLVInfo _package = (HA352_tagMCMagicWeaponLVInfo)translator.GetObject(L, 2, typeof(HA352_tagMCMagicWeaponLVInfo));
gen_to_be_invoked.UpdateTreasureLevelInfo( _package );
-
-
-
- return 0;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_HumanTreasureStateChange(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int __id = LuaAPI.xlua_tointeger(L, 2);
-
- gen_to_be_invoked.HumanTreasureStateChange( __id );
@@ -1328,32 +756,6 @@
bool gen_ret = gen_to_be_invoked.IsVersionUnOpenTreasure( __id );
LuaAPI.lua_pushboolean(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_GetSkillLevelUpId_xlua_st_(RealStatePtr L)
- {
- try {
-
-
-
-
- {
- int __type = LuaAPI.xlua_tointeger(L, 1);
- int __level = LuaAPI.xlua_tointeger(L, 2);
-
- int gen_ret = Snxxz.UI.TreasureModel.GetSkillLevelUpId( __type, __level );
- LuaAPI.xlua_pushinteger(L, gen_ret);
@@ -1470,98 +872,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_TryGetPotentialGetSkill(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int __skillTypeId = LuaAPI.xlua_tointeger(L, 2);
- int[] __array;
-
- bool gen_ret = gen_to_be_invoked.TryGetPotentialGetSkill( __skillTypeId, out __array );
- LuaAPI.lua_pushboolean(L, gen_ret);
- translator.Push(L, __array);
-
-
-
-
- return 2;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_IsPotentialUnlock(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int _treasureId = LuaAPI.xlua_tointeger(L, 2);
- int _potentialId = LuaAPI.xlua_tointeger(L, 3);
-
- bool gen_ret = gen_to_be_invoked.IsPotentialUnlock( _treasureId, _potentialId );
- LuaAPI.lua_pushboolean(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_GetPotentialInitialPower(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int _treasureId = LuaAPI.xlua_tointeger(L, 2);
- int _index = LuaAPI.xlua_tointeger(L, 3);
-
- int gen_ret = gen_to_be_invoked.GetPotentialInitialPower( _treasureId, _index );
- LuaAPI.xlua_pushinteger(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_SatisfyEntranceOpen(RealStatePtr L)
{
try {
@@ -1608,35 +918,6 @@
return 0;
- }
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
-
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _m_GetPotentialNextTargetLevel(RealStatePtr L)
- {
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int _level = LuaAPI.xlua_tointeger(L, 2);
-
- int gen_ret = gen_to_be_invoked.GetPotentialNextTargetLevel( _level );
- LuaAPI.xlua_pushinteger(L, gen_ret);
-
-
-
- return 1;
}
} catch(System.Exception gen_e) {
@@ -1734,20 +1015,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_selectedPotential(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.selectedPotential);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_treasureStepUpShow(RealStatePtr L)
{
try {
@@ -1818,20 +1085,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_selectedPotentialBook(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.selectedPotentialBook);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_fairyTreasureGetDict(RealStatePtr L)
{
try {
@@ -1888,20 +1141,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_treasureEntranceShowId(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.treasureEntranceShowId);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_treasureCollectingShowId(RealStatePtr L)
{
try {
@@ -1930,48 +1169,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_openFromTreasureSoul(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- LuaAPI.lua_pushboolean(L, gen_to_be_invoked.openFromTreasureSoul);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_openFromTreasureUnlockShow(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- LuaAPI.lua_pushboolean(L, gen_to_be_invoked.openFromTreasureUnlockShow);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_openFromTreasureCollect(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- LuaAPI.lua_pushboolean(L, gen_to_be_invoked.openFromTreasureCollect);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_openFromTreasureList(RealStatePtr L)
{
try {
@@ -1979,48 +1176,6 @@
Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.openFromTreasureList);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_openFromTaskId(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.openFromTaskId);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_inPotentialModifyPower(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- LuaAPI.lua_pushboolean(L, gen_to_be_invoked.inPotentialModifyPower);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_castSoulGuideTaskIds(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- translator.Push(L, gen_to_be_invoked.castSoulGuideTaskIds);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
@@ -2049,34 +1204,6 @@
Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.treasureBackLvLimit);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_treasureBackPercent(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- LuaAPI.lua_pushnumber(L, gen_to_be_invoked.treasureBackPercent);
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 1;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _g_get_treasureExitLvLimit(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.treasureExitLvLimit);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
@@ -2169,21 +1296,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _s_set_selectedPotential(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- gen_to_be_invoked.selectedPotential = LuaAPI.xlua_tointeger(L, 2);
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_treasureStepUpShow(RealStatePtr L)
{
try {
@@ -2260,21 +1372,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _s_set_selectedPotentialBook(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- gen_to_be_invoked.selectedPotentialBook = LuaAPI.xlua_tointeger(L, 2);
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_newGotTreasureId(RealStatePtr L)
{
try {
@@ -2282,21 +1379,6 @@
Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.newGotTreasureId = LuaAPI.xlua_tointeger(L, 2);
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _s_set_treasureEntranceShowId(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- gen_to_be_invoked.treasureEntranceShowId = LuaAPI.xlua_tointeger(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
@@ -2335,51 +1417,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _s_set_openFromTreasureSoul(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- gen_to_be_invoked.openFromTreasureSoul = LuaAPI.lua_toboolean(L, 2);
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _s_set_openFromTreasureUnlockShow(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- gen_to_be_invoked.openFromTreasureUnlockShow = LuaAPI.lua_toboolean(L, 2);
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _s_set_openFromTreasureCollect(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- gen_to_be_invoked.openFromTreasureCollect = LuaAPI.lua_toboolean(L, 2);
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_openFromTreasureList(RealStatePtr L)
{
try {
@@ -2387,36 +1424,6 @@
Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.openFromTreasureList = LuaAPI.lua_toboolean(L, 2);
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _s_set_openFromTaskId(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- gen_to_be_invoked.openFromTaskId = LuaAPI.xlua_tointeger(L, 2);
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _s_set_inPotentialModifyPower(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- gen_to_be_invoked.inPotentialModifyPower = LuaAPI.lua_toboolean(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
@@ -2539,40 +1546,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _e_potentialBookSelectEvent(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
- int gen_param_count = LuaAPI.lua_gettop(L);
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- System.Action<int> gen_delegate = translator.GetDelegate<System.Action<int>>(L, 3);
- if (gen_delegate == null) {
- return LuaAPI.luaL_error(L, "#3 need System.Action<int>!");
- }
-
- if (gen_param_count == 3)
- {
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
- gen_to_be_invoked.potentialBookSelectEvent += gen_delegate;
- return 0;
- }
-
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
- gen_to_be_invoked.potentialBookSelectEvent -= gen_delegate;
- return 0;
- }
-
- }
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.potentialBookSelectEvent!");
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _e_collectingTreasureChangeEvent(RealStatePtr L)
{
try {
@@ -2637,108 +1610,6 @@
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.treasureStateChangeEvent!");
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _e_onPotentialLevelUpResultEvent(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
- int gen_param_count = LuaAPI.lua_gettop(L);
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- System.Action<int, int, bool> gen_delegate = translator.GetDelegate<System.Action<int, int, bool>>(L, 3);
- if (gen_delegate == null) {
- return LuaAPI.luaL_error(L, "#3 need System.Action<int, int, bool>!");
- }
-
- if (gen_param_count == 3)
- {
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
- gen_to_be_invoked.onPotentialLevelUpResultEvent += gen_delegate;
- return 0;
- }
-
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
- gen_to_be_invoked.onPotentialLevelUpResultEvent -= gen_delegate;
- return 0;
- }
-
- }
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.onPotentialLevelUpResultEvent!");
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _e_potentialLevelChangeEvent(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
- int gen_param_count = LuaAPI.lua_gettop(L);
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- System.Action<int, int> gen_delegate = translator.GetDelegate<System.Action<int, int>>(L, 3);
- if (gen_delegate == null) {
- return LuaAPI.luaL_error(L, "#3 need System.Action<int, int>!");
- }
-
- if (gen_param_count == 3)
- {
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
- gen_to_be_invoked.potentialLevelChangeEvent += gen_delegate;
- return 0;
- }
-
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
- gen_to_be_invoked.potentialLevelChangeEvent -= gen_delegate;
- return 0;
- }
-
- }
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.potentialLevelChangeEvent!");
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _e_potentialLevelUpdate(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
- int gen_param_count = LuaAPI.lua_gettop(L);
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- System.Action<int, int> gen_delegate = translator.GetDelegate<System.Action<int, int>>(L, 3);
- if (gen_delegate == null) {
- return LuaAPI.luaL_error(L, "#3 need System.Action<int, int>!");
- }
-
- if (gen_param_count == 3)
- {
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
- gen_to_be_invoked.potentialLevelUpdate += gen_delegate;
- return 0;
- }
-
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
- gen_to_be_invoked.potentialLevelUpdate -= gen_delegate;
- return 0;
- }
-
- }
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.potentialLevelUpdate!");
return 0;
}
@@ -2845,40 +1716,6 @@
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _e_humanTreasureStateChangeEvent(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
- int gen_param_count = LuaAPI.lua_gettop(L);
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- System.Action<int> gen_delegate = translator.GetDelegate<System.Action<int>>(L, 3);
- if (gen_delegate == null) {
- return LuaAPI.luaL_error(L, "#3 need System.Action<int>!");
- }
-
- if (gen_param_count == 3)
- {
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
- gen_to_be_invoked.humanTreasureStateChangeEvent += gen_delegate;
- return 0;
- }
-
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
- gen_to_be_invoked.humanTreasureStateChangeEvent -= gen_delegate;
- return 0;
- }
-
- }
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.humanTreasureStateChangeEvent!");
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _e_demonTreasureDungeonUpdate(RealStatePtr L)
{
try {
@@ -2909,40 +1746,6 @@
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.demonTreasureDungeonUpdate!");
- return 0;
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _e_skillLevelUpRedpointUpdate(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
- int gen_param_count = LuaAPI.lua_gettop(L);
- Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1);
- System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 3);
- if (gen_delegate == null) {
- return LuaAPI.luaL_error(L, "#3 need System.Action!");
- }
-
- if (gen_param_count == 3)
- {
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
- gen_to_be_invoked.skillLevelUpRedpointUpdate += gen_delegate;
- return 0;
- }
-
-
- if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
- gen_to_be_invoked.skillLevelUpRedpointUpdate -= gen_delegate;
- return 0;
- }
-
- }
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.skillLevelUpRedpointUpdate!");
return 0;
}
diff --git a/System/Achievement/AchievementGotoPart1.cs b/System/Achievement/AchievementGotoPart1.cs
index b85d4da..efb31c0 100644
--- a/System/Achievement/AchievementGotoPart1.cs
+++ b/System/Achievement/AchievementGotoPart1.cs
@@ -313,46 +313,46 @@
public static void GotoSpSkillLevelUp(int _achievementId)
{
- var config = SuccessConfig.Get(_achievementId);
- var index = PlayerDatas.Instance.baseData.Job - 1;
- var skillId = index < config.Condition.Length ? config.Condition[index] : config.Condition[0];
-
- var treasureId = 0;
- var humanTreasures = treasureModel.GetTreasureCategory(TreasureCategory.Human);
-
- foreach (var id in humanTreasures)
- {
- Treasure treasure;
- treasureModel.TryGetTreasure(id, out treasure);
- if (treasure.GetPotential(skillId) != null)
- {
- treasureId = treasure.id;
- break;
- }
- }
-
- var skillConfig = SkillConfig.Get(skillId);
- var treasureConfig = TreasureConfig.Get(treasureId);
-
- if (treasureId != 0)
- {
- if (!FuncOpen.Instance.IsFuncOpen(82))
- {
- FuncOpen.Instance.ProcessorFuncErrorTip(82);
- return;
- }
-
- Treasure treasure;
- if (treasureModel.TryGetTreasure(treasureId, out treasure))
- {
- if (!treasure.IsHighestStage)
- {
- SysNotifyMgr.Instance.ShowTip("TreasureSkillUnGet", skillConfig.SkillName, treasureConfig.Name);
- return;
- }
- guideAchievementId = _achievementId;
- }
- }
+ //var config = SuccessConfig.Get(_achievementId);
+ //var index = PlayerDatas.Instance.baseData.Job - 1;
+ //var skillId = index < config.Condition.Length ? config.Condition[index] : config.Condition[0];
+ //
+ //var treasureId = 0;
+ //var humanTreasures = treasureModel.GetTreasureCategory(TreasureCategory.Human);
+ //
+ //foreach (var id in humanTreasures)
+ //{
+ // Treasure treasure;
+ // treasureModel.TryGetTreasure(id, out treasure);
+ // if (treasure.GetPotential(skillId) != null)
+ // {
+ // treasureId = treasure.id;
+ // break;
+ // }
+ //}
+ //
+ //var skillConfig = SkillConfig.Get(skillId);
+ //var treasureConfig = TreasureConfig.Get(treasureId);
+ //
+ //if (treasureId != 0)
+ //{
+ // if (!FuncOpen.Instance.IsFuncOpen(82))
+ // {
+ // FuncOpen.Instance.ProcessorFuncErrorTip(82);
+ // return;
+ // }
+ //
+ // Treasure treasure;
+ // if (treasureModel.TryGetTreasure(treasureId, out treasure))
+ // {
+ // if (!treasure.IsHighestStage)
+ // {
+ // SysNotifyMgr.Instance.ShowTip("TreasureSkillUnGet", skillConfig.SkillName, treasureConfig.Name);
+ // return;
+ // }
+ // guideAchievementId = _achievementId;
+ // }
+ //}
}
diff --git a/System/Achievement/AchievementModel.cs b/System/Achievement/AchievementModel.cs
index bd1046d..d4d3008 100644
--- a/System/Achievement/AchievementModel.cs
+++ b/System/Achievement/AchievementModel.cs
@@ -450,48 +450,6 @@
case 116:
getItemPathModel.SetChinItemModel(config.Condition[0]);
break;
- case 91:
- var index = PlayerDatas.Instance.baseData.Job - 1;
- var potentialId = index < config.Condition.Length ? config.Condition[index] : config.Condition[0];
-
- var treasureModel = ModelCenter.Instance.GetModel<TreasureModel>();
- var treasureId = 0;
- var treasures = treasureModel.GetTreasureCategory(TreasureCategory.Human);
-
- foreach (var id in treasures)
- {
- Treasure treasure;
- treasureModel.TryGetTreasure(id, out treasure);
- if (treasure.GetPotential(potentialId) != null)
- {
- treasureId = treasure.id;
- break;
- }
- }
- var skillConfig = SkillConfig.Get(potentialId);
- var treasureConfig = TreasureConfig.Get(treasureId);
- if (treasureId != 0)
- {
- if (!FuncOpen.Instance.IsFuncOpen(82))
- {
- return;
- }
- Treasure treasure;
- if (treasureModel.TryGetTreasure(treasureId, out treasure))
- {
- if (!treasure.IsHighestStage)
- {
- return;
- }
- treasureModel.currentCategory = TreasureCategory.Human;
- treasureModel.selectedTreasure = treasureId;
- if (!WindowCenter.Instance.IsOpen<TreasureBaseWin>())
- {
- WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.TreasureCollectSoul);
- }
- }
- }
- break;
default:
WindowCenter.Instance.Close<TreasureBaseWin>();
diff --git a/System/MainInterfacePanel/FlyingShoesTask.cs b/System/MainInterfacePanel/FlyingShoesTask.cs
index 886fcbe..24e7bbb 100644
--- a/System/MainInterfacePanel/FlyingShoesTask.cs
+++ b/System/MainInterfacePanel/FlyingShoesTask.cs
@@ -196,7 +196,6 @@
else
{
treasureModel.selectedTreasure = _treasureId;
- treasureModel.openFromTaskId = Task_ID;
WindowCenter.Instance.Open<TreasureBaseWin>();
}
return;
@@ -218,7 +217,6 @@
else
{
treasureModel.selectedTreasure = _treasureId;
- treasureModel.openFromTaskId = Task_ID;
WindowCenter.Instance.Open<TreasureBaseWin>();
}
}
diff --git a/System/MainInterfacePanel/PlayerMainDate.cs b/System/MainInterfacePanel/PlayerMainDate.cs
index 7bc1b9a..f797d7f 100644
--- a/System/MainInterfacePanel/PlayerMainDate.cs
+++ b/System/MainInterfacePanel/PlayerMainDate.cs
@@ -379,10 +379,6 @@
public void PowerAdd(int power)
{
- if (ModelCenter.Instance.GetModel<TreasureModel>().inPotentialModifyPower)
- {
- return;
- }
if (prowBool)
{
prowNum = power;
diff --git a/System/RolePromote/RolePromoteModel.cs b/System/RolePromote/RolePromoteModel.cs
index eea028c..a40745b 100644
--- a/System/RolePromote/RolePromoteModel.cs
+++ b/System/RolePromote/RolePromoteModel.cs
@@ -536,33 +536,10 @@
_id == methodData.fairyHeartRedpoint.id ||
_id == realmModel.realmRedpoint.id ||
_id == gemModel.gemTagRedPoint.id ||
- _id == rolePointModel.redpoint.id ||
- IsTreasureRedpoint(_id))
+ _id == rolePointModel.redpoint.id)
{
CheckPromoteDetailEffect();
}
- }
-
- private bool IsTreasureRedpoint(int _id)
- {
- for (int k = 1; k < (int)TreasureCategory.Zerg; k++)
- {
- var list = treasureModel.GetTreasureCategory((TreasureCategory)k);
- if (list == null)
- {
- continue;
- }
- for (int j = 0; j < list.Count; j++)
- {
- Treasure treasure;
- if (treasureModel.TryGetTreasure(list[j], out treasure)
- && treasure.skillLevelUpRedpoint != null && treasure.skillLevelUpRedpoint.id == _id)
- {
- return true;
- }
- }
- }
- return false;
}
public bool GetPromoteDetailShow(PromoteDetailType _type)
@@ -585,17 +562,7 @@
case PromoteDetailType.GodWeapon:
return magicianModel.magicianRedpoint.state == RedPointState.Simple;
case PromoteDetailType.TreasurePotential:
- var list = treasureModel.GetTreasureCategory(TreasureCategory.Human);
- for (int j = 0; j < list.Count; j++)
- {
- Treasure treasure;
- if (treasureModel.TryGetTreasure(list[j], out treasure) && treasure.state == TreasureState.Collected
- && treasure.skillLevelUpRedpoint != null && treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
- {
- return true;
- }
- }
- break;
+ return false;
case PromoteDetailType.Gem:
return gemModel.gemTagRedPoint.state == RedPointState.Simple;
case PromoteDetailType.Wash:
diff --git a/System/Tip/PromoteDetailsWin.cs b/System/Tip/PromoteDetailsWin.cs
index e482f3a..14e2afc 100644
--- a/System/Tip/PromoteDetailsWin.cs
+++ b/System/Tip/PromoteDetailsWin.cs
@@ -96,24 +96,6 @@
WindowCenter.Instance.Open<RolePanel>(false, 3);
break;
case RolePromoteModel.PromoteDetailType.TreasurePotential:
- treasureModel.currentCategory = TreasureCategory.Human;
- var list = treasureModel.GetTreasureCategory(TreasureCategory.Human);
- var gotoId = list[0];
- for (int i = 0; i < list.Count; i++)
- {
- Treasure treasure;
- if (treasureModel.TryGetTreasure(list[i], out treasure))
- {
- if (treasure.state == TreasureState.Collected && treasure.skillLevelUpRedpoint != null &&
- treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
- {
- gotoId = list[i];
- break;
- }
- }
- }
- treasureModel.selectedTreasure = gotoId;
- WindowCenter.Instance.Open<TreasureBaseWin>();
break;
case RolePromoteModel.PromoteDetailType.RolePromote:
WindowCenter.Instance.Open<RolePromoteWin>();
diff --git a/System/Treasure/PotentialItemBehaviour.cs b/System/Treasure/PotentialItemBehaviour.cs
index 31be9cc..b6e6835 100644
--- a/System/Treasure/PotentialItemBehaviour.cs
+++ b/System/Treasure/PotentialItemBehaviour.cs
@@ -63,7 +63,7 @@
{
//if (own >= need)
//{
- model.selectedPotentialBook = potentialBook.itemId;
+ //model.selectedPotentialBook = potentialBook.itemId;
WindowCenter.Instance.Close<PotentialItemUseWin>();
//}
//else
diff --git a/System/Treasure/PotentialItemUseWin.cs b/System/Treasure/PotentialItemUseWin.cs
index 4dff925..acf2c64 100644
--- a/System/Treasure/PotentialItemUseWin.cs
+++ b/System/Treasure/PotentialItemUseWin.cs
@@ -64,20 +64,20 @@
return;
}
- var potential = treasure.GetPotential(model.selectedPotential);
- var levelUpType = model.GetSkillLevelUpType(potential.id);
- var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
- var config = TreasureSkillConfig.Get(levelupId);
-
- var books = new List<PotentialBook>();
- for (int i = 0; i < config.Meterial2ID.Length; i++)
- {
- var itemId = config.Meterial2ID[i];
- var needCount = config.MeterialNum2[i];
- var rate = config.Rate[i];
- books.Add(new PotentialBook(itemId, needCount, rate, levelupId));
- }
- m_PotentialScroll.Init(books);
+ //var potential = treasure.GetPotential(model.selectedPotential);
+ //var levelUpType = model.GetSkillLevelUpType(potential.id);
+ //var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
+ //var config = TreasureSkillConfig.Get(levelupId);
+ //
+ //var books = new List<PotentialBook>();
+ //for (int i = 0; i < config.Meterial2ID.Length; i++)
+ //{
+ // var itemId = config.Meterial2ID[i];
+ // var needCount = config.MeterialNum2[i];
+ // var rate = config.Rate[i];
+ // books.Add(new PotentialBook(itemId, needCount, rate, levelupId));
+ //}
+ //m_PotentialScroll.Init(books);
}
}
diff --git a/System/Treasure/TreasureAchievement.cs b/System/Treasure/TreasureAchievement.cs
index 3f4f606..fcc742e 100644
--- a/System/Treasure/TreasureAchievement.cs
+++ b/System/Treasure/TreasureAchievement.cs
@@ -126,8 +126,7 @@
private void GotoComplete()
{
- if (m_TreasureCyclicScroll.showing || treasureModel.treasureStepUpShow
- || treasureModel.TreasureStageUpLimit(treasureModel.selectedTreasure))
+ if (m_TreasureCyclicScroll.showing || treasureModel.treasureStepUpShow)
{
return;
}
diff --git a/System/Treasure/TreasureAnimation.cs b/System/Treasure/TreasureAnimation.cs
deleted file mode 100644
index 39b5f01..0000000
--- a/System/Treasure/TreasureAnimation.cs
+++ /dev/null
@@ -1,843 +0,0 @@
-锘縰sing System;
-using System.Collections;
-using System.Collections.Generic;
-
-using UnityEngine;
-using UnityEngine.UI;
-using DG.Tweening;
-namespace Snxxz.UI
-{
- public class TreasureAnimation : MonoBehaviour
- {
- [SerializeField] UIAlphaTween m_DisplayAlphaTween;
-
- [SerializeField] RectTransform m_ContainerStars;
- [SerializeField] PositionTween m_StarPositionTween;
- [SerializeField] UIEffect[] m_Stars;
-
- [SerializeField] TreasureMeridianBehaviour[] m_TreasureMeridians;
-
- [SerializeField] PositionTween m_AchievementPosTween;
- [SerializeField] PositionTween m_ProgressPosTween;
-
- [SerializeField] RectTransform m_ContianerPotential;
- [SerializeField] RectTransform m_ContainerLevelUp;
-
- [SerializeField] PositionTween m_SkillPosTween;
- [SerializeField] ScaleTween m_SkillSclTween;
- [SerializeField] ScaleTween m_PotentialSclTween;
-
- [SerializeField] RectTransform m_AchievementSfxTarget;
-
- [SerializeField] PositionTween m_HeroShowSkillPowTween;
- [SerializeField] RectTransform m_ContainerSkillShowBottom;
-
- [SerializeField] ScaleTween[] m_PotentialPointSclTweens;
-
- [SerializeField] TreasurePotentialBriefInfo[] m_TreasurePotentials;
- [SerializeField] RectTransform[] m_PotentialLineMasks;
- [SerializeField] RectTransform m_PotentialSkill;
-
- TreasureModel m_Model;
- TreasureModel model
- {
- get
- {
- return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<TreasureModel>());
- }
- }
-
- #region const
- const int POTENTIALUNLOCKSFX = 5190;
- public const int SPIRALSFX = 5126;
- const int CONVERGESFX = 5127;
- public const float LINE_NORMAL_LENGTH = 187f;
- public const float LINE_NORMAL_SCALE = 0.78f;
- const float POTENTIAL_TIME_SCALE = 0.5f;
- const float SPIRAL_SFX_TIME_SCALE = 0.6f;
- const float LINE_SFX_TIME_SCALE = 0.3f;
- const float POSITION_TWEEN_SPEED = 300f;
- public const int LINESFX = 5121;
- public const string LINE_STATE_1 = "Effect_FaBao_Xian1_01";
- public const string LINE_STATE_2 = "Effect_FaBao_Xian1_02";
- public const string LINE_STATE_3 = "Effect_FaBao_Xian1_03";
- public const string LINE_STATE_4 = "Effect_FaBao_Xian1_04";
- public const string LINE_STATE_5 = "Effect_FaBao_Xian1_05";
-
- public const int POTENTIAL_LINESFX = 5173;
- public const string POTENTIAL_LINE_STATE_1 = "Effect_FaBao_Xian2";
- public const string POTENTIAL_LINE_STATE_2 = "Effect_FaBao_Xian2_02";
-
- public static readonly int Param_Step = Animator.StringToHash("Step");
- #endregion
-
- #region public
- public int selectTreasureId { get; set; }
-
- private int displayTreasure { get; set; }
-
- public event Action OnStageUpLineComplete;
- public event Action<TreasureShowStep> OnStepComplete;
- public event Action<int> OnAchievementSfxComplete;
- public event Action OnAchievementTweenComplete;
- public event Action<int> OnUnlockPotentialComplete;
- public event Action<int,int> OnPotentialLevelUpComplete;
- public event Action<int> OnPotentialLineAnimComplete;
-
- TreasureShowStep m_Step = TreasureShowStep.None;
- TreasureShowStep m_BeforeStep = TreasureShowStep.None;
- public TreasureShowStep step
- {
- get
- {
- return m_Step;
- }
- set
- {
- stepComplete = true;
- if (step == value && value != TreasureShowStep.Lock)
- {
- if (value == TreasureShowStep.UnLock)
- {
- m_ProgressPosTween.SetEndState();
- m_PotentialSclTween.SetEndState();
- UI3DTreasureSelectStage.Instance.SetEndState();
- }
- return;
- }
- switch (m_BeforeStep)
- {
- case TreasureShowStep.Lock:
- if (value != TreasureShowStep.Lock)
- {
- ExitShowLock();
- }
- break;
- }
- m_Step = value;
- m_BeforeStep = value;
- switch (value)
- {
- case TreasureShowStep.Lock:
- OnEnterShowLock();
- break;
- case TreasureShowStep.FirstUnLock:
- OnEnterFisrtUnlock();
- break;
- case TreasureShowStep.UnLock:
- OnEnterShowUnLock();
- break;
- case TreasureShowStep.FirstPotential:
- OnEnterFirstPotential();
- break;
- case TreasureShowStep.Potential:
- OnEnterPotential();
- break;
- }
- }
- }
-
- public void DisplayPotentialLevelUp(int _index, int level)
- {
- if (_index >= m_TreasurePotentials.Length || _index < 0)
- {
- return;
- }
- if (level == 15 && _index < 2)
- {
- stepComplete = false;
- }
- displayTreasure = model.selectedTreasure;
- StartCoroutine(Co_PotentialLevelUp(_index, level));
- }
-
- IEnumerator Co_PotentialLevelUp(int _index, int level)
- {
- yield return StartCoroutine(Co_PotentialSpiral(_index, SPIRALSFX));
- if (displayTreasure != model.selectedTreasure)
- {
- stepComplete = true;
- yield break;
- }
- //UIEffect effect = null;
- //if (level == 1)
- //{
- // effect = EffectMgr.Instance.PlayUIEffect(POTENTIAL_LINESFX, 2100, transform, false);
- // if (effect == null)
- // {
- // stepComplete = true;
- // yield break;
- // }
- // effect.keep = true;
- // effect.maskArea = m_PotentialLineMasks[_index];
- // effect.SetMask();
- // yield return StartCoroutine(Co_DisplayPotentialLine(_index,effect));
- //}
- if (displayTreasure != model.selectedTreasure)
- {
- //StopPotentialLineEffect(effect);
- stepComplete = true;
- yield break;
- }
- if (OnPotentialLevelUpComplete != null)
- {
- OnPotentialLevelUpComplete(_index, level);
- }
- stepComplete = true;
- //yield return null;
- //StopPotentialLineEffect(effect);
- }
-
- public void DisplayPotentialLine(int _index)
- {
- stepComplete = false;
- StartCoroutine(Co_PotentialLineAnim(_index));
- }
-
- IEnumerator Co_PotentialLineAnim(int _index)
- {
- UIEffect effect = EffectMgr.Instance.PlayUIEffect(POTENTIAL_LINESFX, 2100, transform, false);
- if (effect == null)
- {
- stepComplete = true;
- yield break;
- }
- effect.keep = true;
- effect.maskArea = m_PotentialLineMasks[_index];
- effect.SetMask();
- yield return StartCoroutine(Co_DisplayPotentialLine(_index, effect));
- stepComplete = true;
- StopPotentialLineEffect(effect);
- if (OnPotentialLineAnimComplete != null)
- {
- OnPotentialLineAnimComplete(_index);
- }
- }
-
- private void StopPotentialLineEffect(UIEffect _effect)
- {
- if (_effect != null)
- {
- _effect.keep = false;
- _effect.maskArea = null;
- _effect.StopImediatly();
- _effect = null;
- }
- }
-
- IEnumerator Co_PotentialSpiral(int _index, int effectId)
- {
- var effect = EffectMgr.Instance.PlayUIEffect(effectId, 2700, m_TreasurePotentials[_index].transform, false);
- var duration = effect.duration;
- var _time = 0f;
- while (_time < duration)
- {
- _time += Time.deltaTime;
- yield return null;
- if (displayTreasure != model.selectedTreasure)
- {
- effect.StopImediatly();
- effect = null;
- yield break;
- }
- }
- }
-
- IEnumerator Co_DisplayPotentialLine(int _index,UIEffect effect)
- {
- var _duration = effect.duration;
- var _time = 0f;
- var _frompos = transform.InverseTransformPoint(m_TreasurePotentials[_index].transform.TransformPoint(Vector3.zero));
- var _topos = transform.InverseTransformPoint(m_PotentialSkill.transform.TransformPoint(Vector3.zero));
- effect.transform.localPosition = _frompos;
- var _angle = VectorUtility.VectorAngle(_topos, _frompos);
- effect.transform.localEulerAngles = Vector3.zero.SetZ(_angle);
- var _animator = effect.target.GetAnimator();
- _animator.transform.localScale = Vector3.one.SetY(Vector2.Distance(_topos, _frompos)
- / LINE_NORMAL_LENGTH * LINE_NORMAL_SCALE);
- _animator.Play(POTENTIAL_LINE_STATE_1, 0, 0);
- while (_time < _duration)
- {
- _time += Time.deltaTime;
- yield return null;
- if (displayTreasure != model.selectedTreasure)
- {
- yield break;
- }
- }
- }
-
- public void UnlockTreasurePotential(int _index)
- {
- if (_index >= m_TreasurePotentials.Length || _index < 0)
- {
- return;
- }
- stepComplete = false;
- displayTreasure = model.selectedTreasure;
- StartCoroutine(Co_UnlockTreasurePotential(_index));
- }
-
- IEnumerator Co_UnlockTreasurePotential(int _index)
- {
- StartCoroutine(Co_PotentialSpiral(_index, POTENTIALUNLOCKSFX));
- yield return WaitingForSecondConst.WaitMS600;
- if (displayTreasure != model.selectedTreasure)
- {
- stepComplete = true;
- yield break;
- }
- stepComplete = true;
- m_TreasurePotentials[_index].DisplayUnlock();
- if (OnUnlockPotentialComplete != null)
- {
- OnUnlockPotentialComplete(_index);
- }
- }
-
- public void OnStageUp(int _index)
- {
- stepComplete = false;
- StartCoroutine(Co_StepStage(_index));
- }
-
- IEnumerator Co_StepStage(int _index)
- {
- float _timer = 0f;
- float _duration = 0f;
- var _config = ScriptableObjectLoader.LoadSoTreasureMeridian(model.selectedTreasure);
- var _effect = EffectMgr.Instance.PlayUIEffect(SPIRALSFX, 2700, m_TreasureMeridians[_index].transform.parent, false);
- _effect.transform.localPosition = _config[_index].position;
- _duration = _effect.duration;
-
- if (_index == _config.stagePointNum - 1 && m_ProgressPosTween.gameObject.activeInHierarchy)
- {
- m_ProgressPosTween.Play(true);
- }
-
- while (_timer < _duration)
- {
- _timer += Time.deltaTime;
- yield return null;
- }
- _duration = 0.3f;
- _timer = 0f;
- var _current = m_TreasureMeridians[_index];
- _current.RequestStateSfx();
- _current.selectSfx.Play();
- if (_current.selectSfx.IsPlaying)
- {
- _current.selectSfx.transform.DOScale(Vector3.zero, _duration);
- }
- while (_timer < _duration)
- {
- _timer += Time.deltaTime;
- yield return null;
- }
- _current.selectSfx.StopImediatly();
-
- stepComplete = true;
- if (OnStageUpLineComplete != null)
- {
- OnStageUpLineComplete();
- }
- }
-
- public void OnStageLock(int _index)
- {
- StartCoroutine(Co_StageLock(_index));
- }
-
- IEnumerator Co_StageLock(int _index)
- {
- float _timer = 0f;
- float _duration = 0f;
- stepComplete = false;
- var _config = ScriptableObjectLoader.LoadSoTreasureMeridian(model.selectedTreasure);
- _index = Mathf.Max(_index, 0);
- var _current = m_TreasureMeridians[_index];
- if (_index < 0)
- {
- stepComplete = true;
- yield break;
- }
- if (_index < _config.stagePointNum - 1)
- {
- var _effect = EffectMgr.Instance.PlayUIEffect(LINESFX, 2500, m_TreasureMeridians[_index].transform.parent, false);
- _effect.transform.localPosition = _config[_index].position;
- var _angle = VectorUtility.VectorAngle(_config[_index + 1].position, _config[_index].position);
- _effect.transform.localEulerAngles = Vector3.zero.SetZ(_angle);
- var _animator = _effect.target.GetAnimator();
- _animator.transform.localScale = Vector3.one.SetY(Vector2.Distance(_config[_index + 1].position, _config[_index].position)
- / LINE_NORMAL_LENGTH * LINE_NORMAL_SCALE);
- _animator.Play(LINE_STATE_1, 0, 0);
- _duration = _effect.duration;
- _timer = 0f;
- while (_timer < _duration * 0.6f)
- {
- _timer += Time.deltaTime;
- yield return null;
- }
- _effect.StopImediatly();
- var _next = m_TreasureMeridians[_index + 1];
- _current.RequestSfx();
- _next.RequestSfx();
- _duration = 0.3f;
- _timer = 0f;
- if (_next.selectSfx.IsPlaying)
- {
- _next.selectSfx.transform.localScale = Vector3.zero;
- _next.selectSfx.transform.DOScale(Vector3.one, _duration);
- }
- while (_timer < _duration)
- {
- _timer += Time.deltaTime;
- yield return null;
- }
- }
- stepComplete = true;
- if (OnStageUpLineComplete != null)
- {
- OnStageUpLineComplete();
- }
- }
-
- public void OnHeroSkillShow(int _index)
- {
- var _config = ScriptableObjectLoader.LoadSoTreasureMeridian(selectTreasureId);
- m_HeroShowSkillPowTween.gameObject.SetActive(true);
- m_ContainerSkillShowBottom.gameObject.SetActive(false);
- m_HeroShowSkillPowTween.from = _config[_index].position;
- m_HeroShowSkillPowTween.SetStartState();
- m_HeroShowSkillPowTween.Play(()=>
- {
- m_ContainerSkillShowBottom.gameObject.SetActive(true);
- });
- }
-
- public void TreasureTween(bool _play = false)
- {
- UI3DTreasureSelectStage.Instance.SetStartState();
- if (_play)
- {
- UI3DTreasureSelectStage.Instance.Tween(null);
- }
- }
-
- [Header("棰嗗彇鎴愬氨鐗规晥")]
- [SerializeField, Header("鍗曚釜椋炶鏃堕棿")]
- float achievement_sfx_duration = 1.0f;
- [SerializeField, Header("鐗规晥闂撮殧鏃堕棿")]
- float achievement_sfx_interval = 0.15f;
- [SerializeField, Header("鐗规晥涓暟")]
- int achievement_sfx_count = 5;
- public void ShowAchievementCompleteSfx(RectTransform _root, int _id)
- {
- var _worldPos = _root.TransformPoint(Vector3.zero);
- var _startPos = transform.InverseTransformPoint(_worldPos);
- _worldPos = m_AchievementSfxTarget.TransformPoint(Vector3.zero);
- var _endPos = transform.InverseTransformPoint(_worldPos);
- StartCoroutine(Co_AchivementGotSfx(_startPos, _endPos, _id));
- }
-
- IEnumerator Co_AchivementGotSfx(Vector3 _start, Vector3 _end, int _id)
- {
- float _timer = 0f;
- bool _boom = false;
- var _n = _end - _start;
- var _selectTreasure = selectTreasureId;
- _n = (Quaternion.AngleAxis(90, Vector3.forward) * _n).normalized;
- List<Vector3> _points = new List<Vector3>(achievement_sfx_count);
- List<UIEffect> _effects = new List<UIEffect>(achievement_sfx_count);
- UIEffect _boomSfx = null;
- for (int i = 0; i < achievement_sfx_count; i++)
- {
- var _d = UnityEngine.Random.Range(50f, 200.0f);
- var _m = (_start + _end) / 2 + (_d * (i % 2 == 0 ? 1 : -1)) * _n;
- _points.Add(_m);
- }
- while (_timer < achievement_sfx_duration +
- achievement_sfx_interval * (achievement_sfx_count - 1))
- {
- if (_selectTreasure != selectTreasureId)
- {
- for (int i = 0; i < _effects.Count; i++)
- {
- _effects[i].StopImediatly();
- _effects[i] = null;
- }
- if (_boomSfx != null)
- {
- _boomSfx.StopImediatly();
- _boomSfx = null;
- }
- yield break;
- }
- yield return null;
- _timer += Time.deltaTime;
- int _count = Mathf.Min((int)(_timer / achievement_sfx_interval) + 1, achievement_sfx_count);
- for (int i = 0; i < _count; i++)
- {
- if (_effects.Count < i + 1 || _effects[i] == null)
- {
- var _effect = EffectMgr.Instance.PlayUIEffect(3009, 2700, transform, _start, true);
- _effects.Add(_effect);
- }
- var _t = Mathf.Clamp01((_timer - achievement_sfx_interval * i) / achievement_sfx_duration);
- var _pos = Bezier.BezierCurve(_start, _points[i], _end, _t);
- _effects[i].transform.localPosition = _pos;
- }
- if (!_boom && _timer > achievement_sfx_duration +
- achievement_sfx_interval * (achievement_sfx_count - 1) - 0.5f)
- {
- _boom = true;
- _boomSfx = EffectMgr.Instance.PlayUIEffect(5138, 2500, transform, _end, false);
- }
- }
- for (int i = 0; i < _effects.Count; i++)
- {
- _effects[i].StopImediatly();
- _effects[i] = null;
- }
- _effects.Clear();
- if (OnAchievementSfxComplete != null)
- {
- OnAchievementSfxComplete(_id);
- }
- }
-
- public void SetDisplayEnd()
- {
- m_DisplayAlphaTween.SetEndState();
- }
- #endregion
-
- #region private
- float timer = 0f;
- public bool stepComplete { get; set; }
-
- List<UIEffect> m_LineSfxs = new List<UIEffect>();
-
- private void Init()
- {
- m_ContainerStars.gameObject.SetActive(false);
- }
-
- void ExitShowLock()
- {
- m_ContainerStars.gameObject.SetActive(false);
- }
-
- void OnEnterShowLock()
- {
- m_DisplayAlphaTween.SetStartState();
- m_DisplayAlphaTween.Play();
- m_ContainerStars.gameObject.SetActive(true);
- m_StarPositionTween.SetStartState();
- TreasureMeridianConfig _config = ScriptableObjectLoader.LoadSoTreasureMeridian(selectTreasureId);
- for (int i = 0; i < m_Stars.Length; i++)
- {
- if (_config == null || i >= _config.stagePointNum)
- {
- m_Stars[i].gameObject.SetActive(false);
- }
- else
- {
- m_Stars[i].gameObject.SetActive(true);
- m_Stars[i].StopImediatly();
- m_Stars[i].effect = _config[i].effect;
- m_Stars[i].transform.localPosition = _config[i].position;
- m_Stars[i].Play();
- m_Stars[i].target.GetAnimator().Play("Effect_FaBao_Light_1", 0, UnityEngine.Random.Range(0, 0.8f));
- }
- }
-
- TreasureTween();
- }
-
- void OnEnterFisrtUnlock()
- {
- OnEnterShowLock();
-
- m_DisplayAlphaTween.SetStartState();
- m_AchievementPosTween.SetStartState();
- m_ProgressPosTween.SetStartState();
- m_StarPositionTween.SetStartState();
-
- for (int i = 0; i < m_TreasureMeridians.Length; i++)
- {
- m_TreasureMeridians[i].gameObject.SetActive(false);
- }
-
- stepComplete = false;
- m_DisplayAlphaTween.Play(() =>
- {
- TreasureTween(true);
- m_StarPositionTween.Play(OnStarTweenComplete);
- });
- }
-
- void OnStarTweenComplete()
- {
- timer = 0;
- StartCoroutine(Co_ShowMeridianLine());
- }
-
- IEnumerator Co_ShowMeridianLine()
- {
- var _index = 0;
- TreasureMeridianConfig _config = ScriptableObjectLoader.LoadSoTreasureMeridian(selectTreasureId);
- RecycleLineSfx();
- var _duration = 0f;
- while (_index < _config.stagePointNum)
- {
- timer = 0f;
- var _effect1 = EffectMgr.Instance.PlayUIEffect(SPIRALSFX, 2700, m_TreasureMeridians[_index].transform.parent, false);
- _effect1.transform.position = m_TreasureMeridians[_index].transform.position;
- _duration = _effect1.duration;
- while (timer < _duration * SPIRAL_SFX_TIME_SCALE)
- {
- yield return null;
- }
- m_TreasureMeridians[_index].gameObject.SetActive(true);
- m_TreasureMeridians[_index].RequestStateSfx();
- m_Stars[_index].StopImediatly();
- timer = 0f;
- if (_index < _config.stagePointNum - 1)
- {
- var _effect2 = EffectMgr.Instance.PlayUIEffect(LINESFX, 2500, m_TreasureMeridians[_index].transform.parent, false);
- _duration = _effect2.duration;
- _effect2.keep = true;
- m_LineSfxs.Add(_effect2);
- _effect2.transform.position = m_TreasureMeridians[_index].transform.position;
- var _angle = VectorUtility.VectorAngle(_config[_index + 1].position, _config[_index].position);
- _effect2.transform.localEulerAngles = Vector3.zero.SetZ(_angle);
- var _animator = _effect2.target.GetAnimator();
- _animator.transform.localScale = Vector3.one.SetY(Vector2.Distance(_config[_index + 1].position, _config[_index].position)
- / LINE_NORMAL_LENGTH * LINE_NORMAL_SCALE);
- _animator.SetInteger(Param_Step, 0);
- _animator.Play(LINE_STATE_1, 0, 0);
- while (timer < _duration * LINE_SFX_TIME_SCALE)
- {
- yield return null;
- }
- _animator.SetInteger(Param_Step, 1);
- }
- _index++;
- }
- for (int i = 0; i < _config.stagePointNum; i++)
- {
- m_TreasureMeridians[i].PlayLineSfx(2, true);
- }
- RecycleLineSfx();
- timer = 0f;
- _duration = m_AchievementPosTween.duration + m_AchievementPosTween.delay;
- m_AchievementPosTween.Play(() =>
- {
- if (OnAchievementTweenComplete != null)
- {
- OnAchievementTweenComplete();
- }
- });
- Treasure treasure;
- model.TryGetTreasure(selectTreasureId, out treasure);
- if (!treasure.IsHighestStage)
- {
- m_ProgressPosTween.Play();
- }
- if (OnStepComplete != null)
- {
- OnStepComplete(TreasureShowStep.FirstUnLock);
- }
- while (timer < _duration)
- {
- yield return null;
- }
- stepComplete = true;
- model.TryGetTreasure(selectTreasureId, out treasure);
- if (treasure.treasureStages[0].unlockType != TreasureStageUnlock.None)
- {
- OnStageUp(0);
- }
- model.treasureEntranceShowId = 0;
- }
-
- void OnEnterShowUnLock()
- {
- stepComplete = false;
- m_DisplayAlphaTween.SetStartState();
- m_DisplayAlphaTween.Play();
-
- UI3DTreasureSelectStage.Instance.SetStartState();
-
- OnEnterPotential();
- m_ProgressPosTween.SetEndState();
- m_AchievementPosTween.SetEndState();
- m_PotentialSclTween.SetEndState();
-
-
- UI3DTreasureSelectStage.Instance.Tween(() =>
- {
- stepComplete = true;
- if (OnStepComplete != null)
- {
- OnStepComplete(TreasureShowStep.UnLock);
- }
- });
- }
-
- void OnEnterFirstPotential()
- {
- timer = 0;
- stepComplete = false;
- for (int i = 0; i < m_TreasureMeridians.Length; i++)
- {
- m_TreasureMeridians[i].StopSfx();
- }
- StartCoroutine(Co_ShowFirstPotential());
- }
-
- IEnumerator Co_ShowFirstPotential()
- {
- Treasure _treasure;
- model.TryGetTreasure(selectTreasureId, out _treasure);
- if (_treasure == null)
- {
- stepComplete = true;
- yield break;
- }
- var _duration = 0.0f;
- var _stages = _treasure.treasureStages;
- var _config = ScriptableObjectLoader.LoadSoTreasureMeridian(model.selectedTreasure);
- var _skillStage = _stages.FindIndex((x) =>
- {
- return x.unlockType == TreasureStageUnlock.Skill;
- });
- var _skillStageIndex = _treasure.IndexOfStage(_skillStage);
- for (int i = 0; i < _config.stagePointNum; i++)
- {
- if (i == _skillStageIndex)
- {
- continue;
- }
- _duration = Mathf.Max(m_TreasureMeridians[i].scaleTween.delay + m_TreasureMeridians[i].scaleTween.duration, _duration);
- m_TreasureMeridians[i].scaleTween.Play();
- m_TreasureMeridians[i].scaleTween.SetEndState();
- }
- while (timer < _duration)
- {
- yield return null;
- }
- timer = 0;
- _duration = 0;
- for (int i = 0; i < _config.stagePointNum; i++)
- {
- if (i == _skillStageIndex)
- {
- continue;
- }
- var _positionTween = m_TreasureMeridians[i].positionTween;
- _positionTween.from = _config[i].position;
- _positionTween.to = _config[_skillStageIndex].position;
- var _distance = Vector2.Distance(_positionTween.from, _positionTween.to);
- _positionTween.duration = _distance / POSITION_TWEEN_SPEED;
- _duration = Mathf.Max(_positionTween.delay + _positionTween.duration, _duration);
- _positionTween.Play(() =>
- {
- _positionTween.gameObject.SetActive(false);
- });
- }
- while (timer < _duration)
- {
- yield return null;
- }
- if (_config.stagePointNum > 1)
- {
- timer = 0;
- var _effect = EffectMgr.Instance.PlayUIEffect(CONVERGESFX, 2700, m_TreasureMeridians[_skillStageIndex].transform.parent, false);
- _effect.transform.localPosition = _config[_skillStageIndex].position;
- while (timer < 0.5f)
- {
- yield return null;
- }
- }
- timer = 0;
- m_ContainerLevelUp.gameObject.SetActive(false);
- m_ContianerPotential.gameObject.SetActive(true);
- m_PotentialSclTween.SetStartState();
- m_SkillPosTween.from = _config[_skillStageIndex].position;
- m_SkillPosTween.SetStartState();
- m_SkillPosTween.Play();
- _duration = m_SkillPosTween.delay + m_SkillPosTween.duration;
- while (timer < _duration)
- {
- yield return null;
- }
- timer = 0;
- m_SkillSclTween.Play();
- m_SkillSclTween.SetEndState();
- _duration = m_SkillSclTween.delay + m_SkillSclTween.duration;
- while (timer < _duration * POTENTIAL_TIME_SCALE)
- {
- yield return null;
- }
- timer = 0f;
- m_PotentialSclTween.Play();
- _duration = m_PotentialSclTween.duration + m_PotentialSclTween.delay;
- while (timer < _duration)
- {
- yield return null;
- }
- for (int i = 0; i < m_PotentialPointSclTweens.Length; i++)
- {
- var _index = i;
- m_PotentialPointSclTweens[_index].Play();
- m_PotentialPointSclTweens[_index].SetEndState();
- }
- stepComplete = true;
- if (OnStepComplete != null)
- {
- OnStepComplete(TreasureShowStep.FirstPotential);
- }
- }
-
- private void OnEnterPotential()
- {
- m_SkillPosTween.SetEndState();
- m_SkillSclTween.SetEndState();
- }
-
- void RecycleLineSfx()
- {
- for (int i = 0; i < m_LineSfxs.Count; i++)
- {
- m_LineSfxs[i].keep = false;
- m_LineSfxs[i].StopImediatly();
- }
- m_LineSfxs.Clear();
- }
-
- private void LateUpdate()
- {
- switch (step)
- {
- case TreasureShowStep.FirstPotential:
- case TreasureShowStep.FirstUnLock:
- timer += Time.deltaTime;
- break;
- }
- }
- #endregion
-
- public enum TreasureShowStep
- {
- None,
- Lock,
- FirstUnLock,
- UnLock,
- FirstPotential,
- Potential,
- }
- }
-}
-
diff --git a/System/Treasure/TreasureAnimation.cs.meta b/System/Treasure/TreasureAnimation.cs.meta
deleted file mode 100644
index f4d4863..0000000
--- a/System/Treasure/TreasureAnimation.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 1d1253e927c3b944e930c94c9d4df309
-timeCreated: 1526029253
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/System/Treasure/TreasureCollectBriefInfoBehaviour.cs b/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
index 17f9e60..1bdae40 100644
--- a/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
+++ b/System/Treasure/TreasureCollectBriefInfoBehaviour.cs
@@ -92,15 +92,11 @@
achievementModel.achievementAwardableEvent -= OnAchievementAwardable;
achievementModel.achievementCompletedEvent -= OnAchievementCompleted;
model.treasureStageUpEvent -= OnCastSoul;
- model.humanTreasureStateChangeEvent -= OnHumanTreasureStateChange;
- model.potentialLevelChangeEvent -= OnPotentialLevelChange;
RedpointCenter.Instance.redpointValueChangeEvent -= OnRedpointUpdate;
achievementModel.achievementAwardableEvent += OnAchievementAwardable;
achievementModel.achievementCompletedEvent += OnAchievementCompleted;
model.treasureStageUpEvent += OnCastSoul;
- model.humanTreasureStateChangeEvent += OnHumanTreasureStateChange;
- model.potentialLevelChangeEvent += OnPotentialLevelChange;
RedpointCenter.Instance.redpointValueChangeEvent += OnRedpointUpdate;
}
@@ -111,8 +107,6 @@
achievementModel.achievementAwardableEvent -= OnAchievementAwardable;
achievementModel.achievementCompletedEvent -= OnAchievementCompleted;
model.treasureStageUpEvent -= OnCastSoul;
- model.humanTreasureStateChangeEvent -= OnHumanTreasureStateChange;
- model.potentialLevelChangeEvent -= OnPotentialLevelChange;
RedpointCenter.Instance.redpointValueChangeEvent -= OnRedpointUpdate;
}
@@ -383,7 +377,6 @@
var config = TreasureConfig.Get(displayTreasureId);
model.selectedTreasure = displayTreasureId;
model.currentCategory = (TreasureCategory)config.Category;
- model.openFromTreasureCollect = true;
WindowCenter.Instance.Open<TreasureBaseWin>();
}
}
diff --git a/System/Treasure/TreasureComponent.cs b/System/Treasure/TreasureComponent.cs
index 5ee77ab..1daa824 100644
--- a/System/Treasure/TreasureComponent.cs
+++ b/System/Treasure/TreasureComponent.cs
@@ -81,13 +81,9 @@
RequestTreasure();
RequestBottom();
RequestBackLight();
- RequestRedpoint();
- RequestHighestEffect();
RequestTreasureCanva();
UpdateTreasureState();
UpdateParam();
- RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
- RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
model.demonTreasureDungeonUpdate -= DemonTreasureDungeonUpdate;
model.demonTreasureDungeonUpdate += DemonTreasureDungeonUpdate;
}
@@ -99,12 +95,9 @@
RecycleBackLight();
RecycleLockEffect();
RecycleCollectingSfx();
- RecycleRedpoint();
RecycleCondition();
RecycleTreasureLabel();
- RecycleHighestEffect();
RecycleTreasureCanva();
- RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
model.demonTreasureDungeonUpdate -= DemonTreasureDungeonUpdate;
}
interactProcessor.SetActive(_active);
@@ -244,28 +237,6 @@
{
lockEffect.transform.localPosition = paramConfig.lockSfxParam.position;
}
- var count = 0;
- if (stageUpRed != null)
- {
- var _param = UI3DTreasureSelectStage.Instance.stageUpParam;
- count++;
- stageUpRed.transform.localPosition = GetRedpointPosition(count);
- stageUpRed.transform.localScale = _param.scale;
- }
- if (achievementRed != null)
- {
- var _param = UI3DTreasureSelectStage.Instance.achievementParam;
- count++;
- achievementRed.transform.localPosition = GetRedpointPosition(count);
- achievementRed.transform.localScale = _param.scale;
- }
- if (potentialRed != null)
- {
- var _param = UI3DTreasureSelectStage.Instance.potentialParam;
- count++;
- potentialRed.transform.localPosition = GetRedpointPosition(count);
- potentialRed.transform.localScale = _param.scale;
- }
}
}
@@ -360,11 +331,6 @@
UpdateParam();
}
- public void UpdateTreasureStage()
- {
- RequestHighestEffect();
- }
-
private void RequestBackLight()
{
RecycleBackLight();
@@ -455,135 +421,6 @@
{
SFXPlayUtility.Instance.Release(lockEffect);
lockEffect = null;
- }
- }
-
- public void RequestRedpoint()
- {
- RecycleRedpoint();
- Treasure _treasure;
- model.TryGetTreasure(treasureId, out _treasure);
- if (_treasure == null || category != TreasureCategory.Human)
- {
- return;
- }
- //var count = 0;
- //if (_human.castSoulRedpoint.state == RedPointState.Simple)
- //{
- // if (m_StageUpRedpool == null)
- // {
- // var _prefab = UILoader.LoadPrefab("Dian_JueXing");
- // m_StageUpRedpool = GameObjectPoolManager.Instance.RequestPool(_prefab);
- // }
- // stageUpRed = m_StageUpRedpool.Request().transform;
- // stageUpRed.gameObject.SetActive(true);
- // stageUpRed.SetParent(root);
- // stageUpRed.transform.localPosition = Vector3.zero;
- // stageUpRed.LookAt(UI3DTreasureSelectStage.Instance.center);
- // if (stageUpRed != null)
- // {
- // var _param = UI3DTreasureSelectStage.Instance.stageUpParam;
- // count++;
- // stageUpRed.transform.localPosition = GetRedpointPosition(count);
- // stageUpRed.transform.localScale = _param.scale;
- // }
- // LayerUtility.SetLayer(stageUpRed.gameObject, LayerUtility.UILayer, true);
- //}
- //if (_human.achievementRedpoint.state == RedPointState.Simple)
- //{
- // if (m_AchievementRedpool == null)
- // {
- // var _prefab = UILoader.LoadPrefab("Dian_JiHun");
- // m_AchievementRedpool = GameObjectPoolManager.Instance.RequestPool(_prefab);
- // }
- // achievementRed = m_AchievementRedpool.Request().transform;
- // achievementRed.gameObject.SetActive(true);
- // achievementRed.SetParent(root);
- // achievementRed.transform.localPosition = Vector3.zero;
- // achievementRed.LookAt(UI3DTreasureSelectStage.Instance.center);
- // if (achievementRed != null)
- // {
- // var _param = UI3DTreasureSelectStage.Instance.achievementParam;
- // count++;
- // achievementRed.transform.localPosition = GetRedpointPosition(count);
- // achievementRed.transform.localScale = _param.scale;
- // }
- // LayerUtility.SetLayer(achievementRed.gameObject, LayerUtility.UILayer, true);
- //}
- //if (_human.skillLevelUpRedpoint.state == RedPointState.Simple)
- //{
- // if (m_PotentialRedpool == null)
- // {
- // var _prefab = UILoader.LoadPrefab("Dian_Gong");
- // m_PotentialRedpool = GameObjectPoolManager.Instance.RequestPool(_prefab);
- // }
- // potentialRed = m_PotentialRedpool.Request().transform;
- // potentialRed.gameObject.SetActive(true);
- // potentialRed.SetParent(root);
- // potentialRed.transform.localPosition = Vector3.zero;
- // potentialRed.LookAt(UI3DTreasureSelectStage.Instance.center);
- // if (potentialRed != null)
- // {
- // var _param = UI3DTreasureSelectStage.Instance.potentialParam;
- // count++;
- // potentialRed.transform.localPosition = GetRedpointPosition(count);
- // potentialRed.transform.localScale = _param.scale;
- // }
- // LayerUtility.SetLayer(potentialRed.gameObject, LayerUtility.UILayer, true);
- //}
- }
-
- public Vector3 GetRedpointPosition(int _count)
- {
- if (_count == 1)
- {
- return UI3DTreasureSelectStage.Instance.achievementParam.position;
- }
- else if (_count == 2)
- {
- return UI3DTreasureSelectStage.Instance.potentialParam.position;
- }
- else
- {
- return UI3DTreasureSelectStage.Instance.stageUpParam.position;
- }
- }
-
- private void RedpointValueChangeEvent(int _id)
- {
- if (UI3DTreasureSelectStage.Instance.IsCloser)
- {
- return;
- }
- Treasure _treasure;
- model.TryGetTreasure(treasureId, out _treasure);
- if (_treasure == null || category != TreasureCategory.Human)
- {
- return;
- }
- bool _update = false;
- if (_update)
- {
- RequestRedpoint();
- }
- }
-
- public void RecycleRedpoint()
- {
- if (m_PotentialRedpool != null && potentialRed != null)
- {
- m_PotentialRedpool.Release(potentialRed.gameObject);
- potentialRed = null;
- }
- if (m_AchievementRedpool != null && achievementRed != null)
- {
- m_AchievementRedpool.Release(achievementRed.gameObject);
- achievementRed = null;
- }
- if (m_StageUpRedpool != null && stageUpRed != null)
- {
- m_StageUpRedpool.Release(stageUpRed.gameObject);
- stageUpRed = null;
}
}
@@ -825,40 +662,6 @@
}
}
- public void RequestHighestEffect()
- {
- RecycleHighestEffect();
- Treasure _treasure;
- if (category == TreasureCategory.Human &&
- model.TryGetTreasure(treasureId, out _treasure) && _treasure.IsHighestStage && _treasure.state == TreasureState.Collected
- && !model.GetTreasureFinishAnim(treasureId) && model.GetTreasureUnlockShow(TreasureCategory.Human) != treasureId)
- {
- highestSfx = SFXPlayUtility.Instance.Play(5197, root);
- if (highestSfx != null)
- {
- var animator = highestSfx.GetComponentInChildren<Animator>(true);
- if (animator != null)
- {
- animator.Play(HUMAN_HIGHEST_STAGE_1, 0, UI3DTreasureSelectStage.sync_normalizedTime);
- }
- highestSfx.duration = 0;
- LayerUtility.SetLayer(highestSfx.gameObject, LayerUtility.UILayer, true);
- highestSfx.transform.localPosition = Vector3.zero;
- highestSfx.transform.LookAt(UI3DTreasureSelectStage.Instance.center);
- }
- }
- }
-
- public void RecycleHighestEffect()
- {
- if (highestSfx != null)
- {
- highestSfx.gameObject.SetActive(false);
- SFXPlayUtility.Instance.Release(highestSfx);
- highestSfx = null;
- }
- }
-
public void RequestTreasureCanva()
{
RecycleTreasureCanva();
@@ -909,10 +712,8 @@
RecycleName();
RecycleBackLight();
RecycleLockEffect();
- RecycleRedpoint();
RecycleCondition();
RecycleTreasureLabel();
- RecycleHighestEffect();
RecycleTreasureCanva();
RequestSpecialEffect();
@@ -946,8 +747,6 @@
{
RequestBottom();
RequestName();
- RequestRedpoint();
- RequestHighestEffect();
RequestTreasureCanva();
UpdateTreasureState();
RecycleSpecialEffect();
@@ -995,42 +794,11 @@
}
if (model.treasureGotoId != 0 && model.treasureGotoId != 101)
{
- model.openFromTreasureUnlockShow = true;
UI3DTreasureSelectStage.Instance.OnPointDownTreasure(model.treasureGotoId);
model.treasureGotoId = 0;
}
UI3DTreasureSelectStage.Instance.CompleteUnlock();
model.treasureGotoId = 0;
- }
-
- public void PlayHighestShow()
- {
- RecycleHighestEffect();
- var _effect = SFXPlayUtility.Instance.Play(5197, root);
- if (_effect != null)
- {
- var animator = _effect.GetComponentInChildren<Animator>(true);
- if (animator != null)
- {
- animator.Play(HUMAN_HIGHEST_STAGE_2, 0, 0);
- }
- LayerUtility.SetLayer(_effect.gameObject, LayerUtility.UILayer, true);
- _effect.transform.LookAt(UI3DTreasureSelectStage.Instance.center);
- _effect.transform.localPosition = Vector3.zero;
- _effect.duration = 3.0f;
- }
- SnxxzGame.Instance.StartCoroutine(Co_HighestShow());
- }
-
- IEnumerator Co_HighestShow()
- {
- yield return WaitingForSecondConst.GetWaitForSeconds(2.2f);
- model.SetTreasureFinishAnim(treasureId, false);
- if (display)
- {
- UpdateTreasureStage();
- }
- UI3DTreasureSelectStage.Instance.ReCheckTreasureHighest();
}
bool RequireGrayTreasureSkin()
diff --git a/System/Treasure/TreasureData.cs b/System/Treasure/TreasureData.cs
index d002052..17d1b13 100644
--- a/System/Treasure/TreasureData.cs
+++ b/System/Treasure/TreasureData.cs
@@ -73,36 +73,17 @@
}
}
- public int autoSelectPotential { get; set; }
- Dictionary<int, List<TreasurePotential>> jobToPotentials = new Dictionary<int, List<TreasurePotential>>();
public List<TreasureStage> treasureStages = new List<TreasureStage>();
-
- public List<TreasurePotential> potentials
- {
- get
- {
- if (jobToPotentials.ContainsKey(PlayerDatas.Instance.baseData.Job))
- {
- return jobToPotentials[PlayerDatas.Instance.baseData.Job];
- }
- else
- {
- return null;
- }
- }
- }
public List<int> achievements = new List<int>();
public Dictionary<int, AchievementGroup> achievementGroups = new Dictionary<int, AchievementGroup>();
- public Redpoint skillLevelUpRedpoint { get; private set; }
public Redpoint achievementRedpoint { get; private set; }
public Treasure(int _id, int[] _potentialIds, Redpoint _skillLevelUpRedpoint, Redpoint _achievementPoint)
{
this.id = _id;
- this.skillLevelUpRedpoint = _skillLevelUpRedpoint;
this.achievementRedpoint = _achievementPoint;
var config = TreasureConfig.Get(this.id);
@@ -133,100 +114,7 @@
{
group.Sort();
}
-
- for (int i = 0; i < _potentialIds.Length; i++)
- {
- var skillId = _potentialIds[i];
- var skillConfig = SkillConfig.Get(skillId);
- if (skillConfig == null)
- {
- continue;
- }
-
- for (int j = 0; j < GeneralDefine.openJobs.Length; j++)
- {
- var job = GeneralDefine.openJobs[j];
- List<TreasurePotential> tempPotentials;
- if (jobToPotentials.ContainsKey(job))
- {
- tempPotentials = jobToPotentials[job];
- }
- else
- {
- jobToPotentials[job] = tempPotentials = new List<TreasurePotential>();
- }
-
- if (skillConfig.UseType == 0 || skillConfig.UseType == 1 << job)
- {
- tempPotentials.Add(new TreasurePotential(skillId, 0));
- }
- }
- }
}
-
- public TreasurePotential GetPotential(int _potentialId)
- {
- if (potentials == null)
- {
- return null;
- }
- else
- {
- for (int i = 0; i < potentials.Count; i++)
- {
- var potential = potentials[i];
- if (potential.id == _potentialId)
- {
- return potential;
- }
- }
-
- return null;
- }
- }
-
- public TreasurePotential GetPotentialByIndex(int index)
- {
- if (potentials == null)
- {
- return null;
- }
- else
- {
- if (index >= 0 && index < potentials.Count)
- {
- return potentials[index];
- }
-
- return null;
- }
- }
-
- public void ResetPotentialLevel()
- {
- var list = potentials;
- if (list != null)
- {
- for (int i = 0; i < list.Count; i++)
- {
- list[i].level = 0;
- }
- }
- }
-
- public void UpdatePotentialLevel(int _potentialId, int _level)
- {
- for (int i = 0; i < potentials.Count; i++)
- {
- var potential = potentials[i];
- if (potential.id == _potentialId)
- {
- potential.level = _level;
- break;
- }
- }
- }
-
public AchievementGroup FindAchievementGroup(int _achievementId)
{
foreach (var key in achievementGroups.Keys)
@@ -260,21 +148,6 @@
stage = level;
this.exp = exp;
hasClickChallenge = _hasClickChallenge;
- if ((this is HumanTreasure))
- {
- (this as HumanTreasure).UpdateTreasureState();
- }
- }
-
- public bool IsHighestStage
- {
- get
- {
- return treasureStages.FindIndex((x) =>
- {
- return x.stage >= stage + 1;
- }) == -1;
- }
}
public int GetStageId(int _stageIndex)
diff --git a/System/Treasure/TreasureMeridianBehaviour.cs b/System/Treasure/TreasureMeridianBehaviour.cs
deleted file mode 100644
index 99582bf..0000000
--- a/System/Treasure/TreasureMeridianBehaviour.cs
+++ /dev/null
@@ -1,353 +0,0 @@
-锘縰sing System;
-using System.Collections;
-using System.Collections.Generic;
-
-using UnityEngine;
-using UnityEngine.UI;
-using DG.Tweening;
-namespace Snxxz.UI
-{
- public class TreasureMeridianBehaviour : MonoBehaviour
- {
- [SerializeField] CanvasGroup m_CanvasGroup;
- [SerializeField] ScaleTween m_ScaleTween;
- [SerializeField] PositionTween m_PositionTween;
- [SerializeField] Image m_IconBottom;
- [SerializeField] Image m_Bottom;
- [SerializeField] Image m_Icon;
- [SerializeField] Button m_Button;
- [SerializeField] List<Text> m_Descs;
- [SerializeField] UIEffect m_LineSfx;
- [SerializeField] UIEffect m_SelectSfx;
- TreasureModel m_Model;
- TreasureModel model
- {
- get
- {
- return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<TreasureModel>());
- }
- }
-
- Treasure m_Treasure;
- TreasureStage m_TreasureStage;
- HumanTreasureWin m_TreasureLevelUpWin;
-
- int stageIndex = 0;
- int lineState = 0;
- float timer = 0;
- float duration = 0;
-
- public Animator lineAnimator
- {
- get
- {
- if (m_LineSfx.target != null)
- {
- return m_LineSfx.target.GetAnimator();
- }
- return null;
- }
- }
-
- public ScaleTween scaleTween
- {
- get
- {
- return m_ScaleTween;
- }
- }
-
- public PositionTween positionTween
- {
- get
- {
- return m_PositionTween;
- }
- }
-
- public UIEffect selectSfx
- {
- get
- {
- return m_SelectSfx;
- }
- }
-
- private void Awake()
- {
- m_Button.onClick.AddListener(OnStageClick);
- }
-
- private void OnDisable()
- {
- if (m_TreasureLevelUpWin != null)
- {
- //m_TreasureLevelUpWin.OnLineStepComplete -= OnLineStepComplete;
- }
- }
-
- private void OnStageClick()
- {
- if (m_TreasureStage != null&& m_TreasureStage.unlockType != TreasureStageUnlock.Property)
- {
- if (m_TreasureStage.unlockType == TreasureStageUnlock.Item)
- {
- var item = m_TreasureStage.item;
- ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count, -1, item.bind ? 1 : 0);
- ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
- return;
- }
- TreasureStageTipWin.selectStage = m_TreasureStage.stage;
- if (!WindowCenter.Instance.IsOpen<TreasureStageTipWin>())
- {
- TreasureStageTipWin.SetTargetPosition(this.transform as RectTransform);
- WindowCenter.Instance.Open<TreasureStageTipWin>();
- }
- }
- }
-
- public void SetScale(float _scale)
- {
- m_Icon.transform.localScale = _scale * Vector3.one;
- m_IconBottom.transform.localScale = _scale * Vector3.one;
- }
-
- public void Display(int _stage, int _stageIndex, HumanTreasureWin _win)
- {
- m_TreasureLevelUpWin = _win;
- //m_TreasureLevelUpWin.OnLineStepComplete -= OnLineStepComplete;
- //m_TreasureLevelUpWin.OnLineStepComplete += OnLineStepComplete;
- stageIndex = _stageIndex;
- if (model.TryGetTreasure(model.selectedTreasure, out m_Treasure))
- {
- var _list = m_Treasure.treasureStages;
- m_TreasureStage = _list.Find((x) =>
- {
- return x.stage == _stage;
- });
- if (m_TreasureStage == null)
- {
- return;
- }
- for (int i = 0; i < m_Descs.Count; i++)
- {
- m_Descs[i].gameObject.SetActive(false);
- }
- m_Descs[0].transform.localScale = Vector3.one;
- var _config = ScriptableObjectLoader.LoadSoTreasureMeridian(model.selectedTreasure);
- m_Bottom.transform.localScale = _config[stageIndex].scale * Vector3.one;
- switch (m_TreasureStage.unlockType)
- {
- case TreasureStageUnlock.Property:
- var _index = 0;
- foreach (var _key in m_TreasureStage.propertyDict.Keys)
- {
- m_Descs[_index].gameObject.SetActive(true);
- m_Descs[_index].color = UIHelper.s_LightYellow;
- var _propertyCfg = PlayerPropertyConfig.Get(_key);
- m_Descs[_index].text = StringUtility.Contact(_propertyCfg.Name, " +"
- , UIHelper.ReplaceLargeNum(m_TreasureStage.propertyDict[_key]));
- _index++;
- if (GeneralDefine.propertyIconDict.ContainsKey(_key))
- {
- m_Icon.SetSprite(GeneralDefine.propertyIconDict[_key]);
- }
- }
- m_Icon.SetNativeSize();
- break;
- case TreasureStageUnlock.Skill:
- var _skillId = m_TreasureStage.GetSkill(PlayerDatas.Instance.baseData.Job);
- var _skillCfg = SkillConfig.Get(_skillId);
- m_Descs[0].text = Language.Get(m_Treasure.id == 104 ? "TreasureNewXpSkill" : "TreasureNewSkill", _skillCfg.SkillName);
- m_Descs[0].color = m_Treasure.id == 104 ? UIHelper.GetUIColor(TextColType.NavyYellow) : UIHelper.s_LightYellow;
- m_Descs[0].gameObject.SetActive(true);
- m_Icon.SetSprite(_skillCfg.IconName);
- m_Icon.SetNativeSize();
- break;
- case TreasureStageUnlock.Func:
- var _funcCfg = FuncOpenLVConfig.Get(m_TreasureStage.func);
- m_Descs[0].text = Language.Get("TreasureNewFunc", _funcCfg.Remark);
- m_Descs[0].color = UIHelper.s_LightYellow;
- m_Descs[0].gameObject.SetActive(true);
- m_Icon.SetSprite(_funcCfg.Icon);
- m_Icon.SetNativeSize();
- break;
- case TreasureStageUnlock.Item:
- m_Descs[0].gameObject.SetActive(true);
- m_Descs[0].color = UIHelper.s_LightYellow;
- var itemConfig = ItemConfig.Get(m_TreasureStage.item.id);
- m_Icon.SetSprite(itemConfig.IconKey);
- m_Descs[0].text = itemConfig.ItemName;
- m_Icon.SetNativeSize();
- break;
- case TreasureStageUnlock.Treasure:
- m_Descs[0].gameObject.SetActive(true);
- m_Descs[0].color = UIHelper.s_LightYellow;
- var treasureConfig = TreasureConfig.Get(m_TreasureStage.treasure);
- m_Icon.SetSprite(treasureConfig.Icon);
- m_Descs[0].text = treasureConfig.Name;
- m_Icon.rectTransform.sizeDelta = new Vector2(86, 86);
- break;
- case TreasureStageUnlock.TreasureSoul:
- m_Descs[0].gameObject.SetActive(true);
- m_Descs[0].color = UIHelper.s_LightYellow;
- var treasureSoulConfig = TreasurePrivilegeConfig.Get(m_TreasureStage.treasureSoul);
- m_Icon.SetSprite(treasureSoulConfig.Icon);
- m_Descs[0].text = treasureSoulConfig.Name;
- m_Icon.SetNativeSize();
- var sizeDelta = m_Icon.rectTransform.sizeDelta;
- m_Icon.rectTransform.sizeDelta = new Vector2(86, (sizeDelta.y / sizeDelta.x) * 86);
- break;
- }
- }
- }
-
- private void OnLineStepComplete()
- {
- m_CanvasGroup.alpha = m_Treasure.stage < m_TreasureStage.stage ? 0.6f : 1;
- }
-
- public void PlayLineSfx(int _state, bool _check = false)
- {
- var _index = m_Treasure.treasureStages.FindIndex((x) =>
- {
- return x.stage == m_TreasureStage.stage + 1;
- });
- if (_index == -1)
- {
- m_LineSfx.StopImediatly();
- return;
- }
- lineState = _check ? _state : 0;
- timer = 0;
- switch (_state)
- {
- case 2:
- m_LineSfx.effect = TreasureAnimation.LINESFX;
- m_LineSfx.Play();
- lineAnimator.Play(TreasureAnimation.LINE_STATE_2, 0, 0);
- duration = GetClipInfo(TreasureAnimation.LINE_STATE_2).length;
- break;
- case 3:
- if (lineAnimator == null)
- {
- m_LineSfx.effect = TreasureAnimation.LINESFX;
- m_LineSfx.Play();
- }
- lineAnimator.Play(TreasureAnimation.LINE_STATE_3, 0, 0);
- duration = GetClipInfo(TreasureAnimation.LINE_STATE_3).length;
- break;
- case 4:
- if (lineAnimator == null)
- {
- m_LineSfx.effect = TreasureAnimation.LINESFX;
- m_LineSfx.Play();
- }
- lineAnimator.Play(TreasureAnimation.LINE_STATE_4, 0, 0);
- duration = GetClipInfo(TreasureAnimation.LINE_STATE_4).length;
- break;
- }
- var _config = ScriptableObjectLoader.LoadSoTreasureMeridian(m_Treasure.id);
- var _angle = VectorUtility.VectorAngle(_config[stageIndex + 1].position, _config[stageIndex].position);
- m_LineSfx.transform.localEulerAngles = Vector3.zero.SetZ(_angle);
- lineAnimator.transform.localScale = Vector3.one.SetY(Vector2.Distance(_config[stageIndex + 1].position
- , _config[stageIndex].position) / TreasureAnimation.LINE_NORMAL_LENGTH * TreasureAnimation.LINE_NORMAL_SCALE);
- }
-
- private void LateUpdate()
- {
- if (lineState != 0)
- {
- timer += Time.deltaTime;
- if (timer >= duration)
- {
- switch (lineState)
- {
- case 2:
- CheckNextStage();
- break;
- case 3:
- PlayLineSfx(4);
- lineState = 0;
- break;
- }
- timer = 0;
- }
- }
- }
-
- private void CheckNextStage()
- {
- if (m_Treasure.stage <= m_TreasureStage.stage)
- {
- PlayLineSfx(3, true);
- }
- else
- {
- lineState = 0;
- }
- }
-
- private AnimationClip GetClipInfo(string _name)
- {
- var _clips = lineAnimator.runtimeAnimatorController.animationClips;
- for (int i = 0; i < _clips.Length; i++)
- {
- if (_clips[i].name == _name)
- {
- return _clips[i];
- }
- }
- return null;
- }
-
- public void StopSfx()
- {
- m_LineSfx.StopImediatly();
- m_SelectSfx.StopImediatly();
- }
-
- public void RequestSfx()
- {
- if (m_Treasure == null || m_TreasureStage == null)
- {
- return;
- }
- var _stage = model.GetTreasureStageShow(m_Treasure.id);
- PlayLineSfx(m_Treasure.stage < m_TreasureStage.stage || _stage == m_TreasureStage.stage ? 4 : 2);
- RequestStateSfx();
- }
-
- public void RequestStateSfx()
- {
- m_CanvasGroup.alpha = m_Treasure.stage < m_TreasureStage.stage ? 0.6f : 1;
- var config = ScriptableObjectLoader.LoadSoTreasureMeridian(m_Treasure.id);
- if(m_Treasure.stage < m_TreasureStage.stage)
- {
- m_Bottom.transform.localScale = config[stageIndex].scale * Vector3.one;
- }
- m_SelectSfx.StopImediatly();
- if (m_Treasure.stage + 1 == m_TreasureStage.stage
- && model.GetTreasureStageShow(m_Treasure.id) == -1)
- {
- m_SelectSfx.transform.localScale = Vector3.one;
- m_SelectSfx.effect = TreasureStage.selectedSfxId;
- m_SelectSfx.Play();
- }
- else
- {
- m_SelectSfx.transform.localScale = Vector3.one;
- }
- }
-
- public void StartSoulTween()
- {
- var tweener = m_Descs[0].transform.DOScale(Vector3.one * 3, 0.4f);
- tweener.OnStepComplete(() =>
- {
- m_Descs[0].transform.DOScale(Vector3.one, 0.4f);
- });
- }
- }
-}
-
diff --git a/System/Treasure/TreasureMeridianBehaviour.cs.meta b/System/Treasure/TreasureMeridianBehaviour.cs.meta
deleted file mode 100644
index 9b7befc..0000000
--- a/System/Treasure/TreasureMeridianBehaviour.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: ba5ad0efb04d1324fad65871fd9b90e0
-timeCreated: 1525352482
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/System/Treasure/TreasureModel.cs b/System/Treasure/TreasureModel.cs
index 2091626..8f2e0ff 100644
--- a/System/Treasure/TreasureModel.cs
+++ b/System/Treasure/TreasureModel.cs
@@ -36,18 +36,12 @@
public event Action<int> treasureCollectProgressUpdateEvent;
public event Action<int> treasureSelectedEvent;
- public event Action<int> potentialBookSelectEvent;
public event Action<TreasureCategory> collectingTreasureChangeEvent;
public event Action<int> treasureStateChangeEvent;
- public event Action<int, int, bool> onPotentialLevelUpResultEvent;
- public event Action<int, int> potentialLevelChangeEvent;
- public event Action<int, int> potentialLevelUpdate;
public event Action vipKillNPCTreasureEvent;
public event Action<int> treasureLevelProgressUpdateEvent;
public event Action<int> treasureStageUpEvent;
- public event Action<int> humanTreasureStateChangeEvent;
public event Action<int> demonTreasureDungeonUpdate;
- public event Action skillLevelUpRedpointUpdate;
public event Action demonDungeonChallengeNext;
int m_SelectedTreasure = 0;
@@ -61,17 +55,6 @@
{
treasureSelectedEvent(m_SelectedTreasure);
}
- }
- }
- }
-
- int m_SelectedPotential = 0;
- public int selectedPotential {
- get { return m_SelectedPotential; }
- set {
- if (m_SelectedPotential != value)
- {
- m_SelectedPotential = value;
}
}
}
@@ -116,25 +99,6 @@
}
}
- int m_SelectedPotentialBook = 0;
- public int selectedPotentialBook {
- get { return m_SelectedPotentialBook; }
- set {
- if (m_SelectedPotentialBook != value)
- {
- m_SelectedPotentialBook = value;
- if (potentialBookSelectEvent != null)
- {
- potentialBookSelectEvent(m_SelectedPotentialBook);
- }
- }
- }
- }
-
- int levelUpTreasureIdBuf = 0;
- int levelUpPotentialBuf = 0;
-
- Dictionary<int, List<int>> skillLevelUpTypes = new Dictionary<int, List<int>>();
Dictionary<int, Treasure> treasures = new Dictionary<int, Treasure>();
Dictionary<TreasureCategory, List<int>> treasureCategory = new Dictionary<TreasureCategory, List<int>>();
Dictionary<int, int> treasureMapDict = new Dictionary<int, int>();
@@ -143,9 +107,7 @@
List<int> m_CacheGotAchievements = new List<int>();
Dictionary<int, int> treasureStageShowDict = new Dictionary<int, int>();
List<int> treasureUnOpens = new List<int>();//鐗堟湰鏈紑鏀炬硶瀹�
- Dictionary<int, int[]> potentialInitialPowers = new Dictionary<int, int[]>();
Dictionary<int, TreasureDungeon> treasureDungeons = new Dictionary<int, TreasureDungeon>();
- List<int> potentialNextTargetLevels = new List<int>();
public Dictionary<int, int> fairyTreasureGetDict { get; private set; }
@@ -159,40 +121,23 @@
get { return newGotTreasureId > 0; }
}
- public int treasureEntranceShowId {
- get { return LocalSave.GetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "_TreasureEntranceShowId")); }
- set { LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "_TreasureEntranceShowId"), value); }
- }
-
public int treasureCollectingShowId {
get { return LocalSave.GetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "_TreasureCollectingShowId")); }
set { LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "_TreasureCollectingShowId"), value); }
}
- bool potentialFuncOpen { get; set; }
-
public int treasureGotoId { get; set; }
-
- public bool openFromTreasureSoul { get; set; }
- public bool openFromTreasureUnlockShow { get; set; }
- public bool openFromTreasureCollect { get; set; }
public bool openFromTreasureList { get; set; }
- public int openFromTaskId { get; set; }
- public bool inPotentialModifyPower { get; set; }
- public List<int> castSoulGuideTaskIds { get; private set; }
public List<int> guideTreasures { get; private set; }
public int treasureBackLvLimit { get; private set; }
- public float treasureBackPercent { get; private set; }
- public int treasureExitLvLimit { get; private set; }
public int exitRecord { get; set; }
public int entranceOpenCondition { get; private set; }
public List<int> cacheGotAchievements { get { return m_CacheGotAchievements; } }
AchievementModel achievementModel { get { return ModelCenter.Instance.GetModel<AchievementModel>(); } }
- PlayerPackModel packageModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
VIPKillNPCTreasure m_VIPKillNPCTreasure;
public VIPKillNPCTreasure vipKillNPCTreasure {
@@ -211,17 +156,11 @@
public override void Init()
{
ParseConfigs();
- ParseSkillLevelUpConfig();
- ParsePotentialSkillConfig();
achievementModel.achievementProgressUpdateEvent += OnAchievementProgressUpdate;
- achievementModel.achievementAwardableEvent += OnAchievementAwardable;
achievementModel.achievementCompletedEvent += OnAchievementCompleted;
- DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += OnGetSkillLevelUpResult;
- PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnTreasurePotentialSPChange;
- FuncOpen.Instance.OnFuncStateChangeEvent += OnFunctionStateChange;
- packageModel.RefreshItemCountAct += OnPackageItemChange;
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
WindowCenter.Instance.windowAfterOpenEvent += OnWindowOpen;
WindowCenter.Instance.windowAfterCloseEvent += OnWindowClose;
NewBieCenter.Instance.guideCompletedEvent += GuideComplete;
@@ -232,14 +171,10 @@
public override void UnInit()
{
achievementModel.achievementProgressUpdateEvent -= OnAchievementProgressUpdate;
- achievementModel.achievementAwardableEvent -= OnAchievementAwardable;
achievementModel.achievementCompletedEvent -= OnAchievementCompleted;
NewBieCenter.Instance.guideCompletedEvent -= GuideComplete;
- DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= OnGetSkillLevelUpResult;
- PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnTreasurePotentialSPChange;
- FuncOpen.Instance.OnFuncStateChangeEvent -= OnFunctionStateChange;
- packageModel.RefreshItemCountAct -= OnPackageItemChange;
+ PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
WindowCenter.Instance.windowAfterOpenEvent -= OnWindowOpen;
WindowCenter.Instance.windowAfterCloseEvent -= OnWindowClose;
StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
@@ -252,7 +187,6 @@
{
if (playerLevelRefresh)
{
- UpdateAchievementRedpoints();
playerLevelRefresh = false;
}
}
@@ -269,19 +203,12 @@
serverInited = false;
playerLevelRefresh = false;
needDisplayReguluLevelUp = false;
- potentialFuncOpen = false;
treasureUnlockShowDict.Clear();
cacheGotAchievements.Clear();
foreach (var treasure in treasures.Values)
{
treasure.state = TreasureState.Locked;
treasure.UpdateTreasureLevelExp(0, 0, false);
- treasure.ResetPotentialLevel();
- if ((treasure is HumanTreasure))
- {
- var humanTreasure = treasure as HumanTreasure;
- humanTreasure.UpdateTreasureState();
- }
}
foreach (var treasureDungeon in treasureDungeons.Values)
{
@@ -292,9 +219,6 @@
public void OnPlayerLoginOk()
{
serverInited = true;
- UpdateAchievementRedpoints();
- UpdateCastSoulRedpoints();
- UpdateSkillLevelUpRedpoints();
UpdateDemonDungeonRedpoints();
}
@@ -338,98 +262,6 @@
return treasureUnlockShowDict[_type];
}
- public bool GetPotentialUnlockShow(int _treasureId)
- {
- Treasure treasure;
- if (TryGetTreasure(_treasureId, out treasure))
- {
- var potential = treasure.GetPotentialByIndex(1);
- if (potential != null && IsPotentialUnlock(_treasureId, potential.id))
- {
- SetPotentialUnlockShow(_treasureId);
- return false;
- }
- }
- var _playerId = PlayerDatas.Instance.baseData.PlayerID;
- return LocalSave.GetBool(StringUtility.Contact(_playerId, "_PotentialUnlockShow_", _treasureId));
- }
-
- public void SetPotentialUnlockShow(int _treasureId, bool _value = false)
- {
- var _playerId = PlayerDatas.Instance.baseData.PlayerID;
- LocalSave.SetBool(StringUtility.Contact(_playerId, "_PotentialUnlockShow_", _treasureId), _value);
- }
-
- public bool GetSpAnim(int _treasureId)
- {
- var list = GetTreasureCategory(TreasureCategory.Human);
- var index = list.IndexOf(_treasureId);
- if (index == -1)
- {
- return false;
- }
- Treasure treasure;
- if (TryGetTreasure(_treasureId, out treasure))
- {
- var potential = treasure.GetPotentialByIndex(1);
- if (potential != null && IsPotentialUnlock(_treasureId, potential.id))
- {
- SetSpAnim(_treasureId);
- return true;
- }
- }
- uint value = 0;
- uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.SpAnim, 0), out value);
- return MathUtility.GetBitValue(value, (ushort)index);
- }
-
- public void SetSpAnim(int _treasureId, bool anim = true)
- {
- var list = GetTreasureCategory(TreasureCategory.Human);
- var index = list.IndexOf(_treasureId);
- if (index == -1)
- {
- return;
- }
- uint value = 0;
- uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.SpAnim, 0), out value);
- int bitValue = MathUtility.SetBitValue((int)value, (ushort)index, anim);
- QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.SpAnim, bitValue);
- QuickSetting.Instance.SendPackage();
- }
-
- public bool GetTreasureFinishAnim(int _treasureId)
- {
- if (_treasureId == 101)
- {
- return false;
- }
- var list = GetTreasureCategory(TreasureCategory.Human);
- var index = list.IndexOf(_treasureId);
- if (index == -1)
- {
- return false;
- }
- uint value = 0;
- uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, 0), out value);
- return MathUtility.GetBitValue(value, (ushort)index);
- }
-
- public void SetTreasureFinishAnim(int _treasureId, bool anim = true)
- {
- var list = GetTreasureCategory(TreasureCategory.Human);
- var index = list.IndexOf(_treasureId);
- if (index == -1)
- {
- return;
- }
- uint value = 0;
- uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, 0), out value);
- int bitValue = MathUtility.SetBitValue((int)value, (ushort)index, anim);
- QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, bitValue);
- QuickSetting.Instance.SendPackage();
- }
-
public bool TryGetUnlockShowTreasure(out int _id)
{
_id = 0;
@@ -456,19 +288,6 @@
}
var _playerId = PlayerDatas.Instance.baseData.PlayerID;
LocalSave.SetInt(StringUtility.Contact(_playerId, _type, "_TreasureUnlockShow"), _id);
- }
-
- public void SetTreasureStageShow(int _id, int _stage)
- {
- LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,
- "_TreasureStageShow_", _id), _stage);
- }
-
- public int GetTreasureStageShow(int _id)
- {
- var _stage = LocalSave.GetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,
- "_TreasureStageShow_", _id), -1);
- return _stage;
}
public bool TryGetTreasure(int _id, out Treasure _treasure)
@@ -564,62 +383,29 @@
return 0;
}
- /// <summary>
- /// 鑾峰緱鎶�鑳界殑鍗囩骇绫诲瀷
- /// </summary>
- /// <param name="_skillId"></param>
- /// <returns></returns>
- public int GetSkillLevelUpType(int _skillId)
+ public void UpdateTreasureCollectState(uint[] collecteds)
{
- foreach (var key in skillLevelUpTypes.Keys)
+ for (int i = 0; i < collecteds.Length; i++)
{
- if (skillLevelUpTypes[key].Contains(_skillId))
- {
- return key;
- }
- }
-
- return 0;
- }
-
- public void RequestPotentialUpgrade(int _treasureId, int _potentialId, int _costIndex)
- {
- levelUpTreasureIdBuf = _treasureId;
- levelUpPotentialBuf = _potentialId;
-
- var info = new CA50D_tagCMMagicWeaponSkillUp();
- info.SkillTypeID = (ushort)_potentialId;
- info.CostIndex = (byte)_costIndex;
-
- GameNetSystem.Instance.SendInfo(info);
- }
-
- public void UpdateTreasureCollectState(uint[] _gotTreasures)
- {
- for (int i = 0; i < _gotTreasures.Length; i++)
- {
- var id = (int)_gotTreasures[i];
+ var id = (int)collecteds[i];
Treasure treasure;
if (TryGetTreasure(id, out treasure))
{
+ var config = TreasureConfig.Get(id);
if (treasure.state != TreasureState.Collected)
{
treasure.state = TreasureState.Collected;
- if (treasure is HumanTreasure)
+ if (config.Category == (int)TreasureCategory.Human)
{
- var humanTreasure = treasure as HumanTreasure;
- humanTreasure.UpdateTreasureState();
- UpdateCastSoulRedpoint(treasure.id);
if (GetTreasureUnlockShow(TreasureCategory.Human) == treasure.id)
{
SetTreasureUnlockShow(TreasureCategory.Human, 0);
}
}
+
if (serverInited)
{
newGotTreasureId = id;
- treasureEntranceShowId = id;
-
OpenTreasureNewGot();
}
@@ -667,10 +453,6 @@
}
treasure.state = TreasureState.Collecting;
UpdateDemonDungeonRedpoint(treasure.id);
- if ((TreasureCategory)config.Category == TreasureCategory.Human)
- {
- (treasure as HumanTreasure).UpdateTreasureState();
- }
if ((TreasureCategory)config.Category == TreasureCategory.Demon)
{
collectingDemon = key;
@@ -694,35 +476,6 @@
}
UpdateStoveRedpoint();
- UpdateSkillLevelUpRedpoints();
- }
-
- public void UpdateTreasurePotentialInfo(int _oldSkillId, int _newSkillId)
- {
- var config = SkillConfig.Get(_newSkillId);
- foreach (var key in treasures.Keys)
- {
- var treasure = treasures[key];
- if (treasure.GetPotential(config.SkillTypeID) != null)
- {
- treasure.UpdatePotentialLevel(config.SkillTypeID, config.SkillLV);
- if (treasure is HumanTreasure)
- {
- (treasure as HumanTreasure).UpdateTreasureState();
- }
- if (potentialLevelUpdate != null)
- {
- potentialLevelUpdate(config.SkillTypeID, config.SkillLV);
- }
- if (potentialLevelChangeEvent != null)
- {
- potentialLevelChangeEvent(key, config.SkillTypeID);
- }
- UpdateSkillLevelUpRedpoints();
- break;
- }
- }
-
}
private void OnAchievementProgressUpdate(int _achievement)
@@ -800,30 +553,10 @@
}
}
- private void OnGetSkillLevelUpResult(H0721_tagMakeItemAnswer _result)
- {
- switch ((MakeType)_result.MakeType)
- {
- case MakeType.Def_treasureSkillEquip:
- if (onPotentialLevelUpResultEvent != null)
- {
- onPotentialLevelUpResultEvent(levelUpTreasureIdBuf, levelUpPotentialBuf, _result.Result == 1);
- }
-
- levelUpTreasureIdBuf = 0;
- levelUpPotentialBuf = 0;
- break;
- }
- }
-
- private void OnTreasurePotentialSPChange(PlayerDataRefresh refreshType)
+ private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
{
switch (refreshType)
{
- case PlayerDataRefresh.ExAttr7:
- case PlayerDataRefresh.ExAttr8:
- UpdateSkillLevelUpRedpoints();
- break;
case PlayerDataRefresh.LV:
playerLevelRefresh = true;
break;
@@ -831,141 +564,6 @@
case PlayerDataRefresh.FightPower:
UpdateDemonDungeonRedpoints();
break;
- }
- }
-
- private void OnPackageItemChange(PackType _type, int _index, int _itemId)
- {
- if (_type == PackType.rptItem)
- {
- var config = ItemConfig.Get(_itemId);
- if (config.Type == 6)
- {
- UpdateSkillLevelUpRedpoints();
- }
- }
- }
-
- private void OnFunctionStateChange(int _functionId)
- {
- if (_functionId == 82)
- {
- UpdateSkillLevelUpRedpoints();
- bool requireCheckUnlockShow = false;
- if (!potentialFuncOpen && FuncOpen.Instance.IsFuncOpen(82))
- {
- requireCheckUnlockShow = true;
- }
- potentialFuncOpen = FuncOpen.Instance.IsFuncOpen(82);
- var list = treasureCategory[TreasureCategory.Human];
- for (int i = 0; i < list.Count; i++)
- {
- Treasure treasure;
- TryGetTreasure(list[i], out treasure);
- var humanTreasure = treasure as HumanTreasure;
- humanTreasure.UpdateTreasureState();
- if (!serverInited || !treasure.IsHighestStage || !requireCheckUnlockShow)
- {
- continue;
- }
- if (IsPotentialUnlock(list[i], treasure.potentials[0].id))
- {
- SetPotentialUnlockShow(list[i], true);
- }
- }
- }
- }
-
- private void UpdateSkillLevelUpRedpoints()
- {
- var list = GetTreasureCategory(TreasureCategory.Human);
- for (int i = 0; i < list.Count; i++)
- {
- var id = list[i];
- if (treasures[id].skillLevelUpRedpoint != null)
- {
- treasures[id].skillLevelUpRedpoint.state = RedPointState.None;
- }
- }
- var functionOpen = FuncOpen.Instance.IsFuncOpen(82);
- if (functionOpen)
- {
- for (int k = 0; k < 3; k++)
- {
- for (int i = 0; i < list.Count; i++)
- {
- var treasure = treasures[list[i]];
- if (k < treasure.potentials.Count)
- {
- var potential = treasure.potentials[k];
- Item item;
- if (SatisfyLevelUpUnlock(list[i], k)
- && SatisyPotentialLevelUp(list[i], potential.id, out item))
- {
- treasure.skillLevelUpRedpoint.state = RedPointState.Simple;
- treasure.autoSelectPotential = k;
- if (skillLevelUpRedpointUpdate != null)
- {
- skillLevelUpRedpointUpdate();
- }
- return;
- }
- }
- }
- }
- int minCostTreasure = 0;
- int minCostPotentialIndex = 0;
- int minCostItemColor = 0;
- int minCostItemCount = 0;
- bool step = false;
- for (int i = 0; i < list.Count; i++)
- {
- var treasure = treasures[list[i]];
- if (treasure.state != TreasureState.Collected || !treasure.IsHighestStage)
- {
- continue;
- }
- for (int k = 0; k < treasure.potentials.Count; k++)
- {
- Item item;
- if (SatisyPotentialLevelUp(treasure.id, treasure.potentials[k].id, out item))
- {
- if (item.id != 0)
- {
- var itemConfig = ItemConfig.Get(item.id);
- var itemColor = itemConfig.ItemColor;
- if (minCostItemColor == 0 || itemColor < minCostItemColor ||
- (itemColor == minCostItemColor && item.count < minCostItemCount))
- {
- minCostItemColor = itemColor;
- minCostItemCount = item.count;
- minCostTreasure = treasure.id;
- minCostPotentialIndex = k;
- }
- }
- else
- {
- minCostTreasure = treasure.id;
- minCostPotentialIndex = k;
- step = true;
- break;
- }
- }
- }
- if (step)
- {
- break;
- }
- }
- if (minCostTreasure != 0)
- {
- treasures[minCostTreasure].skillLevelUpRedpoint.state = RedPointState.Simple;
- treasures[minCostTreasure].autoSelectPotential = minCostPotentialIndex;
- }
- }
- if (skillLevelUpRedpointUpdate != null)
- {
- skillLevelUpRedpointUpdate();
}
}
@@ -1000,37 +598,6 @@
}
}
- public int GetSkillLevelUpRedpointTreasure()
- {
- var list = GetTreasureCategory(TreasureCategory.Human);
- for (int i = 0; i < list.Count; i++)
- {
- var treasure = treasures[list[i]];
- if (treasure.skillLevelUpRedpoint != null &&
- treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
- {
- return list[i];
- }
- }
- return 0;
- }
-
- private void UpdateAchievementRedpoints()
- {
- foreach (var id in treasures.Keys)
- {
- UpdateAchievementRedpoint(id);
- }
- }
-
- private void UpdateCastSoulRedpoints()
- {
- foreach (var id in treasures.Keys)
- {
- UpdateCastSoulRedpoint(id);
- }
- }
-
private void UpdateStoveRedpoint()
{
Treasure treasure;
@@ -1039,28 +606,6 @@
stoveRedpoint.state = RedPointState.None;
return;
}
- }
-
- public bool TreasureStageUpLimit(int _treasureId, bool _tip = true)
- {
- if (PlayerDatas.Instance.baseData.LV >= treasureExitLvLimit)
- {
- return false;
- }
- Treasure _treasure;
- if (TryGetTreasure(_treasureId, out _treasure))
- {
- var human = _treasure as HumanTreasure;
- if (human != null && human.castSoulRedpoint.state == RedPointState.Simple)
- {
- if (_tip)
- {
- SysNotifyMgr.Instance.ShowTip("FabaoAwaken");
- }
- return true;
- }
- }
- return false;
}
private void OnWindowOpen(Window _window)
@@ -1124,136 +669,10 @@
WindowCenter.Instance.Open<TreasureNewGotWin>();
}
- public bool SatisfyLevelUpUnlock(int treasureId, int index)
- {
- if (treasures.ContainsKey(treasureId))
- {
- var treasure = treasures[treasureId];
- if (treasure.state == TreasureState.Collected && treasure.IsHighestStage)
- {
- if (index >= 0 && index < treasure.potentials.Count - 1)
- {
- var potential = treasure.potentials[index];
- var nextPotential = treasure.potentials[index + 1];
- var skillConfig = SkillConfig.Get(nextPotential.id);
- if (skillConfig.LearnSkillReq > 0)
- {
- if (potential.level < skillConfig.LearnSkillLV)
- {
- return true;
- }
- }
- }
- else if (index == treasure.potentials.Count - 1)
- {
- var potential = treasure.GetPotentialByIndex(index);
- var config = SkillConfig.Get(potential.id);
- int[] _getSkillArray;
- if (TryGetPotentialGetSkill(config.SkillTypeID, out _getSkillArray))
- {
- if (potential.level < _getSkillArray[0])
- {
- return true;
- }
- }
- }
- }
- }
- return false;
- }
-
- public bool SatisyPotentialLevelUp(int treasureId, int potentialId, out Item item)
- {
- item = default(Item);
- var treasure = treasures[treasureId];
- var potential = treasure.GetPotential(potentialId);
- if (potential == null)
- {
- return false;
- }
- var config = SkillConfig.Get(potential.id);
- if (potential.level >= config.SkillMaxLV)
- {
- return false;
- }
-
- if (config.LearnSkillReq > 0)
- {
- var preSkillLevelRequirement = config.LearnSkillLV;
- var preSkill = PlayerDatas.Instance.skill.GetSkillBySkillTypeID(config.LearnSkillReq);
- var preSkillLevel = preSkill == null ? 0 : preSkill.level;
-
- if (preSkillLevel < preSkillLevelRequirement)
- {
- return false;
- }
- }
-
- if (PlayerDatas.Instance.baseData.LV < config.LearnLVReq)
- {
- return false;
- }
-
- var levelUpType = GetSkillLevelUpType(potential.id);
- var levelupId = GetSkillLevelUpId(levelUpType, potential.level + 1);
- var treasureSkillConfig = TreasureSkillConfig.Get(levelupId);
- var spOwn = PlayerDatas.Instance.baseData.treasurePotentialSp;
- var spNeed = treasureSkillConfig.MeterialNum1;
-
- if (spOwn < spNeed)
- {
- return false;
- }
-
- if (treasureSkillConfig.InitialRate >= 8000)
- {
- return true;
- }
- else
- {
- for (int j = 0; j < treasureSkillConfig.MeterialNum2.Length; j++)
- {
- var rate = treasureSkillConfig.Rate[j];
- if (rate >= 6000)
- {
- var itemId = treasureSkillConfig.Meterial2ID[j];
- var own = packageModel.GetItemCountByID(PackType.rptItem, itemId);
- if (own >= treasureSkillConfig.MeterialNum2[j])
- {
- item = new Item()
- {
- id = itemId,
- count = treasureSkillConfig.MeterialNum2[j],
- };
- return true;
- }
- }
- }
- }
- return false;
- }
-
- private void OnAchievementAwardable(int _achievementId)
- {
- foreach (var treasure in treasures.Values)
- {
- if (treasure.achievements.Contains(_achievementId))
- {
- UpdateAchievementRedpoint(treasure.id);
- }
-
- }
- }
-
private void OnAchievementCompleted(int _achievementId)
{
foreach (var treasure in treasures.Values)
{
- if (treasure.achievements.Contains(_achievementId))
- {
- UpdateAchievementRedpoint(treasure.id);
- }
-
var config = TreasureConfig.Get(treasure.id);
if (treasure.achievements.Contains(_achievementId))
{
@@ -1277,7 +696,6 @@
if (_pretreasure == null || _pretreasure.state == TreasureState.Collected)
{
treasure.state = TreasureState.Collecting;
- (treasure as HumanTreasure).UpdateTreasureState();
collectingHuman = treasure.id;
if (serverInited)
{
@@ -1317,76 +735,6 @@
}
}
- private void UpdateAchievementRedpoint(int _treasureId)
- {
- if (!treasures.ContainsKey(_treasureId))
- {
- return;
- }
-
- var treasure = treasures[_treasureId];
- var config = TreasureConfig.Get(_treasureId);
- treasure.achievementRedpoint.state = RedPointState.None;
- if ((TreasureCategory)config.Category == TreasureCategory.Human && treasure.state != TreasureState.Collected)
- {
- return;
- }
-
- if ((TreasureCategory)config.Category == TreasureCategory.Demon && !FuncOpen.Instance.IsFuncOpen(107))
- {
- return;
- }
-
- if((TreasureCategory)config.Category == TreasureCategory.Human && treasure.IsHighestStage)
- {
- return;
- }
-
- foreach (var achievementGroup in treasure.achievementGroups.Values)
- {
- if (achievementGroup.IsAwardable())
- {
- treasure.achievementRedpoint.state = RedPointState.Simple;
- break;
- }
-
- treasure.achievementRedpoint.state = RedPointState.None;
- }
-
- }
-
- private void UpdateCastSoulRedpoint(int _treasureId)
- {
- if (!treasures.ContainsKey(_treasureId))
- {
- return;
- }
-
- var treasure = treasures[_treasureId] as HumanTreasure;
- if (treasure == null)
- {
- return;
- }
- treasure.castSoulRedpoint.state = RedPointState.None;
- if (treasure.state != TreasureState.Collected ||
- treasure.humanState != HumanTreasureState.CastSoul)
- {
- return;
- }
-
- var _nextStage = treasure.treasureStages.Find((x) =>
- {
- return x.stage == treasure.stage + 1;
- });
- if (_nextStage != null)
- {
- if (treasure.exp >= _nextStage.exp)
- {
- treasure.castSoulRedpoint.state = RedPointState.Simple;
- }
- }
- }
-
public void UpdateTreasureLevelInfo(HA352_tagMCMagicWeaponLVInfo package)
{
for (int i = 0; i < package.Count; i++)
@@ -1400,16 +748,10 @@
_up = true;
}
treasure.UpdateTreasureLevelExp(package.InfoList[i].LV, (int)package.InfoList[i].Exp, package.InfoList[i].State == 1);
- if (serverInited && treasure.IsHighestStage)
- {
- SetTreasureFinishAnim(treasure.id);
- }
if (treasureLevelProgressUpdateEvent != null)
{
treasureLevelProgressUpdateEvent(treasure.id);
}
- UpdateCastSoulRedpoint(treasure.id);
- UpdateAchievementRedpoint(treasure.id);
if (serverInited && _up && treasureStageUpEvent != null)
{
treasureStageUpEvent(treasure.id);
@@ -1425,15 +767,6 @@
demonTreasureDungeonUpdate(treasureDungeon.treasureId);
}
}
- }
- UpdateSkillLevelUpRedpoints();
- }
-
- public void HumanTreasureStateChange(int _id)
- {
- if (humanTreasureStateChangeEvent != null)
- {
- humanTreasureStateChangeEvent(_id);
}
}
@@ -1469,9 +802,7 @@
Treasure treasure;
if (category == TreasureCategory.Human)
{
- var caseSoulRedpoint = new Redpoint(CATEGORY_REDPOINTIDS[config.Category - 1], TREASURE_REDPOINTBASE + redpointIndex++);
- treasure = new HumanTreasure(config.ID, config.Potentials, skillLevelUpRedpoint, achievementRedpoint, caseSoulRedpoint);
- potentialInitialPowers.Add(config.ID, config.SkillPower);
+ treasure = new Treasure(config.ID, config.Potentials, skillLevelUpRedpoint, achievementRedpoint);
}
else
{
@@ -1499,10 +830,6 @@
treasureAchievementDict.Add(config.ID, config.Achievements[i]);
break;
}
- //else if (config.Category == (int)TreasureCategory.Fairy && config.ID == 301)
- //{
- // eightFurnacesAchievements.Add(config.Achievements[i]);
- //}
}
if (treasure.state == TreasureState.Locked && config.PreTreasure == 0)
@@ -1546,8 +873,6 @@
}
var funcConfig = FuncConfigConfig.Get("GuideMission");
- castSoulGuideTaskIds = new List<int>();
- castSoulGuideTaskIds.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1));
guideTreasures = new List<int>();
guideTreasures.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical2));
@@ -1556,9 +881,6 @@
funcConfig = FuncConfigConfig.Get("TreasureSkip");
treasureBackLvLimit = int.Parse(funcConfig.Numerical1);
- treasureBackPercent = float.Parse(funcConfig.Numerical2);
- funcConfig = FuncConfigConfig.Get("TreasureExitLimit");
- treasureExitLvLimit = int.Parse(funcConfig.Numerical1);
funcConfig = FuncConfigConfig.Get("TreasureNoOpen");
treasureUnOpens.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1));
@@ -1581,44 +903,6 @@
}
treasureDungeon.ParseDungeonInfo(config);
}
-
- funcConfig = FuncConfigConfig.Get("TreasureSpTarget");
- potentialNextTargetLevels.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1));
- }
-
- const string pattern = "\\\"[0-9]+\\\":\\[[0-9|,]*\\]";
- private void ParseSkillLevelUpConfig()
- {
- try
- {
- var config = FuncConfigConfig.Get("SPSkillType");
- var matches = Regex.Matches(config.Numerical1, pattern);
-
- for (int i = 0; i < matches.Count; i++)
- {
- var match = matches[i].Value;
- var stringArray = match.Split(':');
-
- var key = 0;
- int.TryParse(Regex.Match(stringArray[0], "[0-9]+").Value, out key);
- var skillList = skillLevelUpTypes[key] = new List<int>();
- var skillMatches = Regex.Matches(stringArray[1], "[0-9]{2,}");
- for (int j = 0; j < skillMatches.Count; j++)
- {
- skillList.Add(int.Parse(skillMatches[j].Value));
- }
- }
- }
- catch (Exception ex)
- {
- DebugEx.Log(ex);
- }
-
- }
-
- public static int GetSkillLevelUpId(int _type, int _level)
- {
- return _type * 100 + _level;
}
public int GetMapIdByTreasure(int _treasureId)
@@ -1676,62 +960,6 @@
return 0;
}
- Dictionary<int, int[]> m_TreasurePotentialGetSkills = new Dictionary<int, int[]>();
- private void ParsePotentialSkillConfig()
- {
- var _cfg = FuncConfigConfig.Get("PotentialSkillLearn");
- var _jsonData = LitJson.JsonMapper.ToObject(_cfg.Numerical1);
- foreach (var _key in _jsonData.Keys)
- {
- var _typeId = int.Parse(_key);
- m_TreasurePotentialGetSkills.Add(_typeId, LitJson.JsonMapper.ToObject<int[]>(_jsonData[_key].ToJson()));
- }
- }
-
- public bool TryGetPotentialGetSkill(int _skillTypeId, out int[] _array)
- {
- return m_TreasurePotentialGetSkills.TryGetValue(_skillTypeId, out _array);
- }
-
- public bool IsPotentialUnlock(int treasureId, int potentialId)
- {
- if (!FuncOpen.Instance.IsFuncOpen(82))
- {
- return false;
- }
- Treasure treasure;
- if (TryGetTreasure(treasureId, out treasure))
- {
- var potential = treasure.GetPotential(potentialId);
- if (potential != null)
- {
- var skillConfig = SkillConfig.Get(potential.id);
- if (skillConfig.LearnSkillReq > 0)
- {
- var prepotential = treasure.GetPotential(skillConfig.LearnSkillReq);
- if (prepotential != null && prepotential.level < skillConfig.LearnSkillLV)
- {
- return false;
- }
- }
- }
- }
- return true;
- }
-
- public int GetPotentialInitialPower(int treasureId, int index)
- {
- if (potentialInitialPowers.ContainsKey(treasureId))
- {
- var powerArray = potentialInitialPowers[treasureId];
- if (powerArray != null && index < powerArray.Length && index >= 0)
- {
- return powerArray[index];
- }
- }
- return 0;
- }
-
public bool SatisfyEntranceOpen()
{
var list = GetTreasureCategory(TreasureCategory.Human);
@@ -1772,23 +1000,6 @@
{
SysNotifyMgr.Instance.ShowTip("OpenFabaoHint", taskConfig.lv);
}
- }
-
- public int GetPotentialNextTargetLevel(int level)
- {
- var list = potentialNextTargetLevels;
- for (int i = 0; i < list.Count; i++)
- {
- if (level < list[i])
- {
- if (level < list[i] - 1)
- {
- return list[i];
- }
- break;
- }
- }
- return 0;
}
public void DemonDungeonChallengeNext(int lineId)
diff --git a/System/Treasure/TreasurePotentialBriefInfo.cs b/System/Treasure/TreasurePotentialBriefInfo.cs
deleted file mode 100644
index 95742d1..0000000
--- a/System/Treasure/TreasurePotentialBriefInfo.cs
+++ /dev/null
@@ -1,214 +0,0 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Monday, October 09, 2017
-//--------------------------------------------------------
-using UnityEngine;
-using System.Collections;
-using UnityEngine.UI;
-
-using DG.Tweening;
-
-namespace Snxxz.UI
-{
-
- public class TreasurePotentialBriefInfo : MonoBehaviour
- {
- [SerializeField] PositionTween m_DeadPotentailTween;
- [SerializeField] Text m_PotentialName;
- [SerializeField] Text m_Level;
- [SerializeField] Button m_Button;
- [SerializeField] UIEffect m_PotentialSfx;
- [SerializeField] Image m_Select;
- [SerializeField] Image m_Icon;
- //[SerializeField] ScaleTween m_SelectScale;
-
- public TreasurePotential potential { get; private set; }
-
- int maxLevel = 10;
-
- TreasurePotentialPanel m_TreasurePotential;
- public TreasurePotentialPanel treasurePotential {
- get {
- return m_TreasurePotential;
- }
- set {
- if (m_TreasurePotential != null)
- {
- m_TreasurePotential.potentialSelectEvent -= OnPotentialSelected;
- }
- m_TreasurePotential = value;
- m_TreasurePotential.potentialSelectEvent += OnPotentialSelected;
- }
- }
-
- public PositionTween potentialTween { get { return m_DeadPotentailTween; } }
-
- TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
-
- public void DisplayBaseInfo(TreasurePotential _potential, int _state = 0)
- {
- potential = _potential;
- var config = SkillConfig.Get(potential.id);
- maxLevel = config.SkillMaxLV;
- m_Select.gameObject.SetActive(false);
-
- if (treasurePotential.selectedPotential == potential.id && _state != 2)
- {
- OnPotentialSelected(potential.id);
- }
-
- bool _unlock = potential != null && model.IsPotentialUnlock(model.selectedTreasure, potential.id);
- if (_state == 2 || model.GetPotentialUnlockShow(model.selectedTreasure))
- {
- _unlock = false;
- }
- m_Level.text = _unlock ? StringUtility.Contact(_potential.level, "/", maxLevel) : string.Empty;
- m_Level.transform.localScale = Vector3.one;
-
- DisplayName(_unlock, config);
-
- model.potentialLevelChangeEvent -= OnPotentialLevelUp;
- model.potentialLevelChangeEvent += OnPotentialLevelUp;
-
- DisplayStateSfx(!_unlock);
- }
-
- public void Dispose()
- {
- model.potentialLevelChangeEvent -= OnPotentialLevelUp;
- }
-
- private void SelectPotential()
- {
- if (potential == null/* || !model.IsPotentialUnlock(model.selectedTreasure, potential.id)*/)
- {
- return;
- }
- treasurePotential.selectedPotential = potential.id;
- }
-
- public void SelectTotal()
- {
- m_Select.gameObject.SetActive(false);
- }
-
- public void DisplayUnlock()
- {
- DisplayStateSfx();
- var config = SkillConfig.Get(potential.id);
- bool _unlock = potential != null && model.IsPotentialUnlock(model.selectedTreasure, potential.id);
- m_Level.text = _unlock ? StringUtility.Contact(potential.level, "/", maxLevel) : string.Empty;
- m_Level.transform.localScale = Vector3.one;
- DisplayName(_unlock, config);
- }
-
- void DisplayName(bool unlock, SkillConfig config)
- {
- m_PotentialName.text = config.SkillName;
- m_PotentialName.color = UIHelper.GetUIColor(TextColType.LightYellow);
- if (!unlock)
- {
- var requirement = string.Empty;
- if (config.LearnSkillReq > 0 && config.LearnSkillLV > 0)
- {
- var preskillConfig = SkillConfig.Get(config.LearnSkillReq);
- requirement = Language.Get("Hallows_NeedSkillLVStart", preskillConfig.SkillName, config.LearnSkillLV, config.SkillName);
- m_PotentialName.text = requirement;
- m_PotentialName.color = UIHelper.GetUIColor(TextColType.Red);
- }
- }
- }
-
- public void OnPotentialSelected(int _potentialId)
- {
- m_Select.gameObject.SetActive(_potentialId == potential.id);
- }
-
- private void OnPotentialLevelUp(int _treasureId, int _potential)
- {
- if (potential.id != _potential)
- {
- return;
- }
-
- m_Level.text = StringUtility.Contact(potential.level, "/", maxLevel);
- //DisplayStateSfx();
- }
-
- public void DisplayStateSfx(int _state)
- {
- m_PotentialSfx.StopImediatly();
- m_PotentialSfx.loop = true;
- m_DeadPotentailTween.enabled = false;
- m_DeadPotentailTween.SetStartState();
- m_Icon.material = MaterialUtility.GetUIDefaultGraphicMaterial();
- switch (_state)
- {
- case 0:
- m_DeadPotentailTween.enabled = true;
- m_Icon.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
- break;
- case 1:
- m_PotentialSfx.effect = 5128;
- m_PotentialSfx.Play();
- break;
- case 2:
- m_PotentialSfx.effect = 5129;
- m_PotentialSfx.Play();
- break;
- case 3:
- m_PotentialSfx.effect = 5130;
- m_PotentialSfx.Play();
- break;
- case 4:
- m_PotentialSfx.effect = 5131;
- m_PotentialSfx.Play();
- break;
- }
- }
-
- public void DisplayStateSfx(bool _animation = false)
- {
- if (potential == null || !model.IsPotentialUnlock(model.selectedTreasure, potential.id) || _animation)
- {
- DisplayStateSfx(0);
- }
- else if (potential.level == 0)
- {
- DisplayStateSfx(1);
- }
- else if (potential.level < 15)
- {
- DisplayStateSfx(2);
- }
- else if (potential.level < maxLevel)
- {
- DisplayStateSfx(3);
- }
- else
- {
- DisplayStateSfx(4);
- }
- }
-
- public void StartLevelTween()
- {
- var tweener = m_Level.transform.DOScale(Vector3.one * 3, 0.2f);
- tweener.OnStepComplete(() =>
- {
- m_Level.transform.DOScale(Vector3.one, 0.2f);
- });
- }
-
- private void Awake()
- {
- if (m_Button != null)
- {
- m_Button.AddListener(SelectPotential);
- }
- }
- }
-}
-
-
-
diff --git a/System/Treasure/TreasurePotentialBriefInfo.cs.meta b/System/Treasure/TreasurePotentialBriefInfo.cs.meta
deleted file mode 100644
index 70aa32e..0000000
--- a/System/Treasure/TreasurePotentialBriefInfo.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: f420ca34e1dcb1c429113af1780b035c
-timeCreated: 1507539508
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/System/Treasure/TreasurePotentialLines.cs b/System/Treasure/TreasurePotentialLines.cs
deleted file mode 100644
index 780030c..0000000
--- a/System/Treasure/TreasurePotentialLines.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-namespace Snxxz.UI
-{
- public class TreasurePotentialLines : MonoBehaviour
- {
- [SerializeField] UIEffect[] m_Lines;
- [SerializeField] RectTransform[] m_Targets;
-
- public void Display(int _index, bool _open)
- {
- m_Lines[_index].StopImediatly();
- if (_open)
- {
- StartCoroutine(Co_Display(_index));
- }
- }
-
- IEnumerator Co_Display(int _index)
- {
- yield return null;
- m_Lines[_index].Play();
- var animator = m_Lines[_index].target.GetAnimator();
- var _frompos = transform.InverseTransformPoint(m_Targets[_index].transform.TransformPoint(Vector3.zero));
- var _angle = VectorUtility.VectorAngle(Vector3.zero, _frompos);
- m_Lines[_index].transform.localEulerAngles = Vector3.zero.SetZ(_angle);
- animator.transform.localScale = Vector3.one.SetY(Vector2.Distance(_frompos, Vector3.zero)
- / TreasureAnimation.LINE_NORMAL_LENGTH * TreasureAnimation.LINE_NORMAL_SCALE);
- animator.Play(TreasureAnimation.POTENTIAL_LINE_STATE_2, 0, 0);
- }
-
- public void Dispose()
- {
- for (int i = 0; i < m_Lines.Length; i++)
- {
- m_Lines[i].StopImediatly();
- }
- }
- }
-}
-
diff --git a/System/Treasure/TreasurePotentialLines.cs.meta b/System/Treasure/TreasurePotentialLines.cs.meta
deleted file mode 100644
index 6472bdd..0000000
--- a/System/Treasure/TreasurePotentialLines.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: a79244bb3007bb74bbce789238b8cb13
-timeCreated: 1530153964
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/System/Treasure/TreasurePotentialPanel.cs b/System/Treasure/TreasurePotentialPanel.cs
deleted file mode 100644
index d8877b0..0000000
--- a/System/Treasure/TreasurePotentialPanel.cs
+++ /dev/null
@@ -1,1229 +0,0 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Monday, October 09, 2017
-//--------------------------------------------------------
-using UnityEngine;
-using System.Collections;
-using UnityEngine.UI;
-using System;
-using Snxxz.UI;
-
-namespace Snxxz.UI
-{
- [XLua.Hotfix]
- public class TreasurePotentialPanel : MonoBehaviour
- {
- [SerializeField] TreasureAnimation m_TreasureAnimation;
- [SerializeField] TreasurePotentialBriefInfo[] potentialBriefInfos = null;
-
- [SerializeField] ScrollRect m_PotentialEffectScroll;
- [SerializeField] RectTransform m_ContainerPotential;
- [SerializeField] RectTransform m_ContainerCurrentProperty;
- [SerializeField] PropertyBehaviour m_CurrentProperty;
- [SerializeField] Text m_CurrentPotential;
-
- [SerializeField] RectTransform m_ContainerNextProperty;
- [SerializeField] PropertyBehaviour m_NextProperty;
- [SerializeField] RectTransform m_ContainerNextPotential;
- [SerializeField] Text m_NextPotential;
- [SerializeField] Transform m_ContainerPotentialMaxLevel;
-
- [SerializeField] RectTransform m_ContainerTargetPotential;
- [SerializeField] Text m_TargetPotentialTitle;
- [SerializeField] PropertyBehaviour m_TargetProperty;
- [SerializeField] Text m_TargetPotential;
-
- [SerializeField] Transform m_ContainerRequirement;
- [SerializeField] Text m_SPOwn;
- [SerializeField] Text m_SPNeed;
- [SerializeField] Transform m_ContainerUpgrade;
-
- [SerializeField] ItemBehaviour m_PotentialBook;
- [SerializeField] Text m_PotentialCount;
- [SerializeField] Text m_SuccessRatio;
- [SerializeField] Image m_RatioUp;
- [SerializeField] Button m_ItemBtn;
- [SerializeField] Image m_AddBookSign;
- [SerializeField] Image m_AddBookRedpoint;
- [SerializeField] Button m_RemoveBook;
- [SerializeField] ImageEx m_UpgradeImage;
- [SerializeField] Button m_Upgrade;
- [SerializeField] Image m_LevelUpRed;
-
- [SerializeField] UIEffect m_FailureEffect;
-
- [SerializeField] Text m_SkillTitle;
-
- [SerializeField] RectTransform m_ContainerGetSkill;
- [SerializeField] Text m_GetSkillCondition;
- [SerializeField] Image m_GetSkillIcon;
- [SerializeField] Text m_GetSkillEffect;
- [SerializeField] Text m_GetSkillName;
-
- [SerializeField] RectTransform m_ContainerTotalEffect;
- [SerializeField] Image m_SkillIcon;
- [SerializeField] Text m_SkillName;
- [SerializeField] Text m_SkillCd;
- [SerializeField] Text m_SkillDescription;
- [SerializeField] Image m_StageSkillIcon;
- [SerializeField] Button m_StageSkillBtn;
- [SerializeField] Image m_SkillSelect;
- [SerializeField] PotentialInfo[] m_TotalPotentials;
-
- [SerializeField] RectTransform m_ContainerLock;
- [SerializeField] Text m_PotentialLimit;
-
- [SerializeField] TreasurePotentialLines m_PotentialLine;
-
- public event Action<int> potentialSelectEvent;
- PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
-
- int m_SelectedPotential = 0;
- public int selectedPotential {
- get {
- return m_SelectedPotential;
- }
- set {
- if (m_SelectedPotential != value || selectTotalEffect)
- {
- m_SelectedPotential = value;
- model.selectedPotential = value;
- model.selectedPotentialBook = 0;
-
- DisplayPotentialEffect();
-
- var potential = m_Treasure.GetPotential(selectedPotential);
- var config = SkillConfig.Get(potential.id);
-
- var level = potential.level;
- var isMax = level >= config.SkillMaxLV;
- m_ContainerPotentialMaxLevel.gameObject.SetActive(isMax);
- m_ContainerUpgrade.gameObject.SetActive(!isMax &&
- FuncOpen.Instance.IsFuncOpen(82) && model.IsPotentialUnlock(m_Treasure.id, selectedPotential));
- m_ContainerRequirement.gameObject.SetActive(!isMax);
-
- if (!isMax)
- {
- AutoSelectPotentialBook();
- DisplayUpgradeCost();
- DisplayGetSkill();
- DisplaySuccessRatio();
-
- m_LevelUpRed.gameObject.SetActive(m_Treasure.id == model.GetSkillLevelUpRedpointTreasure()
- && m_Treasure.GetPotentialByIndex(m_Treasure.autoSelectPotential).id == selectedPotential);
- }
- else
- {
- DisplayGetSkill();
- }
-
- if (potentialSelectEvent != null)
- {
- potentialSelectEvent(m_SelectedPotential);
- }
- }
- }
- }
-
- bool m_SelectTotalEffect = false;
- public bool selectTotalEffect {
- get {
- return m_SelectTotalEffect;
- }
- }
-
- int spNeed = 0;
- TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
-
- Treasure m_Treasure;
-
- public void Display(Treasure _treasure, int _state = 0)
- {
- m_Treasure = _treasure;
- if (m_Treasure == null || m_Treasure.potentials == null)
- {
- return;
- }
-
- var _index = 0;
- var _level = -1;
- for (int i = 0; i < m_Treasure.potentials.Count; i++)
- {
- if (model.IsPotentialUnlock(_treasure.id, m_Treasure.potentials[i].id))
- {
- if (m_Treasure.potentials[i].level < _level || _level == -1)
- {
- _level = m_Treasure.potentials[i].level;
- _index = i;
- }
- }
- }
-
- if (m_Treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
- {
- if (m_Treasure.autoSelectPotential < m_Treasure.potentials.Count)
- {
- _index = m_Treasure.autoSelectPotential;
- }
- }
- else
- {
- for (int i = 0; i < m_Treasure.potentials.Count; i++)
- {
- Item item;
- if (model.SatisyPotentialLevelUp(_treasure.id, m_Treasure.potentials[i].id, out item))
- {
- _index = i;
- break;
- }
- }
- }
-
-
- selectedPotential = m_Treasure.potentials[_index].id;
-
- for (int i = 0; i < potentialBriefInfos.Length; i++)
- {
- var behaviour = potentialBriefInfos[i];
- if (i < m_Treasure.potentials.Count)
- {
- behaviour.gameObject.SetActive(true);
- behaviour.treasurePotential = this;
- behaviour.DisplayBaseInfo(m_Treasure.potentials[i], _state);
- if (_state != 2 && m_TreasureAnimation.step == TreasureAnimation.TreasureShowStep.UnLock)
- {
- m_PotentialLine.Display(i, model.IsPotentialUnlock(m_Treasure.id, m_Treasure.potentials[i].id));
- }
- }
- else
- {
- behaviour.gameObject.SetActive(false);
- m_PotentialLine.Display(i, false);
- }
- }
-
- model.selectedPotentialBook = 0;
-
- var level = m_Treasure.potentials[_index].level;
- var config = SkillConfig.Get(m_Treasure.potentials[_index].id);
- var isMax = level >= config.SkillMaxLV;
- if (!isMax)
- {
- AutoSelectPotentialBook();
- DisplayPotentialBook(model.selectedPotentialBook);
- }
-
- model.onPotentialLevelUpResultEvent -= OnPotentialLevelUp;
- model.onPotentialLevelUpResultEvent += OnPotentialLevelUp;
-
- model.potentialLevelUpdate -= PotentialLevelUpdate;
- model.potentialLevelUpdate += PotentialLevelUpdate;
-
- var _stageSkillCfg = SkillConfig.Get(m_Treasure.unlockSkill);
- if (_stageSkillCfg != null)
- {
- m_StageSkillIcon.SetSprite(_stageSkillCfg.IconName);
- m_StageSkillIcon.SetNativeSize();
- }
-
- m_ContainerLock.gameObject.SetActive(!FuncOpen.Instance.IsFuncOpen(82));
- var funcOpenConfig = FuncOpenLVConfig.Get(82);
- m_PotentialLimit.text = Language.Get("TreasureSkillLimit", funcOpenConfig.LimitLV);
-
- m_PotentialEffectScroll.verticalNormalizedPosition = 1f;
-
- if (!model.IsPotentialUnlock(model.selectedTreasure, selectedPotential)
- || model.GetPotentialUnlockShow(model.selectedTreasure) || _state == 2)
- {
- DisplayTotalPotentialEffect();
- }
-
- PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnTreasurePotentialSPChange;
- PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnTreasurePotentialSPChange;
-
- FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
- FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
-
- playerPack.RefreshItemCountAct -= RefreshItemCountAct;
- playerPack.RefreshItemCountAct += RefreshItemCountAct;
-
- m_TreasureAnimation.OnStepComplete -= OnStepComplete;
- m_TreasureAnimation.OnStepComplete += OnStepComplete;
-
- m_TreasureAnimation.OnUnlockPotentialComplete -= OnUnlockPotentialComplete;
- m_TreasureAnimation.OnUnlockPotentialComplete += OnUnlockPotentialComplete;
-
- m_TreasureAnimation.OnPotentialLevelUpComplete -= OnPotentialLevelUpComplete;
- m_TreasureAnimation.OnPotentialLevelUpComplete += OnPotentialLevelUpComplete;
-
- m_TreasureAnimation.OnPotentialLineAnimComplete -= OnPotentialLineAnimComplete;
- m_TreasureAnimation.OnPotentialLineAnimComplete += OnPotentialLineAnimComplete;
-
- model.potentialBookSelectEvent -= PotentialBookSelectEvent;
- model.potentialBookSelectEvent += PotentialBookSelectEvent;
-
- RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
- RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
-
- if (m_TreasureAnimation.step == TreasureAnimation.TreasureShowStep.UnLock)
- {
- OnStepComplete(TreasureAnimation.TreasureShowStep.UnLock);
- }
- }
-
- public void Dispose()
- {
- for (int i = 0; i < potentialBriefInfos.Length; i++)
- {
- var behaviour = potentialBriefInfos[i];
- behaviour.Dispose();
- }
-
- m_PotentialLine.Dispose();
-
- model.potentialBookSelectEvent -= PotentialBookSelectEvent;
- model.onPotentialLevelUpResultEvent -= OnPotentialLevelUp;
- model.potentialLevelUpdate -= PotentialLevelUpdate;
- PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnTreasurePotentialSPChange;
- FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
- playerPack.RefreshItemCountAct -= RefreshItemCountAct;
- m_TreasureAnimation.OnStepComplete -= OnStepComplete;
- m_TreasureAnimation.OnUnlockPotentialComplete -= OnUnlockPotentialComplete;
- m_TreasureAnimation.OnPotentialLevelUpComplete -= OnPotentialLevelUpComplete;
- RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
- m_TreasureAnimation.OnPotentialLineAnimComplete -= OnPotentialLineAnimComplete;
-
- m_SelectedPotential = 0;
-
- model.inPotentialModifyPower = false;
- }
-
- private void PotentialBookSelectEvent(int _id)
- {
- m_PotentialEffectScroll.verticalNormalizedPosition = 1f;
- DisplayPotentialBook(_id);
- }
-
- private void RedpointValueChangeEvent(int _id)
- {
- if (m_Treasure != null && _id == m_Treasure.skillLevelUpRedpoint.id)
- {
- DisplayAddBookRedpoint();
- m_LevelUpRed.gameObject.SetActive(m_Treasure.id == model.GetSkillLevelUpRedpointTreasure()
- && m_Treasure.GetPotentialByIndex(m_Treasure.autoSelectPotential).id == selectedPotential);
- }
- }
-
- private void OnPotentialLevelUpComplete(int _index, int level)
- {
- var potential = m_Treasure.potentials[_index];
- potentialBriefInfos[_index].DisplayStateSfx();
- //potentialBriefInfos[_index].StartLevelTween();
- var _nextPotential = GetNextPotential(potential.id);
- if (_nextPotential != 0)
- {
- var config = SkillConfig.Get(_nextPotential);
- if (level == config.LearnSkillLV && potentialBriefInfos != null)
- {
- for (int i = 0; i < potentialBriefInfos.Length; i++)
- {
- if (potentialBriefInfos[i].potential.id == _nextPotential)
- {
- potentialBriefInfos[i].potentialTween.SetStartState();
- potentialBriefInfos[i].potentialTween.enabled = false;
- m_TreasureAnimation.UnlockTreasurePotential(i);
- }
- }
- }
- }
- }
-
- private void ModifyPowerUp(int treasureId, int index, int fightPower)
- {
- var power = model.GetPotentialInitialPower(treasureId, index);
- if (power != 0)
- {
- ModelCenter.Instance.GetModel<PlayerMainDate>().FabaoPowerAdd(fightPower);
- model.inPotentialModifyPower = true;
- }
- }
-
- private void OnUnlockPotentialComplete(int _index)
- {
- selectedPotential = m_Treasure.potentials[_index].id;
- m_TreasureAnimation.DisplayPotentialLine(_index);
- HandleAchievement();
-
- if (model.inPotentialModifyPower)
- {
- var power = model.GetPotentialInitialPower(m_Treasure.id, _index);
- model.inPotentialModifyPower = false;
- ModelCenter.Instance.GetModel<PlayerMainDate>().FabaoPowerAdd(power);
- }
- }
-
- private void OnPotentialLineAnimComplete(int _index)
- {
- if (_index < potentialBriefInfos.Length)
- {
- m_PotentialLine.Display(_index, true);
- }
- }
-
- private void OnStepComplete(TreasureAnimation.TreasureShowStep _step)
- {
- switch (_step)
- {
- case TreasureAnimation.TreasureShowStep.UnLock:
- if (model.GetPotentialUnlockShow(model.selectedTreasure))
- {
- potentialBriefInfos[0].potentialTween.SetStartState();
- potentialBriefInfos[0].potentialTween.enabled = false;
- m_TreasureAnimation.UnlockTreasurePotential(0);
- model.SetPotentialUnlockShow(model.selectedTreasure);
- }
- else
- {
- HandleAchievement();
- }
- DisplayLines();
- break;
- case TreasureAnimation.TreasureShowStep.FirstPotential:
- if (FuncOpen.Instance.IsFuncOpen(82))
- {
- potentialBriefInfos[0].potentialTween.SetStartState();
- potentialBriefInfos[0].potentialTween.enabled = false;
- m_TreasureAnimation.UnlockTreasurePotential(0);
- model.SetPotentialUnlockShow(model.selectedTreasure);
- }
- else
- {
- HandleAchievement();
- }
- break;
- }
- }
-
- void HandleAchievement()
- {
- if (AchievementGoto.guideAchievementId != 0 && m_Treasure != null)
- {
- var config = SuccessConfig.Get(AchievementGoto.guideAchievementId);
- if (config != null && config.Type == 91)
- {
- var index = PlayerDatas.Instance.baseData.Job - 1;
- var skillId = index < config.Condition.Length ? config.Condition[index] : config.Condition[0];
- var potential = m_Treasure.GetPotential(skillId);
- if (potential != null)
- {
- if (model.IsPotentialUnlock(m_Treasure.id, potential.id))
- {
- selectedPotential = potential.id;
- }
- else
- {
- var skillConfig = SkillConfig.Get(potential.id);
- if (skillConfig.LearnSkillReq > 0 && skillConfig.LearnSkillLV > 0)
- {
- var preskillConfig = SkillConfig.Get(skillConfig.LearnSkillReq);
- SysNotifyMgr.Instance.ShowTip("TreasurePotentialSelectError", preskillConfig.SkillName, skillConfig.LearnSkillLV, skillConfig.SkillName);
- }
- }
- }
- AchievementGoto.guideAchievementId = 0;
- }
- }
- }
-
- void DisplayLines()
- {
- if (m_Treasure == null)
- {
- return;
- }
- for (int i = 0; i < potentialBriefInfos.Length; i++)
- {
- if (i < m_Treasure.potentials.Count)
- {
- m_PotentialLine.Display(i, model.IsPotentialUnlock(m_Treasure.id, m_Treasure.potentials[i].id));
- }
- else
- {
- m_PotentialLine.Display(i, false);
- }
- }
- }
-
- private void OnFuncStateChangeEvent(int _id)
- {
- if (_id == 82)
- {
- m_ContainerLock.gameObject.SetActive(!FuncOpen.Instance.IsFuncOpen(82));
- if (FuncOpen.Instance.IsFuncOpen(82) && model.serverInited)
- {
- potentialBriefInfos[0].potentialTween.SetStartState();
- potentialBriefInfos[0].potentialTween.enabled = false;
- m_TreasureAnimation.UnlockTreasurePotential(0);
- model.SetPotentialUnlockShow(model.selectedTreasure);
- }
- if (!m_SelectTotalEffect)
- {
- DisplayPotentialEffect();
- }
- }
- }
-
- private void DisplayPotentialEffect()
- {
- m_ContainerUpgrade.gameObject.SetActive(FuncOpen.Instance.IsFuncOpen(82));
- m_ContainerPotential.gameObject.SetActive(true);
- m_ContainerTotalEffect.gameObject.SetActive(false);
- m_SelectTotalEffect = false;
- m_SkillTitle.text = Language.Get("TreasurePotential");
-
- m_SkillSelect.gameObject.SetActive(false);
-
- var potential = m_Treasure.GetPotential(selectedPotential);
- var level = potential.level;
- var config = SkillConfig.Get(potential.id);
- if (level <= 0)
- {
- m_CurrentPotential.text = Language.Get("Hallows_NotLearn");
- m_CurrentProperty.gameObject.SetActive(false);
- }
- else
- {
- var currentConfig = SkillConfig.Get(potential.id + level - 1);
- m_CurrentPotential.text = currentConfig.Description;
- m_CurrentProperty.gameObject.SetActive(true);
- m_CurrentProperty.DisplayUpper(6, currentConfig.MP);
- }
-
- var isMax = level >= config.SkillMaxLV;
- m_ContainerNextPotential.gameObject.SetActive(!isMax);
- m_ContainerNextProperty.gameObject.SetActive(!isMax);
- if (!isMax)
- {
- var nextConfig = SkillConfig.Get(potential.id + level);
- m_NextPotential.text = nextConfig.Description;
- var currentConfig = SkillConfig.Get(potential.id + level - 1);
- var currentPropertyValue = 0;
- if (currentConfig != null)
- {
- currentPropertyValue = currentConfig.MP;
- }
- m_NextProperty.DisplayCompare(6, currentPropertyValue, nextConfig.MP);
- }
-
- var targetLevel = model.GetPotentialNextTargetLevel(potential.level);
- m_ContainerTargetPotential.gameObject.SetActive(targetLevel != 0);
- if (targetLevel != 0)
- {
- m_TargetPotentialTitle.text = Language.Get("TargetPotentialLevelEffect", targetLevel);
- var targetConfig = SkillConfig.Get(potential.id + targetLevel - 1);
- m_TargetPotential.text = targetConfig.Description;
- m_TargetProperty.DisplayUpper(6, targetConfig.MP);
- }
-
- DisplayAddBookRedpoint();
- }
-
- private void DisplayTotalPotentialEffect()
- {
- m_SelectTotalEffect = true;
-
- m_SkillSelect.gameObject.SetActive(true);
-
- for (int i = 0; i < potentialBriefInfos.Length; i++)
- {
- if (potentialBriefInfos[i].potential.id == model.selectedPotential)
- {
- potentialBriefInfos[i].SelectTotal();
- }
- }
-
- m_ContainerGetSkill.gameObject.SetActive(false);
- m_ContainerUpgrade.gameObject.SetActive(false);
- m_ContainerPotential.gameObject.SetActive(false);
- m_ContainerTotalEffect.gameObject.SetActive(true);
- m_SkillTitle.text = Language.Get("PotentialSkill");
-
- var config = SkillConfig.Get(m_Treasure.unlockSkill);
- if (config != null)
- {
- m_SkillIcon.SetSprite(config.IconName);
- m_SkillName.text = config.SkillName;
- m_SkillCd.text = config.CoolDownTime == 0 ? string.Empty : Language.Get("L1065", config.CoolDownTime / 1000);
- m_SkillDescription.text = config.Description;
- }
-
-
- for (int i = 0; i < m_TotalPotentials.Length; i++)
- {
- if (i < m_Treasure.potentials.Count)
- {
- m_TotalPotentials[i].SetActive(true);
- var potential = m_Treasure.potentials[i];
- m_TotalPotentials[i].Display(potential, model.selectedTreasure);
- }
- else
- {
- m_TotalPotentials[i].SetActive(false);
- }
- }
- }
-
- void AutoSelectPotentialBook()
- {
- var potential = m_Treasure.GetPotential(model.selectedPotential);
- if (potential == null)
- {
- return;
- }
- var levelUpType = model.GetSkillLevelUpType(potential.id);
- var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
- var config = TreasureSkillConfig.Get(levelupId);
- if (config == null)
- {
- return;
- }
- if (config.InitialRate >= 100)
- {
- model.selectedPotentialBook = 0;
- return;
- }
- var itemId = config.Meterial2ID.Length > 0 ? config.Meterial2ID[0] : 0;
- if (itemId != 0)
- {
- //var own = playerPack.GetItemCountByID(PackType.rptItem, itemId);
- //var need = config.MeterialNum2[0];
- var rate = config.Rate[0];
- if (rate >= 60)
- {
- model.selectedPotentialBook = itemId;
- }
- }
- }
-
- private void DisplayUpgradeCost()
- {
- var potential = m_Treasure.GetPotential(selectedPotential);
- var levelUpType = model.GetSkillLevelUpType(potential.id);
- var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
- var config = TreasureSkillConfig.Get(levelupId);
- var spOwn = PlayerDatas.Instance.baseData.treasurePotentialSp;
- spNeed = config.MeterialNum1;
- m_SPOwn.text = UIHelper.ReplaceLargeNum(spOwn);
- m_SPNeed.text = StringUtility.Contact("/", UIHelper.ReplaceLargeNum(spNeed));
- m_SPOwn.color = spOwn >= spNeed ? UIHelper.GetUIColor(TextColType.DarkGreen) : UIHelper.GetUIColor(TextColType.Red);
- }
-
- private void DisplayGetSkill(bool _levelUp = false)
- {
- var potential = m_Treasure.GetPotential(selectedPotential);
- var config = SkillConfig.Get(potential.id);
- int[] _getSkillArray;
- if (model.TryGetPotentialGetSkill(config.SkillTypeID, out _getSkillArray))
- {
- m_ContainerGetSkill.gameObject.SetActive(true);
- var _getSkillCfg = SkillConfig.Get(_getSkillArray[1]);
- m_GetSkillIcon.SetSprite(_getSkillCfg.IconName);
- m_GetSkillIcon.material = potential.level >= _getSkillArray[0] ?
- MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetInstantiatedSpriteGrayMaterial();
- m_GetSkillEffect.text = _getSkillCfg.Description;
- m_GetSkillName.text = _getSkillCfg.SkillName;
- if (potential.level >= _getSkillArray[0])
- {
- m_GetSkillCondition.text = Language.Get("Role_TieTitle_2");
- if (_levelUp && potential.level == _getSkillArray[0])
- {
- EffectMgr.Instance.PlayUIEffect(TreasureAnimation.SPIRALSFX, 2700, m_GetSkillIcon.transform, false);
- }
- }
- else
- {
- m_GetSkillCondition.text = Language.Get("PotentialGetSkillLevel", _getSkillArray[0]);
- }
- m_GetSkillCondition.color = potential.level >= _getSkillArray[0] ? UIHelper.GetUIColor(TextColType.NavyYellow) : UIHelper.GetUIColor(TextColType.Red);
- }
- else
- {
- m_ContainerGetSkill.gameObject.SetActive(false);
- }
- }
-
- private void DisplaySuccessRatio()
- {
- var levelUpConfig = GetPotentialLevelUpConfig();
- m_SuccessRatio.text = StringUtility.Contact((levelUpConfig.rate * 0.01f).ToString("f0"), "%");
- m_RatioUp.gameObject.SetActive(model.selectedPotentialBook != 0 && levelUpConfig.rate > 0 && levelUpConfig.materilaKind > 1);
- m_SuccessRatio.color = UIHelper.GetUIColor(model.selectedPotentialBook != 0 && levelUpConfig.rate > 0
- ? TextColType.DarkGreen : TextColType.LightYellow);
- m_UpgradeImage.gray = levelUpConfig.rate == 0 && model.selectedPotentialBook == 0;
- m_Upgrade.interactable = levelUpConfig.rate != 0 || model.selectedPotentialBook != 0;
- }
-
- private void DisplayAddBookRedpoint()
- {
- if (selectTotalEffect || model.selectedPotentialBook != 0)
- {
- m_AddBookRedpoint.gameObject.SetActive(false);
- return;
- }
- var levelUpConfig = GetPotentialLevelUpConfig();
- if (levelUpConfig.rate * 0.01f >= 60)
- {
- m_AddBookRedpoint.gameObject.SetActive(false);
- return;
- }
- Item item;
- bool levelUpHighSuccess = model.SatisyPotentialLevelUp(model.selectedTreasure, model.selectedPotential, out item);
- m_AddBookRedpoint.gameObject.SetActive(levelUpHighSuccess);
- }
-
- private void OnSpNeedItem()
- {
- var levelUpConfig = GetPotentialLevelUpConfig();
- if (levelUpConfig.rate >= 10000)
- {
- SysNotifyMgr.Instance.ShowTip("SPSuccessHint");
- return;
- }
- if (model.selectedPotentialBook == 0)
- {
- WindowCenter.Instance.Open<PotentialItemUseWin>();
- }
- else
- {
- if (levelUpConfig.materilaKind > 1)
- {
- WindowCenter.Instance.Open<PotentialItemUseWin>();
- }
- else
- {
- ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(model.selectedPotentialBook);
- }
- }
- }
-
- private void RemovePotentialBook()
- {
- model.selectedPotentialBook = 0;
- }
-
- private void DisplayPotentialBook(int _potentialBookId)
- {
- m_PotentialBook.gameObject.SetActive(_potentialBookId != 0);
- m_PotentialCount.gameObject.SetActive(_potentialBookId != 0);
- m_RemoveBook.gameObject.SetActive(false);
- m_AddBookSign.gameObject.SetActive(_potentialBookId == 0);
- if (_potentialBookId != 0)
- {
- m_PotentialBook.showCount = false;
- m_PotentialBook.SetItem(_potentialBookId, 1);
-
- var levelUpConfig = GetPotentialLevelUpConfig();
- bool satisfy = levelUpConfig.own >= levelUpConfig.need;
- m_PotentialCount.text = StringUtility.Contact(UIHelper.AppendStringColor(satisfy ?
- TextColType.LightYellow : TextColType.Red, levelUpConfig.own.ToString()), "/", levelUpConfig.need);
- m_RemoveBook.gameObject.SetActive(levelUpConfig.materilaKind > 1);
- }
-
- DisplaySuccessRatio();
- DisplayAddBookRedpoint();
- }
-
- private void RefreshItemCountAct(PackType packType, int arg2, int _id)
- {
- var config = ItemConfig.Get(_id);
- if (packType == PackType.rptItem && config != null && config.Type == 6)
- {
- var levelUpConfig = GetPotentialLevelUpConfig();
- if (_id == model.selectedPotentialBook)
- {
- DisplayPotentialBook(model.selectedPotentialBook);
- }
- //if (levelUpConfig.own < levelUpConfig.need)
- //{
- // model.selectedPotentialBook = 0;
- //}
- }
- }
-
- private void UpgradeLevel()
- {
- if (!m_TreasureAnimation.stepComplete)
- {
- return;
- }
- var error = 0;
- if (!TestPotentialLevelUp(out error))
- {
- var skillConfig = SkillConfig.Get(selectedPotential);
- switch (error)
- {
- case 1:
- ServerTipDetails.DisplayNormalTip(Language.Get("Hallows_NeedLv", skillConfig.LearnLVReq));
- break;
- case 2:
- if (skillConfig.LearnSkillReq > 0)
- {
- var preSkillConfig = SkillConfig.Get(skillConfig.LearnSkillReq);
- ServerTipDetails.DisplayNormalTip(Language.Get("Hallows_NeedSkillLV", preSkillConfig.SkillName, skillConfig.LearnSkillLV));
- }
- break;
- case 3:
- ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(148);
- //ServerTipDetails.DisplayNormalTip(Language.Get("Hallows_SpUnEnough"));
- break;
- case 4:
- SysNotifyMgr.Instance.ShowTip("TreasureUnsealed");
- break;
- case 6:
- if (model.selectedPotentialBook != 0)
- {
- ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(model.selectedPotentialBook);
- }
- else
- {
- SysNotifyMgr.Instance.ShowTip("LevelUpZeroRate");
- }
- break;
- }
-
- return;
- }
-
- var successRequirement = GeneralDefine.potentialUpSuccessRecommend;
- var levelUpConfig = GetPotentialLevelUpConfig();
-
- DisplaySuccessRatio();
- if (levelUpConfig.rate * 0.0001f >= successRequirement)
- {
- model.RequestPotentialUpgrade(m_Treasure.id, selectedPotential, levelUpConfig.materilaIndex);
- }
- else
- {
- if (DayRemind.Instance.GetDayRemind(DayRemind.POTENTIAL_NO_NOTIFY))
- {
- model.RequestPotentialUpgrade(m_Treasure.id, selectedPotential, levelUpConfig.materilaIndex);
- return;
- }
- ConfirmCancel.ToggleConfirmCancel(
- Language.Get("Mail101"),
- Language.Get("Hallows_SuccessTooLow"),
- Language.Get("TodayNoNotify"),
- (bool _ok, bool _toggle) =>
- {
- if (_ok)
- {
- model.RequestPotentialUpgrade(m_Treasure.id, selectedPotential, levelUpConfig.materilaIndex);
- }
- if (_toggle)
- {
- DayRemind.Instance.SetDayRemind(DayRemind.POTENTIAL_NO_NOTIFY, true);
- }
- });
- }
-
- }
-
- private PotentialLevelUpConfig GetPotentialLevelUpConfig()
- {
- var potential = m_Treasure.GetPotential(selectedPotential);
- var levelUpType = model.GetSkillLevelUpType(potential.id);
- var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
- var config = TreasureSkillConfig.Get(levelupId);
- if (config == null)
- {
- return new PotentialLevelUpConfig(0, 0, 0, 0, 0);
- }
- if (model.selectedPotentialBook == 0)
- {
- return new PotentialLevelUpConfig(config.InitialRate, 0, 0, 0, 0);
- }
- else
- {
- var index = 0;
- for (int i = 0; i < config.Meterial2ID.Length; i++)
- {
- if (config.Meterial2ID[i] == model.selectedPotentialBook)
- {
- index = i;
- break;
- }
- }
-
- var own = playerPack.GetItemCountByID(PackType.rptItem, model.selectedPotentialBook);
- var need = config.MeterialNum2[index];
- var ratio = own >= need ? config.Rate[index] : config.InitialRate;
-
- return new PotentialLevelUpConfig(ratio, index + 1, own, need, config.Meterial2ID.Length);
- }
- }
-
- private bool ContainsPotentialBook(int potentialBook)
- {
- if (potentialBook == 0)
- {
- return false;
- }
- var potential = m_Treasure.GetPotential(selectedPotential);
- var levelUpType = model.GetSkillLevelUpType(potential.id);
- var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
- var config = TreasureSkillConfig.Get(levelupId);
- if (config == null)
- {
- return false;
- }
- for (int i = 0; i < config.Meterial2ID.Length; i++)
- {
- if (config.Meterial2ID[i] == potentialBook)
- {
- return true;
- }
- }
- return false;
- }
-
- private int GetNextPotential(int _potentialId)
- {
- for (int i = 0; i < m_Treasure.potentials.Count; i++)
- {
- var potential = m_Treasure.potentials[i];
- if (potential.id == _potentialId)
- {
- continue;
- }
- var skillConfig = SkillConfig.Get(potential.id);
- if (skillConfig.LearnSkillReq == _potentialId)
- {
- return potential.id;
- }
- }
- return 0;
- }
-
- private void PotentialLevelUpdate(int _potentialId, int arg2)
- {
- if (_potentialId == model.selectedPotential && !m_SelectTotalEffect)
- {
- DisplayPotentialEffect();
- }
- var potential = m_Treasure.GetPotential(_potentialId);
- if (potential != null && model.serverInited)
- {
- PotentialLevelUpAnimation(_potentialId, potential.level);
- var nextPotential = GetNextPotential(potential.id);
- if (nextPotential != 0)
- {
- var config = SkillConfig.Get(nextPotential);
- if (potential.level == config.LearnSkillLV && potentialBriefInfos != null)
- {
- for (int i = 0; i < potentialBriefInfos.Length; i++)
- {
- if (potentialBriefInfos[i].potential.id == nextPotential)
- {
- var current = SkillConfig.Get(potential.id + potential.level - 1);
- var before = SkillConfig.Get(potential.id + potential.level - 2);
- ModifyPowerUp(m_Treasure.id, i, current.FightPower - before.FightPower);
- }
- }
- }
- }
- }
-
- if(_potentialId == model.selectedPotential && !m_SelectTotalEffect)
- {
- var levelUpConfig = GetPotentialLevelUpConfig();
- if (!ContainsPotentialBook(model.selectedPotentialBook))
- {
- AutoSelectPotentialBook();
- }
-
- var curconfig = SkillConfig.Get(potential.id);
-
- var level = potential.level;
- var isMax = level >= curconfig.SkillMaxLV;
- m_ContainerUpgrade.gameObject.SetActive(!isMax && FuncOpen.Instance.IsFuncOpen(82));
- }
- }
-
- private void OnPotentialLevelUp(int _treasureId, int _potential, bool _ok)
- {
- if (m_Treasure.id != _treasureId)
- {
- return;
- }
-
- if (selectedPotential != _potential)
- {
- return;
- }
-
- if (!_ok)
- {
- m_FailureEffect.Play();
- }
-
- if (_ok)
- {
- DisplayPotentialEffect();
- var potential = m_Treasure.GetPotential(selectedPotential);
- var config = SkillConfig.Get(potential.id);
-
- var level = potential.level;
- var isMax = level >= config.SkillMaxLV;
- m_ContainerPotentialMaxLevel.gameObject.SetActive(isMax);
- m_ContainerUpgrade.gameObject.SetActive(!isMax && FuncOpen.Instance.IsFuncOpen(82));
- m_ContainerRequirement.gameObject.SetActive(!isMax);
-
- if (!isMax)
- {
- DisplayUpgradeCost();
- DisplaySuccessRatio();
- DisplayGetSkill(true);
- DisplayPotentialBook(model.selectedPotentialBook);
- }
- }
- else
- {
- DisplayPotentialBook(model.selectedPotentialBook);
- var levelUpConfig = GetPotentialLevelUpConfig();
- bool satisfy = levelUpConfig.own >= levelUpConfig.need;
- m_PotentialCount.text = StringUtility.Contact(UIHelper.AppendStringColor(satisfy ?
- TextColType.LightYellow : TextColType.Red, levelUpConfig.own.ToString()), "/", levelUpConfig.need);
- }
- }
-
- private void PotentialLevelUpAnimation(int id, int level)
- {
- for (int i = 0; i < potentialBriefInfos.Length; i++)
- {
- if (potentialBriefInfos[i].potential == null)
- {
- continue;
- }
- if (potentialBriefInfos[i].potential.id == id)
- {
- m_TreasureAnimation.DisplayPotentialLevelUp(i, level);
- break;
- }
- }
- }
-
- private void OnTreasurePotentialSPChange(PlayerDataRefresh refreshType)
- {
- switch (refreshType)
- {
- case PlayerDataRefresh.ExAttr7:
- case PlayerDataRefresh.ExAttr8:
- var spOwn = PlayerDatas.Instance.baseData.treasurePotentialSp;
- m_SPOwn.text = UIHelper.ReplaceLargeNum(spOwn);
- m_SPNeed.text = StringUtility.Contact("/", UIHelper.ReplaceLargeNum(spNeed));
- m_SPOwn.color = spOwn >= spNeed ? UIHelper.GetUIColor(TextColType.DarkGreen) : UIHelper.GetUIColor(TextColType.Red);
- break;
- }
- }
-
- private bool TestPotentialLevelUp()
- {
- var error = 0;
- return TestPotentialLevelUp(out error);
- }
-
- private bool TestPotentialLevelUp(out int _error)
- {
- //1.浜虹墿绛夌骇瑕佹眰涓嶈冻锛�2.鍓嶇疆鎶�鑳界瓑绾т笉瓒筹紱3.sp涓嶈冻;4.娉曞疂鏈幏寰�;5.宸茬粡鏈�澶х瓑绾�;6.姒傜巼涓�0
- _error = 0;
- if (m_Treasure.state != TreasureState.Collected)
- {
- _error = 4;
- return false;
- }
-
- var skillConfig = SkillConfig.Get(selectedPotential);
- if (PlayerDatas.Instance.baseData.LV < skillConfig.LearnLVReq)
- {
- _error = 1;
- return false;
- }
-
- if (skillConfig.LearnSkillReq > 0)
- {
- var preSkillConfig = SkillConfig.Get(selectedPotential);
- var preSkillLevelRequirement = skillConfig.LearnSkillLV;
- var preSkill = PlayerDatas.Instance.skill.GetSkillBySkillTypeID(skillConfig.LearnSkillReq);
- var preSkillLevel = preSkill == null ? 0 : preSkill.level;
-
- if (preSkillLevel < preSkillLevelRequirement)
- {
- _error = 2;
- return false;
- }
- }
-
- if (PlayerDatas.Instance.baseData.treasurePotentialSp < spNeed)
- {
- _error = 3;
- return false;
- }
-
- if (m_Treasure.GetPotential(selectedPotential).level >= skillConfig.SkillMaxLV)
- {
- _error = 5;
- return false;
- }
-
- var levelUpConfig = GetPotentialLevelUpConfig();
- if (levelUpConfig.rate == 0)
- {
- _error = 6;
- return false;
- }
-
- _error = 0;
- return true;
- }
-
- private void OnStageSkillBtn()
- {
- DisplayTotalPotentialEffect();
- }
-
- private void Awake()
- {
- m_ItemBtn.AddListener(OnSpNeedItem);
- m_Upgrade.AddListener(UpgradeLevel);
- m_RemoveBook.AddListener(RemovePotentialBook);
- m_StageSkillBtn.AddListener(OnStageSkillBtn);
- }
-
- private void CheckAchievementGuide()
- {
- if (AchievementGoto.guideAchievementId != 0)
- {
- var config = SuccessConfig.Get(AchievementGoto.guideAchievementId);
- var condition = config.Type == 91 && config.Condition[0] == model.selectedPotential;
-
- if (condition)
- {
- var guideEffect = AchievementGuideEffectPool.Require(1);
- guideEffect.transform.SetParentEx(m_Upgrade.transform, Vector3.zero, Vector3.zero, Vector3.one);
- }
- }
- }
-
-#if UNITY_EDITOR
- [ContextMenu("杩炵嚎")]
- public void PreviewSfx()
- {
- }
-#endif
-
- struct PotentialLevelUpConfig
- {
- public int materilaIndex;
- public int rate;
- public int need;
- public int own;
- public int materilaKind;
-
- public PotentialLevelUpConfig(int _rate, int _materilaIndex, int _own, int _need,int materilaKind)
- {
- this.rate = _rate;
- this.materilaIndex = _materilaIndex;
- this.need = _need;
- this.own = _own;
- this.materilaKind = materilaKind;
- }
- }
- [Serializable]
- public class PotentialInfo
- {
- [SerializeField] Transform m_Container;
- [SerializeField] Text m_Name;
- [SerializeField] Text m_Effect;
- [SerializeField] Text m_Level;
- [SerializeField] Text m_GetSkillName;
- [SerializeField] Text m_GetSkillEffect;
- [SerializeField] Text m_GetSkillCondition;
-
- public void Display(TreasurePotential potential, int treasureId)
- {
- var model = ModelCenter.Instance.GetModel<TreasureModel>();
-
- var level = potential.level;
- var potentialConifg = SkillConfig.Get(potential.id);
-
- int[] _getskillArray;
- m_GetSkillName.gameObject.SetActive(false);
- m_GetSkillEffect.gameObject.SetActive(false);
- m_GetSkillCondition.gameObject.SetActive(false);
- if (model.TryGetPotentialGetSkill(potentialConifg.SkillTypeID, out _getskillArray))
- {
- var _getSkillCfg = SkillConfig.Get(_getskillArray[1]);
- m_GetSkillName.text = _getSkillCfg.SkillName;
- m_GetSkillEffect.text = _getSkillCfg.Description;
- m_GetSkillName.gameObject.SetActive(true);
- if (potential.level < _getskillArray[0])
- {
- m_GetSkillCondition.gameObject.SetActive(true);
- m_GetSkillCondition.text = Language.Get("Hallows_NeedSkillLV", potentialConifg.SkillName, _getskillArray[0]);
- m_GetSkillCondition.color = UIHelper.GetUIColor(TextColType.Red);
- }
- else
- {
- m_GetSkillEffect.gameObject.SetActive(true);
- }
- }
-
- m_Name.text = potentialConifg.SkillName;
- if (!model.IsPotentialUnlock(treasureId, potential.id))
- {
- var skillConfig = SkillConfig.Get(potential.id);
- var requirement = string.Empty;
- if (skillConfig.LearnSkillReq > 0 && skillConfig.LearnSkillLV > 0)
- {
- var preskillConfig = SkillConfig.Get(skillConfig.LearnSkillReq);
- requirement = Language.Get("Hallows_NeedSkillLV", preskillConfig.SkillName, skillConfig.LearnSkillLV);
- }
- else
- {
- requirement = Language.Get("Hallows_NeedLv", potentialConifg.LearnLVReq);
- }
-
- m_Level.text = requirement;
- m_Level.color = UIHelper.GetUIColor(TextColType.Red);
- m_Effect.gameObject.SetActive(false);
- }
- else
- {
- m_Level.text = StringUtility.Contact(level, Language.Get("Z1041"));
- m_Level.color = UIHelper.s_LightYellow;
- var currentConfig = SkillConfig.Get(potential.id + level - 1);
- if (currentConfig == null)
- {
- m_Effect.gameObject.SetActive(false);
- m_Effect.text = string.Empty;
- }
- else
- {
- m_Effect.gameObject.SetActive(true);
- m_Effect.text = currentConfig.Description;
- }
- }
- }
-
- public void SetActive(bool _active)
- {
- m_Container.gameObject.SetActive(_active);
- }
- }
-
- }
-
-}
-
-
-
diff --git a/System/Treasure/TreasurePotentialPanel.cs.meta b/System/Treasure/TreasurePotentialPanel.cs.meta
deleted file mode 100644
index ed01851..0000000
--- a/System/Treasure/TreasurePotentialPanel.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 80df40297c4ccc142ac0787fae7f16f6
-timeCreated: 1507533806
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/System/Treasure/TreasureSelectWin.cs b/System/Treasure/TreasureSelectWin.cs
index 8f2bca7..067e8f9 100644
--- a/System/Treasure/TreasureSelectWin.cs
+++ b/System/Treasure/TreasureSelectWin.cs
@@ -45,8 +45,7 @@
m_HumanBtn.onClick.AddListener(() =>
{
if (UI3DTreasureSelectStage.Instance.currentCategory == TreasureCategory.Human
- || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser
- || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
+ || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser)
{
return;
}
@@ -57,8 +56,7 @@
m_DemonBtn.onClick.AddListener(() =>
{
if (UI3DTreasureSelectStage.Instance.currentCategory == TreasureCategory.Demon
- || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser
- || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
+ || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser)
{
return;
}
@@ -69,8 +67,7 @@
m_FairyBtn.onClick.AddListener(() =>
{
if (UI3DTreasureSelectStage.Instance.currentCategory == TreasureCategory.Fairy
- || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser
- || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
+ || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser)
{
return;
}
@@ -79,8 +76,7 @@
m_KingBtn.onClick.AddListener(() =>
{
if (UI3DTreasureSelectStage.Instance.currentCategory == TreasureCategory.King
- || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser
- || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
+ || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser)
{
return;
}
@@ -88,7 +84,7 @@
});
m_BackBtn.onClick.AddListener(() =>
{
- if (UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
+ if (UI3DTreasureSelectStage.Instance.UnlockShowing)
{
return;
}
@@ -116,7 +112,6 @@
protected override void OnPreOpen()
{
UI3DTreasureSelectStage.Instance.UnlockShowing = false;
- UI3DTreasureSelectStage.Instance.treasureFinishShowing = false;
if (!UI3DTreasureSelectStage.Instance.IsOpen)
{
UI3DTreasureSelectStage.Instance.Open(false, model.currentCategory);
@@ -124,7 +119,6 @@
UI3DTreasureSelectStage.Instance.OnCameraStartEvent += OnCameraStartEvent;
UI3DTreasureSelectStage.Instance.OnCameraBackComplete += OnCameraBackComplete;
UI3DTreasureSelectStage.Instance.OnUnlockComplete += OnUnlockComplete;
- UI3DTreasureSelectStage.Instance.OnHighestComplete += OnHighestComplete;
UI3DTreasureSelectStage.Instance.startAnimation += StartAnimation;
m_TreasureDrag.OnValueChange += OnValueChange;
m_TreasureDrag.OnDragComplete += OnDragComplete;
@@ -153,7 +147,6 @@
UI3DTreasureSelectStage.Instance.OnCameraStartEvent -= OnCameraStartEvent;
UI3DTreasureSelectStage.Instance.OnCameraBackComplete -= OnCameraBackComplete;
UI3DTreasureSelectStage.Instance.OnUnlockComplete -= OnUnlockComplete;
- UI3DTreasureSelectStage.Instance.OnHighestComplete -= OnHighestComplete;
UI3DTreasureSelectStage.Instance.startAnimation -= StartAnimation;
m_TreasureDrag.OnValueChange -= OnValueChange;
m_TreasureDrag.OnDragComplete -= OnDragComplete;
@@ -227,9 +220,8 @@
private void UpdateButtonState()
{
var _closer = UI3DTreasureSelectStage.Instance.IsCloser
- || UI3DTreasureSelectStage.Instance.UnlockShowing|| UI3DTreasureSelectStage.Instance.treasureFinishShowing;
- if (UI3DTreasureSelectStage.Instance.UnlockShowing
- || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
+ || UI3DTreasureSelectStage.Instance.UnlockShowing;
+ if (UI3DTreasureSelectStage.Instance.UnlockShowing)
{
m_BackBtn.gameObject.SetActive(false);
}
@@ -270,8 +262,7 @@
private void ReclickSelect(TreasureCategory category)
{
if (UI3DTreasureSelectStage.Instance.jumping
- || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser
- || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
+ || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser)
{
return;
}
@@ -279,34 +270,6 @@
var gotoId = 0;
switch (category)
{
- case TreasureCategory.Human:
- for (int i = 0; i < list.Count; i++)
- {
- Treasure treasure;
- if (model.TryGetTreasure(list[i], out treasure))
- {
- var humanTreasure = treasure as HumanTreasure;
- if (treasure.achievementRedpoint.state == RedPointState.Simple
- || treasure.skillLevelUpRedpoint.state == RedPointState.Simple
- || humanTreasure.castSoulRedpoint.state == RedPointState.Simple
- || humanTreasure.humanState == HumanTreasureState.Challenge)
- {
- if (list[i] > UI3DTreasureSelectStage.Instance.selectTreasure)
- {
- if (rightSelect || gotoId == 0)
- {
- gotoId = list[i];
- break;
- }
- }
- else if (list[i] < UI3DTreasureSelectStage.Instance.selectTreasure)
- {
- gotoId = list[i];
- }
- }
- }
- }
- break;
case TreasureCategory.Demon:
for (int i = 0; i < list.Count; i++)
{
diff --git a/System/Treasure/UI3DTreasureSelectStage.cs b/System/Treasure/UI3DTreasureSelectStage.cs
index cbc79de..c827fb3 100644
--- a/System/Treasure/UI3DTreasureSelectStage.cs
+++ b/System/Treasure/UI3DTreasureSelectStage.cs
@@ -159,7 +159,6 @@
public bool CloserComplete { get; private set; }
public int jumpTreasure { get; private set; }
public bool UnlockShowing { get; set; }
- public bool treasureFinishShowing { get; set; }
public bool Preloading { get; private set; }
public GameObject currentTreasureTitle
@@ -218,7 +217,6 @@
public event Action OnCameraCloserComplete;
public event Action OnCameraBackEvent;
public event Action OnUnlockComplete;
- public event Action OnHighestComplete;
public event Action startAnimation;
Dictionary<TreasureCategory, List<TreasureComponent>> m_Treasures = new Dictionary<TreasureCategory, List<TreasureComponent>>();
@@ -340,7 +338,6 @@
IsCloser = false;
CloserComplete = false;
UnlockShowing = false;
- treasureFinishShowing = false;
IsOpen = false;
jumping = false;
Preloading = false;
@@ -398,7 +395,6 @@
});
if (_component != null && _component.display)
{
- _component.UpdateTreasureStage();
_component.SetLayer(CloserComplete ? LayerUtility.DefaultLayer : LayerUtility.UILayer);
}
}
@@ -409,7 +405,6 @@
presentSelectIndex = 0;
UnlockShowing = false;
- treasureFinishShowing = false;
currentCategory = _type;
model.currentCategory = currentCategory;
@@ -486,11 +481,7 @@
{
var _treasure = 0;
int _index = -1;
- if (CheckTreasureFinish(out _treasure))
- {
- treasureFinishShowing = true;
- }
- else if (model.GetTreasureUnlockShow(currentCategory) != 0)
+ if (model.GetTreasureUnlockShow(currentCategory) != 0)
{
_treasure = model.GetTreasureUnlockShow(currentCategory);
model.treasureGotoId = _treasure;
@@ -519,31 +510,6 @@
return _index;
}
- private bool CheckTreasureFinish(out int treasureId)
- {
- treasureId = 0;
- if (currentCategory != TreasureCategory.Human)
- {
- return false;
- }
- var list = model.GetTreasureCategory(TreasureCategory.Human);
- for (int i = 0; i < list.Count; i++)
- {
- if (list[i] == 101)
- {
- continue;
- }
- Treasure treasure;
- if (model.TryGetTreasure(list[i], out treasure)
- && treasure.IsHighestStage && model.GetTreasureFinishAnim(list[i]))
- {
- treasureId = list[i];
- return true;
- }
- }
- return false;
- }
-
int Compare(int x, int y)
{
Treasure treasure_x;
@@ -557,29 +523,6 @@
if (collect_x != collect_y)
{
return -collect_x.CompareTo(collect_y);
- }
- if ((treasure_x is HumanTreasure) && (treasure_y is HumanTreasure))
- {
- var humanTreasure_x = treasure_x as HumanTreasure;
- var humanTreasure_y = treasure_y as HumanTreasure;
- bool castSoul_x = humanTreasure_x.castSoulRedpoint.state == RedPointState.Simple;
- bool castSoul_y = humanTreasure_y.castSoulRedpoint.state == RedPointState.Simple;
- if (castSoul_x != castSoul_y)
- {
- return -castSoul_x.CompareTo(castSoul_y);
- }
- bool achieve_x = humanTreasure_x.achievementRedpoint.state == RedPointState.Simple;
- bool achieve_y = humanTreasure_y.achievementRedpoint.state == RedPointState.Simple;
- if (achieve_x != achieve_y)
- {
- return -achieve_x.CompareTo(achieve_y);
- }
- bool skillUp_x = humanTreasure_x.skillLevelUpRedpoint.state == RedPointState.Simple;
- bool skillUp_y = humanTreasure_y.skillLevelUpRedpoint.state == RedPointState.Simple;
- if (skillUp_x != skillUp_y)
- {
- return -skillUp_x.CompareTo(skillUp_y);
- }
}
TreasureDungeon treasureDungeonx;
@@ -685,8 +628,7 @@
public bool AllowPointClick()
{
if (IsCloser || UnlockShowing || jumping
- || draging || BossShowModel.Instance.BossShowing
- || treasureFinishShowing)
+ || draging || BossShowModel.Instance.BossShowing)
{
return false;
}
@@ -737,11 +679,6 @@
var _component = m_Treasures[currentCategory][presentSelectIndex];
_component.PlayUnlockShow();
}
- else if (treasureFinishShowing)
- {
- var _component = m_Treasures[currentCategory][presentSelectIndex];
- _component.PlayHighestShow();
- }
else
{
TreasureDungeon treasureDungeon;
@@ -772,7 +709,7 @@
public void BegineDrag()
{
- if (IsCloser || UnlockShowing || treasureFinishShowing)
+ if (IsCloser || UnlockShowing)
{
return;
}
@@ -1057,11 +994,11 @@
private void CameraBackComplete()
{
+ IsCloser = false;
if (OnCameraBackComplete != null)
{
OnCameraBackComplete();
}
- IsCloser = false;
if (!IsOpen)
{
return;
@@ -1130,7 +1067,6 @@
}
#endregion
- #region 瑙i攣鍔ㄧ敾鎾斁瀹屾垚
public void CompleteUnlock()
{
if (OnUnlockComplete != null)
@@ -1138,21 +1074,15 @@
OnUnlockComplete();
}
}
- #endregion
public void ReCheckTreasureHighest()
{
- treasureFinishShowing = false;
if (!IsOpen)
{
return;
}
var treasureId = 0;
- if (CheckTreasureFinish(out treasureId))
- {
- treasureFinishShowing = true;
- }
- else if (model.GetTreasureUnlockShow(currentCategory) != 0)
+ if (model.GetTreasureUnlockShow(currentCategory) != 0)
{
UnlockShowing = true;
treasureId = model.GetTreasureUnlockShow(currentCategory);
@@ -1171,10 +1101,6 @@
{
_component.PlayUnlockShow();
}
- else if (treasureFinishShowing)
- {
- _component.PlayHighestShow();
- }
}
else
{
@@ -1183,13 +1109,6 @@
if (startAnimation != null)
{
startAnimation();
- }
- }
- else
- {
- if (OnHighestComplete != null)
- {
- OnHighestComplete();
}
}
}
--
Gitblit v1.8.0