public override void SendAction() { Ag.LogString("WasInvite :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 350); // AddKeyValue ("serviceCode", 350); //SendStr = SendStr.AddKeyValue ("userID", User.WAS.KkoID); //SendStr = SendStr.AddKeyValue ("key", User.WAS.WasKey); SendStr = SendStr.AddKeyValue("formatVersion", 1); SendStr = SendStr.AddKeyValue("friendID", friendID, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasInvite :: postAction " + RcvdStr); //JsonData jsUInfo = JsonMapper.ToObject (RcvdStr); // 0 : 성공, -1 : 코인부족, -2 : 기타 에러 Ag.LogString("WasInvite :: postAction " + Result.result); if (Result.result == 0) { User.InviteCount = NdObj["inviteCount"].AsInt; User.Isinvite = NdObj["isInvite"].AsInt; } messageAction(Result.result); }; SendAndRciv(); }
// 0 - 성공. -1: 게임 세션키 생성 실패. 1: 글러브 부족, 2: 카톡 갱신 실패, 3: 글러브 갱신 실패, 4: 카드중에 LimitGameEA 부족한 카드가 있음 public override void SendAction() { Ag.LogString("WasGameStart :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 501); // AddKeyValue ("serviceCode", 501); SendStr = SendStr.AddKeyValue("formatVersion", 1); //SendStr = SendStr.AddKeyValue ("userID", User.WAS.KkoID); //SendStr = SendStr.AddKeyValue ("key", User.WAS.WasKey); SendStr = SendStr.AddKeyValue("enemyID", enemyID); SendStr = SendStr.AddKeyValue("contWinMyFlag", contWinMyFlag); SendStr = SendStr.AddKeyValue("contWinEnemyFlag", contWinEnemFlag); SendStr = SendStr.AddArray("arrayCardId", GetIntArray(arrCardId)); SendStr = SendStr.AddArray("arrayEnemyCardId", GetIntArray(arrayEnemyId)); SendStr = SendStr.AddKeyValue("friendGame", friendGame, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasGameStart :: postAction " + RcvdStr); //JsonData jsUInfo = JsonMapper.ToObject (RcvdStr); //if (Result.result == 0 || ) try { User.WAS.GameSessionKey = NdObj ["gameSessionKey"]; } catch { " gameSessionKey parsing failure ".HtLog(); } // 0 - 성공. -1:게임 세션키 생성 실패. 1: 글러브 부족, 2:카톡 갱신 실패, 3:글러브 갱신 실패, 4: 카드중에 LimitGameEA 부족한 카드가 있음 Ag.LogString("WasGameStart :: postAction result : " + Result.result + " Session Key : " + User.WAS.GameSessionKey); messageAction(Result.result); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasUniformUpdate :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 325); SendStr = SendStr.AddKeyValue("formatVersion", 1); string unifArr = " "; for (int i = 0; i < User.arrCostume.Count; i++) { AmCostume uObj = User.arrCostume [i]; unifArr += uObj.WAS.ToJsonStr(); // JsonMapper.ToJson (uObj.WAS); if (i != User.arrCostume.Count - 1) { unifArr += ","; } } unifArr = unifArr.AddSqreBrakt(); SendStr = SendStr.AddArray("arrCostume", unifArr, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasCostumeUpdate :: postAction " + Result.result); messageAction(Result.result); Ag.LogString("WasCostumeUpdate :: postAction >>> "); }; SendAndRciv(); }
// public AmUser usr; public override void SendAction() { User.arrMail.Clear(); Ag.LogString("WasMailFetch :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 360); // AddKeyValue ("serviceCode", 360); SendStr = SendStr.AddKeyValue("formatVersion", 1, false); //SendStr = SendStr.AddKeyValue ("userID", User.WAS.KkoID); //SendStr = SendStr.AddKeyValue ("key", User.WAS.WasKey, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogStartWithStr(1, "WasMailFetch :: postAction " + RcvdStr); JSONNode arrObj = NdObj ["arrMails"]; for (int k = 0; k < arrObj.Count; k++) { AmMail nObj = new AmMail(); if (nObj.ParseFrom(arrObj [k])) { User.arrMail.Add(nObj); } } //if (usr.ParseMail (arrObj)) //Ag.LogIntenseWord (" WasMail OK "); Ag.LogString("WasMailFetch :: postAction " + Result.result); messageAction(Result.result); }; SendAndRciv(); }
//public bool IsAvailable; // _////////////////////////////////////////////////_ _____ Main _____ Methods _____ public override void SendAction() { Ag.LogString("WasUnRegist :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 115); SendStr = SendStr.AddKeyValue("formatVersion", 1, false); SendStr = SendStr.AddParen(); //SendStr = SendStr.AddKeyValue ("encodedPassword", StNet.encodedPassword, false); postAction = () => { switch (Result.result) //0 : 성공, 1 : 탈퇴 회원 재가입, -1 : 카카오 ID 중복 2: 블럭 사용자 { case 0: OKtoGO = true; break; case -1: OKtoGO = false; break; } messageAction(Result.result); Ag.LogString(Result.ToString() + " , OK to GO : " + OKtoGO); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasCardExtend :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 315); // AddKeyValue ("serviceCode", 315); SendStr = SendStr.AddKeyValue("formatVersion", 1); //SendStr = SendStr.AddKeyValue ("userID", User.WAS.KkoID); //SendStr = SendStr.AddKeyValue ("key", User.WAS.WasKey); SendStr = SendStr.AddKeyValue("cardId", cardId); SendStr = SendStr.AddKeyValue("count", count); SendStr = SendStr.AddKeyValue("buyType", User.GetBuyType("FuncCardExtend" + User.GetCardIdOf(cardId).WAS.grade + "30"), false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasCardExtend :: postAction " + RcvdStr); //JsonData jsUInfo = JsonMapper.ToObject (RcvdStr); // 0 : 성공 Ag.LogString("WasCardExtend :: postAction .. >>>> next step is messageAction "); messageAction(Result.result); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasMailSend :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 362); // .AddKeyValue ("serviceCode", 362); SendStr = SendStr.AddKeyValue("formatVersion", 1); //SendStr = SendStr.AddKeyValue ("userID", User.WAS.KkoID); //SendStr = SendStr.AddKeyValue ("key", User.WAS.WasKey); SendStr = SendStr.AddKeyValue("friendID", friendID); SendStr = SendStr.AddKeyValue("content", content); SendStr = SendStr.AddKeyValue("itemTypeId", itemTypeId, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogStartWithStr(1, "WasMailSend :: postAction " + RcvdStr); //if (usr.ParseMail (arrObj)) //Ag.LogIntenseWord (" WasMail OK "); Ag.LogString("WasMailSend :: postAction " + Result.result); messageAction(Result.result); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasCardLevelup :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 252); SendStr = SendStr.AddKeyValue("cardID", cardID); SendStr = SendStr.AddKeyValue("formatVersion", 1); // Deck AmCard curCard = User.GetCardIdOf(cardID); int bT = User.GetBuyType("FuncLevelUp" + (curCard.WAS.level + 1)); SendStr = SendStr.AddKeyValue("buyType", bT, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasCardLevelup :: postAction " + RcvdStr); //JsonData jsUInfo = JsonMapper.ToObject (RcvdStr); if (Result.result == 0) { JSONNode contJs = NdObj ["cardInfoRslt"]; Ag.LogString("WasCardLevelup :: postAction .. >>>> next step is messageAction "); AmCard theCard = User.arrCard.GetMemberWithCond <AmCard> ((AmCard crd) => { return(crd.WAS.ID == contJs ["ID"].AsInt); }); theCard.WAS.WasCardParse(contJs); theCard.ScouterParse(); } messageAction(Result.result); }; SendAndRciv(); }
private void ComSend(object obj) { lock (this) //由于send()中的if(Sending == true) return,所以这里不会产生阻塞,如果没有那句,多次启动该线程,会在此处排队 { if (client.Client != null) { try { while (sendStream.CanWrite) { lock (sendStream) { Sending = true; SendStr temp = (SendStr)obj; byte[] comSendData = temp.SendData; sendStream.Write(comSendData, 0, comSendData.Length); Sending = false; } Thread.Sleep(500); } //_ComSend.Abort(); } catch (Exception err) { client.Close(); // MessageBox.Show("ComSend 命令发送失败:" + err.Message, "提示"); } } } }
public override void SendAction() { Ag.LogString("WasUniformUpdate :: SendAction ... Started ... "); if (partOfAll == null) { partOfAll = new List <AmUniform> (); for (int k = 0; k < User.arrUniform.Count; k++) { if (k == 0 || User.arrUniform [k].mustUpdate) { partOfAll.Add(User.arrUniform [k]); } } } SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 320); SendStr = SendStr.AddKeyValue("formatVersion", 1); string unifArr = ""; int sendNum = partOfAll.Count > 8 ? 8 : partOfAll.Count; Ag.LogDouble(" Update >>> .... Remain >>> " + sendNum); for (int i = 0; i < sendNum; i++) { AmUniform uObj = partOfAll [i]; //Ag.LogString (" Must Update ?? " + uObj.mustUpdate); //if (uObj.mustUpdate || i == 0) unifArr += uObj.ToJsonStr() + " , "; } partOfAll.RemoveRange(0, sendNum); unifArr = unifArr.Substring(0, unifArr.Length - 2); unifArr = unifArr.AddSqreBrakt(); SendStr = SendStr.AddArray("arrUniform", unifArr, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasUniformUpdate :: postAction " + Result.result); if (partOfAll.Count > 0) { Ag.LogIntenseWord(" Update Again .... Remain >>> " + partOfAll.Count); SendAction(); } messageAction(Result.result); Ag.LogString(" postAction "); }; SendAndRciv(); }
private void Send(SendStr sendSet) { if (Sending == true) { return; //如果当前正在发送,则取消本次发送,本句注释后,可能阻塞在ComSend的lock处 } _ComSend = new Thread(new ParameterizedThreadStart(ComSend)); //new发送线程 _ComSend.Start(sendSet); //发送线程启动 }
public override void SendAction() { Ag.LogString("WasInAppPrchs :: SendAction ... Started ... ", pWichtig: true); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 202); SendStr = SendStr.AddKeyValue("formatVersion", 1); #if UNITY_IPHONE SendStr = SendStr.AddKeyValue("productID", AgStt.mIAP.ProductID); SendStr = SendStr.AddKeyValue("receipt", AgStt.mIAP.ReceiptOfIAP); SendStr = SendStr.AddKeyValue("buyCode", AgStt.mIAP.TransactionID); Ag.LogString("ID : " + AgStt.mIAP.ProductID + " Receit : " + AgStt.mIAP.ReceiptOfIAP.Substring(0, 5) + AgStt.mIAP.TransactionID, pWichtig: true); SendStr = SendStr.AddKeyValue("androidSignature", ""); SendStr = SendStr.AddKeyValue("buyTransactionKey", ""); SendStr = SendStr.AddKeyValue("appStoreType", 1, false); // iOS #endif #if UNITY_ANDROID if (Ag.CurStorePlfm == StorePlfm.Nstore) { AgStt.mIAB.Receipt = AgStt.mIAB.BuyCode; AgStt.mIAB.Signature = ""; AgStt.mIAB.TransactionKey = ""; } SendStr = SendStr.AddKeyValue("productID", AgStt.mIAB.ProductID); SendStr = SendStr.AddKeyValue("receipt", AgStt.mIAB.Receipt); SendStr = SendStr.AddKeyValue("buyCode", AgStt.mIAB.BuyCode); SendStr = SendStr.AddKeyValue("androidSignature", AgStt.mIAB.Signature); SendStr = SendStr.AddKeyValue("buyTransactionKey", AgStt.mIAB.TransactionKey); SendStr = SendStr.AddKeyValue("appStoreType", 2, false); // google 2, nStore 3 ("WasInAppPrchs :: buyCode : " + AgStt.mIAB.BuyCode + " productID : " + AgStt.mIAB.ProductID).HtLog(); #endif SendStr = SendStr.AddParen(); Ag.LogString(" WasInAppPrchs " + SendStr, pWichtig: true); postAction += () => { Ag.LogStartWithStr(1, "WasInAppPrchs :: postAction " + RcvdStr); Ag.LogString(RcvdStr.Substring(0, 10), pWichtig: true); if (Result.result == 0) { AgStt.InAppPurchaseSuccess = true; Ag.LogIntenseWord(" Was In App Purchase >>>> AgStt.InAppPurchaseSuccess " + AgStt.InAppPurchaseSuccess); } // if (Result.result == 0) // ActPurchaseSuccess (); // else // ActPurchaseCancelled (); //Ag.LogString ("WasReview :: postAction " + Result.result); messageAction(Result.result); }; SendAndRciv(); }
// additionalBuyFlag : 0 (no), 1 (additional) // public List<string> playerNamze = new List<string> (); // public List<int> backNum = new List<int> (); // 0 : cash, 1 : gold /* * public WasPurchaseCard () * { * string hangen = WWW.UnEscapeURL ("%EC%83%9D%EC%84%B1%EC%9E%90"); * Ag.LogString ("WasPurchaseCard :: Generation ... " + hangen); * * dlgt_WillSend = () => { * return User.arrCard.Count < 30; * }; * } */ public override void SendAction() { Ag.LogString("WasPurchaseCard :: SendAction ... Started ... "); User.arrNewCard.Clear(); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 220); SendStr = SendStr.AddKeyValue("option", option); SendStr = SendStr.AddKeyValue("eaNum", eaNum); SendStr = SendStr.AddKeyValue("leagueType", leagueType); SendStr = SendStr.AddKeyValue("formatVersion", 2); // Deck //SendStr = SendStr.AddKeyValue ("kind", kind); // SendStr = SendStr.AddArray ("backNum", JsonMapper.ToJson (backNum)); // SendStr = SendStr.AddArray ("playerName", JsonMapper.ToJson (playerName)); SendStr = SendStr.AddKeyValue("additionalBuyFlag", additionalBuyFlag); SendStr = SendStr.AddKeyValue("buyType", buyType, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasPurchaseCard :: postAction " + RcvdStr); //JsonData jsData = JsonMapper.ToObject (RcvdStr); JSONNode jsCard = NdObj ["arrCard"]; if (Result.result == 0) { for (int k = 0; k < jsCard.Count; k++) { AmCard nuCard = new AmCard(); nuCard.WAS.WasCardParse(jsCard [k]); nuCard.ScouterParse(); if (User.GetCardIdOf(jsCard [k] ["ID"].AsInt) == null) { nuCard.KickOrder = -1; } User.arrNewCard.Add(nuCard); } } // Card Update .... WasCardUpdate bObj = new WasCardUpdate() { User = User }; bObj.messageAction = (int pInt) => { }; // 0 : 성공, -1 : 코인부족, -2 : 기타 에러 Ag.LogString("WasPurchaseCard :: postAction " + Result.result + " New Card : " + User.arrNewCard.Count); messageAction(Result.result); //Ag.LogString (((string)(jsData ["cash1"])).LogWith ("cash1") + ((string)(jsData ["cash2"])).LogWith ("cash2") + ((string)(jsData ["gold"])).LogWith ("gold")); }; SendAndRciv(); }
/// <summary> /// 发送数据 /// </summary> /// <param name="sendSet"></param> public void Send(SendStr sendSet)//发送数据,分为多线程方式和单线程方式 { if (Sending == true) { return; //如果当前正在发送,则取消本次发送,本句注释后,可能阻塞在ComSend的lock处 } _ComSend = new Thread(new ParameterizedThreadStart(ComSend)); //new发送线程 SendSet.SendSetData = sendSet.SendSetData; //发送数据线程传递参数的结构体--发送的数据 SendSet.SendSetMode = sendSet.SendSetMode; //发送数据线程传递参数的结构体--发送方式 _ComSend.Start(SendSet); //发送线程启动 }
//public bool IsAvailable; // _////////////////////////////////////////////////_ _____ Main _____ Methods _____ public override void SendAction() { Encript = false; //AgStt.mURI = "http://221.143.21.33/api.psy.versionCheck.trd"; //AgStt.mURI = "http://psy.kakao.joycity.com/api.psy.versionCheck.do"; // dev AgStt.mURI = " http://psy-kakao.joycity.com/api.psy.versionCheck.do"; Ag.LogString("WasServerVersion :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddKeyValue("serviceCode", 99); SendStr = SendStr.AddKeyValue("formatVersion", 0); SendStr = SendStr.AddKeyValue("buildVersion", AgStt.CliVersion); SendStr = SendStr.AddKeyValue("osVersion", "1.0"); SendStr = SendStr.AddKeyValue("deviceUUID", User.DeviceID); SendStr = SendStr.AddKeyValue("osType", 2); SendStr = SendStr.AddKeyValue("deviceModel", SystemInfo.deviceModel, false); SendStr = SendStr.AddParen(); postAction = () => { if (Result.result == 0 || Result.result == 1 || Result.result == 2) { AgStt.SvrVersion = NdObj ["svrVersion"].AsInt; } else { messageAction(Result.result); Ag.LogString(Result.ToString() + " , E r r o r "); } if (AgStt.SvrVersion == AgStt.CliVersion) // Service //AgStt.mURI = "http://221.143.21.33/api.psy.do"; // mServiceURI; //AgStt.mNodeURI = "http://221.143.21.32"; { AgStt.mURI = AgStt.mServiceURI; //"http://221.143.21.33/api.psy.do"; // mServiceURI; AgStt.mNodeURI = AgStt.mServiceNodeURI; //"http://221.143.21.32"; // mServiceNodeURI; } if (AgStt.SvrVersion > AgStt.CliVersion) // Update case ... Server is faster { AgStt.mURI = AgStt.mServiceURI; // mServiceURI; AgStt.mNodeURI = AgStt.mServiceNodeURI; // mServiceNodeURI; } if (AgStt.SvrVersion < AgStt.CliVersion) // Review ..... Client is faster { AgStt.mURI = AgStt.mServiceURI; // mServiceURI; AgStt.mNodeURI = AgStt.mServiceNodeURI; // mServiceNodeURI; } messageAction(Result.result); Ag.LogString(Result.ToString() + " , Server Version : " + AgStt.SvrVersion + " Client Version : " + AgStt.CliVersion); }; SendAndRciv(); }
private void DeleteButtonClicked(object sender, EventArgs e) { /* 消去ボタン押下 */ SendStr = SendStr.Substring(0, SendStr.Length - 1); if (SendStr.Length == 0) { displaylabel.Text = "入力してください"; } else { displaylabel.Text = SendStr; } }
// _////////////////////////////////////////////////_ _____ Main _____ Methods _____ public override void SendAction() { Ag.LogString("WasUserInfo :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 101); SendStr = SendStr.AddKeyValue("formatVersion", 2); // Free coupon time. .. SendStr = SendStr.AddKeyValue("flag", flag, false); SendStr = SendStr.AddParen(); postAction = () => { User.ParseUserInfoOK(NdObj); messageAction(Result.result); }; SendAndRciv(); }
// 610 : GIVE_REWARD_EVERY_HOUR_EVENT public override void SendAction() { Ag.LogString("WasCodeOnlyProtocol :: SendAction ... Started ... " + " Code : _____ " + protoCode + " _____"); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, protoCode); SendStr = SendStr.AddKeyValue("formatVersion", 1, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogStartWithStr(1, "WasCodeOnlyProtocol :: postAction " + RcvdStr); Ag.LogString(RcvdStr.Substring(0, 10), pWichtig: true); messageAction(Result.result); }; SendAndRciv(); }
// _////////////////////////////////////////////////_ _____ Main _____ Methods _____ public override void SendAction() { Ag.LogString("WasNoReturn :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddKeyValue("serviceCode", 101333); SendStr = SendStr.AddKeyValue("key", User.WAS.WasKey, false); SendStr = SendStr.AddKeyValue("userID", User.WAS.KkoID, false); SendStr = SendStr.AddParen(); postAction = () => { " >>>>> ".HtLog(); messageAction(Result.result); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasScouter :: SendAction ... Started ... " + " "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 505); SendStr = SendStr.AddKeyValue("formatVersion", 1); SendStr = SendStr.AddKeyValue("buyType", User.GetBuyType("FuncScouter"), false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogStartWithStr(1, "WasScouter :: postAction " + RcvdStr); Ag.LogString(RcvdStr.Substring(0, 10), pWichtig: true); messageAction(Result.result); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasPurchaseGold :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 210); SendStr = SendStr.AddKeyValue("formatVersion", 1); SendStr = SendStr.AddKeyValue("gold", Gold, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasPurchaseGold :: postAction " + RcvdStr); messageAction(Result.result); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasFriendRank :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 150); SendStr = SendStr.AddKeyValue("formatVersion", 1); string frdArrStr = ""; for (int j = 0; j < arrFriendIDs.Count; j++) { string frdStr = ""; frdStr = frdStr.AddKeyValue("userID", arrFriendIDs [j], false); frdStr = frdStr.AddParen(); frdArrStr += frdStr; if (j != arrFriendIDs.Count - 1) { frdArrStr += ","; } } frdArrStr = frdArrStr.AddSqreBrakt(); SendStr = SendStr.AddArray("arrFriendID", frdArrStr, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasFriendRank :: postAction " + Result.result); // :[{"userID":"AppsTest0101","weekScore":0,"bestScore":0,"contWinNum":0,"winNumWeek":0,"lossNumWeek":0,"winNum":0,"lossNum":0}, //JsonData arrJsO = JData ["arrFriendRank"]; JSONNode arrJsO = NdObj ["arrFriendRank"]; Ag.LogString(" Friend Count " + arrJsO.Count); for (int j = 0; j < arrJsO.Count; j++) { WasRank anObj = new WasRank(); // JsonMapper.ToObject<WasRank> (arrJsO [j].ToJson ()); anObj.Parse(arrJsO [j]); User.arrFriendRank.Add(anObj); } messageAction(Result.result); Ag.LogString("WasFriendRank :: postAction >>> "); }; SendAndRciv(); }
//card 240, unif 241, cost 242 public override void SendAction() { Ag.LogString("WasCardUniformCostume :: SendAction ... Started ... " + code); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, code); SendStr = SendStr.AddKeyValue("formatVersion", 1); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasCardUniformCostume :: postAction " + Result.result + " " + code); //JsonData jsUInfo = JsonMapper.ToObject (RcvdStr); JSONNode jsCnt; switch (code) { case 240: jsCnt = NdObj ["arrCard"]; if (User.ParseCards(jsCnt)) { Ag.LogIntenseWord(" Fetch Card OK "); } break; case 241: jsCnt = NdObj ["arrUniform"]; if (User.ParseUniform(jsCnt)) { Ag.LogIntenseWord(" Fetch Uniform OK "); } break; case 242: jsCnt = NdObj ["arrCostume"]; if (User.ParseCostume(jsCnt)) { Ag.LogIntenseWord(" Fetch Costume OK "); } break; } messageAction(Result.result); Ag.LogString("WasCardUniformCostume :: postAction >>> "); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasReceiveContWinItems :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 605); // AddKeyValue ("serviceCode", 605); SendStr = SendStr.AddKeyValue("formatVersion", 1, false); //SendStr = SendStr.AddKeyValue ("userID", User.WAS.KkoID); //SendStr = SendStr.AddKeyValue ("key", User.WAS.WasKey, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasReceiveContWinItems :: postAction " + RcvdStr); messageAction(Result.result); }; SendAndRciv(); }
//public int buyType; // 0 : cash, 1 : gold public override void SendAction() { Ag.LogString("WasHeartFillMax :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 260); SendStr = SendStr.AddKeyValue("formatVersion", 1); SendStr = SendStr.AddKeyValue("buyType", User.GetBuyType("FuncHeartMax"), false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasHeartFillMax :: postAction " + RcvdStr); // 0 : 성공, -1 : 코인부족, -2 : 기타 에러 Ag.LogString("WasHeartFillMax :: postAction " + Result.result); messageAction(Result.result); }; SendAndRciv(); }
//public int buyType; // 0 : cash, 1 : gold public override void SendAction() { Ag.LogString("WasPurchaseCostume :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 222); SendStr = SendStr.AddKeyValue("formatVersion", 1); SendStr = SendStr.AddKeyValue("itemTypeID", costumeName); SendStr = SendStr.AddKeyValue("buyType", User.GetBuyType(costumeName), false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasPurchaseCostume :: postAction " + RcvdStr); // 0 : 성공, -1 : 코인부족, -2 : 기타 에러 Ag.LogString("WasPurchaseCostume :: postAction " + Result.result); messageAction(Result.result); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasFuncInitRank :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 235); SendStr = SendStr.AddKeyValue("formatVersion", 1); SendStr = SendStr.AddKeyValue("buyType", User.GetBuyType("FuncResetRank"), false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasFuncInitRank :: postAction " + RcvdStr); //JsonData jsUInfo = JsonMapper.ToObject (RcvdStr); // 0 : 성공, -1 : 코인부족, -2 : 기타 에러 Ag.LogString("WasFuncInitRank :: postAction " + Result.result); messageAction(Result.result); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasItemUpdate :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 232); SendStr = SendStr.AddKeyValue("formatVersion", 1); SendStr = SendStr.AddArray("item", itemObj.WAS.ToJsonStr()); // JsonMapper.ToJson (itemObj.WAS), false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasItemUpdate :: postAction " + RcvdStr); //JsonData jsUInfo = JsonMapper.ToObject (RcvdStr); // 0 : 성공, -1 : 코인부족, -2 : 기타 에러 Ag.LogString("WasItemUse :: postAction " + Result.result); messageAction(Result.result); }; SendAndRciv(); }
//public bool IsAvailable; // _////////////////////////////////////////////////_ _____ Main _____ Methods _____ public override void SendAction() { Ag.LogString("WasTeamCheck :: SendAction ... Started ... "); //StNet.TeamNameAvailable = null; SendStr = ""; SendStr = SendStr.AddKeyValue("serviceCode", 111); SendStr = SendStr.AddKeyValue("userID", ID); SendStr = SendStr.AddKeyValue("formatVersion", 1); SendStr = SendStr.AddKeyValue("teamName", TgtName, false); SendStr = SendStr.AddParen(); postAction = () => { messageAction(Result.result); // 0 : 성공, -1 : 중복, -2 : 허용 불가 이름, 1: 존재하지 않는 사용자 Ag.LogString(Result.ToString() + " , TeamNameChk : " + Result.result); }; SendAndRciv(); }
public override void SendAction() { //AgStt.IsGaming = null; Ag.LogString("WasGameReport :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 502); // AddKeyValue ("serviceCode", 502); //SendStr = SendStr.AddKeyValue ("userID", User.WAS.KkoID); //SendStr = SendStr.AddKeyValue ("key", User.WAS.WasKey); SendStr = SendStr.AddKeyValue("formatVersion", 1); SendStr = SendStr.AddKeyValue("gameSessionKey", User.WAS.GameSessionKey); SendStr = SendStr.AddKeyValue("winner", winnerID); SendStr = SendStr.AddKeyValue("loser", loserID); SendStr = SendStr.AddKeyValue("winPoint", winPo); SendStr = SendStr.AddKeyValue("losePoint", losPo, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasGameReport :: postAction " + RcvdStr); try { rTicketNum = NdObj ["ticketNum"].AsInt; Ag.mySelf.mRewardGold = NdObj ["gold"].AsInt; } catch { " TicketNum Num 0 ".HtLog(); } if (Result.result == 0) { if (!User.myRank.WAS.Parse(NdObj["myRank"])) { Ag.LogIntenseWord("GameReport.. Parse myRank ERROR "); } //usr.mRankObj.WAS = JsonMapper.ToObject<WasRank>(jsUInfo["myRank"].ToJson()); } // 0 : 성공, -1 : 코인부족, -2 : 기타 에러 Ag.LogString("WasGameReport :: postAction result : " + Result.result + " ticket : " + rTicketNum + " RewardGold " + Ag.mySelf.mRewardGold); messageAction(Result.result); }; SendAndRciv(); }