Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HA326_tagMCNPCIDCollectionCntInfo), typeof(DTCA326_tagMCNPCIDCollectionCntInfo));
|
| | | Register(typeof(HA904_tagGCDogzNPCRefreshTime), typeof(DTCA904_tagGCDogzNPCRefreshTime));
|
| | | Register(typeof(HA714_tagMCNPCCntList), typeof(DTCA714_tagMCNPCCntList));
|
| | | Register(typeof(HAA16_tagMCSuperGiftInfo), typeof(DTCAA16_tagMCSuperGiftInfo));
|
| | | Register(typeof(HAC10_tagGCAllFamilyBossHurtInfoList), typeof(DTCAC10_tagGCAllFamilyBossHurtInfoList));
|
| | | Register(typeof(HA715_tagMCFamilyBossHurtList), typeof(DTCA715_tagMCFamilyBossHurtList));
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, August 21, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class DogzDungeonConfig : ConfigBase { |
| | | |
| | | public int NPCID { get ; private set ; } |
| | | public int MonsterType { get ; private set ; } |
| | | public int[] RareItemID; |
| | | public string PortraitID { get ; private set; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return NPCID.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | MonsterType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | string[] RareItemIDStringArray = rawContents[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RareItemID = new int[RareItemIDStringArray.Length]; |
| | | for (int i=0;i<RareItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | } |
| | | |
| | | PortraitID = rawContents[3].Trim(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e3a382a765dc3ce4db610c70a6b30d8f |
| | | timeCreated: 1534817173 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | AddAsyncTask<AllPeoplePartyAwardConfig>();
|
| | | AddAsyncTask<OrderInfoConfig>();
|
| | | AddAsyncTask<TrialExchangeConfig>();
|
| | | AddAsyncTask<DogzDungeonConfig>();
|
| | | AddAsyncTask<TrialRewardsConfig>();
|
| | | AddAsyncTask<DogzEquipPlusConfig>();
|
| | | AddAsyncTask<FairyGrabBossConfig>();
|
| | |
| | | fairy = null;
|
| | | mine = null;
|
| | | ChatCtrl.Inst.ClearChatInfo(ChatInfoType.Fairy);
|
| | | PlayerPrefs.DeleteKey(m_storeModel.UNIONSTORESAVE_KEY);
|
| | | |
| | | }
|
| | | #endregion
|
| | |
|
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A2 27 查询地图NPC数量信息 #tagCMQueryNPCCntInfo |
| | | |
| | | public class CA227_tagCMQueryNPCCntInfo : GameNetPackBasic |
| | | { |
| | | public uint MapID; // 目标地图ID |
| | | public ushort LineID; // 线路ID |
| | | public byte IsNoTimeLimit; //是否没有查询时间限制,默认有限制 |
| | | public byte NPCIDListLen; |
| | | public string NPCIDList; // 需要查询的NPCID列表 |
| | | |
| | | public CA227_tagCMQueryNPCCntInfo() |
| | | { |
| | | combineCmd = (ushort)0x03FE; |
| | | _cmd = (ushort)0xA227; |
| | | } |
| | | |
| | | public override void WriteToBytes() |
| | | { |
| | | WriteBytes(MapID, NetDataType.DWORD); |
| | | WriteBytes(LineID, NetDataType.WORD); |
| | | WriteBytes(IsNoTimeLimit, NetDataType.BYTE); |
| | | WriteBytes(NPCIDListLen, NetDataType.BYTE); |
| | | WriteBytes(NPCIDList, NetDataType.Chars, NPCIDListLen); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd1ae837bd2fb0740a2eebd1bd12e4bf |
| | | timeCreated: 1534765562 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | { |
| | | taskmodel.TaskRefreshes((int)vNetData.MissionID, vNetData.DictKeyLen, vNetData.DictKey, (int)vNetData.DictValue);//任务字典 |
| | | taskmodel.Task0820(vNetData); |
| | | |
| | | taskmodel.GetTaskGetOnNow((int)vNetData.MissionID, vNetData.DictKey); |
| | | PreFightMission.Instance.HandleNewPlayerMission(vNetData); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, August 20, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI; |
| | | |
| | | public class DTCA326_tagMCNPCIDCollectionCntInfo : DtcBasic |
| | | { |
| | | |
| | | DogzDungeonModel model { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HA326_tagMCNPCIDCollectionCntInfo; |
| | | |
| | | for (int i = 0; i < package.NPCCollCntList.Length; i++) |
| | | { |
| | | var collect = package.NPCCollCntList[i]; |
| | | if (collect.NPCID == model.bigBoxNpcId) |
| | | { |
| | | model.bigBoxCollectCount = collect.CollectionCnt; |
| | | } |
| | | |
| | | if (collect.NPCID == model.smallBoxNpcId) |
| | | { |
| | | model.smallBoxCollectCount = collect.CollectionCnt; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9fffd651589b82c46a6274d6209639b8 |
| | | timeCreated: 1534766485 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | { |
| | | WorldBossModel worldBossModel { get { return ModelCenter.Instance.GetModel<WorldBossModel>(); } } |
| | | BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } } |
| | | DogzDungeonModel dogzDungeonModel { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | |
| | | case 1:
|
| | | bossHomeModel.wearyValue = info.KillCnt;
|
| | | break;
|
| | | case 2:
|
| | | dogzDungeonModel.wearyValue = info.KillCnt;
|
| | | break;
|
| | | }
|
| | | }
|
| | | } |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, August 20, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI; |
| | | |
| | | public class DTCA714_tagMCNPCCntList : DtcBasic { |
| | | |
| | | DogzDungeonModel model { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HA714_tagMCNPCCntList; |
| | | |
| | | model.UpdateMonsterSurplusInfo(package); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3fe7c73d652077745ac6d4ff21662559 |
| | | timeCreated: 1534765878 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, August 20, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI; |
| | | |
| | | public class DTCA904_tagGCDogzNPCRefreshTime : DtcBasic |
| | | { |
| | | |
| | | DogzDungeonModel model { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HA904_tagGCDogzNPCRefreshTime; |
| | | model.UpdateBoxOrEliteRefreshTime(package); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 46d9553ef31c5d041a1c7fe24e4101b3 |
| | | timeCreated: 1534766114 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A3 26 NPCID已采集次数信息 #tagMCNPCIDCollectionCntInfo |
| | | |
| | | public class HA326_tagMCNPCIDCollectionCntInfo : GameNetPackBasic |
| | | { |
| | | public byte CollNPCCnt; //采集NPC记录数 |
| | | public tagMCNPCIDCollectionCnt[] NPCCollCntList = null; // 采集NPC次数记录列表 |
| | | |
| | | public HA326_tagMCNPCIDCollectionCntInfo() |
| | | { |
| | | _cmd = (ushort)0xA326; |
| | | } |
| | | |
| | | public override void ReadFromBytes(byte[] vBytes) |
| | | { |
| | | TransBytes(out CollNPCCnt, vBytes, NetDataType.BYTE); |
| | | NPCCollCntList = new tagMCNPCIDCollectionCnt[CollNPCCnt]; |
| | | for (int i = 0; i < CollNPCCnt; i++) |
| | | { |
| | | NPCCollCntList[i] = new tagMCNPCIDCollectionCnt(); |
| | | TransBytes(out NPCCollCntList[i].NPCID, vBytes, NetDataType.DWORD); |
| | | TransBytes(out NPCCollCntList[i].CollectionCnt, vBytes, NetDataType.BYTE); |
| | | } |
| | | } |
| | | |
| | | public struct tagMCNPCIDCollectionCnt |
| | | { |
| | | public uint NPCID; //NPCID |
| | | public byte CollectionCnt; //已采集次数 |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9503ba9edfa7bc648b1a7ceef6d73f09 |
| | | timeCreated: 1534766369 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A7 14 通知查询的NPC数量 #tagMCNPCCntList |
| | | |
| | | public class HA714_tagMCNPCCntList : GameNetPackBasic |
| | | { |
| | | public uint MapID; |
| | | public byte NPCInfoCnt; |
| | | public tagMCNPCCntInfo[] NPCInfoList = null; |
| | | |
| | | public HA714_tagMCNPCCntList() |
| | | { |
| | | _cmd = (ushort)0xA714; |
| | | } |
| | | |
| | | public override void ReadFromBytes(byte[] vBytes) |
| | | { |
| | | TransBytes(out MapID, vBytes, NetDataType.DWORD); |
| | | TransBytes(out NPCInfoCnt, vBytes, NetDataType.BYTE); |
| | | NPCInfoList = new tagMCNPCCntInfo[NPCInfoCnt]; |
| | | for (int i = 0; i < NPCInfoCnt; i++) |
| | | { |
| | | NPCInfoList[i] = new tagMCNPCCntInfo(); |
| | | TransBytes(out NPCInfoList[i].NPCID, vBytes, NetDataType.DWORD); |
| | | TransBytes(out NPCInfoList[i].Cnt, vBytes, NetDataType.DWORD); |
| | | } |
| | | } |
| | | |
| | | public struct tagMCNPCCntInfo |
| | | { |
| | | public uint NPCID; |
| | | public uint Cnt; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bf9b9299398fb9a458800aa77445fc16 |
| | | timeCreated: 1534765697 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A9 04 通知神兽副本NPC刷新时间 #tagGCDogzNPCRefreshTime |
| | | |
| | | public class HA904_tagGCDogzNPCRefreshTime : GameNetPackBasic |
| | | { |
| | | public byte Cnt; //信息个数 |
| | | public tagDogzTimeInfoObj[] InfoList = null; //信息列表 |
| | | |
| | | public HA904_tagGCDogzNPCRefreshTime() |
| | | { |
| | | _cmd = (ushort)0xA904; |
| | | } |
| | | |
| | | public override void ReadFromBytes(byte[] vBytes) |
| | | { |
| | | TransBytes(out Cnt, vBytes, NetDataType.BYTE); |
| | | InfoList = new tagDogzTimeInfoObj[Cnt]; |
| | | for (int i = 0; i < Cnt; i++) |
| | | { |
| | | InfoList[i] = new tagDogzTimeInfoObj(); |
| | | TransBytes(out InfoList[i].NPCID, vBytes, NetDataType.DWORD); |
| | | TransBytes(out InfoList[i].RefreshSecond, vBytes, NetDataType.DWORD); |
| | | } |
| | | } |
| | | |
| | | public struct tagDogzTimeInfoObj |
| | | { |
| | | public uint NPCID; // npcid |
| | | public uint RefreshSecond; // 刷新倒计时, 秒 |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a6d61160de2d3074dbcaade643da682c |
| | | timeCreated: 1534766033 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | return LoadMob(_assetBundleName, _assetName);
|
| | | }
|
| | |
|
| | | public static GameObject LoadModelRes(int id)
|
| | | public static GameObject LoadModelRes(int id, bool _ui = false)
|
| | | {
|
| | |
|
| | | ModelResConfig _m = Config.Instance.Get<ModelResConfig>(id);
|
| | |
| | |
|
| | | if (_m.Type == (int)E_ModelResType.Suit)
|
| | | {
|
| | | return LoadModelPrefab(raceSuffix, _name);
|
| | | return LoadModelPrefab(raceSuffix, _name, _ui);
|
| | | }
|
| | | else if (_m.Type == (int)E_ModelResType.Horse)
|
| | | {
|
| | | return LoadModelPrefab(horseSuffix, _name);
|
| | | return LoadModelPrefab(horseSuffix, _name, _ui);
|
| | | }
|
| | | else if (_m.Type == (int)E_ModelResType.Wing)
|
| | | {
|
| | | return LoadModelPrefab(wingSuffix, _name);
|
| | | return LoadModelPrefab(wingSuffix, _name, _ui);
|
| | | }
|
| | | else if (_m.Type == (int)E_ModelResType.Weapon)
|
| | | {
|
| | | return LoadModelPrefab(weaponSuffix, _name);
|
| | | return LoadModelPrefab(weaponSuffix, _name, _ui);
|
| | | }
|
| | | else if (_m.Type == (int)E_ModelResType.Secondary)
|
| | | {
|
| | | return LoadModelPrefab(secondarySuffix, _name);
|
| | | return LoadModelPrefab(secondarySuffix, _name, _ui);
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | |
|
| | | public static void LoadCreateRole(int job, Action<bool, UnityEngine.Object> _callBack)
|
| | | {
|
| | |
| | | return _gameObject;
|
| | | }
|
| | |
|
| | | private static GameObject LoadModelPrefab(string _suffix, string name, bool _ui)
|
| | | {
|
| | | var prefab = LoadModelPrefab(_suffix, _ui ? name + "_UI" : name);
|
| | | if (prefab == null)
|
| | | {
|
| | | prefab = LoadModelPrefab(_suffix, name);
|
| | | }
|
| | |
|
| | | return prefab;
|
| | | }
|
| | |
|
| | | public static GameObject LoadMob(string assetBundleName, string assetName)
|
| | | {
|
| | | GameObject _gameObject = null;
|
| | |
| | | if (NpcConfig.NPCEffect != 0)
|
| | | {
|
| | | m_AppearEffect = SFXPlayUtility.Instance.PlayBattleEffect(NpcConfig.NPCEffect, this);
|
| | | //EffectConfig _effectConfig = ConfigManager.Instance.GetTemplate<EffectConfig>(NpcConfig.NPCEffect);
|
| | | //EffectConfig _effectConfig = Config.Instance.Get<EffectConfig>(NpcConfig.NPCEffect);
|
| | | //if (_effectConfig != null)
|
| | | //{
|
| | | // SoundPlayer.Instance.PlayAudio(m_AudioSource, _effectConfig.audio);
|
| | |
| | | // return;
|
| | | //}
|
| | |
|
| | | //NPCConfig _npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(NpcID);
|
| | | //NPCConfig _npcConfig = Config.Instance.Get<NPCConfig>(NpcID);
|
| | | //if (_npcConfig == null)
|
| | | //{
|
| | | // return;
|
| | |
| | | {
|
| | | PlayerDatas.Instance.hero.ExitArea((int)E_Type.Boss);
|
| | | PlayerDatas.Instance.hero.currentBossArea = null;
|
| | | //MapConfig _mapConfig = ConfigManager.Instance.GetTemplate<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | //MapConfig _mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | //SoundPlayer.Instance.PlayBackGroundMusic(_mapConfig.Music);
|
| | | }
|
| | | else
|
| | |
| | | blastFurnace.RefreshSelectRecycleAct += RefreshRecycleGetMoney;
|
| | | danDrugCtrl.OnRefreshCell += RefreshRecycleDan;
|
| | | shopCtrl.OnRefreshCell += RefreshShopCell;
|
| | | m_storeModel.RefreshBuyShopLimitEvent = CreateShopCell;
|
| | | m_storeModel.RefreshBuyShopLimitEvent += CreateShopCell;
|
| | | m_storeModel.RefreshTCBPlayerDataEvent += RefreshRecycleScore;
|
| | | blastFurnace.RefreshMakeItemAnswerAct += OnGetRecycleResult;
|
| | | m_storeModel.storeFuncType = StoreFunc.DanDrugStore;
|
| | |
| | | blastFurnace.RefreshSelectRecycleAct -= RefreshRecycleGetMoney;
|
| | | blastFurnace.RefreshMakeItemAnswerAct -= OnGetRecycleResult;
|
| | | playerPack.RefreshItemCountAct -= RefreshItemCnt;
|
| | | m_storeModel.RefreshBuyShopLimitEvent -= CreateShopCell;
|
| | | recycleBtn.RemoveAllListeners();
|
| | | GlobalTimeEvent.Instance.secondEvent -= RefreshResetTime;
|
| | | }
|
| | |
| | |
|
| | | break;
|
| | | //case BlastFurnaceFuncTitle.TreasureRefine:
|
| | | // chinItemModel = ConfigManager.Instance.GetTemplate<ItemConfig>(extraMatIds[cell.index]);
|
| | | // chinItemModel = Config.Instance.Get<ItemConfig>(extraMatIds[cell.index]);
|
| | | // if (chinItemModel != null)
|
| | | // {
|
| | | // RefreshCellUI(extraMatIds[cell.index], cell, FurnaceModel.GetFireSuccessRate(chinItemModel.Effect1, chinItemModel.EffectValueA1), fireChooseCell, chinItemModel);
|
| | |
| | | //if(_treasure != null)
|
| | | //{
|
| | | // _refineModel = TreasureRefineConfig.GetTreasureRefineModel(_treasure.id, _treasure.level);
|
| | | // _tagTreasureModel = ConfigManager.Instance.GetTemplate<TreasureConfig>(_treasure.id);
|
| | | // _tagTreasureModel = Config.Instance.Get<TreasureConfig>(_treasure.id);
|
| | | // InitUI();
|
| | | //}
|
| | |
|
| | |
| | | // if(_refineModel.OpenSkill != 0)
|
| | | // {
|
| | | // _openSkillText.gameObject.SetActive(true);
|
| | | // tagChinSkill = ConfigManager.Instance.GetTemplate<SkillConfig>(_refineModel.OpenSkill);
|
| | | // tagChinSkill = Config.Instance.Get<SkillConfig>(_refineModel.OpenSkill);
|
| | | // if(tagChinSkill != null)
|
| | | // {
|
| | | // _openSkillText.text = Language.Get("BlastFurnace110",tagChinSkill.SkillName);
|
| | |
| | |
|
| | | private void RefreshDandrugCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | //TreasureConfig treasureModel = ConfigManager.Instance.GetTemplate<TreasureConfig>(cell.index);
|
| | | //TreasureConfig treasureModel = Config.Instance.Get<TreasureConfig>(cell.index);
|
| | | //Treasure treasure = null;
|
| | | //FurnaceModel.sTreasureModel.TryGetTreasure(cell.index, out treasure);
|
| | | //TreasureRefineConfig nextRefineModel = null;
|
| | |
| | | }
|
| | | else if (!composeWinModel.IsEnoughMoney(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("L1006"));
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Z1011"));
|
| | | isCanCompose = false;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | AchievementGuideEffect guidEffect = null;
|
| | |
|
| | | bool isJumpTo;
|
| | | protected override void BindController()
|
| | | {
|
| | | cellCtrl.OnRefreshCell += RefreshCell;
|
| | |
| | | {
|
| | | DTCA814_tagMCMakeItemAnswer.MakeItemAnswerEvent += OnComposeAnswer;
|
| | | firstTypeDict = composeWinModel.GetFirstTypeModel((int)ComposeFuncType.Item);
|
| | | bool isJumpTo = false;
|
| | | isJumpTo = false;
|
| | | if (AchievementGoto.guideAchievementId != 0)
|
| | | {
|
| | | SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
|
| | |
| | | if (curSecondType == 0)
|
| | | {
|
| | | RefreshUI(null);
|
| | | }
|
| | |
|
| | | if (compoundModel != null)
|
| | | {
|
| | | RefreshUI(compoundModel);
|
| | | if (isJumpTo)
|
| | | {
|
| | | isJumpTo = false;
|
| | | bool isCanCompose = true;
|
| | | if (!composeWinModel.IsEnoughFixedMat(compoundModel) || !composeWinModel.IsEnoughUnfixedMat(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Compose101"));
|
| | | isCanCompose = false;
|
| | | }
|
| | | else if (!composeWinModel.IsEnoughMoney(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("L1006"));
|
| | | isCanCompose = false;
|
| | | }
|
| | |
|
| | | if (isCanCompose)
|
| | | {
|
| | | guidEffect = AchievementGuideEffectPool.Require(1);
|
| | | guidEffect.transform.SetParentEx(composeBtn.transform, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | {
|
| | | cellCtrl.JumpIndex(curThirdType*50, 0, EnhancedUI.EnhancedScroller.EnhancedScroller.TweenType.immediate);
|
| | | }
|
| | | CheckJumpModel();
|
| | | }
|
| | |
|
| | | private void CheckJumpModel()
|
| | | {
|
| | | if (compoundModel != null)
|
| | | {
|
| | | RefreshUI(compoundModel);
|
| | | if (isJumpTo)
|
| | | {
|
| | | isJumpTo = false;
|
| | | bool isCanCompose = true;
|
| | | if (!composeWinModel.IsEnoughFixedMat(compoundModel) || !composeWinModel.IsEnoughUnfixedMat(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Compose101"));
|
| | | isCanCompose = false;
|
| | | }
|
| | | else if (!composeWinModel.IsEnoughMoney(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("L1006"));
|
| | | isCanCompose = false;
|
| | | }
|
| | |
|
| | | if (isCanCompose)
|
| | | {
|
| | | guidEffect = AchievementGuideEffectPool.Require(1);
|
| | | guidEffect.transform.SetParentEx(composeBtn.transform, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | Image icon = cell.transform.Find("BtnIcon").GetComponent<Image>();
|
| | |
| | | }
|
| | | else if(!composeWinModel.IsEnoughMoney(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("L1006"));
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Z1011"));
|
| | | isCanCompose = false;
|
| | | }
|
| | |
|
| | |
| | | public void Display(ItemModel data)
|
| | | {
|
| | | //m_DogzEquip.Display(data);
|
| | | //var config = ConfigManager.Instance.GetTemplate<ItemConfig>(data.itemId);
|
| | | //var config = Config.Instance.Get<ItemConfig>(data.itemId);
|
| | | //if (config != null)
|
| | | //{
|
| | | // m_ItemNameTxt.text = config.ItemName;
|
| | |
| | | // {
|
| | | // if (index < m_BasePropertys.Length)
|
| | | // {
|
| | | // var propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_key);
|
| | | // var propertyConfig = Config.Instance.Get<PlayerPropertyConfig>(_key);
|
| | | // m_BasePropertys[index].gameObject.SetActive(true);
|
| | | // m_BasePropertys[index].Display(_key, data.basePropertyDict[_key]);
|
| | | // }
|
| | |
| | | // {
|
| | | // if (index < m_SpecialPropertys.Length)
|
| | | // {
|
| | | // var propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_key);
|
| | | // var propertyConfig = Config.Instance.Get<PlayerPropertyConfig>(_key);
|
| | | // m_SpecialPropertys[index].gameObject.SetActive(true);
|
| | | // m_SpecialPropertys[index].Display(_key, data.specialPropertyDict[_key]);
|
| | | // }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 52a985f55841d694dac464804eae545e |
| | | folderAsset: yes |
| | | timeCreated: 1534559436 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, August 18, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class DogzBoxBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] Text m_BigBoxCount; |
| | | [SerializeField] Text m_SmallBoxCount; |
| | | [SerializeField] RawImage m_RawImage; |
| | | |
| | | DogzDungeonModel model { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | |
| | | public void Display() |
| | | { |
| | | timer = 0f; |
| | | UI3DModelExhibition.Instance.BeginShowNPC(model.bigBoxNpcId, Vector3.zero, m_RawImage); |
| | | DisplayBoxSurplusInfo(); |
| | | model.boxSurplusChangeEvent += OnBoxInfoUpdate; |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | model.boxSurplusChangeEvent -= OnBoxInfoUpdate; |
| | | UI3DModelExhibition.Instance.StopShowNPC(); |
| | | } |
| | | |
| | | private void OnBoxInfoUpdate() |
| | | { |
| | | DisplayBoxSurplusInfo(); |
| | | } |
| | | |
| | | private void DisplayBoxSurplusInfo() |
| | | { |
| | | var boxInfo = model.dogzDungeonBox; |
| | | m_BigBoxCount.text = boxInfo.bigBoxSurplus.ToString(); |
| | | m_BigBoxCount.color = UIHelper.GetUIColor(boxInfo.bigBoxSurplus > 0 ? TextColType.White : TextColType.Red); |
| | | m_SmallBoxCount.text = boxInfo.smallBoxSurplus.ToString(); |
| | | m_SmallBoxCount.color = UIHelper.GetUIColor(boxInfo.smallBoxSurplus > 0 ? TextColType.White : TextColType.Red); |
| | | } |
| | | |
| | | float timer = 0f; |
| | | private void LateUpdate() |
| | | { |
| | | timer += Time.deltaTime; |
| | | if (timer > 30) |
| | | { |
| | | timer = 0f; |
| | | model.RequestBoxSurplusInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2e487abe9c3d74147b7a132a647f110c |
| | | timeCreated: 1534563273 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, August 18, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | using System; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class DogzDungeonBreifInfoBehaviour : FindPreciousBossBriefInfoBehaviour |
| | | { |
| | | |
| | | [SerializeField] Image m_Attention; |
| | | |
| | | protected override int selectedBossId |
| | | { |
| | | get |
| | | { |
| | | return model.selectedBoss; |
| | | } |
| | | set |
| | | { |
| | | model.selectedBoss = value; |
| | | } |
| | | } |
| | | |
| | | protected override InteractorableState interactorableState |
| | | { |
| | | get |
| | | { |
| | | var selected = selectedBossId == bossId; |
| | | var config = Config.Instance.Get<DogzDungeonConfig>(bossId); |
| | | var dieOrLocked = false; |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | dieOrLocked = model.dogzDungeonBox.bigBoxSurplus <= 0; |
| | | break; |
| | | case 3: |
| | | dieOrLocked = model.dogzDungeonElite.eliteSurplus <= 0; |
| | | break; |
| | | case 4: |
| | | dieOrLocked = !model.IsBossUnLocked(bossId) || !findPreciousModel.IsBossAlive(bossId); |
| | | break; |
| | | } |
| | | |
| | | if (!dieOrLocked) |
| | | { |
| | | return selected ? InteractorableState.NormalSelected : InteractorableState.NormalUnSelected; |
| | | } |
| | | else |
| | | { |
| | | return selected ? InteractorableState.DieOrLockedSelected : InteractorableState.DieOrLockedUnSelected; |
| | | } |
| | | } |
| | | set |
| | | { |
| | | base.interactorableState = value; |
| | | } |
| | | } |
| | | |
| | | protected override bool isUnLocked |
| | | { |
| | | get |
| | | { |
| | | return model.IsBossUnLocked(bossId); |
| | | } |
| | | } |
| | | |
| | | DogzDungeonModel model { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | |
| | | public override void Display(object _data) |
| | | { |
| | | base.Display(_data); |
| | | |
| | | m_Attention.gameObject.SetActive(findPreciousModel.IsBossSubscribed(bossId)); |
| | | var config = Config.Instance.Get<DogzDungeonConfig>(bossId); |
| | | var npcConfig = Config.Instance.Get<NPCConfig>(bossId); |
| | | |
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm); |
| | | UpdateBossRebornCoolDown(isUnLocked); |
| | | UpdateBossPortrait(interactorableState); |
| | | OnSelected(bossId); |
| | | |
| | | model.boxSurplusChangeEvent -= OnGuardInfoUpdate; |
| | | model.boxSurplusChangeEvent -= OnBoxInfoUpdate; |
| | | model.dogzDungeonBox.refreshTimeEvent -= OnBoxRefreshTimeChange; |
| | | model.dogzDungeonElite.refreshTimeEvent -= OnEliteRefreshTimeChange; |
| | | |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | model.dogzDungeonBox.refreshTimeEvent += OnBoxRefreshTimeChange; |
| | | model.boxSurplusChangeEvent += OnGuardInfoUpdate; |
| | | break; |
| | | case 3: |
| | | model.dogzDungeonElite.refreshTimeEvent += OnEliteRefreshTimeChange; |
| | | model.boxSurplusChangeEvent += OnBoxInfoUpdate; |
| | | break; |
| | | } |
| | | |
| | | model.bossSelectedEvent -= OnSelected; |
| | | model.bossSelectedEvent += OnSelected; |
| | | } |
| | | |
| | | public override void Dispose() |
| | | { |
| | | base.Dispose(); |
| | | model.bossSelectedEvent -= OnSelected; |
| | | model.boxSurplusChangeEvent -= OnGuardInfoUpdate; |
| | | model.boxSurplusChangeEvent -= OnBoxInfoUpdate; |
| | | model.dogzDungeonBox.refreshTimeEvent -= OnBoxRefreshTimeChange; |
| | | model.dogzDungeonElite.refreshTimeEvent -= OnEliteRefreshTimeChange; |
| | | } |
| | | |
| | | protected override void UpdateBossRebornCoolDown(bool _isUnLocked) |
| | | { |
| | | if (_isUnLocked) |
| | | { |
| | | var config = Config.Instance.Get<DogzDungeonConfig>(bossId); |
| | | var refreshTime = DateTime.Now; |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | refreshTime = model.dogzDungeonBox.refreshTime; |
| | | break; |
| | | case 3: |
| | | refreshTime = model.dogzDungeonElite.refreshTime; |
| | | break; |
| | | case 4: |
| | | FindPreciousModel.BossInfo bossInfo; |
| | | if (findPreciousModel.TryGetBossInfo(bossId, out bossInfo) && !bossInfo.IsBossAlive()) |
| | | { |
| | | refreshTime = bossInfo.refreshTime; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | if (refreshTime > DateTime.Now) |
| | | { |
| | | m_CoolDown.Begin(refreshTime, OnBossCoolDownCompleted); |
| | | } |
| | | else |
| | | { |
| | | m_CoolDown.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | m_CoolDown.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | |
| | | private void OnBoxRefreshTimeChange() |
| | | { |
| | | UpdateBossRebornCoolDown(isUnLocked); |
| | | } |
| | | |
| | | private void OnEliteRefreshTimeChange() |
| | | { |
| | | UpdateBossRebornCoolDown(isUnLocked); |
| | | } |
| | | |
| | | private void OnGuardInfoUpdate() |
| | | { |
| | | UpdateBossPortrait(interactorableState); |
| | | } |
| | | |
| | | private void OnBoxInfoUpdate() |
| | | { |
| | | UpdateBossPortrait(interactorableState); |
| | | } |
| | | |
| | | private void OnSelected(int _bossId) |
| | | { |
| | | UpdateBossNameLevelFont(interactorableState); |
| | | } |
| | | |
| | | protected override void OnSubscribe(int _bossId) |
| | | { |
| | | base.OnSubscribe(_bossId); |
| | | if (bossId != _bossId) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | m_Attention.gameObject.SetActive(findPreciousModel.IsBossSubscribed(bossId)); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 61b922330133f6946a1b5f9b6b6f62a6 |
| | | timeCreated: 1534559500 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using TableConfig; |
| | | using System; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class DogzDungeonModel : Model |
| | | { |
| | | |
| | | public const int DOGZDUNGEON_REDPOINT = 76009; |
| | | public const int DATA_MAPID = 21110; |
| | | |
| | | int m_SelectedBoss = 0; |
| | | public int selectedBoss |
| | | { |
| | | get |
| | | { |
| | | return this.m_SelectedBoss; |
| | | } |
| | | set |
| | | { |
| | | if (this.m_SelectedBoss != value) |
| | | { |
| | | this.m_SelectedBoss = value; |
| | | if (bossSelectedEvent != null) |
| | | { |
| | | bossSelectedEvent(value); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | int m_WearyValue = 0; |
| | | public int wearyValue |
| | | { |
| | | get { return m_WearyValue; } |
| | | set |
| | | { |
| | | if (m_WearyValue != value) |
| | | { |
| | | m_WearyValue = value; |
| | | if (bossWearyValueChangeEvent != null) |
| | | { |
| | | bossWearyValueChangeEvent(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | int m_BigBoxCollectCount = 0; |
| | | public int bigBoxCollectCount |
| | | { |
| | | get { return m_BigBoxCollectCount; } |
| | | set |
| | | { |
| | | if (m_BigBoxCollectCount != value) |
| | | { |
| | | m_BigBoxCollectCount = value; |
| | | if (bigBoxCollectCountChangeEvent != null) |
| | | { |
| | | bigBoxCollectCountChangeEvent(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | int m_SmallBoxCollectCount = 0; |
| | | public int smallBoxCollectCount |
| | | { |
| | | get { return m_SmallBoxCollectCount; } |
| | | set { m_SmallBoxCollectCount = value; } |
| | | } |
| | | |
| | | public event Action<int> bossSelectedEvent; |
| | | public event Action bossWearyValueChangeEvent; |
| | | public event Action bigBoxCollectCountChangeEvent; |
| | | public event Action boxSurplusChangeEvent; |
| | | public event Action eliteSurplusChangeEvent; |
| | | |
| | | List<int> sortedBossIds = new List<int>(); |
| | | Dictionary<int, DogzDungeonBossData> bosses = new Dictionary<int, DogzDungeonBossData>(); |
| | | public DogzDungeonBox dogzDungeonBox = new DogzDungeonBox(); |
| | | public DogzDungeonElite dogzDungeonElite = new DogzDungeonElite(); |
| | | Redpoint redpoint = new Redpoint(DOGZDUNGEON_REDPOINT); |
| | | |
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } } |
| | | |
| | | public int bigBoxNpcId = 0; |
| | | public int smallBoxNpcId = 0; |
| | | public List<int> eliteMonsters = new List<int>(); |
| | | |
| | | public override void Init() |
| | | { |
| | | ParseConfig(); |
| | | } |
| | | |
| | | public override void UnInit() |
| | | { |
| | | } |
| | | |
| | | public bool TryGetBossData(int _bossId, out DogzDungeonBossData _data) |
| | | { |
| | | return bosses.TryGetValue(_bossId, out _data); |
| | | } |
| | | |
| | | public List<int> GetNpcIds() |
| | | { |
| | | var npcIds = new List<int>(); |
| | | npcIds.Add(bigBoxNpcId); |
| | | npcIds.Add(eliteMonsters[0]); |
| | | npcIds.AddRange(bosses.Keys); |
| | | |
| | | return npcIds; |
| | | } |
| | | |
| | | public List<int> GetBosses() |
| | | { |
| | | return new List<int>(bosses.Keys); |
| | | } |
| | | |
| | | public int GetRecommendNpc() |
| | | { |
| | | if (bigBoxCollectCount < 2) //未疲劳 |
| | | { |
| | | return bigBoxNpcId;//大宝箱npc id |
| | | } |
| | | |
| | | if (wearyValue < GeneralConfig.Instance.bossWearyValues[2]) |
| | | { |
| | | var playerLevel = PlayerDatas.Instance.baseData.LV; |
| | | for (int i = sortedBossIds.Count - 1; i >= 0; i--) |
| | | { |
| | | var bossId = sortedBossIds[i]; |
| | | var dogzConfig = Config.Instance.Get<DogzDungeonConfig>(bossId); |
| | | if (dogzConfig.MonsterType == 3 || dogzConfig.MonsterType == 4) |
| | | { |
| | | var npcConfig = Config.Instance.Get<NPCConfig>(bossId); |
| | | if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId) && playerLevel >= npcConfig.NPCLV) |
| | | { |
| | | return bossId; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return sortedBossIds[0]; |
| | | } |
| | | |
| | | return bigBoxNpcId;//大宝箱 npcid |
| | | } |
| | | |
| | | public int GetRecommendKillElite() |
| | | { |
| | | var Elite = dogzDungeonElite.GetAliveElite(); |
| | | if (Elite == 0) |
| | | { |
| | | Elite = eliteMonsters[0]; |
| | | } |
| | | |
| | | return Elite; |
| | | } |
| | | |
| | | public bool IsBossUnLocked(int _bossId) |
| | | { |
| | | if (_bossId == bigBoxNpcId || _bossId == smallBoxNpcId) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | if (eliteMonsters.Contains(_bossId)) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | return bosses.ContainsKey(_bossId) && bosses[_bossId].isUnLocked; |
| | | } |
| | | |
| | | public void RequestBoxAndEliteSurplusInfo() |
| | | { |
| | | var sendInfo = new CA227_tagCMQueryNPCCntInfo(); |
| | | sendInfo.MapID = DATA_MAPID; |
| | | sendInfo.LineID = 0; |
| | | var stringArray = new string[eliteMonsters.Count + 2]; |
| | | for (int i = 0; i < eliteMonsters.Count; i++) |
| | | { |
| | | stringArray[i] = eliteMonsters[i].ToString(); |
| | | } |
| | | |
| | | stringArray[eliteMonsters.Count] = bigBoxNpcId.ToString(); |
| | | stringArray[eliteMonsters.Count + 1] = smallBoxNpcId.ToString(); |
| | | |
| | | sendInfo.NPCIDList = string.Format("[{0}]", string.Join(",", stringArray)); |
| | | sendInfo.NPCIDListLen = (byte)sendInfo.NPCIDList.Length; |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | |
| | | public void RequestBoxSurplusInfo() |
| | | { |
| | | var sendInfo = new CA227_tagCMQueryNPCCntInfo(); |
| | | sendInfo.MapID = DATA_MAPID; |
| | | sendInfo.LineID = 0; |
| | | sendInfo.NPCIDList = string.Format("[{0},{1}]", bigBoxNpcId, smallBoxNpcId); |
| | | sendInfo.NPCIDListLen = (byte)sendInfo.NPCIDList.Length; |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | |
| | | public void RequestEliteSurplusInfo() |
| | | { |
| | | var sendInfo = new CA227_tagCMQueryNPCCntInfo(); |
| | | sendInfo.MapID = DATA_MAPID; |
| | | sendInfo.LineID = 0; |
| | | var stringArray = new string[eliteMonsters.Count]; |
| | | for (int i = 0; i < stringArray.Length; i++) |
| | | { |
| | | stringArray[i] = eliteMonsters[i].ToString(); |
| | | } |
| | | |
| | | sendInfo.NPCIDList = string.Format("[{0}]", string.Join(",", stringArray)); |
| | | sendInfo.NPCIDListLen = (byte)sendInfo.NPCIDList.Length; |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | |
| | | public void UpdateMonsterSurplusInfo(HA714_tagMCNPCCntList _npcInfoes) |
| | | { |
| | | if (_npcInfoes.MapID != DATA_MAPID) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var updatedBox = false; |
| | | var updatedElite = false; |
| | | for (int i = 0; i < _npcInfoes.NPCInfoList.Length; i++) |
| | | { |
| | | var npcInfo = _npcInfoes.NPCInfoList[i]; |
| | | if (npcInfo.NPCID == bigBoxNpcId) |
| | | { |
| | | dogzDungeonBox.bigBoxSurplus = (int)npcInfo.Cnt; |
| | | updatedBox = true; |
| | | } |
| | | |
| | | if (npcInfo.NPCID == smallBoxNpcId) |
| | | { |
| | | dogzDungeonBox.smallBoxSurplus = (int)npcInfo.Cnt; |
| | | updatedBox = true; |
| | | } |
| | | |
| | | if (eliteMonsters.Contains((int)npcInfo.NPCID)) |
| | | { |
| | | dogzDungeonElite.UpdateEliteInfo((int)npcInfo.NPCID, (int)npcInfo.Cnt); |
| | | updatedElite = true; |
| | | } |
| | | } |
| | | |
| | | if (updatedBox) |
| | | { |
| | | if (boxSurplusChangeEvent != null) |
| | | { |
| | | boxSurplusChangeEvent(); |
| | | } |
| | | } |
| | | |
| | | if (updatedElite) |
| | | { |
| | | if (eliteSurplusChangeEvent != null) |
| | | { |
| | | eliteSurplusChangeEvent(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public void UpdateBoxOrEliteRefreshTime(HA904_tagGCDogzNPCRefreshTime _refreshTimes) |
| | | { |
| | | for (int i = 0; i < _refreshTimes.InfoList.Length; i++) |
| | | { |
| | | var info = _refreshTimes.InfoList[i]; |
| | | if (bigBoxNpcId == info.NPCID || smallBoxNpcId == info.NPCID) |
| | | { |
| | | dogzDungeonBox.UpdateBoxRefreshTime((int)info.RefreshSecond); |
| | | RequestBoxSurplusInfo(); |
| | | } |
| | | |
| | | if (eliteMonsters.Contains((int)info.NPCID)) |
| | | { |
| | | dogzDungeonElite.UpdateEliteRefreshTime((int)info.RefreshSecond); |
| | | RequestEliteSurplusInfo(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void ParseConfig() |
| | | { |
| | | var configs = Config.Instance.GetAllValues<DogzDungeonConfig>(); |
| | | foreach (var config in configs) |
| | | { |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | bigBoxNpcId = config.NPCID; |
| | | break; |
| | | case 2: |
| | | smallBoxNpcId = config.NPCID; |
| | | break; |
| | | case 3: |
| | | eliteMonsters.Add(config.NPCID); |
| | | break; |
| | | case 4: |
| | | bosses[config.NPCID] = new DogzDungeonBossData(config.NPCID); |
| | | sortedBossIds.Add(config.NPCID); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | sortedBossIds.Sort(DogzDungeonBossData.LevelCompare); |
| | | } |
| | | } |
| | | |
| | | public class DogzDungeonBox |
| | | { |
| | | public int bigBoxSurplus; |
| | | public int smallBoxSurplus; |
| | | public DateTime refreshTime { get; private set; } |
| | | |
| | | public event Action refreshTimeEvent; |
| | | |
| | | public void UpdateBoxInfo(int _big, int _small) |
| | | { |
| | | bigBoxSurplus = _big; |
| | | smallBoxSurplus = _small; |
| | | } |
| | | |
| | | public void UpdateBoxRefreshTime(int _seconds) |
| | | { |
| | | refreshTime = DateTime.Now + new TimeSpan(_seconds * TimeSpan.TicksPerSecond); |
| | | DebugEx.Log("宝箱刷新时间:" + refreshTime); |
| | | if (refreshTimeEvent != null) |
| | | { |
| | | refreshTimeEvent(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public class DogzDungeonElite |
| | | { |
| | | public Dictionary<int, int> eliteCounts = new Dictionary<int, int>(); |
| | | public int eliteSurplus |
| | | { |
| | | get |
| | | { |
| | | var count = 0; |
| | | foreach (var eliteCount in eliteCounts.Values) |
| | | { |
| | | count += eliteCount; |
| | | } |
| | | return count; |
| | | } |
| | | } |
| | | |
| | | public DateTime refreshTime { get; private set; } |
| | | public event Action refreshTimeEvent; |
| | | |
| | | public void UpdateEliteInfo(int _npcId, int _count) |
| | | { |
| | | eliteCounts[_npcId] = _count; |
| | | } |
| | | |
| | | public void UpdateEliteRefreshTime(int _seconds) |
| | | { |
| | | refreshTime = DateTime.Now + new TimeSpan(_seconds * TimeSpan.TicksPerSecond); |
| | | if (refreshTimeEvent != null) |
| | | { |
| | | refreshTimeEvent(); |
| | | } |
| | | DebugEx.Log("精英刷新时间:" + refreshTime); |
| | | } |
| | | |
| | | public int GetAliveElite() |
| | | { |
| | | foreach (var EliteCount in eliteCounts) |
| | | { |
| | | if (EliteCount.Key > 0) |
| | | { |
| | | return EliteCount.Value; |
| | | } |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | public class DogzDungeonBossData |
| | | { |
| | | public int id { get; private set; } |
| | | public bool isUnLocked |
| | | { |
| | | get |
| | | { |
| | | var config = Config.Instance.Get<NPCConfig>(id); |
| | | return PlayerDatas.Instance.baseData.LV >= config.NPCLV; |
| | | } |
| | | } |
| | | |
| | | public DogzDungeonBossData(int _id) |
| | | { |
| | | this.id = _id; |
| | | } |
| | | |
| | | public static int LevelCompare(int a, int b) |
| | | { |
| | | var configA = Config.Instance.Get<NPCConfig>(a); |
| | | var configB = Config.Instance.Get<NPCConfig>(b); |
| | | |
| | | return configA.NPCLV < configB.NPCLV ? -1 : 1; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 978a73f0055381a48aef1e53492b7407 |
| | | timeCreated: 1534559596 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, August 18, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class DogzDungeonWin : Window |
| | | { |
| | | |
| | | [SerializeField] CyclicScroll m_Bosses; |
| | | [SerializeField] DogzBoxBehaviour m_BoxBehaviour; |
| | | [SerializeField] DogzEliteMonsterBehaviour m_EliteMonsterBehaviour; |
| | | [SerializeField] BossIntroduceBehaviour m_BossIntroduce; |
| | | |
| | | [SerializeField] Button m_Goto; |
| | | [SerializeField] ImageEx m_ImageGoto; |
| | | [SerializeField] Button m_KillRecord; |
| | | [SerializeField] Transform m_SurpassLevel; |
| | | [SerializeField] ToggleButton m_Subscribe; |
| | | |
| | | [SerializeField] RectTransform m_ContainerBoxCollectWeary; |
| | | [SerializeField] TextEx m_BoxCollectWearyValue; |
| | | [SerializeField] RectTransform m_ContainerBossKillWeary; |
| | | [SerializeField] TextEx m_BossKillWearyValue; |
| | | |
| | | DogzDungeonModel model { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } } |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Goto.AddListener(GotoKillBoss); |
| | | m_KillRecord.AddListener(ShowKillRecords); |
| | | m_Subscribe.AddListener(SwitchSubscribeBoss); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | model.bossSelectedEvent += OnBossSelected; |
| | | findPreciousModel.bossSubscribeChangeEvent += OnSubscribeBoss; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | model.bossSelectedEvent -= OnBossSelected; |
| | | findPreciousModel.bossSubscribeChangeEvent -= OnSubscribeBoss; |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | ShowBosses(); |
| | | model.RequestBoxAndEliteSurplusInfo(); |
| | | } |
| | | #endregion |
| | | |
| | | private void ShowBosses() |
| | | { |
| | | var bosses = model.GetNpcIds(); |
| | | model.selectedBoss = model.GetRecommendNpc(); |
| | | m_Bosses.Init(bosses); |
| | | m_Bosses.MoveToCenter(bosses.IndexOf(model.selectedBoss)); |
| | | |
| | | // DisplayItemDropTip(model.selectedBoss); |
| | | DisplayBossBaseInfo(model.selectedBoss); |
| | | DisplayWearyValue(model.selectedBoss); |
| | | } |
| | | |
| | | private void ShowKillRecords() |
| | | { |
| | | findPreciousModel.ViewKillRecordsBoss = model.selectedBoss; |
| | | WindowCenter.Instance.Open<KillRecordsWin>(); |
| | | } |
| | | |
| | | private void SwitchSubscribeBoss() |
| | | { |
| | | if (findPreciousModel.IsBossSubscribed(model.selectedBoss)) |
| | | { |
| | | findPreciousModel.RequestDeSubscribeBoss(model.selectedBoss); |
| | | } |
| | | else |
| | | { |
| | | findPreciousModel.RequestSubscribeBoss(model.selectedBoss, false); |
| | | } |
| | | } |
| | | |
| | | private void GotoKillBoss() |
| | | { |
| | | if (PlayerDatas.Instance.baseData.MapID == DogzDungeonModel.DATA_MAPID) |
| | | { |
| | | WindowCenter.Instance.Close<LootPreciousFrameWin>(); |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | | |
| | | var config = Config.Instance.Get<DogzDungeonConfig>(model.selectedBoss); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | if (PlayerDatas.Instance.baseData.MapID != DogzDungeonModel.DATA_MAPID) |
| | | { |
| | | var map = Config.Instance.Get<MapConfig>(DogzDungeonModel.DATA_MAPID); |
| | | var position = new Vector3(map.BornPoints[0].x, 0, map.BornPoints[0].y); |
| | | MapTransferUtility.Send_WorldTransfer(DogzDungeonModel.DATA_MAPID, position, MapTransferType.WorldTransport, 0, 0); |
| | | } |
| | | break; |
| | | case 4: |
| | | MapTransferUtility.Instance.MoveToNPC(model.selectedBoss); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void OnSubscribeBoss(int _bossId) |
| | | { |
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(model.selectedBoss); |
| | | } |
| | | |
| | | private void OnBossSelected(int _bossId) |
| | | { |
| | | //DisplayItemDropTip(_bossId); |
| | | DisplayBossBaseInfo(_bossId); |
| | | DisplayWearyValue(_bossId); |
| | | } |
| | | |
| | | private void DisplayBossBaseInfo(int _bossId) |
| | | { |
| | | var config = Config.Instance.Get<DogzDungeonConfig>(_bossId); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | m_KillRecord.gameObject.SetActive(false); |
| | | m_BossIntroduce.Dispose(); |
| | | m_BossIntroduce.gameObject.SetActive(false); |
| | | m_EliteMonsterBehaviour.Dispose(); |
| | | m_EliteMonsterBehaviour.gameObject.SetActive(false); |
| | | m_BoxBehaviour.gameObject.SetActive(true); |
| | | m_BoxBehaviour.Display(); |
| | | break; |
| | | case 3: |
| | | m_KillRecord.gameObject.SetActive(false); |
| | | m_BossIntroduce.Dispose(); |
| | | m_BossIntroduce.gameObject.SetActive(false); |
| | | m_BoxBehaviour.gameObject.SetActive(false); |
| | | m_BoxBehaviour.Dispose(); |
| | | |
| | | m_EliteMonsterBehaviour.gameObject.SetActive(true); |
| | | m_EliteMonsterBehaviour.Display(); |
| | | break; |
| | | case 4: |
| | | m_KillRecord.gameObject.SetActive(true); |
| | | m_BoxBehaviour.Dispose(); |
| | | m_BoxBehaviour.gameObject.SetActive(false); |
| | | m_EliteMonsterBehaviour.Dispose(); |
| | | m_EliteMonsterBehaviour.gameObject.SetActive(false); |
| | | |
| | | m_BossIntroduce.gameObject.SetActive(true); |
| | | m_BossIntroduce.Display(_bossId, true); |
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(_bossId); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void DisplayItemDropTip(int _bossId) |
| | | { |
| | | var config = Config.Instance.Get<DogzDungeonConfig>(model.selectedBoss); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | m_SurpassLevel.gameObject.SetActive(false); |
| | | break; |
| | | case 4: |
| | | var npcDropConfig = Config.Instance.Get<NPCDropItemConfig>(_bossId); |
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV); |
| | | m_SurpassLevel.gameObject.SetActive(true); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void DisplayWearyValue(int _bossId) |
| | | { |
| | | var config = Config.Instance.Get<DogzDungeonConfig>(model.selectedBoss); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | m_ContainerBoxCollectWeary.gameObject.SetActive(true); |
| | | m_ContainerBossKillWeary.gameObject.SetActive(false); |
| | | var bigBoxCollectCountLimit = 2; |
| | | m_BoxCollectWearyValue.text = StringUtility.Contact(model.bigBoxCollectCount, "/", bigBoxCollectCountLimit); |
| | | m_BoxCollectWearyValue.colorType = model.bigBoxCollectCount >= bigBoxCollectCountLimit ? TextColType.Red : TextColType.DarkGreen; |
| | | break; |
| | | case 3: |
| | | case 4: |
| | | m_ContainerBoxCollectWeary.gameObject.SetActive(false); |
| | | m_ContainerBossKillWeary.gameObject.SetActive(true); |
| | | var wearyValueLimit = GeneralConfig.Instance.bossWearyValues[2]; |
| | | m_BossKillWearyValue.text = StringUtility.Contact(model.wearyValue, "/", wearyValueLimit); |
| | | m_BossKillWearyValue.colorType = model.wearyValue >= wearyValueLimit ? TextColType.Red : TextColType.DarkGreen; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void EnterDogzDungeon() |
| | | { |
| | | var error = 0; |
| | | if (TestEnterDungeon(out error)) |
| | | { |
| | | MapTransferUtility.Instance.MoveToNPC(model.selectedBoss); |
| | | } |
| | | else |
| | | { |
| | | ProcessEnterDungeonError(error); |
| | | } |
| | | } |
| | | |
| | | private bool TestEnterDungeon(out int _error) |
| | | { |
| | | _error = 0; |
| | | return true; |
| | | } |
| | | |
| | | private void ProcessEnterDungeonError(int _error) |
| | | { |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e5074977b4d949f40b8568222ecfc23b |
| | | timeCreated: 1534559453 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, August 18, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class DogzEliteMonsterBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] Text m_Elite; |
| | | [SerializeField] RawImage m_RawImage; |
| | | |
| | | DogzDungeonModel model { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | |
| | | public void Display() |
| | | { |
| | | timer = 0f; |
| | | UI3DModelExhibition.Instance.BeginShowNPC(model.eliteMonsters[0], Vector3.zero, m_RawImage); |
| | | DisplayGuardSurplusInfo(); |
| | | model.boxSurplusChangeEvent += OnGuardInfoUpdate; |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | model.boxSurplusChangeEvent -= OnGuardInfoUpdate; |
| | | UI3DModelExhibition.Instance.StopShowNPC(); |
| | | } |
| | | |
| | | private void OnGuardInfoUpdate() |
| | | { |
| | | DisplayGuardSurplusInfo(); |
| | | } |
| | | |
| | | private void DisplayGuardSurplusInfo() |
| | | { |
| | | var guard = model.dogzDungeonElite; |
| | | m_Elite.text = guard.eliteSurplus.ToString(); |
| | | m_Elite.color = UIHelper.GetUIColor(guard.eliteSurplus > 0 ? TextColType.White : TextColType.Red); |
| | | } |
| | | |
| | | float timer = 0f; |
| | | private void LateUpdate() |
| | | { |
| | | timer += Time.deltaTime; |
| | | if (timer > 30f) |
| | | { |
| | | timer = 0f; |
| | | model.RequestEliteSurplusInfo(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e1cbf382b6be57544a7603a6af20a97f |
| | | timeCreated: 1534563304 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | }
|
| | | unusualRewards = demonJarConfig.RareItemID;
|
| | | break;
|
| | | case FindPreciousType.DogzDungeon:
|
| | | undoubtedlyRewards = Config.Instance.Get<DogzDungeonConfig>(bossId).RareItemID;
|
| | | break;
|
| | | }
|
| | |
|
| | | if (m_UndoubtedlyRewardGroup != null)
|
| | |
| | | findPreciousModel.bossInfoUpdateEvent -= OnBossInfoUpdate;
|
| | | }
|
| | |
|
| | | protected void DrawBossBaseInfo(string _icon, string _name, int _level, int _realm)
|
| | | protected virtual void DrawBossBaseInfo(string _icon, string _name, int _level, int _realm)
|
| | | {
|
| | | m_Portrait.SetSprite(_icon);
|
| | | m_Portrait.SetNativeSize();
|
| | |
| | | m_Portrait.material = isGray ? m_GrayMaterial : m_NormalMaterial;
|
| | | }
|
| | |
|
| | | protected void UpdateBossRebornCoolDown(bool _isUnLocked)
|
| | | protected virtual void UpdateBossRebornCoolDown(bool _isUnLocked)
|
| | | {
|
| | | if (_isUnLocked)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (isRebornRightNow && !m_RefreshAtOnce.gameObject.activeInHierarchy)
|
| | | if (m_RefreshAtOnce != null)
|
| | | {
|
| | | m_RefreshAtOnce.gameObject.SetActive(true);
|
| | | }
|
| | | else if (!isRebornRightNow && m_RefreshAtOnce.gameObject.activeInHierarchy)
|
| | | {
|
| | | m_RefreshAtOnce.gameObject.SetActive(false);
|
| | | if (isRebornRightNow && !m_RefreshAtOnce.gameObject.activeInHierarchy)
|
| | | {
|
| | | m_RefreshAtOnce.gameObject.SetActive(true);
|
| | | }
|
| | | else if (!isRebornRightNow && m_RefreshAtOnce.gameObject.activeInHierarchy)
|
| | | {
|
| | | m_RefreshAtOnce.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } }
|
| | | BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
|
| | | DogzDungeonModel dogzDungeonModel { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | |
| | | if (model.currentBossNotify != 0)
|
| | | {
|
| | | var type = model.GetBossFindPreciousType(model.currentBossNotify);
|
| | | if (type == FindPreciousModel.FindPreciousType.DemonJar)
|
| | | if (type == FindPreciousType.DemonJar)
|
| | | {
|
| | | if (demonJarModel.GetSurplusTimes() <= 0)
|
| | | {
|
| | |
| | |
|
| | | switch (type)
|
| | | {
|
| | | case FindPreciousModel.FindPreciousType.DemonJar:
|
| | | case FindPreciousType.DemonJar:
|
| | | GotoKillDemonJarBoss(bossId);
|
| | | break;
|
| | | case FindPreciousModel.FindPreciousType.WorldBoss:
|
| | | case FindPreciousType.WorldBoss:
|
| | | GotoKillWorldBoss(bossId);
|
| | | break;
|
| | | case FindPreciousModel.FindPreciousType.BossHome:
|
| | | case FindPreciousType.BossHome:
|
| | | GotoKillBossHomeBoss(bossId);
|
| | | break;
|
| | | case FindPreciousModel.FindPreciousType.ElderGodArea:
|
| | | case FindPreciousType.ElderGodArea:
|
| | | GotoKillElderGodAreaBoss(bossId);
|
| | | break;
|
| | | case FindPreciousModel.FindPreciousType.PersonalBoss:
|
| | | case FindPreciousType.PersonalBoss:
|
| | | break;
|
| | | case FindPreciousType.DogzDungeon:
|
| | | GotoKillDogzDungeonBoss(bossId);
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | }
|
| | |
|
| | | private void GotoKillDogzDungeonBoss(int _bossId)
|
| | | {
|
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | var mapConfig = Config.Instance.Get<MapConfig>(mapId);
|
| | |
|
| | | if (mapConfig.MapFBType == (int)MapType.OpenCountry)
|
| | | {
|
| | | MapTransferUtility.Instance.MoveToNPC(_bossId);
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("InDungeon_CantGo");
|
| | | }
|
| | | }
|
| | |
|
| | | private void EnterBossHome(int _floor,int _bossId)
|
| | | {
|
| | | var error = 0;
|
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System; |
| | | using TableConfig; |
| | | using System.Text; |
| | | |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using System;
|
| | | using TableConfig;
|
| | | using System.Text;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class FindPreciousModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk, IMapInitOk, ISwitchAccount
|
| | |
| | | Redpoint findPreciousRedpoint = new Redpoint(FINDPRECIOUS_REDPOINTID);
|
| | |
|
| | | int m_ViewKillRecordsBoss = 0;
|
| | | public int ViewKillRecordsBoss {
|
| | | public int ViewKillRecordsBoss
|
| | | {
|
| | | get { return this.m_ViewKillRecordsBoss; }
|
| | | set { this.m_ViewKillRecordsBoss = value; }
|
| | | }
|
| | |
| | | List<int> bossNotifies = new List<int>();
|
| | |
|
| | | int m_CurrentBossNotify = 0;
|
| | | public int currentBossNotify {
|
| | | public int currentBossNotify
|
| | | {
|
| | | get { return m_CurrentBossNotify; }
|
| | | private set {
|
| | | private set
|
| | | {
|
| | | if (m_CurrentBossNotify != value)
|
| | | {
|
| | | m_CurrentBossNotify = value;
|
| | |
| | | {
|
| | | return FindPreciousType.PersonalBoss;
|
| | | }
|
| | | else if (Config.Instance.ContainKey<DogzDungeonConfig>(_bossId))
|
| | | {
|
| | | return FindPreciousType.DogzDungeon;
|
| | | }
|
| | |
|
| | | return FindPreciousType.None;
|
| | | }
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public enum FindPreciousType
|
| | | {
|
| | | None,
|
| | | WorldBoss,
|
| | | BossHome,
|
| | | PersonalBoss,
|
| | | ElderGodArea,
|
| | | DemonJar,
|
| | | }
|
| | |
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | [SerializeField] FunctionButtonGroup m_FunctionGroup; |
| | | [SerializeField] FunctionButton m_DemonJar; |
| | | [SerializeField] FunctionButton m_FairyGrabBoss; |
| | | [SerializeField] FunctionButton m_DogzDungeon; |
| | | |
| | | [SerializeField] Button m_Left; |
| | | [SerializeField] Button m_Right; |
| | |
| | | protected override void AddListeners() |
| | | { |
| | | m_DemonJar.AddListener(ShowDemonJar); |
| | | m_DogzDungeon.AddListener(ShowDogzDungeon); |
| | | m_FairyGrabBoss.AddListener(FairyGrabBoss); |
| | | |
| | | m_Left.AddListener(ShowLastFunction); |
| | | m_Right.AddListener(ShowNextFunction); |
| | | m_Close.AddListener(CloseClick); |
| | |
| | | functionOrder = m_FairyGrabBoss.order; |
| | | } |
| | | |
| | | private void ShowDogzDungeon() |
| | | { |
| | | CloseSubWindows(); |
| | | WindowCenter.Instance.Open<DogzDungeonWin>(); |
| | | functionOrder = m_DogzDungeon.order; |
| | | } |
| | | |
| | | private void CloseSubWindows() |
| | | { |
| | | WindowCenter.Instance.CloseImmediately<DemonJarWin>(); |
| | | WindowCenter.Instance.CloseImmediately<DogzDungeonWin>(); |
| | | WindowCenter.Instance.CloseImmediately<FairyGrabBossWin>(); |
| | | } |
| | | |
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_WearyValue.text = StringUtility.Contact(model.wearyValue, "/", GeneralConfig.Instance.bossWearyValues[0] + model.extraBossWearyValue);
|
| | | m_WearyValue.colorType = model.wearyValue >= GeneralConfig.Instance.bossWearyValues[0]+model.extraBossWearyValue ? TextColType.Red : TextColType.DarkGreen;
|
| | | var wearyValueLimit = GeneralConfig.Instance.bossWearyValues[0] + model.extraBossWearyValue;
|
| | | m_WearyValue.text = StringUtility.Contact(model.wearyValue, "/", wearyValueLimit);
|
| | | m_WearyValue.colorType = model.wearyValue >= wearyValueLimit ? TextColType.Red : TextColType.DarkGreen;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | public List<int> bossHomeNoRebornRemindMaps = null;
|
| | | public List<int> elderGodNoRebornRemindMaps = null;
|
| | | public List<int> demonJarNoRebornRemindMaps = null;
|
| | | public List<int> dogzNoRebornRemindMaps = null;
|
| | |
|
| | | public string[][] ModeDefaultConfig { get; private set; }
|
| | | public int[] RealmGroup { get; private set; }
|
| | |
| | | public int inGameDownLoadHighestLevelPoint { get; private set; }
|
| | |
|
| | | public List<int> dungeonCanUseMoneyIds { get; private set; }
|
| | | public int dogzBoxLimit { get; private set; }
|
| | |
|
| | | public Dictionary<int, int> dungeonRebornClientTimes { get; private set; }
|
| | | public int[] CompareEquipPlaces { get; private set; }
|
| | |
| | | bossHomeNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 2));
|
| | | elderGodNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 3));
|
| | | demonJarNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 4));
|
| | | dogzNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 5));
|
| | |
|
| | | if (ModeDefaultConfig == null)
|
| | | {
|
| | |
| | |
|
| | | dungeonCanUseMoneyIds = new List<int>(GetIntArray("FBEnterTickeyAuto", 1));
|
| | | dungeonRebornClientTimes = ConfigParse.GetDic<int, int>(GetInputString("DuplicatesRebornTime", 2));
|
| | | dogzBoxLimit = GetInt("DogzBoxLimit");
|
| | |
|
| | | fairyGrabBossMapLines = ConfigParse.GetDic<int, int>(GetInputString("MapLine", 2));
|
| | | var grabBossMaps = fairyGrabBossMapLines.Keys.ToList();
|
| | |
| | | m_TitlesText.text= "<color=#feed28> " + TaskTitle(TaskId) + " </color>"; |
| | | string str = _AllMissionDict[TaskId].InforList; |
| | | m_ContentsText.gameObject.SetActive(false); |
| | | //var config = ConfigManager.Instance.GetTemplate<TASKINFOConfig>(str); |
| | | //var config = Config.Instance.Get<TASKINFOConfig>(str); |
| | | //if (config != null) |
| | | //{ |
| | | // m_ContentsText.text = config.show_writing; |
| | |
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | switch (findPreciousType)
|
| | | {
|
| | | case FindPreciousModel.FindPreciousType.WorldBoss:
|
| | | case FindPreciousType.WorldBoss:
|
| | | show = !GeneralConfig.Instance.worldBossNoRebornRemindMaps.Contains(mapId);
|
| | | break;
|
| | | case FindPreciousModel.FindPreciousType.BossHome:
|
| | | case FindPreciousType.BossHome:
|
| | | show = !GeneralConfig.Instance.bossHomeNoRebornRemindMaps.Contains(mapId);
|
| | | break;
|
| | | case FindPreciousModel.FindPreciousType.ElderGodArea:
|
| | | case FindPreciousType.ElderGodArea:
|
| | | show = !GeneralConfig.Instance.elderGodNoRebornRemindMaps.Contains(mapId);
|
| | | break;
|
| | | case FindPreciousModel.FindPreciousType.DemonJar:
|
| | | case FindPreciousType.DemonJar:
|
| | | show = !GeneralConfig.Instance.demonJarNoRebornRemindMaps.Contains(mapId);
|
| | | break;
|
| | | case FindPreciousType.DogzDungeon:
|
| | | break;
|
| | | }
|
| | |
|
| | | if (show)
|
| | |
| | | if (isNeutralMap)
|
| | | {
|
| | | m_BossBriefInfos.gameObject.SetActive(true);
|
| | | m_BossBriefInfos.Display(ModelCenter.Instance.GetModel<WorldBossModel>().GetWorldBosses(PlayerDatas.Instance.baseData.MapID));
|
| | | if (PlayerDatas.Instance.baseData.MapID==DogzDungeonModel.DATA_MAPID)
|
| | | {
|
| | | var bosses = ModelCenter.Instance.GetModel<DogzDungeonModel>().GetBosses();
|
| | | m_BossBriefInfos.Display(bosses);
|
| | | }
|
| | | else
|
| | | {
|
| | | var bosses = ModelCenter.Instance.GetModel<WorldBossModel>().GetWorldBosses(PlayerDatas.Instance.baseData.MapID);
|
| | | m_BossBriefInfos.Display(bosses);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | public int currentMission { get; private set; }
|
| | | public int currentMissionState { get; private set; }
|
| | |
|
| | | public int GetNowTaskID { get; set; }
|
| | | public int GetNowTaskID { get; set; }//获取当前选中条的任务ID
|
| | |
|
| | | private bool AutomaticityBool = false;//控制是否自动进行自动任务
|
| | | private int retainTaskID = 0;
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent -= secondEvent;
|
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent;
|
| | | AutomaticityBool = true;
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | private void onStageLoadFinish()//地图切换时调用
|
| | | {
|
| | |
| | | {
|
| | | if (MainTaskDic.ContainsKey(_MissionId) && MainCardLevelChange != null && _DictValue == 0)
|
| | | {
|
| | | |
| | | if (IsGetOnBool)
|
| | | {
|
| | | GetNowTaskID = _MissionId;
|
| | | }
|
| | | MainCardLevelChange(_MissionId);
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | {
|
| | | CardLevelChange(_MissionId);
|
| | | }
|
| | | if (MainTaskDic.ContainsKey(_MissionId) && MainCardLevelChange != null)
|
| | | {
|
| | | MainCardLevelChange(_MissionId);
|
| | | if (MainTaskDic.ContainsKey(_MissionId))
|
| | | { |
| | | if (IsGetOnBool)
|
| | | {
|
| | | GetNowTaskID = _MissionId;
|
| | | }
|
| | | if (MainCardLevelChange != null)
|
| | | {
|
| | | MainCardLevelChange(_MissionId);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | //if (_NpcID == allMissionDict[key].LightList.NpcId)
|
| | | //{
|
| | | // if (allMissionDict[key].LightList.StateLight > Light)
|
| | | // {
|
| | | // Light = allMissionDict[key].LightList.StateLight;
|
| | | // }
|
| | |
|
| | | //}
|
| | | }
|
| | |
|
| | | return Light;
|
| | |
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | if (FairyAuDic.Count != 0)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | | public void DailyBountyMove()//日常赏金任务
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | if (BountyDic.Count != 0)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private int Autotasking(int taskID)
|
| | |
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | else if (FairyAuDic.ContainsKey(_taskID))//仙盟任务
|
| | | {
|
| | |
| | | {
|
| | | break;
|
| | | }
|
| | |
|
| | | if (MapTransferUtility.Instance.MapTransferDoType != MapTransferUtility.E_MapTransferDoType.None)
|
| | | {
|
| | | break;
|
| | |
| | | GA_NpcFunc.SetNpcFuncVisible(Npcid, true);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | return -1;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public int GetQuestState(int _taskId)
|
| | |
| | | return -1;
|
| | | }
|
| | | }
|
| | | //--------主要用于记录任务列表选中条的智能性 (-_-||)
|
| | | public int GetOnTaskId = 0;
|
| | | public bool IsGetOnBool = false;
|
| | | private int NeedTime = 10;
|
| | | private DateTime dateTimeA;
|
| | | public void GetTaskGetOnNow(int TaskID, string DictKey)//记录下信息字典的ID
|
| | | {
|
| | | string key1Str = "on_kill_" + TaskID;
|
| | | string key2Str = "get_byid_" + TaskID;
|
| | | if (TaskID > 1 && (key1Str== DictKey || key2Str== DictKey))
|
| | | {
|
| | | GetOnTaskId = TaskID;
|
| | | dateTimeA =DateTime.Now;
|
| | | }
|
| | |
|
| | | }
|
| | | private void secondEvent()
|
| | | {
|
| | | TimeSpan timeS =DateTime.Now- dateTimeA;
|
| | | int timeSend = timeS.Seconds;
|
| | | if (timeSend >= NeedTime)
|
| | | {
|
| | | IsGetOnBool = true;
|
| | | GetOnTaskId = GetNowTaskID;//获取当前选中的ID |
| | | }
|
| | | else
|
| | | {
|
| | | IsGetOnBool = false;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private void MainCardLevelChange(int _id)
|
| | | {
|
| | | TaskScheduling();
|
| | | bool IsDefault = true;
|
| | | var State = taskmodel.GetTaskStatus(_id);
|
| | | if (State == PlayerTaskDatas.TaskStatus.CardLevel)
|
| | | {
|
| | | IsDefault = false;
|
| | | }
|
| | | if (IsDefault)
|
| | | {
|
| | | foreach (var key in taskmodel.MainTaskDic.Keys)
|
| | | {
|
| | | if (taskmodel.MainTaskDic[key].MissionState != 3)
|
| | | {
|
| | | taskmodel.GetNowTaskID = key;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (_list.Count > 0)
|
| | | {
|
| | | taskmodel.GetNowTaskID = _list[0];
|
| | | }
|
| | | }
|
| | | TaskScheduling(); |
| | | TheTaskToGenerate();
|
| | | TaskJump(_id);
|
| | | }
|
| | |
|
| | | private void SetLength()
|
| | |
| | | void OnTaskToDelete(int _IdTask)//任务的删除
|
| | | {
|
| | | var inDungeon = IsDungeon();
|
| | | TaskScheduling();
|
| | | if (WindowCenter.Instance.CheckOpen<MainInterfaceWin>() && !inDungeon)
|
| | | {
|
| | | LodingDelTask(_IdTask);
|
| | | TheTaskToGenerate();//任务列表需要重新排列重新刷新赋值
|
| | | // LodingDelTask(_IdTask);
|
| | | }
|
| | | TaskScheduling();
|
| | | |
| | | }
|
| | |
|
| | |
|
| | |
| | | return mapConfig != null && mapConfig.MapFBType != 0;
|
| | | }
|
| | |
|
| | | private void TaskJump()
|
| | | private void TaskJump(int TaskID=0)
|
| | | {
|
| | | int type = _list.IndexOf(taskmodel.GetNowTaskID);
|
| | | int type = 0;
|
| | | if (TaskID == 0)
|
| | | {
|
| | | type= _list.IndexOf(taskmodel.GetNowTaskID);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (_list.Contains(TaskID))
|
| | | {
|
| | | type = _list.IndexOf(TaskID);
|
| | | } |
| | | }
|
| | | if (_list.Count <= 2 || type <= 0)
|
| | | {
|
| | | m_ScrollRect.verticalNormalizedPosition = 1;
|
| | |
| | | if (_GetMountSkills.ContainsKey(_MountList[Index]))//解锁 |
| | | { |
| | | _MountSkill.Lock.SetActive(false); |
| | | // _MountSkill.MountNameTxt1.text = ConfigManager.Instance.GetTemplate<HorseConfig>(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | // _MountSkill.MountNameTxt1.text = Config.Instance.Get<HorseConfig>(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | _MountSkill.SkillTex.material = MaterialUtility.GetUIDefaultGraphicMaterial();//亮 |
| | | } |
| | | else//未解锁 |
| | | { |
| | | // _MountSkill.MountNameTxt1.text = ConfigManager.Instance.GetTemplate<HorseConfig>(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | // _MountSkill.MountNameTxt1.text = Config.Instance.Get<HorseConfig>(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | _MountSkill.Lock.SetActive(false); |
| | | } |
| | | |
| | |
| | | _mountSkill.SkillTex.material = MaterialUtility.GetDefaultSpriteGrayMaterial();//灰 |
| | | _mountSkill.Lock.SetActive(true); |
| | | _mountSkill.SkillNameTxt.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).SkillName; |
| | | // _mountSkill.MountNameTxt1.text = "<color=#ff2828>" + ConfigManager.Instance.GetTemplate<HorseConfig>(_MountSkillDic[SkillID].HorseID).Name + "</color>"; |
| | | // _mountSkill.MountNameTxt1.text = "<color=#ff2828>" + Config.Instance.Get<HorseConfig>(_MountSkillDic[SkillID].HorseID).Name + "</color>"; |
| | | } |
| | | |
| | | void Consumables(int SkillID) |
| | |
| | | }
|
| | | }
|
| | |
|
| | | private float time = 0f;
|
| | | private DateTime dateTimeA;
|
| | | private void secondEvent()
|
| | | {
|
| | | if (!Wait)
|
| | | {
|
| | | time+= Time.deltaTime;
|
| | | if (time >= 1.5f)
|
| | | TimeSpan timeS = DateTime.Now - dateTimeA;
|
| | | if (timeS.Seconds >= 2f)
|
| | | {
|
| | | Wait = true;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | time = 0f;
|
| | | dateTimeA = DateTime.Now;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | PlayerLoginOkData();
|
| | | }
|
| | | }
|
| | | private float time = 0f;
|
| | | private DateTime dateTimeA;
|
| | | private void secondEvent()
|
| | | {
|
| | | if (!Wait)
|
| | | {
|
| | | time += Time.deltaTime;
|
| | | if (time >= 1.5f)
|
| | | TimeSpan timeS = DateTime.Now - dateTimeA;
|
| | | if (timeS.Seconds>= 2f)
|
| | | {
|
| | | Wait = true;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | time = 0f;
|
| | | dateTimeA = DateTime.Now;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using TableConfig; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using TableConfig;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class RealmBossShow : MonoBehaviour
|
| | |
| | | newClothes = item == null ? newClothes = config.BaseEquip[0] : item.ChangeOrd;
|
| | | }
|
| | |
|
| | | var _prefab = InstanceResourcesLoader.LoadModelRes(newClothes);
|
| | | var _prefab = InstanceResourcesLoader.LoadModelRes(newClothes,true);
|
| | | if (!_prefab)
|
| | | {
|
| | | newClothes = config.BaseEquip[0];
|
| | |
| | |
|
| | | private void LoadClothes(int resID)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(resID);
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(resID,true);
|
| | | if (clothesModel == null)
|
| | | {
|
| | | clothesModel = Instantiate(prefab, Constants.Special_Hide_Position, Quaternion.identity);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void LoadClothesEffect(int job,int clothedID, int suitLevel)
|
| | | public void LoadClothesEffect(int job, int clothedID, int suitLevel)
|
| | | {
|
| | | var _equipModel = ModelCenter.Instance.GetModel<PlayerPackModel>().GetSinglePackModel(PackType.rptEquip);
|
| | | if (_equipModel == null)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | m_storeModel.storeFuncType = StoreFunc.BagStore;
|
| | | InitModel();
|
| | | OnFrenshMoneyInfo();
|
| | | m_storeModel.RefreshBuyShopLimitEvent = InitModel;
|
| | | m_storeModel.RefreshBuyShopLimitEvent += InitModel;
|
| | | PlayerDatas.Instance.RefreshPlayerInfoEvent += OnFrenshMoneyInfo;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | |
| | | m_storeModel.RefreshBuyShopLimitEvent -= InitModel;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | protected override void OnPreOpen() |
| | | { |
| | | |
| | | m_storeModel.RefreshBuyShopLimitEvent = InitModel; |
| | | m_storeModel.RefreshBuyShopLimitEvent += InitModel; |
| | | model.OnRefreshRuneChip += OnFrenshMoneyInfo; |
| | | _tagFuncModel = Config.Instance.Get<FuncConfigConfig>("RuneShop"); |
| | | m_storeModel.storeFuncType = StoreFunc.RuneStore; |
| | |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | {
|
| | | m_storeModel.RefreshBuyShopLimitEvent -= InitModel; |
| | | runemodel.OnRefreshRuneChip -= OnFrenshMoneyInfo; |
| | | } |
| | | #endregion |
| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= FuncStateChange;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine -= RefreshServerHour;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= RefreshFamilyLv;
|
| | | RefreshTCBPlayerDataEvent -= RefreshPlayerLv;
|
| | | TimeMgr.Instance.OnHourEvent -= RefreshServerHour;
|
| | | shopItemlimitDict.Clear();
|
| | | tagTowerModel = null;
|
| | | storeFuncType = StoreFunc.WeekStore;
|
| | |
| | | public void OnAfterPlayerDataInitialize()
|
| | | {
|
| | | UNIONSTORESAVE_KEY = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, LocalSaveStoreType.UnionStore);
|
| | | DebugEx.Log("UNIONSTORESAVE_KEY:" + UNIONSTORESAVE_KEY);
|
| | | StoreEffectRecord_Key = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "StoreEffectRecord");
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= RefreshFamilyLv;
|
| | | |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += RefreshFamilyLv;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine -= RefreshServerHour;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine += RefreshServerHour;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= FuncStateChange;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += FuncStateChange;
|
| | | RefreshTCBPlayerDataEvent -= RefreshPlayerLv;
|
| | | RefreshTCBPlayerDataEvent += RefreshPlayerLv;
|
| | | TimeMgr.Instance.OnHourEvent -= RefreshServerHour;
|
| | | TimeMgr.Instance.OnHourEvent += RefreshServerHour;
|
| | |
|
| | | shoplist = null;
|
| | | CheckWeekStoreIsShopBuy(out shoplist);
|
| | | ControllerRedPoint();
|
| | |
| | | private void RefreshServerHour()
|
| | | {
|
| | | ControllerRedPoint();
|
| | | if(!PlayerDatas.Instance.fairyData.HasFairy)
|
| | | {
|
| | | PlayerPrefs.DeleteKey(UNIONSTORESAVE_KEY);
|
| | | }
|
| | | }
|
| | |
|
| | | public Action RefreshBuyShopLimitEvent;
|
| | | public event Action RefreshBuyShopLimitEvent;
|
| | |
|
| | | public StoreFunc storeFuncType = StoreFunc.WeekStore;
|
| | | private Dictionary<uint, BuyShopItemLimit> shopItemlimitDict = new Dictionary<uint, BuyShopItemLimit>();
|
| | |
| | | {
|
| | | shopId = 0;
|
| | | m_storeModel.RefreshTCBPlayerDataEvent += OnRefreshPlayerInfo;
|
| | | m_storeModel.RefreshBuyShopLimitEvent = OnCreate;
|
| | | m_storeModel.RefreshBuyShopLimitEvent += OnCreate;
|
| | | RefreshCoins();
|
| | | RefreshResetTime();
|
| | | }
|
| | |
| | | protected override void OnPreClose()
|
| | | {
|
| | | m_storeModel.shoplist.Clear();
|
| | | m_storeModel.RefreshBuyShopLimitEvent -= OnCreate;
|
| | | GlobalTimeEvent.Instance.secondEvent -= RefreshResetTime;
|
| | | m_storeModel.RefreshTCBPlayerDataEvent -= OnRefreshPlayerInfo;
|
| | |
|
| | |
| | | m_storeModel.storeFuncType = StoreFunc.ToolStore;
|
| | | m_storeModel.RefreshTCBPlayerDataEvent += OnRefreshPlayerInfo;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += CreateCell;
|
| | | m_storeModel.RefreshBuyShopLimitEvent = CreateCell;
|
| | | m_storeModel.RefreshBuyShopLimitEvent += CreateCell;
|
| | | CreateCell();
|
| | | RefreshUI();
|
| | | }
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | m_storeModel.RefreshBuyShopLimitEvent -= CreateCell;
|
| | | m_storeModel.RefreshTCBPlayerDataEvent -= OnRefreshPlayerInfo;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= CreateCell;
|
| | | }
|
| | |
| | | private void CreateCell()
|
| | | {
|
| | | shopId = 0;
|
| | | _unionLv = PlayerDatas.Instance.fairyData.fairy.FamilyLV;
|
| | | _unionLv = 0;
|
| | | if(PlayerDatas.Instance.fairyData.HasFairy)
|
| | | {
|
| | | _unionLv = PlayerDatas.Instance.fairyData.fairy.FamilyLV;
|
| | | }
|
| | | base.CreateShopItemCell(_shopCtrl,2);
|
| | | }
|
| | |
|
| | |
| | | redpointList[i - 1].state = RedPointState.None;
|
| | | if (item != null)
|
| | | {
|
| | | ItemConfig itemCfg = ConfigManager.Instance.GetTemplate<ItemConfig>((int)item.itemInfo.ItemID);
|
| | | ItemConfig itemCfg = Config.Instance.Get<ItemConfig>((int)item.itemInfo.ItemID);
|
| | | List<ItemModel> list = IsBagHaveGem(FuncConfigConfig.GetGemTypeByEquipPos(item.itemInfo.ItemPlace));
|
| | | if (list == null || list.Count == 0) continue;
|
| | | uint[] stones = PlayerStoneData.Instance.GetStoneInfo(i);
|
| | |
| | | ItemModel item = playerPack.GetItemModelByIndex(PackType.rptEquip, _index);
|
| | | if (item != null)
|
| | | {
|
| | | ItemConfig itemCfg = ConfigManager.Instance.GetTemplate<ItemConfig>((int)item.itemInfo.ItemID);
|
| | | ItemConfig itemCfg = Config.Instance.Get<ItemConfig>((int)item.itemInfo.ItemID);
|
| | | List<ItemModel> list = IsBagHaveGem(FuncConfigConfig.GetGemTypeByEquipPos(item.itemInfo.ItemPlace));
|
| | | if (list == null || list.Count == 0)
|
| | | {
|
| | |
| | |
|
| | | public bool GetMinLevelGem(int _type, int _itemId, out int _pos, out int _hole)
|
| | | {
|
| | | _pos = 0;_hole = 0;
|
| | | _pos = 0; _hole = 0;
|
| | | int _minItemId = 0;
|
| | | for (int i = 1; i <= 10; i++)
|
| | | {
|
| | |
| | | {
|
| | | expValue+= Sort2(key);
|
| | | //ItemModel model = playerPack.GetItemModelByIndex(PackType.rptItem, key);
|
| | | //expValue += ConfigManager.Instance.GetTemplate<WingRefineExpConfig>(model.itemInfo.ItemID).EXPupper;
|
| | | //expValue += Config.Instance.Get<WingRefineExpConfig>(model.itemInfo.ItemID).EXPupper;
|
| | | }
|
| | | }
|
| | | return _currentRefiningAll > expValue;
|
| | |
| | | TreasureAchievement showAchievementBehaviour;
|
| | |
|
| | | bool m_Showing = false;
|
| | | public bool showing {
|
| | | public bool showing
|
| | | {
|
| | | get { return m_Showing; }
|
| | | private set { m_Showing = value; }
|
| | | }
|
| | |
| | | for (int i = 0; i < infiniteItems.Count; i++)
|
| | | {
|
| | | var item = infiniteItems[i] as TreasureAchievement;
|
| | | if (item != null && preIndex + i < datas.Count)
|
| | | if (item != null && preIndex + i <= datas.Count)
|
| | | {
|
| | | if (item.achievementGroup != datas[preIndex + i])
|
| | | {
|
| | | item.gameObject.SetActive(true);
|
| | | item.Display(datas[preIndex + i]);
|
| | | }
|
| | | item.Display(datas[preIndex + i]);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | RegisterModel<TrialDungeonModel>();
|
| | | RegisterModel<ActivitiesPushMgr>();
|
| | | RegisterModel<MultipleRealmPointModel>();
|
| | | RegisterModel<DogzDungeonModel>();
|
| | | RegisterModel<DogzModel>();
|
| | | RegisterModel<TreasureSoulModel>();
|
| | | RegisterModel<FairyGrabBossModel>();
|
| | |
| | |
|
| | | public static GameObject LoadUIHorse(int id)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(id);
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(id, true);
|
| | | if (prefab == null)
|
| | | {
|
| | | return null;
|
| | |
| | |
|
| | | public static void ReleaseUIHourse(int id, GameObject model)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(id);
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(id, true);
|
| | | var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | |
|
| | | var animator = model.GetComponent<Animator>();
|
| | |
| | |
|
| | | public static GameObject LoadUIWing(int _id)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(_id);
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(_id, true);
|
| | | if (prefab == null)
|
| | | {
|
| | | return null;
|
| | |
| | |
|
| | | public static void ReleaseUIWing(int _id, GameObject _model)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(_id);
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(_id, true);
|
| | | var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | | var animator = _model.GetComponent<Animator>();
|
| | | if (animator != null)
|
| | |
| | |
|
| | | if (weaponId != 0)
|
| | | {
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(weaponId);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(weaponId, true);
|
| | | if (prefab)
|
| | | {
|
| | | pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | |
| | |
|
| | | if (secondaryId != 0)
|
| | | {
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(secondaryId);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(secondaryId, true);
|
| | | if (prefab)
|
| | | {
|
| | | if (secondaryModel)
|
| | |
| | |
|
| | | if (wingsId != 0)
|
| | | {
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(wingsId);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(wingsId, true);
|
| | | if (prefab)
|
| | | {
|
| | | pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | |
| | |
|
| | | if (clothesId != 0)
|
| | | {
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(clothesId);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(clothesId, true);
|
| | | if (prefab)
|
| | | {
|
| | | pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | |
| | |
|
| | | if (weaponModel)
|
| | | {
|
| | | GameObject prefab = InstanceResourcesLoader.LoadModelRes(weaponId);
|
| | | GameObject prefab = InstanceResourcesLoader.LoadModelRes(weaponId, true);
|
| | | if (prefab)
|
| | | {
|
| | | GameObjectPoolManager.Instance.ReleaseGameObject(prefab, weaponModel);
|
| | |
| | | UnloadClothes();
|
| | | }
|
| | |
|
| | | var _prefab = InstanceResourcesLoader.LoadModelRes(newClothes);
|
| | | var _prefab = InstanceResourcesLoader.LoadModelRes(newClothes, true);
|
| | | if (!_prefab)
|
| | | {
|
| | | newClothes = config.BaseEquip[0];
|
| | |
| | |
|
| | | private void LoadClothes(int resID)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(resID);
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(resID, true);
|
| | | if (prefab)
|
| | | {
|
| | | var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(clothesId);
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(clothesId, true);
|
| | | var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | | pool.Release(clothesModel);
|
| | | clothesModel = null;
|
| | |
| | |
|
| | | if (oldWeapon != 0)
|
| | | {
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(oldWeapon);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(oldWeapon, true);
|
| | | pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | | pool.Release(weaponModel);
|
| | | weaponModel = null;
|
| | | }
|
| | |
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newWeapon);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newWeapon, true);
|
| | |
|
| | | if (!prefab)
|
| | | {
|
| | | newWeapon = config.BaseEquip[1];
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newWeapon);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newWeapon, true);
|
| | | }
|
| | |
|
| | | if (prefab)
|
| | |
| | |
|
| | | if (oldSecondary != 0)
|
| | | {
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(oldSecondary);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(oldSecondary, true);
|
| | | pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | | pool.Release(secondaryModel);
|
| | | secondaryModel = null;
|
| | |
| | |
|
| | | if (newSecondary != 0)
|
| | | {
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newSecondary);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newSecondary, true);
|
| | | if (!prefab)
|
| | | {
|
| | | newSecondary = config.BaseEquip[2];
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newSecondary);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newSecondary, true);
|
| | | }
|
| | |
|
| | | if (prefab)
|
| | |
| | |
|
| | | if (oldWings != 0)
|
| | | {
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(oldWings);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(oldWings, true);
|
| | | pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | | pool.Release(wingsModel);
|
| | | wingsModel = null;
|
| | |
| | |
|
| | | if (newWings != 0)
|
| | | {
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newWings);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newWings, true);
|
| | |
|
| | | if (!prefab)
|
| | | {
|
| | | newWings = config.BaseEquip[3];
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newWings);
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(newWings, true);
|
| | | }
|
| | |
|
| | | if (prefab)
|
| | |
| | |
|
| | | public enum FindPreciousType
|
| | | {
|
| | | WorldBoss,
|
| | | BossHome,
|
| | | PersonalBoss,
|
| | | ElderGodArea,
|
| | | DemonJar,
|
| | | WorldBoss = 0,
|
| | | BossHome = 1,
|
| | | PersonalBoss = 2,
|
| | | ElderGodArea = 3,
|
| | | DemonJar = 4,
|
| | | DogzDungeon = 5,
|
| | | None = 99,
|
| | | }
|
| | |
|
| | | public enum GotServerRewardType
|