/// <summary> /// Remodel <see cref="Residence"/>, this is called directly from a packet hander. /// </summary> public void Remodel(Player player, ClientHousingRemodel housingRemodel) { if (!residence.CanModifyResidence(player.CharacterId)) { throw new InvalidPacketValueException(); } // TODO }
public static void HandleHousingRemodel(WorldSession session, ClientHousingRemodel housingRemodel) { if (!(session.Player.Map is ResidenceMap residenceMap)) { throw new InvalidPacketValueException(); } residenceMap.Remodel(session.Player, housingRemodel); }
public static void HandleHousingRemodel(WorldSession session, ClientHousingRemodel housingRemodel) { if (session.Player.Map is not ResidenceMapInstance residenceMap) { throw new InvalidPacketValueException(); } residenceMap.Remodel(housingRemodel.TargetResidence, session.Player, housingRemodel); }
/// <summary> /// Remodel <see cref="Residence"/>, this is called directly from a packet hander. /// </summary> public void Remodel(Player player, ClientHousingRemodel housingRemodel) { if (!residence.CanModifyResidence(player.CharacterId)) { throw new InvalidPacketValueException(); } if (housingRemodel.RoofDecorInfoId != 0u) { residence.Roof = (ushort)housingRemodel.RoofDecorInfoId; } if (housingRemodel.WallpaperId != 0u) { residence.Wallpaper = (ushort)housingRemodel.WallpaperId; } if (housingRemodel.EntrywayDecorInfoId != 0u) { residence.Entryway = (ushort)housingRemodel.EntrywayDecorInfoId; } if (housingRemodel.DoorDecorInfoId != 0u) { residence.Door = (ushort)housingRemodel.DoorDecorInfoId; } if (housingRemodel.SkyWallpaperId != 0u) { residence.Sky = (ushort)housingRemodel.SkyWallpaperId; } if (housingRemodel.MusicId != 0u) { residence.Music = (ushort)housingRemodel.MusicId; } if (housingRemodel.GroundWallpaperId != 0u) { residence.Ground = (ushort)housingRemodel.GroundWallpaperId; } SendHousingProperties(); }