4747 【前端】【1.3】封魔坛新增自动进入功能(VIP特权),双倍挑战修改
| | |
| | | #endif |
| | | } |
| | | |
| | | public Snxxz.UI.TestModel __Gen_Delegate_Imp13(object p0) |
| | | public bool __Gen_Delegate_Imp13(object p0) |
| | | { |
| | | #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); |
| | | |
| | | PCall(L, 1, 1, errFunc); |
| | | |
| | | |
| | | bool __gen_ret = LuaAPI.lua_toboolean(L, errFunc + 1); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public Snxxz.UI.TestModel __Gen_Delegate_Imp14(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public void __Gen_Delegate_Imp14(object p0, object p1) |
| | | public void __Gen_Delegate_Imp15(object p0, object p1) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public bool __Gen_Delegate_Imp15(object p0, out int p1) |
| | | public bool __Gen_Delegate_Imp16(object p0, out int p1) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public void __Gen_Delegate_Imp16(object p0, int p1) |
| | | public void __Gen_Delegate_Imp17(object p0, int p1) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a545fb3dcf719304fa74180c10219375 |
| | | folderAsset: yes |
| | | timeCreated: 1542357825 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | |
| | | |
| | | { |
| | | int __bossId = LuaAPI.xlua_tointeger(L, 2); |
| | | int _bossId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.AddOneBossRebornNotify( __bossId ); |
| | | gen_to_be_invoked.AddOneBossRebornNotify( _bossId ); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | { |
| | | int __bossId = LuaAPI.xlua_tointeger(L, 2); |
| | | int _bossId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.RemoveOneBossRebornNotify( __bossId ); |
| | | gen_to_be_invoked.RemoveOneBossRebornNotify( _bossId ); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | { |
| | | int __bossId = LuaAPI.xlua_tointeger(L, 2); |
| | | Snxxz.UI.FindPreciousModel.BossNotify __notify;translator.Get(L, 2, out __notify); |
| | | |
| | | gen_to_be_invoked.ReportConfirmBossRebornNotify( __bossId ); |
| | | gen_to_be_invoked.ReportConfirmBossRebornNotify( __notify ); |
| | | |
| | | |
| | | |
| | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.FindPreciousModel gen_to_be_invoked = (Snxxz.UI.FindPreciousModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.currentBossNotify); |
| | | translator.Push(L, gen_to_be_invoked.currentBossNotify); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 4b9fd447cb5eca74cbe6bbe110054e57 |
| | | timeCreated: 1542789675 |
| | | timeCreated: 1542874645 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.MysticalPurchaseModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 11, 3, 0); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 14, 5, 2); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "CompareBySellTime", _m_CompareBySellTime); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateMysticalShopInfo", _m_UpdateMysticalShopInfo); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMysticalShop", _m_GetMysticalShop); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateRedpoint", _m_UpdateRedpoint); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "CloseRedPoint", _m_CloseRedPoint); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateMysticalShopEvent", _e_UpdateMysticalShopEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "onStateUpate", _e_onStateUpate); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateNewMysticalEvent", _e_UpdateNewMysticalEvent); |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsOpen", _g_get_IsOpen); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "isOpenPrompting", _g_get_isOpenPrompting); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsOpen", _g_get_IsOpen); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsAdvance", _g_get_IsAdvance); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "priorityOpen", _g_get_priorityOpen); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "mysticalRedpoint", _g_get_mysticalRedpoint); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "isOpenPrompting", _s_set_isOpenPrompting); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "mysticalRedpoint", _s_set_mysticalRedpoint); |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0); |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 2, 0, 0); |
| | | |
| | | |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MysticalRedKey", Snxxz.UI.MysticalPurchaseModel.MysticalRedKey); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UpdateRedpoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.MysticalPurchaseModel gen_to_be_invoked = (Snxxz.UI.MysticalPurchaseModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.UpdateRedpoint( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_CloseRedPoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.MysticalPurchaseModel gen_to_be_invoked = (Snxxz.UI.MysticalPurchaseModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.CloseRedPoint( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_isOpenPrompting(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.MysticalPurchaseModel gen_to_be_invoked = (Snxxz.UI.MysticalPurchaseModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isOpenPrompting); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_IsOpen(RealStatePtr L) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_mysticalRedpoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.MysticalPurchaseModel gen_to_be_invoked = (Snxxz.UI.MysticalPurchaseModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.mysticalRedpoint); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_isOpenPrompting(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.MysticalPurchaseModel gen_to_be_invoked = (Snxxz.UI.MysticalPurchaseModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.isOpenPrompting = 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_mysticalRedpoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.MysticalPurchaseModel gen_to_be_invoked = (Snxxz.UI.MysticalPurchaseModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.mysticalRedpoint = (Snxxz.UI.Redpoint)translator.GetObject(L, 2, typeof(Snxxz.UI.Redpoint)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_UpdateNewMysticalEvent(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | Snxxz.UI.MysticalPurchaseModel gen_to_be_invoked = (Snxxz.UI.MysticalPurchaseModel)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.UpdateNewMysticalEvent += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.UpdateNewMysticalEvent -= 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.MysticalPurchaseModel.UpdateNewMysticalEvent!"); |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.OSGiftModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 13, 8, 2); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 14, 8, 2); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsExist", _m_IsExist); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsGiftExist", _m_IsGiftExist); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsGiftBuy", _m_IsGiftBuy); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetRechargeId", _m_GetRechargeId); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetAreadyOpens", _m_SetAreadyOpens); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDefaultSelect", _m_GetDefaultSelect); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetDayRemind", _m_SetDayRemind); |
| | |
| | | |
| | | |
| | | { |
| | | int __id = LuaAPI.xlua_tointeger(L, 2); |
| | | int _payType = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsGiftExist( __id ); |
| | | bool gen_ret = gen_to_be_invoked.IsGiftExist( _payType ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | |
| | | |
| | | |
| | | { |
| | | int __id = LuaAPI.xlua_tointeger(L, 2); |
| | | int _payType = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsGiftBuy( __id ); |
| | | bool gen_ret = gen_to_be_invoked.IsGiftBuy( _payType ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetRechargeId(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _payType = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetRechargeId( _payType ); |
| | | 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_SetAreadyOpens(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.VipModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 46, 24, 11); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 47, 24, 11); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetVipTitle", _m_GetVipTitle); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTitlePower", _m_GetTitlePower); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetCTGConfigs", _m_GetCTGConfigs); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetRechargeItem", _m_TryGetRechargeItem); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetFirstReward", _m_TryGetFirstReward); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateVipGift", _m_UpdateVipGift); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateVipExp", _m_UpdateVipExp); |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_TryGetRechargeItem(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.VipModel gen_to_be_invoked = (Snxxz.UI.VipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _id = LuaAPI.xlua_tointeger(L, 2); |
| | | System.Collections.Generic.List<Snxxz.UI.AwardItem> _list; |
| | | |
| | | bool gen_ret = gen_to_be_invoked.TryGetRechargeItem( _id, out _list ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | translator.Push(L, _list); |
| | | |
| | | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_TryGetFirstReward(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 8babb5fb6c492df4199b8f2698b16386 |
| | | timeCreated: 1542789679 |
| | | timeCreated: 1542874645 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | var grade = model.GetGrade(new Dungeon(DEMONJAR_MAPID, config.LineID));
|
| | | if ((config.CanEnterTimes == 0 || grade == 0) && this.findPreciousModel.IsBossAlive((int)_bossId))
|
| | | {
|
| | | this.findPreciousModel.AddOneBossRebornNotify((int)_bossId);
|
| | | this.findPreciousModel.AddOneBossRebornNotify(_bossId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | public void DisplayRebornBoss()
|
| | | {
|
| | | if (model.currentBossNotify != 0)
|
| | | if (model.currentBossNotify != default(FindPreciousModel.BossNotify))
|
| | | {
|
| | | var bossId = model.currentBossNotify;
|
| | | var bossId = model.currentBossNotify.bossId;
|
| | | var type = model.GetBossFindPreciousType(bossId);
|
| | |
|
| | | if (type == FindPreciousType.DemonJar && AutoGotoSkillDemonJarBoss(bossId))
|
| | |
| | | private void GotoKillBoss()
|
| | | {
|
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | var bossId = model.currentBossNotify;
|
| | | var bossId = model.currentBossNotify.bossId;
|
| | | var type = model.GetBossFindPreciousType(bossId);
|
| | |
|
| | | switch (type)
|
| | |
| | |
|
| | | private void ReportConfirmBossRebornNotify()
|
| | | {
|
| | | if (model.currentBossNotify != 0)
|
| | | if (model.currentBossNotify != default(FindPreciousModel.BossNotify))
|
| | | {
|
| | | model.ReportConfirmBossRebornNotify(model.currentBossNotify);
|
| | | }
|
| | |
| | |
|
| | | private void DisplayRebornCountDown()
|
| | | {
|
| | | var bossId = model.currentBossNotify;
|
| | | var bossId = model.currentBossNotify.bossId;
|
| | | if (model.IsBossAlive(bossId))
|
| | | {
|
| | | m_BossRebornTimer.text = Language.Get("BossAlreadyReborn");
|
| | |
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | public class FindPreciousModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk, IMapInitOk, ISwitchAccount
|
| | | public class FindPreciousModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk, IMapInitOk, ISwitchAccount
|
| | | {
|
| | | public const int PREPOSE_SECONDS = 120;
|
| | | public const int FINDPRECIOUS_REDPOINTID = 76000;
|
| | |
| | | }
|
| | |
|
| | | Dictionary<int, BossInfo> bossInfos = new Dictionary<int, BossInfo>();
|
| | | List<int> bossNotifies = new List<int>();
|
| | | List<BossNotify> bossNotifies = new List<BossNotify>();
|
| | |
|
| | | int m_CurrentBossNotify = 0;
|
| | | public int currentBossNotify {
|
| | | BossNotify m_CurrentBossNotify = default(BossNotify);
|
| | | public BossNotify currentBossNotify {
|
| | | get { return m_CurrentBossNotify; }
|
| | | private set {
|
| | | if (m_CurrentBossNotify != value)
|
| | |
| | |
|
| | | public void OnSwitchAccount()
|
| | | {
|
| | | m_CurrentBossNotify = 0;
|
| | | m_CurrentBossNotify = default(BossNotify);
|
| | | bossSubscribes.Clear();
|
| | | bossNotifies.Clear();
|
| | | FindPreciousTimer.Instance.Clear();
|
| | |
| | | {
|
| | | var sendInfo = new CA903_tagCGAttentionBoss();
|
| | | sendInfo.BossID = (uint)_bossId;
|
| | | sendInfo.IsAdd = 0;
|
| | | sendInfo.IsAdd = 9;
|
| | | GameNetSystem.Instance.SendInfo(sendInfo);
|
| | |
|
| | | bossSubscribes[_bossId] = new BossSubscribe(_bossId, 9);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void AddOneBossRebornNotify(int _bossId)
|
| | | public void AddOneBossRebornNotify(int bossId)
|
| | | {
|
| | | if (IsBossSubscribed(_bossId) && !bossNotifies.Contains(_bossId))
|
| | | if (IsBossSubscribed(bossId) && !ExitBossNotify(bossId))
|
| | | {
|
| | | var type = GetBossFindPreciousType(_bossId);
|
| | | var type = GetBossFindPreciousType(bossId);
|
| | | if (type == FindPreciousType.DemonJar && demonJarModel.GetSurplusTimes() <= 0)
|
| | | {
|
| | |
|
| | | }
|
| | | else
|
| | | {
|
| | | bossNotifies.Add(_bossId);
|
| | | bossNotifies.Add(new BossNotify(bossId, demonJarModel.autoChallenge));
|
| | | currentBossNotify = GetNextBossNotify();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void RemoveOneBossRebornNotify(int _bossId)
|
| | | public void RemoveOneBossRebornNotify(int bossId )
|
| | | {
|
| | | if (bossNotifies.Contains(_bossId))
|
| | | if (ExitBossNotify(bossId))
|
| | | {
|
| | | bossNotifies.Remove(_bossId);
|
| | | RemoveBossRebornNotify(bossId);
|
| | | currentBossNotify = GetNextBossNotify();
|
| | | }
|
| | | }
|
| | |
|
| | | public void ReportConfirmBossRebornNotify(int _bossId)
|
| | | public void ReportConfirmBossRebornNotify(BossNotify _notify)
|
| | | {
|
| | | if (bossNotifies.Contains(_bossId))
|
| | | if (bossNotifies.Contains(_notify))
|
| | | {
|
| | | bossNotifies.Remove(_bossId);
|
| | | bossNotifies.Remove(_notify);
|
| | | }
|
| | |
|
| | | currentBossNotify = GetNextBossNotify();
|
| | |
| | | {
|
| | | for (int i = bossNotifies.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var bossId = bossNotifies[i];
|
| | | if (GetBossFindPreciousType(bossId) == _type)
|
| | | var notify = bossNotifies[i];
|
| | | if (GetBossFindPreciousType(notify.bossId) == _type)
|
| | | {
|
| | | bossNotifies.Remove(bossId);
|
| | | bossNotifies.Remove(notify);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | return FindPreciousType.None;
|
| | | }
|
| | |
|
| | | private int GetNextBossNotify()
|
| | | private BossNotify GetNextBossNotify()
|
| | | {
|
| | | if (bossNotifies.Count > 0)
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | return 0;
|
| | | return default(BossNotify);
|
| | | }
|
| | | }
|
| | |
|
| | | private bool ExitBossNotify(int bossId)
|
| | | {
|
| | | foreach (var notify in bossNotifies)
|
| | | {
|
| | | return notify.bossId == bossId;
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | |
|
| | | private void RemoveBossRebornNotify(int bossId)
|
| | | {
|
| | | for (var i = bossNotifies.Count; i >= 0; i--)
|
| | | {
|
| | | var notify = bossNotifies[i];
|
| | | if (notify.bossId == bossId)
|
| | | {
|
| | | bossNotifies.RemoveAt(i);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void InitializeBossNotify()
|
| | | {
|
| | | m_CurrentBossNotify = 0;
|
| | | m_CurrentBossNotify = default(BossNotify);
|
| | | bossNotifies.Clear();
|
| | | foreach (var boss in bossInfos.Values)
|
| | | {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public struct BossNotify
|
| | | {
|
| | | public int bossId;
|
| | | public bool demonJarAuto;
|
| | |
|
| | | public BossNotify(int bossId, bool demonJarAuto)
|
| | | {
|
| | | this.bossId = bossId;
|
| | | this.demonJarAuto = demonJarAuto;
|
| | | }
|
| | |
|
| | | public static bool operator ==(BossNotify _lhs, BossNotify _rhs)
|
| | | {
|
| | | return _lhs.bossId == _rhs.bossId && _lhs.demonJarAuto == _rhs.demonJarAuto;
|
| | | }
|
| | |
|
| | | public static bool operator !=(BossNotify _lhs, BossNotify _rhs)
|
| | | {
|
| | | return _lhs.bossId != _rhs.bossId || _lhs.demonJarAuto != _rhs.demonJarAuto;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void CheckBossReborn()
|
| | | {
|
| | | if (findPreciousModel.currentBossNotify == 0)
|
| | | if (findPreciousModel.currentBossNotify == default(FindPreciousModel.BossNotify))
|
| | | {
|
| | | m_BossRebornPusher.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!BossFakeLineUtility.Instance.IsBossVisible(findPreciousModel.currentBossNotify))
|
| | | if (!BossFakeLineUtility.Instance.IsBossVisible(findPreciousModel.currentBossNotify.bossId))
|
| | | {
|
| | | var findPreciousType = findPreciousModel.GetBossFindPreciousType(findPreciousModel.currentBossNotify);
|
| | | var findPreciousType = findPreciousModel.GetBossFindPreciousType(findPreciousModel.currentBossNotify.bossId);
|
| | |
|
| | | var killable = false;
|
| | | var show = true;
|