Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | AssetsVersionMaker.WriteAssetsVersionFile(Path.Combine(Directory.GetParent(Application.dataPath).FullName, m_UserData.m_OutputPath), fileInfos);
|
| | | }
|
| | |
|
| | | static int packageIndex
|
| | | {
|
| | | get { return LocalSave.GetInt("ClientPackageIndex", 1); }
|
| | | set { LocalSave.SetInt("ClientPackageIndex", value); }
|
| | | }
|
| | |
|
| | | private void ExecuteBuildClientPackageIpaAppend()
|
| | | {
|
| | | var outputPath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
|
| | | ClientPackage.BuildPublishers(ClientPackage.SDK_PLUGIN_PROJECT, outputPath, ApkOutputPath, publishers, false, false);
|
| | | ClientPackage.BuildPublishers(ClientPackage.SDK_PLUGIN_PROJECT, outputPath, ApkOutputPath, publishers, packageIndex, false, false);
|
| | | }
|
| | |
|
| | | private void ExecuteBuildClientPackageIpaReplace()
|
| | | {
|
| | | var outputPath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
|
| | | ClientPackage.BuildPublishers(ClientPackage.SDK_PLUGIN_PROJECT, outputPath, ApkOutputPath, publishers, false, true);
|
| | | ClientPackage.BuildPublishers(ClientPackage.SDK_PLUGIN_PROJECT, outputPath, ApkOutputPath, publishers, packageIndex, false, true);
|
| | | }
|
| | |
|
| | | private void ExecuteBuildClientPackageApk()
|
| | | {
|
| | | var outputPath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
|
| | | ClientPackage.BuildPublishers(ClientPackage.SDK_PLUGIN_PROJECT, outputPath, ApkOutputPath, publishers, false, false);
|
| | | ClientPackage.BuildPublishers(ClientPackage.SDK_PLUGIN_PROJECT, outputPath, ApkOutputPath, publishers, packageIndex, false, false);
|
| | | }
|
| | |
|
| | | private void ExecuteBuildClientPackageDevelopApk()
|
| | | {
|
| | | var outputPath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
|
| | | ClientPackage.BuildPublishers(ClientPackage.SDK_PLUGIN_PROJECT, outputPath, ApkOutputPath, publishers, true, false);
|
| | | ClientPackage.BuildPublishers(ClientPackage.SDK_PLUGIN_PROJECT, outputPath, ApkOutputPath, publishers, packageIndex, true, false);
|
| | | }
|
| | |
|
| | | private void ExecuteSwitchVersionConfig()
|
| | |
| | | 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: |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, August 31, 2018 |
| | | // [ Date ]: Tuesday, September 04, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public int UseLV { get ; private set ; }
|
| | | public int CanSell { get ; private set ; }
|
| | | public int CanTrade { get ; private set ; }
|
| | | public int ComposeID { get ; private set ; }
|
| | | public int[] JumpComposeCondi;
|
| | | public int CanDrop { get ; private set ; }
|
| | | public int CanBind { get ; private set ; }
|
| | | public int CDType { get ; private set ; }
|
| | |
| | |
|
| | | CanTrade=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0;
|
| | |
|
| | | ComposeID=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0; |
| | | string[] JumpComposeCondiStringArray = rawContents[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | JumpComposeCondi = new int[JumpComposeCondiStringArray.Length]; |
| | | for (int i=0;i<JumpComposeCondiStringArray.Length;i++) |
| | | { |
| | | int.TryParse(JumpComposeCondiStringArray[i],out JumpComposeCondi[i]); |
| | | }
|
| | |
|
| | | CanDrop=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0;
|
| | |
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: cfc9e4de91b5b6741bf06e2003e353b9 |
| | | timeCreated: 1535682711 |
| | | timeCreated: 1536031053 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | AddAsyncTask<AllPeoplePartyAwardConfig>();
|
| | | AddAsyncTask<OrderInfoConfig>();
|
| | | AddAsyncTask<TrialExchangeConfig>();
|
| | | AddAsyncTask<DogzDungeonConfig>();
|
| | | AddAsyncTask<TrialRewardsConfig>();
|
| | | AddAsyncTask<DogzEquipPlusConfig>();
|
| | | AddAsyncTask<FairyGrabBossConfig>();
|
| 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: |
| 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: |
| | |
| | | DisconnectState disconnectState;
|
| | |
|
| | | NetState m_NetState;
|
| | | public NetState netState {
|
| | | public NetState netState
|
| | | {
|
| | | get { return this.m_NetState; }
|
| | | set {
|
| | | set
|
| | | {
|
| | | if (this.m_NetState != value)
|
| | | {
|
| | | switch (m_NetState)
|
| | |
| | |
|
| | | public void BeginConnectGameServer(string _ip, int _port, Action _onConnected)
|
| | | {
|
| | | if (socketController != null && socketController.Connected)
|
| | | try
|
| | | {
|
| | | socketController.CloseConnect();
|
| | | if (socketController != null && socketController.Connected)
|
| | | {
|
| | | socketController.CloseConnect();
|
| | | }
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | |
|
| | | socketController = new ClientSocketController();
|
| 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: |
| | |
| | | public class ClientSocketController
|
| | | {
|
| | | Socket m_Socket;
|
| | | public Socket socket {
|
| | | public Socket socket
|
| | | {
|
| | | get { return m_Socket; }
|
| | | }
|
| | |
|
| | |
| | | /// </summary>
|
| | | public void CloseConnect()
|
| | | {
|
| | | isStopTreading = true;
|
| | | if (m_packageThread != null)
|
| | | try
|
| | | {
|
| | | m_packageThread.Abort();
|
| | | isStopTreading = true;
|
| | | if (m_packageThread != null)
|
| | | {
|
| | | m_packageThread.Abort();
|
| | | }
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | |
|
| | | if (m_Socket != null && m_Socket.Connected)
|
| | | try
|
| | | {
|
| | | m_Socket.Shutdown(SocketShutdown.Both);
|
| | | m_Socket.Close();
|
| | | if (m_Socket != null && m_Socket.Connected)
|
| | | {
|
| | | m_Socket.Shutdown(SocketShutdown.Both);
|
| | | m_Socket.Close();
|
| | | }
|
| | |
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | |
|
| | | sendQueue.Clear();
|
| | |
| | | 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
|
| | |
| | |
|
| | | 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;
|
| | |
| | | if (model.dungeonResult.leaderID == PlayerDatas.Instance.baseData.PlayerID
|
| | | && realmConfig != null && realmConfig.IsBigRealm == 1)
|
| | | {
|
| | | var count = 0;
|
| | | var configs = Config.Instance.GetAllValues<RealmConfig>();
|
| | | for (int i = 0; i < configs.Count; i++)
|
| | | {
|
| | | if (configs[i].Lv < realmModel.cacheRealmLv && configs[i].IsBigRealm == 1)
|
| | | {
|
| | | count++;
|
| | | }
|
| | | else if (configs[i].Lv >= realmModel.cacheRealmLv)
|
| | | {
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (count >= 3)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var teamModel = ModelCenter.Instance.GetModel<TeamModel>();
|
| | | for (int i = 0; i < teamModel.myTeam.memberCount; i++)
|
| | | {
|
| | |
| | | }
|
| | | 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>();
|
| | |
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(itemId);
|
| | | if (itemConfig == null) return false;
|
| | |
|
| | | ItemCompoundConfig itemCompound = Config.Instance.Get<ItemCompoundConfig>(itemConfig.ComposeID);
|
| | | int[] composeCondi = itemConfig.JumpComposeCondi;
|
| | | if (composeCondi.Length < 3) return false;
|
| | | ItemCompoundConfig itemCompound = GetThirdTypeModellist(composeCondi[0],composeCondi[1],composeCondi[2])[0];
|
| | | if(itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
|
| | | {
|
| | | switch (itemCompound.firstType)
|
| | |
| | | }
|
| | | this.secondType = itemCompound.secondType;
|
| | |
|
| | | if(itemConfig.ComposeID == 223)
|
| | | if(itemCompound.firstType == 5 && itemCompound.secondType == 3)
|
| | | {
|
| | | this.thirdType = PlayerDatas.Instance.baseData.Job;
|
| | | }
|
| | |
| | | }
|
| | | else if(!composeWinModel.IsEnoughMoney(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("L1006"));
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Z1011"));
|
| | | isCanCompose = false;
|
| | | }
|
| | |
|
| | |
| | | public const string FLASHSALE_REDPOINT = "FlashSale_Redpoint";
|
| | | public const string OSTIMEGIFT_REDPOINT = "OSTimeGift_Redpoint";
|
| | | public const string OSGIFT_REDPOINT = "OSGitf_Redpoint";
|
| | | public const string TASK_SKILL_HOLE = "TaskSkillHole";
|
| | | public Dictionary<string, int[]> dayRemindDic = new Dictionary<string, int[]>();
|
| | |
|
| | | public bool GetDayRemind(string _remindKey)
|
| | |
| | | SetDayRemind(FLASHSALE_REDPOINT);
|
| | | SetDayRemind(OSTIMEGIFT_REDPOINT);
|
| | | SetDayRemind(OSGIFT_REDPOINT);
|
| | | SetDayRemind(TASK_SKILL_HOLE);
|
| | | }
|
| | |
|
| | | private void SetDayRemind(string _key)
|
| | |
| | | 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()
|
| | |
| | | ChatCtrl.Inst.PteChatName = name;
|
| | | LanguageVerify.toPlayerLevel = 0;
|
| | | MapConfig mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | string msg = StringUtility.Contact(Language.Get("KillOthersDes", mapConfig.Name,StringUtility.Contact("<color=#FF0101FF", UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName), "</color>")),ChatCtrl.KILL_IDENTIFY);
|
| | | string msg = StringUtility.Contact(Language.Get("KillOthersDes", mapConfig.Name,StringUtility.Contact("<color=#FF0101FF>", UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName), "</color>")),ChatCtrl.KILL_IDENTIFY);
|
| | | ChatCtrl.Inst.SendChatInfo(ChatInfoType.Friend,msg);
|
| | | }
|
| | |
|
| | |
| | | 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();
|
| | |
| | |
|
| | | if (!isOverdue)
|
| | | {
|
| | | if(attrData.itemConfig.ComposeID != 0)
|
| | | if(attrData.itemConfig.JumpComposeCondi != null && attrData.itemConfig.JumpComposeCondi.Length > 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.compose, (ItemWinBtnType, ItemAttrData) => {
|
| | | int jumpId = 0;
|
| | |
| | | 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
|
| | | {
|
| | |
| | | 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) |
| | |
| | | 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)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | public bool jumpToPass { get; set; }
|
| | | public int minTaskHole { get; private set; }
|
| | | public int maxTaskHole { get; private set; }
|
| | | public int immediatelyUnlockTask { get; private set; }
|
| | | void ParseConfig()
|
| | | {
|
| | | for (int i = 1; i <= 3; i++)
|
| | |
| | | passEquipCnt = int.Parse(funcCfg.Numerical2);
|
| | | taskHoleDict = ConfigParse.GetDic<int, int>(funcCfg.Numerical4);
|
| | | }
|
| | | funcCfg = Config.Instance.Get<FuncConfigConfig>("PassiveSkillTask");
|
| | | immediatelyUnlockTask = int.Parse(funcCfg.Numerical2);
|
| | | funcCfg = Config.Instance.Get<FuncConfigConfig>("PassSkillEquipGetWay");
|
| | | if (funcCfg != null)
|
| | | {
|
| | |
| | | taskHoleCondition = result;
|
| | | }
|
| | | }
|
| | | UpdateTaskHoleRedpoint();
|
| | | }
|
| | |
|
| | | RolePromoteModel m_PromoteModel;
|
| | |
| | | }
|
| | | playerLoginOk = true;
|
| | | UpdateRedpoint();
|
| | | UpdateTaskHoleRedpoint();
|
| | | }
|
| | |
|
| | | public void CheckEquipPassSkill(PlayerSkillData _skill)
|
| | |
| | | DayRemind.Instance.SetDayRemind(DayRemind.PASS_SKILL_REDPOINT, true);
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public Redpoint taskHoleRedpoint = new Redpoint(10302, 1030299);
|
| | | void UpdateTaskHoleRedpoint()
|
| | | {
|
| | | taskHoleRedpoint.state = RedPointState.None;
|
| | | if (DayRemind.Instance.GetDayRemind(DayRemind.TASK_SKILL_HOLE))
|
| | | {
|
| | | return;
|
| | | }
|
| | | foreach (var hole in taskHoleDict.Keys)
|
| | | {
|
| | | var taskId = taskHoleDict[hole];
|
| | | if (taskId == immediatelyUnlockTask)
|
| | | {
|
| | | var config = Config.Instance.Get<PyTaskConfig>(taskId);
|
| | | if (PlayerDatas.Instance.baseData.LV >= config.lv
|
| | | && !IsTaskHoleUnlock(hole))
|
| | | {
|
| | | taskHoleRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetTaskHoleRemind()
|
| | | {
|
| | | DayRemind.Instance.SetDayRemind(DayRemind.TASK_SKILL_HOLE, true);
|
| | | UpdateTaskHoleRedpoint();
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void OnFuncStateChangeEvent(int _id)
|
| | |
| | | if (_id == 109)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | UpdateTaskHoleRedpoint();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | [Header("GetWay")]
|
| | | [SerializeField]
|
| | | Button m_GetWayBtn;
|
| | | [SerializeField] Button m_ImmediatelyUnlock;
|
| | | [SerializeField] ScrollerController scrollerController;
|
| | | [SerializeField] RectTransform m_ContainerGetWay;
|
| | | [SerializeField] ClickScreenOtherSpace clickOtherSpace;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | PlayerMainDate taskMain { get { return ModelCenter.Instance.GetModel<PlayerMainDate>(); } }
|
| | | PlayerPackModel pack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
|
| | | static readonly Color equipHoleLimitColor = new Color32(250, 3, 3, 255);
|
| | | static readonly Color equipHoleUnLimitColor = new Color32(51, 8, 0, 255);
|
| | | #region Built-in
|
| | |
| | | }
|
| | | scrollerController.OnRefreshCell += OnRefreshCell;
|
| | | m_GetWayBtn.onClick.AddListener(OnGetWayBtn);
|
| | | m_ImmediatelyUnlock.onClick.AddListener(ImmediatelyUnlock);
|
| | | clickOtherSpace.AddListener(() =>
|
| | | {
|
| | | m_ContainerGetWay.gameObject.SetActive(false);
|
| | |
| | | m_DragImg.gameObject.SetActive(false);
|
| | | m_ContainerGetWay.gameObject.SetActive(false);
|
| | | m_GetWayBtn.gameObject.SetActive(false);
|
| | | m_ImmediatelyUnlock.gameObject.SetActive(false);
|
| | | flipScroll.locked = false;
|
| | | PlayerSkillDatas.OnRefreshSkill += OnRefreshSkill;
|
| | | model.OnRefreshSltSkill += OnRefreshSltSkill;
|
| | |
| | | {
|
| | | base.OnActived();
|
| | | UpdatePageBtn();
|
| | |
|
| | | if (model.taskHoleRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | model.SetTaskHoleRemind();
|
| | | for (int i = 0; i < equipPassSkills.Count; i++)
|
| | | {
|
| | | PassSkillLimit limit;
|
| | | if (model.TryGetPassSkillLimit(i, out limit))
|
| | | {
|
| | | if (limit.OpenSkillSlots > 0
|
| | | && model.taskHoleDict[limit.OpenSkillSlots] == model.immediatelyUnlockTask)
|
| | | {
|
| | | OnClickEquipHole(i, false);
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | flipScroll.RefreshActive();
|
| | | var _equipIndex = GetEquipHoleIndex(model.presentSltSkillID);
|
| | | SetEquipHoleSelect(_equipIndex);
|
| | | m_GetWayBtn.gameObject.SetActive(CheckOpenGetWays(_equipIndex));
|
| | | m_GetWayBtn.gameObject.SetActive(CheckOpenGetWays(_equipIndex) == 1);
|
| | | m_ImmediatelyUnlock.gameObject.SetActive(CheckOpenGetWays(_equipIndex) == 2);
|
| | | OnUpdateSltSkillInfo();
|
| | | }
|
| | |
|
| | | private bool CheckOpenGetWays(int _index)
|
| | | private int CheckOpenGetWays(int _index)
|
| | | {
|
| | | PassSkillLimit _limit;
|
| | | if (model.TryGetPassSkillLimit(_index, out _limit))
|
| | | {
|
| | | if (_limit.level > 0 && PlayerDatas.Instance.baseData.LV < _limit.level)
|
| | | {
|
| | | return true;
|
| | | return 1;
|
| | | }
|
| | | else if (_limit.vipLv > 0 && PlayerDatas.Instance.baseData.VIPLv < _limit.vipLv)
|
| | | {
|
| | | return true;
|
| | | return 1;
|
| | | }
|
| | | else if (_limit.MountLv > 0 && promoteModel.GetMountTotallv() < _limit.MountLv)
|
| | | {
|
| | | return true;
|
| | | return 1;
|
| | | }
|
| | | else if (_limit.OpenSkillSlots > 0 && !model.IsTaskHoleUnlock(_limit.OpenSkillSlots))
|
| | | {
|
| | | return false;
|
| | | if (model.taskHoleDict.ContainsKey(_limit.OpenSkillSlots))
|
| | | {
|
| | | var taskId = model.taskHoleDict[_limit.OpenSkillSlots];
|
| | | var config = Config.Instance.Get<PyTaskConfig>(taskId);
|
| | | if (PlayerDatas.Instance.baseData.LV >= config.lv
|
| | | && taskId == model.immediatelyUnlockTask)
|
| | | {
|
| | | return 2;
|
| | | }
|
| | | }
|
| | | return 3;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private void OnRefreshPlayerInfo(PlayerDataRefresh type)
|
| | |
| | | {
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | | var taskName = string.Empty;
|
| | |
|
| | | if (model.taskHoleDict.ContainsKey(limit.OpenSkillSlots))
|
| | | {
|
| | | var taskConfig = Config.Instance.Get<PyTaskConfig>(model.taskHoleDict[limit.OpenSkillSlots]);
|
| | | if (taskConfig != null)
|
| | | var taskId = model.taskHoleDict[limit.OpenSkillSlots];
|
| | | var config = Config.Instance.Get<PyTaskConfig>(taskId);
|
| | | if (PlayerDatas.Instance.baseData.LV < config.lv)
|
| | | {
|
| | | var taskInfoConfig = Config.Instance.Get<TASKINFOConfig>(taskConfig.name);
|
| | | taskName = taskInfoConfig == null ? string.Empty : taskInfoConfig.show_writing;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text =
|
| | | UIHelper.ReplaceNewLine(Language.Get("PassSkillHoleLimitTask_6", config.lv));
|
| | | continue;
|
| | | }
|
| | | }
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text =
|
| | | UIHelper.ReplaceNewLine(Language.Get(StringUtility.Contact("PassSkillHoleLimitTask_", limit.OpenSkillSlots)));
|
| | | continue;
|
| | | }
|
| | | else if (model.taskHoleDict[limit.OpenSkillSlots] == model.immediatelyUnlockTask
|
| | | && model.IsTaskHoleUnlock(limit.OpenSkillSlots))
|
| | | {
|
| | | if (m_ImmediatelyUnlock.gameObject.activeSelf)
|
| | | {
|
| | | m_ImmediatelyUnlock.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var dis = Vector3.Distance(des.center, src.center);
|
| | | if (dis < rect.rect.width / 2)
|
| | | {
|
| | | if (CheckOpenGetWays(i))
|
| | | if (CheckOpenGetWays(i) != 0)
|
| | | {
|
| | | //SoundPlayer.Instance.PlayUIAudio(2);
|
| | | return;
|
| | |
| | | UpdatePassEquipPageBtn();
|
| | | var _equipIndex = GetEquipHoleIndex(model.presentSltSkillID);
|
| | | SetEquipHoleSelect(_equipIndex);
|
| | | m_GetWayBtn.gameObject.SetActive(CheckOpenGetWays(_equipIndex));
|
| | | m_GetWayBtn.gameObject.SetActive(CheckOpenGetWays(_equipIndex) == 1);
|
| | | m_ImmediatelyUnlock.gameObject.SetActive(CheckOpenGetWays(_equipIndex) == 2);
|
| | | }
|
| | |
|
| | | private void UpdatePassEquipPageBtn()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnClickEquipHole(int index)
|
| | | private void OnClickEquipHole(int index, bool requireRemind = true)
|
| | | {
|
| | | PassSkillLimit limit;
|
| | | m_GetWayBtn.gameObject.SetActive(false);
|
| | | m_ImmediatelyUnlock.gameObject.SetActive(false);
|
| | | SetEquipHoleSelect(index);
|
| | | if (model.TryGetPassSkillLimit(index, out limit))
|
| | | {
|
| | |
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV < limit.level)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("PassEquipLimitLevel", limit.level);
|
| | | if (requireRemind)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("PassEquipLimitLevel", limit.level);
|
| | | }
|
| | | m_GetWayBtn.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv < limit.vipLv)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("PassEquipLimitVip", limit.vipLv);
|
| | | if (requireRemind)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("PassEquipLimitVip", limit.vipLv);
|
| | | }
|
| | | m_GetWayBtn.gameObject.SetActive(true);
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | if (promoteModel.GetMountTotallv() < limit.MountLv)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("PassEquipLimitMountLevel", limit.MountLv);
|
| | | if (requireRemind)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("PassEquipLimitMountLevel", limit.MountLv);
|
| | | }
|
| | | m_GetWayBtn.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (!model.IsTaskHoleUnlock(limit.OpenSkillSlots))
|
| | | {
|
| | | var taskName = string.Empty;
|
| | | if (model.taskHoleDict.ContainsKey(limit.OpenSkillSlots))
|
| | | {
|
| | | var taskConfig = Config.Instance.Get<PyTaskConfig>(model.taskHoleDict[limit.OpenSkillSlots]);
|
| | | if (taskConfig != null)
|
| | | var taskId = model.taskHoleDict[limit.OpenSkillSlots];
|
| | | var config = Config.Instance.Get<PyTaskConfig>(taskId);
|
| | | if (PlayerDatas.Instance.baseData.LV < config.lv)
|
| | | {
|
| | | var taskInfoConfig = Config.Instance.Get<TASKINFOConfig>(taskConfig.name);
|
| | | taskName = taskInfoConfig == null ? string.Empty : taskInfoConfig.show_writing;
|
| | | m_GetWayBtn.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | if (taskId == model.immediatelyUnlockTask)
|
| | | {
|
| | | m_ImmediatelyUnlock.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | | SysNotifyMgr.Instance.ShowTip(StringUtility.Contact("PassSkillHoleLimitTask_", limit.OpenSkillSlots));
|
| | | if (requireRemind)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip(StringUtility.Contact("PassSkillHoleLimitTask_", limit.OpenSkillSlots));
|
| | | }
|
| | | m_GetWayBtn.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
| | | m_ContainerGetWay.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | | void ImmediatelyUnlock()
|
| | | {
|
| | | var count = pack.GetItemCountByID(PackType.rptItem, taskMain.ItemID);
|
| | | if (count >= taskMain.ItemNumber)
|
| | | {
|
| | | task.CompletionOfTask(model.immediatelyUnlockTask);
|
| | | }
|
| | | else
|
| | | {
|
| | | var requireJade = (ulong)((taskMain.ItemNumber - count) * taskMain.UnitPrice);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("PassiveSkillTask3", requireJade), |
| | | (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | if (UIHelper.GetMoneyCnt(1) >= requireJade)
|
| | | {
|
| | | task.CompletionOfTask(model.immediatelyUnlockTask);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (VersionConfig.Get().isBanShu)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GoldErr");
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnClickFunc(CellView cell)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)cell.index);
|
| | |
| | | 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]);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | [SerializeField] Text m_SoulDescription;
|
| | | [SerializeField] Image m_SoulTarget;
|
| | | [SerializeField] UIEffect m_SoulEffect;
|
| | | [SerializeField] PositionTween m_PositionTween;
|
| | | [SerializeField] Button m_Active;
|
| | | [SerializeField] Text m_ActiveText;
|
| | | [SerializeField] Button m_GotoRealm;
|
| | |
| | | achievementModel.achievementCompletedEvent += AchievementCompletedEvent;
|
| | | m_TreasureSoulBtn.state = TitleBtnState.Click;
|
| | | Display();
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | DisplaySelect();
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | m_ContainerPreview.gameObject.SetActive(!special.active);
|
| | | m_SoulEffect.StopImediatly();
|
| | | m_PositionTween.Stop();
|
| | | m_PositionTween.SetStartState();
|
| | | if (!special.active)
|
| | | {
|
| | | DisplayPreview(model.selectSoul);
|
| | |
| | | {
|
| | | m_SoulEffect.effect = config.effectId;
|
| | | m_SoulEffect.Play();
|
| | | m_PositionTween.Play();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | 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
|