public override bool Equals(object tgt) { if (tgt == null) { return(false); } FlowNode_OnUrlSchemeLaunch.LINEParam lineParam = tgt as FlowNode_OnUrlSchemeLaunch.LINEParam; return(lineParam != null && this.type == lineParam.type && (FlowNode_OnUrlSchemeLaunch.IsEqual(this.iname, lineParam.iname) && FlowNode_OnUrlSchemeLaunch.IsEqual(this.creatorFUID, lineParam.creatorFUID)) && this.roomid == lineParam.roomid); }
private bool UpdatePendingParam() { string paramString = MonoSingleton <UrlScheme> .Instance.ParamString; if (string.IsNullOrEmpty(paramString)) { return(false); } MonoSingleton <UrlScheme> .Instance.ParamString = (string)null; DebugUtility.Log("OnUrlSchemeLaunch:" + paramString); FlowNode_OnUrlSchemeLaunch.LINEParam lineParam = this.Analyze(paramString); if (lineParam == null) { return(false); } if (FlowNode_OnUrlSchemeLaunch.LINEParam_decided != null && FlowNode_OnUrlSchemeLaunch.LINEParam_decided.Equals((object)lineParam)) { DebugUtility.Log("Checking param is same..."); MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance; if (instance.CurrentState == MyPhoton.MyState.ROOM) { DebugUtility.Log("in room."); MyPhoton.MyRoom currentRoom = instance.GetCurrentRoom(); JSON_MyPhotonRoomParam myPhotonRoomParam = currentRoom != null?JSON_MyPhotonRoomParam.Parse(currentRoom.json) : (JSON_MyPhotonRoomParam)null; if (myPhotonRoomParam.isLINE == 0) { DebugUtility.Log("not LINE."); } else if (!FlowNode_OnUrlSchemeLaunch.IsEqual(myPhotonRoomParam.iname, lineParam.iname)) { DebugUtility.Log("iname is not match."); } else if (!FlowNode_OnUrlSchemeLaunch.IsEqual(myPhotonRoomParam.creatorFUID, lineParam.creatorFUID)) { DebugUtility.Log("creatorFUID is not match."); } else if ((JSON_MyPhotonRoomParam.EType)myPhotonRoomParam.type != lineParam.type) { DebugUtility.Log("type is not match."); } else { DebugUtility.Log("UrlScheme MultiPlayLINE start skip. same param."); return(false); } } } DebugUtility.Log("UrlScheme MultiPlayLINE start get pending." + (object)(lineParam != null)); FlowNode_OnUrlSchemeLaunch.LINEParam_Pending = lineParam; return(true); }
private FlowNode_OnUrlSchemeLaunch.LINEParam Analyze(string str) { string[] strArray1 = str.Split('?'); if (strArray1 == null) { return((FlowNode_OnUrlSchemeLaunch.LINEParam)null); } if (strArray1.Length <= 1 || strArray1[1] == null) { return((FlowNode_OnUrlSchemeLaunch.LINEParam)null); } string s = WWW.UnEscapeURL(strArray1[1].Split('=')[1]); byte[] data; try { data = Convert.FromBase64String(s); } catch { DebugUtility.LogError("UrlScheme invalid param"); return((FlowNode_OnUrlSchemeLaunch.LINEParam)null); } string[] strArray2 = MyEncrypt.Decrypt(JSON_MyPhotonRoomParam.LINE_PARAM_ENCODE_KEY, data, false).Split('&'); if (strArray2 == null || strArray2.Length != 4) { return((FlowNode_OnUrlSchemeLaunch.LINEParam)null); } int num = 0; FlowNode_OnUrlSchemeLaunch.LINEParam lineParam = new FlowNode_OnUrlSchemeLaunch.LINEParam(); foreach (string str1 in strArray2) { char[] chArray = new char[1] { '=' }; string[] strArray3 = str1.Split(chArray); if (strArray3 == null || strArray3.Length != 2) { return((FlowNode_OnUrlSchemeLaunch.LINEParam)null); } if (strArray3[0].Equals("iname")) { lineParam.iname = strArray3[1]; num |= 1; } else if (strArray3[0].Equals("type")) { lineParam.type = (JSON_MyPhotonRoomParam.EType) int.Parse(strArray3[1]); num |= 2; } else if (strArray3[0].Equals("creatorFUID")) { lineParam.creatorFUID = strArray3[1]; num |= 4; } else if (strArray3[0].Equals("roomid")) { lineParam.roomid = int.Parse(strArray3[1]); num |= 8; } } for (int index = 0; index < 4; ++index) { if ((num & 1 << index) == 0) { return((FlowNode_OnUrlSchemeLaunch.LINEParam)null); } } return(lineParam); }