public COrder(CEncodedObjectInputBufferI bin) { bin.nextTag(TAG); Dictionary <string, string> A = bin.getAttributes(); ordType_ = A[ORDTYPE]; value_ = EncodeUtil.parseInt(A[VALUE]); if (A.ContainsKey(UTYPE)) { utype_ = A[UTYPE]; } flag_ = EncodeUtil.fromBoolString(A[FLAG]); ugid_ = EncodeUtil.parseUInt(A[UGID]); useEmbark_ = EncodeUtil.fromBoolString(A[UGID]); bin.firstChild(); bin.nextTag(LOCS); if (bin.hasChildren()) { bin.firstChild(); locs_ = new List <CLoc>(); while (!bin.reachedEndTag(LOCS)) { CLoc l = CLoc.fromKey(bin.getObjectText(LOC)); locs_.Add(l); } } bin.endTag(LOCS); bin.endTag(TAG); }
public CSupplyRoute(CEncodedObjectInputBufferI bin) { bin.nextTag(TAG); Dictionary <string, string> A = bin.getAttributes(); rid_ = EncodeUtil.parseUInt(A[RID]); source_ = EncodeUtil.parseUInt(A[SOURCE]); sourceLoc_ = CLoc.fromKey(A[SOURCE_LOC]); dest_ = EncodeUtil.parseUInt(A[DEST]); destLoc_ = CLoc.fromKey(A[DEST_LOC]); inTransit_ = EncodeUtil.parseUInt(A[IN_TRANSIT]); nextArrival_ = EncodeUtil.parseUInt(A[NEXT_ARRIVAL]); bin.endTag(TAG); }
public CProductionReportData(CEncodedObjectInputBufferI bin) { bin.nextTag(TAG); Dictionary <string, string> A = bin.getAttributes(); value_ = EncodeUtil.parseInt(A[VALUE]); pkey_ = EncodeUtil.parseUInt(A[PKEY]); ckey_ = EncodeUtil.parseUInt(A[CKEY]); rtype_ = bin.getObjectText(RTYPE); if (bin.thisTag() == REPORT) { report_ = bin.getObjectText(REPORT); } else { report_ = null; } if (bin.thisTag() == PTYPE) { ptype_ = bin.getObjectText(PTYPE); } else { ptype_ = null; } if (bin.thisTag() == CTYPE) { ctype_ = bin.getObjectText(CTYPE); } else { ctype_ = null; } if (bin.thisTag() == LOC) { loc_ = CLoc.fromKey(bin.getObjectText(LOC)); } else { loc_ = null; } bin.endTag(TAG); }
protected CUnit(Dictionary <string, string> A, CEncodedObjectInputBufferI bin, AIQueryI query) { utype_ = A[UTYPE]; loc_ = CLoc.fromKey(A[LOC]); gid_ = EncodeUtil.parseUInt(A[GID]); owner_ = EncodeUtil.parseInt(A[OWNER]); stackLayer_ = EncodeUtil.parseUInt(A[STACKLAYER]); level_ = A[LEVEL]; landed_ = EncodeUtil.fromBoolString(A[LANDED]); inReentry_ = EncodeUtil.fromBoolString(A[INREENTRY]); host_ = EncodeUtil.parseUInt(A[HOST]); turn_ = EncodeUtil.parseInt(A[TURN]); rmvr_ = EncodeUtil.parseInt(A[RMVR]); rmvs_ = EncodeUtil.parseInt(A[RMVS]); fired_ = EncodeUtil.fromBoolString(A[FIRED]); armed_ = EncodeUtil.fromBoolString(A[ARMED]); dmg_ = EncodeUtil.parseInt(A[DMG]); shortFuel_ = EncodeUtil.fromBoolString(A[SHORTFUEL]); sawEnemy_ = EncodeUtil.fromBoolString(A[SAWENEMY]); dugIn_ = EncodeUtil.fromBoolString(A[DUGIN]); experience_ = EncodeUtil.parseUInt(A[EXPERIENCE]); readiness_ = A[READINESS]; expType_ = A[EXPTYPE]; name_ = bin.getObjectText(NAME); bin.nextTag(CUNITS); if (bin.hasChildren()) { bin.firstChild(); while (!bin.reachedEndTag(CUNITS)) { bin.nextTag(CUNIT); Dictionary <string, string> D = bin.getAttributes(); uint u = EncodeUtil.parseUInt(D[CUNITID]); cunits_.Add(u); bin.endTag(CUNIT); } } bin.endTag(CUNITS); ord_ = new COrder(bin); entry_ = query.unitQuery(utype_); }