public DictRafflePool(uint id, int raffleCount, DictRaffleAwardArray pool, string poolString) { this.id = id; this.raffleCount = raffleCount; this.pool = pool; this.poolString = poolString; }
public string poolString; //奖池,为填写方便,暂时用id|weight|prob, 格式的字符串填写, 服务器load后手动解析成RaffleAwardArray格式 public DictRafflePool() { id = 0; raffleCount = 0; pool = new DictRaffleAwardArray(); poolString = ""; }
public int __decode(byte[] binData, ref int pos) { this.id = Proto4z.BaseProtoObject.decodeUI32(binData, ref pos); this.raffleCount = Proto4z.BaseProtoObject.decodeI32(binData, ref pos); this.pool = new DictRaffleAwardArray(); this.pool.__decode(binData, ref pos); this.poolString = Proto4z.BaseProtoObject.decodeString(binData, ref pos); return pos; }
public System.Collections.Generic.List<byte> __encode() { var data = new System.Collections.Generic.List<byte>(); data.AddRange(Proto4z.BaseProtoObject.encodeUI32(this.id)); data.AddRange(Proto4z.BaseProtoObject.encodeI32(this.raffleCount)); if (this.pool == null) this.pool = new DictRaffleAwardArray(); data.AddRange(this.pool.__encode()); data.AddRange(Proto4z.BaseProtoObject.encodeString(this.poolString)); return data; }