public GameContextSummonsInformation( SpawnInformation spawnInformation, uint wave, EntityLook look, GameFightMinimalStats stats, List <GameContextBasicSpawnInformation> summons) { this.spawnInformation = spawnInformation; this.wave = wave; this.look = look; this.stats = stats; this.summons = summons; }
public virtual void Deserialize(IDataReader reader) { //this.spawnInformation = ProtocolTypeManager.getInstance(SpawnInformation, _id1); this.spawnInformation = ProtocolTypeManager.GetInstance <SpawnInformation>((uint)reader.ReadUShort()); this.spawnInformation.Deserialize(reader); this.wave = (uint)reader.ReadByte(); if (this.wave < 0U) { throw new Exception("Forbidden value (" + (object)this.wave + ") on element of GameContextSummonsInformation.wave."); } this.look = new EntityLook(); this.look.Deserialize(reader); this.stats = ProtocolTypeManager.GetInstance <GameFightMinimalStats>((uint)reader.ReadUShort()); this.stats.Deserialize(reader); uint num = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num; ++index) { GameContextBasicSpawnInformation instance = ProtocolTypeManager.GetInstance <GameContextBasicSpawnInformation>((uint)reader.ReadUShort()); instance.Deserialize(reader); this.summons.Add(instance); } }