public bool ParseExchange(JSONNode pData, AmUser pEnemy) { Ag.LogStartWithStr(3, "NodeGameObject :: Parse Exchange "); pEnemy = EnAmUser = new AmUser(); Ag.LogString(" >>> User <<< " + pData ["User"].ToString()); JSONNode user = JSON.Parse(pData ["User"].ToString().RecoverFromDodgeStr(" ` ", true)); EnAmUser.WAS.KkoID = user ["KkoID"]; EnAmUser.WAS.KkoNick = user ["KkoNick"]; EnAmUser.KkoNickEncode = user ["KNickEncode"]; Ag.LogString(" >>> " + EnAmUser.WAS.KkoID + EnAmUser.WAS.KkoNick); Ag.LogString(" >>> Item <<< " + pData ["arrItemWas"]); JSONNode arrItm = JSON.Parse(pData ["arrItemWas"].ToString().RecoverFromDodgeStr(" ` ", true)); for (int k = 0; k < arrItm.Count; k++) { Ag.LogString(arrItm [k].ToString()); try { AmItem itm = new AmItem(); itm.ParseFrom(arrItm [k]); itm.ShowMyself(); EnAmUser.arrItem.Add(itm); } catch { Ag.LogString(" :: >>> Item Parse !!!!! E R R O R !!!!! ", pWichtig: true); } } Ag.LogNewLine(2); Ag.LogString(" >>> Uniform <<< " + pData ["arrUniform"]); arrItm = JSON.Parse(pData ["arrUniform"].ToString().RecoverFromDodgeStr(" ` ", true)); for (int k = 0; k < arrItm.Count; k++) { Ag.LogString(arrItm [k].ToString()); AmUniform nUni = new AmUniform(); EnAmUser.arrUniform.Add(nUni); try { nUni.Parse(arrItm [k]); nUni.WasParseColorStringToKickKeepObj(); } catch { Ag.LogString(" :: >>> ParseColorInfo !!!!! E R R O R !!!!! ", pWichtig: true); } } Ag.LogString("NodeGameObject :: Parse Exchange >>>>> >>>>> "); Ag.LogIntense(5, false); return(true); }
public bool ParseItem(JSONNode pData) { Ag.LogStartWithStr(1, " [< AmUserNet.cs >] <<<<< ParseItem >>>>> >> " + pData.Count); pData.ToString().HtLog(); arrItem.Clear(); try { for (int k = 0; k < pData.Count; k++) { AmItem aObj = new AmItem(); aObj.ParseFrom(pData [k]); //aObj.WAS = JsonMapper.ToObject<WasItem> (pData [k].ToJson ()); aObj.WAS.ShowMyself(); arrItem.Add(aObj); } (" [< AmUserNet.cs >] <<<<< ParseItem >>>>> >> arr.Count " + arrItem.Count).HtLog(); } catch { Ag.LogIntenseWord(" [< AmUserNet.cs >] Parse <<<<< ParseItem >>>>> E R R O R :: "); return(false); } return(true); }