Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | //-------------------------------------------------------- |
| | | // [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 |
| | |
| | | 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)
|
| | | {
|
| | | try
|
| | | {
|
| | | if (socketController != null && socketController.Connected)
|
| | | {
|
| | | socketController.CloseConnect();
|
| | | }
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | |
|
| | | socketController = new ClientSocketController();
|
| | |
|
| | |
| | | public class ClientSocketController
|
| | | {
|
| | | Socket m_Socket;
|
| | | public Socket socket {
|
| | | public Socket socket
|
| | | {
|
| | | get { return m_Socket; }
|
| | | }
|
| | |
|
| | |
| | | /// </summary>
|
| | | public void CloseConnect()
|
| | | {
|
| | | try
|
| | | {
|
| | | isStopTreading = true;
|
| | | if (m_packageThread != null)
|
| | | {
|
| | | m_packageThread.Abort();
|
| | | }
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | |
|
| | | try
|
| | | {
|
| | | if (m_Socket != null && m_Socket.Connected)
|
| | | {
|
| | | m_Socket.Shutdown(SocketShutdown.Both);
|
| | | m_Socket.Close();
|
| | | }
|
| | |
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | |
|
| | | sendQueue.Clear();
|
| | | m_Socket = null;
|
| | |
|
| | |
| | | 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;
|
| | | }
|
| | |
| | | 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);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | 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;
|