/// <summary> /// Crate all placed <see cref="Decor"/>, this is called directly from a packet hander. /// </summary> public void CrateAllDecor(Player player) { if (!residence.CanModifyResidence(player.CharacterId)) { throw new InvalidPacketValueException(); } var housingResidenceDecor = new ServerHousingResidenceDecor(); foreach (Decor decor in residence.GetPlacedDecor()) { decor.Crate(); housingResidenceDecor.DecorData.Add(new ServerHousingResidenceDecor.Decor { RealmId = WorldServer.RealmId, DecorId = decor.DecorId, ResidenceId = residence.Id, DecorType = decor.Type, Scale = decor.Scale, Position = decor.Position, Rotation = decor.Rotation, DecorInfoId = decor.Entry.Id }); } EnqueueToAll(housingResidenceDecor); }