public override void LoadFromJSON(LogicJSONObject jsonRoot) { LogicJSONObject baseObject = jsonRoot.GetJSONObject("base"); if (baseObject == null) { Debugger.Error("Replay LogicPlaceAlliancePortalCommand load failed! Base missing!"); } base.LoadFromJSON(baseObject); LogicJSONNumber dataNumber = jsonRoot.GetJSONNumber("d"); if (dataNumber != null) { this.m_data = (LogicAlliancePortalData)LogicDataTables.GetDataById(dataNumber.GetIntValue(), LogicDataType.ALLIANCE_PORTAL); } if (this.m_data == null) { Debugger.Error("Replay LogicPlaceAlliancePortalCommand load failed! Data is NULL!"); } this.m_x = jsonRoot.GetJSONNumber("x").GetIntValue(); this.m_y = jsonRoot.GetJSONNumber("y").GetIntValue(); }
public override void Decode(ByteStream stream) { this.m_x = stream.ReadInt(); this.m_y = stream.ReadInt(); this.m_data = (LogicAlliancePortalData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.ALLIANCE_PORTAL); base.Decode(stream); }
public override void Destruct() { base.Destruct(); this.m_data = null; }