fix: Converts houses/deeds to serialization generator (#2288)
### Summary * Converts HouseDeeds to serialization generator * Converts Houses to serialization generator * Converts ContestHouses to serialization generator
This commit is contained in:
parent
d984961b38
commit
771cb50919
63 changed files with 1872 additions and 2528 deletions
22
Projects/UOContent/Migrations/Server.Multis.BaseContestHouse.v1.json
generated
Normal file
22
Projects/UOContent/Migrations/Server.Multis.BaseContestHouse.v1.json
generated
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"type": "Server.Multis.BaseContestHouse",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "HouseType",
|
||||||
|
"type": "Server.Multis.ContestHouseType",
|
||||||
|
"rule": "EnumMigrationRule"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Fixtures",
|
||||||
|
"type": "System.Collections.Generic.List\u003CServer.Item\u003E",
|
||||||
|
"rule": "ListMigrationRule",
|
||||||
|
"ruleArguments": [
|
||||||
|
"@Tidy",
|
||||||
|
"@CanBeNull",
|
||||||
|
"Server.Item",
|
||||||
|
"SerializableInterfaceMigrationRule"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Camelot.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Camelot.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Camelot"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.CasaMoga.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.CasaMoga.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.CasaMoga"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Castle.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Castle.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Castle"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.CastleOfOceania.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.CastleOfOceania.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.CastleOfOceania"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.DarkthornKeep.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.DarkthornKeep.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.DarkthornKeep"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.BrickHouseDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.BrickHouseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.BrickHouseDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.CastleDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.CastleDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.CastleDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.FieldStoneHouseDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.FieldStoneHouseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.FieldStoneHouseDeed"
|
||||||
|
}
|
||||||
22
Projects/UOContent/Migrations/Server.Multis.Deeds.HouseDeed.v0.json
generated
Normal file
22
Projects/UOContent/Migrations/Server.Multis.Deeds.HouseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.HouseDeed",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "Offset",
|
||||||
|
"type": "Server.Point3D",
|
||||||
|
"rule": "PrimitiveUOTypeMigrationRule",
|
||||||
|
"ruleArguments": [
|
||||||
|
"Point3D"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "MultiID",
|
||||||
|
"type": "int",
|
||||||
|
"rule": "PrimitiveTypeMigrationRule",
|
||||||
|
"ruleArguments": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.KeepDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.KeepDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.KeepDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.LargeMarbleDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.LargeMarbleDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.LargeMarbleDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.LargePatioDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.LargePatioDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.LargePatioDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.LogCabinDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.LogCabinDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.LogCabinDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.MarbleWorkshopDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.MarbleWorkshopDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.MarbleWorkshopDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.SandstonePatioDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.SandstonePatioDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.SandstonePatioDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.SmallBrickHouseDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.SmallBrickHouseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.SmallBrickHouseDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.SmallTowerDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.SmallTowerDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.SmallTowerDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.StonePlasterHouseDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.StonePlasterHouseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.StonePlasterHouseDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.StoneWorkshopDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.StoneWorkshopDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.StoneWorkshopDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.ThatchedRoofCottageDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.ThatchedRoofCottageDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.ThatchedRoofCottageDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.TowerDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.TowerDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.TowerDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.TwoStoryStonePlasterHouseDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.TwoStoryStonePlasterHouseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.TwoStoryStonePlasterHouseDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.TwoStoryWoodPlasterHouseDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.TwoStoryWoodPlasterHouseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.TwoStoryWoodPlasterHouseDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.VillaDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.VillaDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.VillaDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.WoodHouseDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.WoodHouseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.WoodHouseDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Deeds.WoodPlasterHouseDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Deeds.WoodPlasterHouseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Deeds.WoodPlasterHouseDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.ElsaCastle.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.ElsaCastle.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.ElsaCastle"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.FeudalCastle.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.FeudalCastle.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.FeudalCastle"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.GothicRoseCastle.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.GothicRoseCastle.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.GothicRoseCastle"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.GrimswindSisters.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.GrimswindSisters.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.GrimswindSisters"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.GuildHouse.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.GuildHouse.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.GuildHouse"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Keep.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Keep.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Keep"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.LacrimaeInCaelo.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.LacrimaeInCaelo.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.LacrimaeInCaelo"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.LargeMarbleHouse.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.LargeMarbleHouse.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.LargeMarbleHouse"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.LargePatioHouse.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.LargePatioHouse.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.LargePatioHouse"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.LogCabin.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.LogCabin.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.LogCabin"
|
||||||
|
}
|
||||||
11
Projects/UOContent/Migrations/Server.Multis.MovingCrate.v0.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Multis.MovingCrate.v0.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.MovingCrate",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "House",
|
||||||
|
"type": "Server.Multis.BaseHouse",
|
||||||
|
"rule": "SerializableInterfaceMigrationRule"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.OkinawaSweetDreamCastle.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.OkinawaSweetDreamCastle.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.OkinawaSweetDreamCastle"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.PackingBox.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.PackingBox.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.PackingBox"
|
||||||
|
}
|
||||||
15
Projects/UOContent/Migrations/Server.Multis.PreviewHouse.v0.json
generated
Normal file
15
Projects/UOContent/Migrations/Server.Multis.PreviewHouse.v0.json
generated
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.PreviewHouse",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "PreviewComponents",
|
||||||
|
"type": "System.Collections.Generic.List\u003CServer.Item\u003E",
|
||||||
|
"rule": "ListMigrationRule",
|
||||||
|
"ruleArguments": [
|
||||||
|
"Server.Item",
|
||||||
|
"SerializableInterfaceMigrationRule"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.RobinsNest.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.RobinsNest.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.RobinsNest"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.RobinsRoost.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.RobinsRoost.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.RobinsRoost"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.SandStonePatio.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.SandStonePatio.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.SandStonePatio"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.SandalwoodKeep.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.SandalwoodKeep.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.SandalwoodKeep"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.SmallOldHouse.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.SmallOldHouse.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.SmallOldHouse"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.SmallShop.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.SmallShop.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.SmallShop"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.SmallTower.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.SmallTower.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.SmallTower"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Spires.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Spires.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Spires"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.TheSandstoneCastle.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.TheSandstoneCastle.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.TheSandstoneCastle"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.Tower.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.Tower.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.Tower"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.TraditionalKeep.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.TraditionalKeep.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.TraditionalKeep"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.TrinsicKeep.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.TrinsicKeep.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.TrinsicKeep"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.TwoStoryHouse.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.TwoStoryHouse.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.TwoStoryHouse"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.TwoStoryVilla.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.TwoStoryVilla.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.TwoStoryVilla"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Multis.VillaCrowley.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Multis.VillaCrowley.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Multis.VillaCrowley"
|
||||||
|
}
|
||||||
|
|
@ -1,842 +1,283 @@
|
||||||
using Server.Regions;
|
using ModernUO.Serialization;
|
||||||
using Server.Targeting;
|
|
||||||
|
|
||||||
namespace Server.Multis.Deeds
|
namespace Server.Multis.Deeds;
|
||||||
{
|
|
||||||
public class HousePlacementTarget : MultiTarget
|
|
||||||
{
|
|
||||||
private readonly HouseDeed m_Deed;
|
|
||||||
|
|
||||||
public HousePlacementTarget(HouseDeed deed) : base(deed.MultiID, deed.Offset) => m_Deed = deed;
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class StonePlasterHouseDeed : HouseDeed
|
||||||
protected override void OnTarget(Mobile from, object o)
|
|
||||||
{
|
|
||||||
if (o is not IPoint3D ip)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Point3D p = ip switch
|
|
||||||
{
|
|
||||||
Item item => item.GetWorldTop(),
|
|
||||||
Mobile m => m.Location,
|
|
||||||
_ => new Point3D(ip)
|
|
||||||
};
|
|
||||||
|
|
||||||
var reg = Region.Find(p, from.Map);
|
|
||||||
|
|
||||||
if (from.AccessLevel >= AccessLevel.GameMaster || reg.AllowHousing(from, p))
|
|
||||||
{
|
|
||||||
m_Deed.OnPlacement(from, p);
|
|
||||||
}
|
|
||||||
else if (reg.IsPartOf<TempNoHousingRegion>())
|
|
||||||
{
|
|
||||||
// Lord British has decreed a 'no build' period, thus you cannot build this house at this time.
|
|
||||||
from.SendLocalizedMessage(501270);
|
|
||||||
}
|
|
||||||
else if (reg.IsPartOf<TreasureRegion>() || reg.IsPartOf<HouseRegion>())
|
|
||||||
{
|
|
||||||
// The house could not be created here. Either something is blocking the house, or the house would not be on valid terrain.
|
|
||||||
from.SendLocalizedMessage(1043287);
|
|
||||||
}
|
|
||||||
else if (reg.IsPartOf<HouseRaffleRegion>())
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1150493); // You must have a deed for this plot of land in order to build here.
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(501265); // Housing can not be created in this area.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract class HouseDeed : Item
|
|
||||||
{
|
|
||||||
public HouseDeed(int id, Point3D offset) : base(0x14F0)
|
|
||||||
{
|
|
||||||
LootType = LootType.Newbied;
|
|
||||||
|
|
||||||
MultiID = id;
|
|
||||||
Offset = offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HouseDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
|
||||||
public int MultiID { get; set; }
|
|
||||||
|
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
|
||||||
public Point3D Offset { get; set; }
|
|
||||||
|
|
||||||
public virtual Direction HouseDirection => Direction.South;
|
|
||||||
|
|
||||||
public abstract Rectangle2D[] Area { get; }
|
|
||||||
|
|
||||||
public override double DefaultWeight => 1.0;
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(1); // version
|
|
||||||
|
|
||||||
writer.Write(Offset);
|
|
||||||
|
|
||||||
writer.Write(MultiID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
switch (version)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
Offset = reader.ReadPoint3D();
|
|
||||||
|
|
||||||
goto case 0;
|
|
||||||
}
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
MultiID = reader.ReadInt();
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Weight == 0.0)
|
|
||||||
{
|
|
||||||
Weight = 1.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDoubleClick(Mobile from)
|
|
||||||
{
|
|
||||||
if (!IsChildOf(from.Backpack))
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
|
||||||
}
|
|
||||||
else if (from.AccessLevel < AccessLevel.GameMaster && BaseHouse.HasAccountHouse(from))
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(501271); // You already own a house, you may not place another!
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* House placement cancellation could result in a
|
|
||||||
* 60 second delay in the return of your deed.
|
|
||||||
*/
|
|
||||||
from.SendLocalizedMessage(1010433);
|
|
||||||
|
|
||||||
from.Target = new HousePlacementTarget(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract BaseHouse GetHouse(Mobile owner);
|
|
||||||
|
|
||||||
public void OnPlacement(Mobile from, Point3D p)
|
|
||||||
{
|
|
||||||
if (Deleted)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!IsChildOf(from.Backpack))
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
|
||||||
}
|
|
||||||
else if (from.AccessLevel < AccessLevel.GameMaster && BaseHouse.HasAccountHouse(from))
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(501271); // You already own a house, you may not place another!
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var center = new Point3D(p.X - Offset.X, p.Y - Offset.Y, p.Z - Offset.Z);
|
|
||||||
var res = HousePlacement.Check(from, MultiID, center, out var toMove, HouseDirection);
|
|
||||||
|
|
||||||
switch (res)
|
|
||||||
{
|
|
||||||
case HousePlacementResult.Valid:
|
|
||||||
{
|
|
||||||
var house = GetHouse(from);
|
|
||||||
house.MoveToWorld(center, from.Map);
|
|
||||||
Delete();
|
|
||||||
|
|
||||||
for (var i = 0; i < toMove.Count; ++i)
|
|
||||||
{
|
|
||||||
object o = toMove[i];
|
|
||||||
|
|
||||||
if (o is Mobile mobile)
|
|
||||||
{
|
|
||||||
mobile.Location = house.BanLocation;
|
|
||||||
}
|
|
||||||
else if (o is Item item)
|
|
||||||
{
|
|
||||||
item.Location = house.BanLocation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case HousePlacementResult.BadItem:
|
|
||||||
case HousePlacementResult.BadLand:
|
|
||||||
case HousePlacementResult.BadStatic:
|
|
||||||
case HousePlacementResult.BadRegionHidden:
|
|
||||||
{
|
|
||||||
// The house could not be created here. Either something is blocking the house, or the house would not be on valid terrain.
|
|
||||||
from.SendLocalizedMessage(1043287);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case HousePlacementResult.NoSurface:
|
|
||||||
{
|
|
||||||
from.SendMessage(
|
|
||||||
"The house could not be created here. Part of the foundation would not be on any surface."
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case HousePlacementResult.BadRegion:
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(501265); // Housing cannot be created in this area.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case HousePlacementResult.BadRegionTemp:
|
|
||||||
{
|
|
||||||
// Lord British has decreed a 'no build' period, thus you cannot build this house at this time.
|
|
||||||
from.SendLocalizedMessage(501270);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case HousePlacementResult.BadRegionRaffle:
|
|
||||||
{
|
|
||||||
// You must have a deed for this plot of land in order to build here.
|
|
||||||
from.SendLocalizedMessage(1150493);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class StonePlasterHouseDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public StonePlasterHouseDeed() : base(0x64, new Point3D(0, 4, 0))
|
public StonePlasterHouseDeed() : base(0x64, new Point3D(0, 4, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public StonePlasterHouseDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041211;
|
public override int LabelNumber => 1041211;
|
||||||
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x64);
|
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x64);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class FieldStoneHouseDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class FieldStoneHouseDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public FieldStoneHouseDeed() : base(0x66, new Point3D(0, 4, 0))
|
public FieldStoneHouseDeed() : base(0x66, new Point3D(0, 4, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public FieldStoneHouseDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041212;
|
public override int LabelNumber => 1041212;
|
||||||
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x66);
|
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x66);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class SmallBrickHouseDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SmallBrickHouseDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public SmallBrickHouseDeed() : base(0x68, new Point3D(0, 4, 0))
|
public SmallBrickHouseDeed() : base(0x68, new Point3D(0, 4, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public SmallBrickHouseDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041213;
|
public override int LabelNumber => 1041213;
|
||||||
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x68);
|
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x68);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class WoodHouseDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class WoodHouseDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public WoodHouseDeed() : base(0x6A, new Point3D(0, 4, 0))
|
public WoodHouseDeed() : base(0x6A, new Point3D(0, 4, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public WoodHouseDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041214;
|
public override int LabelNumber => 1041214;
|
||||||
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x6A);
|
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x6A);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class WoodPlasterHouseDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class WoodPlasterHouseDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public WoodPlasterHouseDeed() : base(0x6C, new Point3D(0, 4, 0))
|
public WoodPlasterHouseDeed() : base(0x6C, new Point3D(0, 4, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public WoodPlasterHouseDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041215;
|
public override int LabelNumber => 1041215;
|
||||||
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x6C);
|
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x6C);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class ThatchedRoofCottageDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ThatchedRoofCottageDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public ThatchedRoofCottageDeed() : base(0x6E, new Point3D(0, 4, 0))
|
public ThatchedRoofCottageDeed() : base(0x6E, new Point3D(0, 4, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public ThatchedRoofCottageDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041216;
|
public override int LabelNumber => 1041216;
|
||||||
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
public override Rectangle2D[] Area => SmallOldHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x6E);
|
public override BaseHouse GetHouse(Mobile owner) => new SmallOldHouse(owner, 0x6E);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class BrickHouseDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class BrickHouseDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public BrickHouseDeed() : base(0x74, new Point3D(-1, 7, 0))
|
public BrickHouseDeed() : base(0x74, new Point3D(-1, 7, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public BrickHouseDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041219;
|
public override int LabelNumber => 1041219;
|
||||||
public override Rectangle2D[] Area => GuildHouse.AreaArray;
|
public override Rectangle2D[] Area => GuildHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new GuildHouse(owner);
|
public override BaseHouse GetHouse(Mobile owner) => new GuildHouse(owner);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class TwoStoryWoodPlasterHouseDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TwoStoryWoodPlasterHouseDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public TwoStoryWoodPlasterHouseDeed() : base(0x76, new Point3D(-3, 7, 0))
|
public TwoStoryWoodPlasterHouseDeed() : base(0x76, new Point3D(-3, 7, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public TwoStoryWoodPlasterHouseDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041220;
|
public override int LabelNumber => 1041220;
|
||||||
public override Rectangle2D[] Area => TwoStoryHouse.AreaArray;
|
public override Rectangle2D[] Area => TwoStoryHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new TwoStoryHouse(owner, 0x76);
|
public override BaseHouse GetHouse(Mobile owner) => new TwoStoryHouse(owner, 0x76);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class TwoStoryStonePlasterHouseDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TwoStoryStonePlasterHouseDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public TwoStoryStonePlasterHouseDeed() : base(0x78, new Point3D(-3, 7, 0))
|
public TwoStoryStonePlasterHouseDeed() : base(0x78, new Point3D(-3, 7, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public TwoStoryStonePlasterHouseDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041221;
|
public override int LabelNumber => 1041221;
|
||||||
public override Rectangle2D[] Area => TwoStoryHouse.AreaArray;
|
public override Rectangle2D[] Area => TwoStoryHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new TwoStoryHouse(owner, 0x78);
|
public override BaseHouse GetHouse(Mobile owner) => new TwoStoryHouse(owner, 0x78);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class TowerDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TowerDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public TowerDeed() : base(0x7A, new Point3D(0, 7, 0))
|
public TowerDeed() : base(0x7A, new Point3D(0, 7, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public TowerDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041222;
|
public override int LabelNumber => 1041222;
|
||||||
public override Rectangle2D[] Area => Tower.AreaArray;
|
public override Rectangle2D[] Area => Tower.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new Tower(owner);
|
public override BaseHouse GetHouse(Mobile owner) => new Tower(owner);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class KeepDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class KeepDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public KeepDeed() : base(0x7C, new Point3D(0, 11, 0))
|
public KeepDeed() : base(0x7C, new Point3D(0, 11, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public KeepDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041223;
|
public override int LabelNumber => 1041223;
|
||||||
public override Rectangle2D[] Area => Keep.AreaArray;
|
public override Rectangle2D[] Area => Keep.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new Keep(owner);
|
public override BaseHouse GetHouse(Mobile owner) => new Keep(owner);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class CastleDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CastleDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public CastleDeed() : base(0x7E, new Point3D(0, 16, 0))
|
public CastleDeed() : base(0x7E, new Point3D(0, 16, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public CastleDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041224;
|
public override int LabelNumber => 1041224;
|
||||||
public override Rectangle2D[] Area => Castle.AreaArray;
|
public override Rectangle2D[] Area => Castle.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new Castle(owner);
|
public override BaseHouse GetHouse(Mobile owner) => new Castle(owner);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class LargePatioDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class LargePatioDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public LargePatioDeed() : base(0x8C, new Point3D(-4, 7, 0))
|
public LargePatioDeed() : base(0x8C, new Point3D(-4, 7, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public LargePatioDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041231;
|
public override int LabelNumber => 1041231;
|
||||||
public override Rectangle2D[] Area => LargePatioHouse.AreaArray;
|
public override Rectangle2D[] Area => LargePatioHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new LargePatioHouse(owner);
|
public override BaseHouse GetHouse(Mobile owner) => new LargePatioHouse(owner);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class LargeMarbleDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class LargeMarbleDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public LargeMarbleDeed() : base(0x96, new Point3D(-4, 7, 0))
|
public LargeMarbleDeed() : base(0x96, new Point3D(-4, 7, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public LargeMarbleDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041236;
|
public override int LabelNumber => 1041236;
|
||||||
public override Rectangle2D[] Area => LargeMarbleHouse.AreaArray;
|
public override Rectangle2D[] Area => LargeMarbleHouse.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new LargeMarbleHouse(owner);
|
public override BaseHouse GetHouse(Mobile owner) => new LargeMarbleHouse(owner);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class SmallTowerDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SmallTowerDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public SmallTowerDeed() : base(0x98, new Point3D(3, 4, 0))
|
public SmallTowerDeed() : base(0x98, new Point3D(3, 4, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public SmallTowerDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041237;
|
public override int LabelNumber => 1041237;
|
||||||
public override Rectangle2D[] Area => SmallTower.AreaArray;
|
public override Rectangle2D[] Area => SmallTower.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new SmallTower(owner);
|
public override BaseHouse GetHouse(Mobile owner) => new SmallTower(owner);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class LogCabinDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class LogCabinDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public LogCabinDeed() : base(0x9A, new Point3D(1, 6, 0))
|
public LogCabinDeed() : base(0x9A, new Point3D(1, 6, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public LogCabinDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041238;
|
public override int LabelNumber => 1041238;
|
||||||
public override Rectangle2D[] Area => LogCabin.AreaArray;
|
public override Rectangle2D[] Area => LogCabin.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new LogCabin(owner);
|
public override BaseHouse GetHouse(Mobile owner) => new LogCabin(owner);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class SandstonePatioDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SandstonePatioDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public SandstonePatioDeed() : base(0x9C, new Point3D(-1, 4, 0))
|
public SandstonePatioDeed() : base(0x9C, new Point3D(-1, 4, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public SandstonePatioDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041239;
|
public override int LabelNumber => 1041239;
|
||||||
public override Rectangle2D[] Area => SandStonePatio.AreaArray;
|
public override Rectangle2D[] Area => SandStonePatio.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new SandStonePatio(owner);
|
public override BaseHouse GetHouse(Mobile owner) => new SandStonePatio(owner);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class VillaDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class VillaDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public VillaDeed() : base(0x9E, new Point3D(3, 6, 0))
|
public VillaDeed() : base(0x9E, new Point3D(3, 6, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public VillaDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041240;
|
public override int LabelNumber => 1041240;
|
||||||
public override Rectangle2D[] Area => TwoStoryVilla.AreaArray;
|
public override Rectangle2D[] Area => TwoStoryVilla.AreaArray;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new TwoStoryVilla(owner);
|
public override BaseHouse GetHouse(Mobile owner) => new TwoStoryVilla(owner);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class StoneWorkshopDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class StoneWorkshopDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public StoneWorkshopDeed() : base(0xA0, new Point3D(-1, 4, 0))
|
public StoneWorkshopDeed() : base(0xA0, new Point3D(-1, 4, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public StoneWorkshopDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041241;
|
public override int LabelNumber => 1041241;
|
||||||
public override Rectangle2D[] Area => SmallShop.AreaArray2;
|
public override Rectangle2D[] Area => SmallShop.AreaArray2;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new SmallShop(owner, 0xA0);
|
public override BaseHouse GetHouse(Mobile owner) => new SmallShop(owner, 0xA0);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class MarbleWorkshopDeed : HouseDeed
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MarbleWorkshopDeed : HouseDeed
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public MarbleWorkshopDeed() : base(0xA2, new Point3D(-1, 4, 0))
|
public MarbleWorkshopDeed() : base(0xA2, new Point3D(-1, 4, 0))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public MarbleWorkshopDeed(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1041242;
|
public override int LabelNumber => 1041242;
|
||||||
public override Rectangle2D[] Area => SmallShop.AreaArray1;
|
public override Rectangle2D[] Area => SmallShop.AreaArray1;
|
||||||
|
|
||||||
public override BaseHouse GetHouse(Mobile owner) => new SmallShop(owner, 0xA2);
|
public override BaseHouse GetHouse(Mobile owner) => new SmallShop(owner, 0xA2);
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
133
Projects/UOContent/Multis/HouseDeed.cs
Normal file
133
Projects/UOContent/Multis/HouseDeed.cs
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
using ModernUO.Serialization;
|
||||||
|
|
||||||
|
namespace Server.Multis.Deeds;
|
||||||
|
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
|
public abstract partial class HouseDeed : Item
|
||||||
|
{
|
||||||
|
[SerializableField(0)]
|
||||||
|
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||||
|
private Point3D _offset;
|
||||||
|
|
||||||
|
[SerializableField(1)]
|
||||||
|
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||||
|
private int _multiID;
|
||||||
|
|
||||||
|
public HouseDeed(int id, Point3D offset) : base(0x14F0)
|
||||||
|
{
|
||||||
|
LootType = LootType.Newbied;
|
||||||
|
|
||||||
|
_multiID = id;
|
||||||
|
_offset = offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual Direction HouseDirection => Direction.South;
|
||||||
|
|
||||||
|
public abstract Rectangle2D[] Area { get; }
|
||||||
|
|
||||||
|
public override double DefaultWeight => 1.0;
|
||||||
|
|
||||||
|
public override void OnDoubleClick(Mobile from)
|
||||||
|
{
|
||||||
|
if (!IsChildOf(from.Backpack))
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||||
|
}
|
||||||
|
else if (from.AccessLevel < AccessLevel.GameMaster && BaseHouse.HasAccountHouse(from))
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(501271); // You already own a house, you may not place another!
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* House placement cancellation could result in a
|
||||||
|
* 60 second delay in the return of your deed.
|
||||||
|
*/
|
||||||
|
from.SendLocalizedMessage(1010433);
|
||||||
|
|
||||||
|
from.Target = new HousePlacementTarget(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract BaseHouse GetHouse(Mobile owner);
|
||||||
|
|
||||||
|
public void OnPlacement(Mobile from, Point3D p)
|
||||||
|
{
|
||||||
|
if (Deleted)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsChildOf(from.Backpack))
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||||
|
}
|
||||||
|
else if (from.AccessLevel < AccessLevel.GameMaster && BaseHouse.HasAccountHouse(from))
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(501271); // You already own a house, you may not place another!
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var center = new Point3D(p.X - Offset.X, p.Y - Offset.Y, p.Z - Offset.Z);
|
||||||
|
var res = HousePlacement.Check(from, MultiID, center, out var toMove, HouseDirection);
|
||||||
|
|
||||||
|
switch (res)
|
||||||
|
{
|
||||||
|
case HousePlacementResult.Valid:
|
||||||
|
{
|
||||||
|
var house = GetHouse(from);
|
||||||
|
house.MoveToWorld(center, from.Map);
|
||||||
|
Delete();
|
||||||
|
|
||||||
|
for (var i = 0; i < toMove.Count; ++i)
|
||||||
|
{
|
||||||
|
var o = toMove[i];
|
||||||
|
|
||||||
|
if (o is Mobile mobile)
|
||||||
|
{
|
||||||
|
mobile.Location = house.BanLocation;
|
||||||
|
}
|
||||||
|
else if (o is Item item)
|
||||||
|
{
|
||||||
|
item.Location = house.BanLocation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case HousePlacementResult.BadItem:
|
||||||
|
case HousePlacementResult.BadLand:
|
||||||
|
case HousePlacementResult.BadStatic:
|
||||||
|
case HousePlacementResult.BadRegionHidden:
|
||||||
|
{
|
||||||
|
// The house could not be created here. Either something is blocking the house, or the house would not be on valid terrain.
|
||||||
|
from.SendLocalizedMessage(1043287);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case HousePlacementResult.NoSurface:
|
||||||
|
{
|
||||||
|
from.SendMessage(
|
||||||
|
"The house could not be created here. Part of the foundation would not be on any surface."
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case HousePlacementResult.BadRegion:
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(501265); // Housing cannot be created in this area.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case HousePlacementResult.BadRegionTemp:
|
||||||
|
{
|
||||||
|
// Lord British has decreed a 'no build' period, thus you cannot build this house at this time.
|
||||||
|
from.SendLocalizedMessage(501270);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case HousePlacementResult.BadRegionRaffle:
|
||||||
|
{
|
||||||
|
// You must have a deed for this plot of land in order to build here.
|
||||||
|
from.SendLocalizedMessage(1150493);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
51
Projects/UOContent/Multis/HousePlacementTarget.cs
Normal file
51
Projects/UOContent/Multis/HousePlacementTarget.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
using Server.Regions;
|
||||||
|
using Server.Targeting;
|
||||||
|
|
||||||
|
namespace Server.Multis.Deeds;
|
||||||
|
|
||||||
|
public class HousePlacementTarget : MultiTarget
|
||||||
|
{
|
||||||
|
private readonly HouseDeed _deed;
|
||||||
|
|
||||||
|
public HousePlacementTarget(HouseDeed deed) : base(deed.MultiID, deed.Offset) => _deed = deed;
|
||||||
|
|
||||||
|
protected override void OnTarget(Mobile from, object o)
|
||||||
|
{
|
||||||
|
if (o is not IPoint3D ip)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Point3D p = ip switch
|
||||||
|
{
|
||||||
|
Item item => item.GetWorldTop(),
|
||||||
|
Mobile m => m.Location,
|
||||||
|
_ => new Point3D(ip)
|
||||||
|
};
|
||||||
|
|
||||||
|
var reg = Region.Find(p, from.Map);
|
||||||
|
|
||||||
|
if (from.AccessLevel >= AccessLevel.GameMaster || reg.AllowHousing(from, p))
|
||||||
|
{
|
||||||
|
_deed.OnPlacement(from, p);
|
||||||
|
}
|
||||||
|
else if (reg.IsPartOf<TempNoHousingRegion>())
|
||||||
|
{
|
||||||
|
// Lord British has decreed a 'no build' period, thus you cannot build this house at this time.
|
||||||
|
from.SendLocalizedMessage(501270);
|
||||||
|
}
|
||||||
|
else if (reg.IsPartOf<TreasureRegion>() || reg.IsPartOf<HouseRegion>())
|
||||||
|
{
|
||||||
|
// The house could not be created here. Either something is blocking the house, or the house would not be on valid terrain.
|
||||||
|
from.SendLocalizedMessage(1043287);
|
||||||
|
}
|
||||||
|
else if (reg.IsPartOf<HouseRaffleRegion>())
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(1150493); // You must have a deed for this plot of land in order to build here.
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(501265); // Housing can not be created in this area.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Logging;
|
using Server.Logging;
|
||||||
|
|
||||||
namespace Server.Multis
|
namespace Server.Multis;
|
||||||
{
|
|
||||||
public enum ContestHouseType
|
public enum ContestHouseType
|
||||||
{
|
{
|
||||||
Keep,
|
Keep,
|
||||||
|
|
@ -12,25 +13,27 @@ namespace Server.Multis
|
||||||
Other
|
Other
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BaseContestHouse : BaseHouse
|
[SerializationGenerator(1, false)]
|
||||||
|
public partial class BaseContestHouse : BaseHouse
|
||||||
{
|
{
|
||||||
private static readonly ILogger logger = LogFactory.GetLogger(typeof(BaseContestHouse));
|
private static readonly ILogger logger = LogFactory.GetLogger(typeof(BaseContestHouse));
|
||||||
|
|
||||||
|
[SerializableField(0)]
|
||||||
|
private ContestHouseType _houseType;
|
||||||
|
|
||||||
|
[Tidy]
|
||||||
|
[CanBeNull]
|
||||||
|
[SerializableField(1, setter: "private")]
|
||||||
|
private List<Item> _fixtures;
|
||||||
|
|
||||||
public BaseContestHouse(ContestHouseType type, int multiID, Mobile owner, int maxLockDown, int maxSecure)
|
public BaseContestHouse(ContestHouseType type, int multiID, Mobile owner, int maxLockDown, int maxSecure)
|
||||||
: base(multiID, owner, maxLockDown, maxSecure)
|
: base(multiID, owner, maxLockDown, maxSecure)
|
||||||
{
|
{
|
||||||
HouseType = type;
|
_houseType = type;
|
||||||
|
|
||||||
AutoAddFixtures();
|
AutoAddFixtures();
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseContestHouse(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public ContestHouseType HouseType { get; set; }
|
|
||||||
public List<Item> Fixtures { get; private set; }
|
|
||||||
|
|
||||||
public virtual int SignPostID => 9;
|
public virtual int SignPostID => 9;
|
||||||
|
|
||||||
public override Point3D BaseBanLocation => new(
|
public override Point3D BaseBanLocation => new(
|
||||||
|
|
@ -132,8 +135,7 @@ namespace Server.Multis
|
||||||
|
|
||||||
public void AddFixture(Item item)
|
public void AddFixture(Item item)
|
||||||
{
|
{
|
||||||
Fixtures ??= new List<Item>();
|
Fixtures ??= [];
|
||||||
|
|
||||||
Fixtures.Add(item);
|
Fixtures.Add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -149,8 +151,9 @@ namespace Server.Multis
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Item fixture in Fixtures)
|
for (var i = 0; i < Fixtures.Count; i++)
|
||||||
{
|
{
|
||||||
|
var fixture = Fixtures[i];
|
||||||
if (fixture is HouseTeleporter fix && fix.Location == p)
|
if (fixture is HouseTeleporter fix && fix.Location == p)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -199,8 +202,9 @@ namespace Server.Multis
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var door in Doors)
|
for (var i = 0; i < Doors.Count; i++)
|
||||||
{
|
{
|
||||||
|
var door = Doors[i];
|
||||||
foreach (var check in Doors.Where(d => d != door))
|
foreach (var check in Doors.Where(d => d != door))
|
||||||
{
|
{
|
||||||
if (door.InRange(check.Location, 1))
|
if (door.InRange(check.Location, 1))
|
||||||
|
|
@ -234,29 +238,8 @@ namespace Server.Multis
|
||||||
teleporters.Clear();
|
teleporters.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
private void Deserialize(IGenericReader reader, int version)
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
|
|
||||||
writer.Write((int)HouseType);
|
|
||||||
|
|
||||||
if (Fixtures != null)
|
|
||||||
{
|
|
||||||
Fixtures.Tidy();
|
|
||||||
writer.Write(Fixtures);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writer.Write(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
HouseType = (ContestHouseType)reader.ReadInt();
|
HouseType = (ContestHouseType)reader.ReadInt();
|
||||||
|
|
||||||
var count = reader.ReadInt();
|
var count = reader.ReadInt();
|
||||||
|
|
@ -268,9 +251,10 @@ namespace Server.Multis
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TrinsicKeep : BaseContestHouse
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class TrinsicKeep : BaseContestHouse
|
||||||
{
|
{
|
||||||
public static Rectangle2D[] AreaArray =
|
public static readonly Rectangle2D[] AreaArray =
|
||||||
{
|
{
|
||||||
new(-11, -11, 23, 23), new(-10, 13, 6, 1),
|
new(-11, -11, 23, 23), new(-10, 13, 6, 1),
|
||||||
new(-2, 13, 6, 1), new(6, 13, 7, 1)
|
new(-2, 13, 6, 1), new(6, 13, 7, 1)
|
||||||
|
|
@ -282,28 +266,13 @@ namespace Server.Multis
|
||||||
SetSign(-11, 13, 7, false);
|
SetSign(-11, 13, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TrinsicKeep(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Rectangle2D[] Area => AreaArray;
|
public override Rectangle2D[] Area => AreaArray;
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class GothicRoseCastle : BaseContestHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray =
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GothicRoseCastle : BaseContestHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray =
|
|
||||||
{
|
{
|
||||||
new(-15, -15, 31, 31),
|
new(-15, -15, 31, 31),
|
||||||
new(-14, 16, 11, 1),
|
new(-14, 16, 11, 1),
|
||||||
|
|
@ -317,101 +286,43 @@ namespace Server.Multis
|
||||||
SetSign(-15, 16, 7, false);
|
SetSign(-15, 16, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GothicRoseCastle(Serial serial) : base(serial)
|
public override Rectangle2D[] Area => AreaArray;
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class ElsaCastle : BaseContestHouse
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ElsaCastle : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public ElsaCastle(Mobile owner)
|
public ElsaCastle(Mobile owner)
|
||||||
: base(ContestHouseType.Castle, 0x1480, owner, 3281, 28)
|
: base(ContestHouseType.Castle, 0x1480, owner, 3281, 28)
|
||||||
{
|
{
|
||||||
SetSign(-15, 16, 7, false);
|
SetSign(-15, 16, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ElsaCastle(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class Spires : BaseContestHouse
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Spires : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public Spires(Mobile owner)
|
public Spires(Mobile owner)
|
||||||
: base(ContestHouseType.Castle, 0x1481, owner, 3281, 28)
|
: base(ContestHouseType.Castle, 0x1481, owner, 3281, 28)
|
||||||
{
|
{
|
||||||
SetSign(-15, 16, 7, false);
|
SetSign(-15, 16, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Spires(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class CastleOfOceania : BaseContestHouse
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CastleOfOceania : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public CastleOfOceania(Mobile owner)
|
public CastleOfOceania(Mobile owner)
|
||||||
: base(ContestHouseType.Castle, 0x1482, owner, 3281, 28)
|
: base(ContestHouseType.Castle, 0x1482, owner, 3281, 28)
|
||||||
{
|
{
|
||||||
SetSign(-15, 16, 7, false);
|
SetSign(-15, 16, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CastleOfOceania(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class FeudalCastle : BaseContestHouse
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
public static readonly Rectangle2D[] AreaArray =
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class FeudalCastle : BaseContestHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray =
|
|
||||||
{
|
{
|
||||||
new(-15, -15, 31, 31),
|
new(-15, -15, 31, 31),
|
||||||
new(5, 16, 1, 1),
|
new(5, 16, 1, 1),
|
||||||
|
|
@ -425,53 +336,23 @@ namespace Server.Multis
|
||||||
SetSign(-15, 16, 7, true);
|
SetSign(-15, 16, 7, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FeudalCastle(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Rectangle2D[] Area => AreaArray;
|
public override Rectangle2D[] Area => AreaArray;
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class RobinsNest : BaseContestHouse
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class RobinsNest : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public RobinsNest(Mobile owner)
|
public RobinsNest(Mobile owner)
|
||||||
: base(ContestHouseType.Keep, 0x1484, owner, 2113, 18)
|
: base(ContestHouseType.Keep, 0x1484, owner, 2113, 18)
|
||||||
{
|
{
|
||||||
SetSign(-11, 13, 7, false);
|
SetSign(-11, 13, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RobinsNest(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class TraditionalKeep : BaseContestHouse
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
public static readonly Rectangle2D[] AreaArray =
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TraditionalKeep : BaseContestHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray =
|
|
||||||
{
|
{
|
||||||
new(-11, -11, 23, 23),
|
new(-11, -11, 23, 23),
|
||||||
new(-10, 13, 6, 1),
|
new(-10, 13, 6, 1),
|
||||||
|
|
@ -485,76 +366,31 @@ namespace Server.Multis
|
||||||
SetSign(-11, 13, 7, false);
|
SetSign(-11, 13, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TraditionalKeep(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Rectangle2D[] Area => AreaArray;
|
public override Rectangle2D[] Area => AreaArray;
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class VillaCrowley : BaseContestHouse
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class VillaCrowley : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public VillaCrowley(Mobile owner)
|
public VillaCrowley(Mobile owner)
|
||||||
: base(ContestHouseType.Keep, 0x1486, owner, 2113, 18)
|
: base(ContestHouseType.Keep, 0x1486, owner, 2113, 18)
|
||||||
{
|
{
|
||||||
SetSign(-11, 13, 7, true);
|
SetSign(-11, 13, 7, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public VillaCrowley(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class DarkthornKeep : BaseContestHouse
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DarkthornKeep : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public DarkthornKeep(Mobile owner)
|
public DarkthornKeep(Mobile owner)
|
||||||
: base(ContestHouseType.Keep, 0x1487, owner, 2113, 18)
|
: base(ContestHouseType.Keep, 0x1487, owner, 2113, 18)
|
||||||
{
|
{
|
||||||
SetSign(-11, 13, 7, false);
|
SetSign(-11, 13, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DarkthornKeep(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class SandalwoodKeep : BaseContestHouse
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SandalwoodKeep : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public SandalwoodKeep(Mobile owner)
|
public SandalwoodKeep(Mobile owner)
|
||||||
: base(ContestHouseType.Keep, 0x1488, owner, 2113, 18)
|
: base(ContestHouseType.Keep, 0x1488, owner, 2113, 18)
|
||||||
|
|
@ -562,128 +398,53 @@ namespace Server.Multis
|
||||||
SetSign(-11, 13, 7, true);
|
SetSign(-11, 13, 7, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SandalwoodKeep(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int SignPostID => 353;
|
public override int SignPostID => 353;
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class CasaMoga : BaseContestHouse
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CasaMoga : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public CasaMoga(Mobile owner)
|
public CasaMoga(Mobile owner)
|
||||||
: base(ContestHouseType.Keep, 0x1489, owner, 2113, 18)
|
: base(ContestHouseType.Keep, 0x1489, owner, 2113, 18)
|
||||||
{
|
{
|
||||||
SetSign(-11, 13, 7, false);
|
SetSign(-11, 13, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CasaMoga(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class RobinsRoost : BaseContestHouse
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class RobinsRoost : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public RobinsRoost(Mobile owner)
|
public RobinsRoost(Mobile owner)
|
||||||
: base(ContestHouseType.Castle, 0x148A, owner, 3281, 28)
|
: base(ContestHouseType.Castle, 0x148A, owner, 3281, 28)
|
||||||
{
|
{
|
||||||
SetSign(-15, 16, 7, true);
|
SetSign(-15, 16, 7, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RobinsRoost(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class Camelot : BaseContestHouse
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Camelot : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public Camelot(Mobile owner)
|
public Camelot(Mobile owner)
|
||||||
: base(ContestHouseType.Castle, 0x148B, owner, 3281, 28)
|
: base(ContestHouseType.Castle, 0x148B, owner, 3281, 28)
|
||||||
{
|
{
|
||||||
SetSign(-15, 16, 7, false);
|
SetSign(-15, 16, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Camelot(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class LacrimaeInCaelo : BaseContestHouse
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class LacrimaeInCaelo : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public LacrimaeInCaelo(Mobile owner)
|
public LacrimaeInCaelo(Mobile owner)
|
||||||
: base(ContestHouseType.Castle, 0x148C, owner, 3281, 28)
|
: base(ContestHouseType.Castle, 0x148C, owner, 3281, 28)
|
||||||
{
|
{
|
||||||
SetSign(-15, 16, 7, false);
|
SetSign(-15, 16, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LacrimaeInCaelo(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class OkinawaSweetDreamCastle : BaseContestHouse
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
public static readonly Rectangle2D[] AreaArray =
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class OkinawaSweetDreamCastle : BaseContestHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray =
|
|
||||||
{
|
{
|
||||||
new(-15, -15, 31, 31),
|
new(-15, -15, 31, 31),
|
||||||
new(-14, 16, 6, 1),
|
new(-14, 16, 6, 1),
|
||||||
|
|
@ -696,54 +457,22 @@ namespace Server.Multis
|
||||||
{
|
{
|
||||||
SetSign(-15, 16, 7, true);
|
SetSign(-15, 16, 7, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public OkinawaSweetDreamCastle(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Rectangle2D[] Area => AreaArray;
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class TheSandstoneCastle : BaseContestHouse
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TheSandstoneCastle : BaseContestHouse
|
|
||||||
{
|
{
|
||||||
public TheSandstoneCastle(Mobile owner)
|
public TheSandstoneCastle(Mobile owner)
|
||||||
: base(ContestHouseType.Castle, 0x148E, owner, 3281, 28)
|
: base(ContestHouseType.Castle, 0x148E, owner, 3281, 28)
|
||||||
{
|
{
|
||||||
SetSign(-15, 16, 7, true);
|
SetSign(-15, 16, 7, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TheSandstoneCastle(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class GrimswindSisters : BaseContestHouse
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
public static readonly Rectangle2D[] AreaArray =
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GrimswindSisters : BaseContestHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray =
|
|
||||||
{
|
{
|
||||||
new(-15, -15, 31, 31),
|
new(-15, -15, 31, 31),
|
||||||
new(-14, 16, 9, 1),
|
new(-14, 16, 9, 1),
|
||||||
|
|
@ -757,22 +486,5 @@ namespace Server.Multis
|
||||||
SetSign(-15, 16, 7, false);
|
SetSign(-15, 16, 7, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GrimswindSisters(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Rectangle2D[] Area => AreaArray;
|
public override Rectangle2D[] Area => AreaArray;
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Multis.Deeds;
|
using Server.Multis.Deeds;
|
||||||
|
|
||||||
namespace Server.Multis
|
namespace Server.Multis;
|
||||||
|
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class SmallOldHouse : BaseHouse
|
||||||
{
|
{
|
||||||
public class SmallOldHouse : BaseHouse
|
public static readonly Rectangle2D[] AreaArray = [new(-3, -3, 7, 7), new(-1, 4, 3, 1)];
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray = { new(-3, -3, 7, 7), new(-1, 4, 3, 1) };
|
|
||||||
|
|
||||||
public SmallOldHouse(Mobile owner, int id) : base(id, owner, 425, 3)
|
public SmallOldHouse(Mobile owner, int id) : base(id, owner, 425, 3)
|
||||||
{
|
{
|
||||||
|
|
@ -16,10 +18,6 @@ namespace Server.Multis
|
||||||
SetSign(2, 4, 5);
|
SetSign(2, 4, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SmallOldHouse(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Rectangle2D[] Area => AreaArray;
|
public override Rectangle2D[] Area => AreaArray;
|
||||||
public override Point3D BaseBanLocation => new(2, 4, 0);
|
public override Point3D BaseBanLocation => new(2, 4, 0);
|
||||||
|
|
||||||
|
|
@ -36,27 +34,15 @@ namespace Server.Multis
|
||||||
0x68 => new SmallBrickHouseDeed(),
|
0x68 => new SmallBrickHouseDeed(),
|
||||||
0x6A => new WoodHouseDeed(),
|
0x6A => new WoodHouseDeed(),
|
||||||
0x6C => new WoodPlasterHouseDeed(),
|
0x6C => new WoodPlasterHouseDeed(),
|
||||||
0x6E => new ThatchedRoofCottageDeed(),
|
|
||||||
_ => new ThatchedRoofCottageDeed()
|
_ => new ThatchedRoofCottageDeed()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class GuildHouse : BaseHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray = [new(-7, -7, 14, 14), new(-2, 7, 4, 1)];
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GuildHouse : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray = { new(-7, -7, 14, 14), new(-2, 7, 4, 1) };
|
|
||||||
|
|
||||||
public GuildHouse(Mobile owner) : base(0x74, owner, 1100, 8)
|
public GuildHouse(Mobile owner) : base(0x74, owner, 1100, 8)
|
||||||
{
|
{
|
||||||
|
|
@ -70,10 +56,6 @@ namespace Server.Multis
|
||||||
AddSouthDoor(3, -1, 7);
|
AddSouthDoor(3, -1, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GuildHouse(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DefaultPrice => 144500;
|
public override int DefaultPrice => 144500;
|
||||||
|
|
||||||
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.ThreeStoryFoundations[20];
|
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.ThreeStoryFoundations[20];
|
||||||
|
|
@ -84,24 +66,13 @@ namespace Server.Multis
|
||||||
public override Point3D BaseBanLocation => new(4, 8, 0);
|
public override Point3D BaseBanLocation => new(4, 8, 0);
|
||||||
|
|
||||||
public override HouseDeed GetDeed() => new BrickHouseDeed();
|
public override HouseDeed GetDeed() => new BrickHouseDeed();
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class TwoStoryHouse : BaseHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray =
|
||||||
var version = reader.ReadInt();
|
[new(-7, 0, 14, 7), new(-7, -7, 9, 7), new(-4, 7, 4, 1)];
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TwoStoryHouse : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray =
|
|
||||||
{ new(-7, 0, 14, 7), new(-7, -7, 9, 7), new(-4, 7, 4, 1) };
|
|
||||||
|
|
||||||
public TwoStoryHouse(Mobile owner, int id) : base(id, owner, 1370, 10)
|
public TwoStoryHouse(Mobile owner, int id) : base(id, owner, 1370, 10)
|
||||||
{
|
{
|
||||||
|
|
@ -115,10 +86,6 @@ namespace Server.Multis
|
||||||
AddSouthDoor(id == 0x76 ? -2 : -3, 0, 27);
|
AddSouthDoor(id == 0x76 ? -2 : -3, 0, 27);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TwoStoryHouse(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Rectangle2D[] Area => AreaArray;
|
public override Rectangle2D[] Area => AreaArray;
|
||||||
public override Point3D BaseBanLocation => new(2, 8, 0);
|
public override Point3D BaseBanLocation => new(2, 8, 0);
|
||||||
|
|
||||||
|
|
@ -129,31 +96,19 @@ namespace Server.Multis
|
||||||
return ItemID switch
|
return ItemID switch
|
||||||
{
|
{
|
||||||
0x76 => new TwoStoryWoodPlasterHouseDeed(),
|
0x76 => new TwoStoryWoodPlasterHouseDeed(),
|
||||||
0x78 => new TwoStoryStonePlasterHouseDeed(),
|
|
||||||
_ => new TwoStoryStonePlasterHouseDeed()
|
_ => new TwoStoryStonePlasterHouseDeed()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class Tower : BaseHouse
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Tower : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray =
|
|
||||||
{
|
{
|
||||||
|
public static readonly Rectangle2D[] AreaArray =
|
||||||
|
[
|
||||||
new(-7, -7, 16, 14), new(-1, 7, 4, 2), new(-11, 0, 4, 7),
|
new(-7, -7, 16, 14), new(-1, 7, 4, 2), new(-11, 0, 4, 7),
|
||||||
new(9, 0, 4, 7)
|
new(9, 0, 4, 7)
|
||||||
};
|
];
|
||||||
|
|
||||||
public Tower(Mobile owner) : base(0x7A, owner, 2119, 15)
|
public Tower(Mobile owner) : base(0x7A, owner, 2119, 15)
|
||||||
{
|
{
|
||||||
|
|
@ -168,10 +123,6 @@ namespace Server.Multis
|
||||||
AddEastDoor(false, 1, 4, 46);
|
AddEastDoor(false, 1, 4, 46);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Tower(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DefaultPrice => 433200;
|
public override int DefaultPrice => 433200;
|
||||||
|
|
||||||
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.ThreeStoryFoundations[37];
|
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.ThreeStoryFoundations[37];
|
||||||
|
|
@ -181,28 +132,17 @@ namespace Server.Multis
|
||||||
public override Point3D BaseBanLocation => new(5, 8, 0);
|
public override Point3D BaseBanLocation => new(5, 8, 0);
|
||||||
|
|
||||||
public override HouseDeed GetDeed() => new TowerDeed();
|
public override HouseDeed GetDeed() => new TowerDeed();
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class Keep : BaseHouse // warning: ODD shape!
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Keep : BaseHouse // warning: ODD shape!
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray =
|
|
||||||
{
|
{
|
||||||
|
public static readonly Rectangle2D[] AreaArray =
|
||||||
|
[
|
||||||
new(-11, -11, 7, 8), new(-11, 5, 7, 8), new(6, -11, 7, 8),
|
new(-11, -11, 7, 8), new(-11, 5, 7, 8), new(6, -11, 7, 8),
|
||||||
new(6, 5, 7, 8), new(-9, -3, 5, 8), new(6, -3, 5, 8),
|
new(6, 5, 7, 8), new(-9, -3, 5, 8), new(6, -3, 5, 8),
|
||||||
new(-4, -9, 10, 20), new(-1, 11, 4, 1)
|
new(-4, -9, 10, 20), new(-1, 11, 4, 1)
|
||||||
};
|
];
|
||||||
|
|
||||||
public Keep(Mobile owner) : base(0x7C, owner, 2625, 18)
|
public Keep(Mobile owner) : base(0x7C, owner, 2625, 18)
|
||||||
{
|
{
|
||||||
|
|
@ -213,33 +153,18 @@ namespace Server.Multis
|
||||||
SetSign(5, 12, 16);
|
SetSign(5, 12, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Keep(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DefaultPrice => 665200;
|
public override int DefaultPrice => 665200;
|
||||||
|
|
||||||
public override Rectangle2D[] Area => AreaArray;
|
public override Rectangle2D[] Area => AreaArray;
|
||||||
public override Point3D BaseBanLocation => new(5, 13, 0);
|
public override Point3D BaseBanLocation => new(5, 13, 0);
|
||||||
|
|
||||||
public override HouseDeed GetDeed() => new KeepDeed();
|
public override HouseDeed GetDeed() => new KeepDeed();
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class Castle : BaseHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray = [new(-15, -15, 31, 31), new(-1, 16, 4, 1)];
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Castle : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray = { new(-15, -15, 31, 31), new(-1, 16, 4, 1) };
|
|
||||||
|
|
||||||
public Castle(Mobile owner) : base(0x7E, owner, 4076, 28)
|
public Castle(Mobile owner) : base(0x7E, owner, 4076, 28)
|
||||||
{
|
{
|
||||||
|
|
@ -254,33 +179,18 @@ namespace Server.Multis
|
||||||
AddSouthDoors(false, -1, -11, 6, false);
|
AddSouthDoors(false, -1, -11, 6, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Castle(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DefaultPrice => 1022800;
|
public override int DefaultPrice => 1022800;
|
||||||
|
|
||||||
public override Rectangle2D[] Area => AreaArray;
|
public override Rectangle2D[] Area => AreaArray;
|
||||||
public override Point3D BaseBanLocation => new(5, 17, 0);
|
public override Point3D BaseBanLocation => new(5, 17, 0);
|
||||||
|
|
||||||
public override HouseDeed GetDeed() => new CastleDeed();
|
public override HouseDeed GetDeed() => new CastleDeed();
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class LargePatioHouse : BaseHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray = [new(-7, -7, 15, 14), new(-5, 7, 4, 1)];
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class LargePatioHouse : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray = { new(-7, -7, 15, 14), new(-5, 7, 4, 1) };
|
|
||||||
|
|
||||||
public LargePatioHouse(Mobile owner) : base(0x8C, owner, 1100, 8)
|
public LargePatioHouse(Mobile owner) : base(0x8C, owner, 1100, 8)
|
||||||
{
|
{
|
||||||
|
|
@ -295,10 +205,6 @@ namespace Server.Multis
|
||||||
AddSouthDoor(4, -1, 7);
|
AddSouthDoor(4, -1, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LargePatioHouse(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DefaultPrice => 152800;
|
public override int DefaultPrice => 152800;
|
||||||
|
|
||||||
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.ThreeStoryFoundations[29];
|
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.ThreeStoryFoundations[29];
|
||||||
|
|
@ -308,23 +214,12 @@ namespace Server.Multis
|
||||||
public override Point3D BaseBanLocation => new(1, 8, 0);
|
public override Point3D BaseBanLocation => new(1, 8, 0);
|
||||||
|
|
||||||
public override HouseDeed GetDeed() => new LargePatioDeed();
|
public override HouseDeed GetDeed() => new LargePatioDeed();
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class LargeMarbleHouse : BaseHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray = [new(-7, -7, 15, 14), new(-6, 7, 6, 1)];
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class LargeMarbleHouse : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray = { new(-7, -7, 15, 14), new(-6, 7, 6, 1) };
|
|
||||||
|
|
||||||
public LargeMarbleHouse(Mobile owner) : base(0x96, owner, 1370, 10)
|
public LargeMarbleHouse(Mobile owner) : base(0x96, owner, 1370, 10)
|
||||||
{
|
{
|
||||||
|
|
@ -335,10 +230,6 @@ namespace Server.Multis
|
||||||
SetSign(1, 8, 11);
|
SetSign(1, 8, 11);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LargeMarbleHouse(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DefaultPrice => 192000;
|
public override int DefaultPrice => 192000;
|
||||||
|
|
||||||
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.ThreeStoryFoundations[29];
|
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.ThreeStoryFoundations[29];
|
||||||
|
|
@ -348,23 +239,12 @@ namespace Server.Multis
|
||||||
public override Point3D BaseBanLocation => new(1, 8, 0);
|
public override Point3D BaseBanLocation => new(1, 8, 0);
|
||||||
|
|
||||||
public override HouseDeed GetDeed() => new LargeMarbleDeed();
|
public override HouseDeed GetDeed() => new LargeMarbleDeed();
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class SmallTower : BaseHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray = [new(-3, -3, 8, 7), new(2, 4, 3, 1)];
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SmallTower : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray = { new(-3, -3, 8, 7), new(2, 4, 3, 1) };
|
|
||||||
|
|
||||||
public SmallTower(Mobile owner) : base(0x98, owner, 580, 4)
|
public SmallTower(Mobile owner) : base(0x98, owner, 580, 4)
|
||||||
{
|
{
|
||||||
|
|
@ -375,10 +255,6 @@ namespace Server.Multis
|
||||||
SetSign(1, 4, 5);
|
SetSign(1, 4, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SmallTower(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DefaultPrice => 88500;
|
public override int DefaultPrice => 88500;
|
||||||
|
|
||||||
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[6];
|
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[6];
|
||||||
|
|
@ -387,23 +263,12 @@ namespace Server.Multis
|
||||||
public override Point3D BaseBanLocation => new(1, 4, 0);
|
public override Point3D BaseBanLocation => new(1, 4, 0);
|
||||||
|
|
||||||
public override HouseDeed GetDeed() => new SmallTowerDeed();
|
public override HouseDeed GetDeed() => new SmallTowerDeed();
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class LogCabin : BaseHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray = [new(-3, -6, 8, 13)];
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class LogCabin : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray = { new(-3, -6, 8, 13) };
|
|
||||||
|
|
||||||
public LogCabin(Mobile owner) : base(0x9A, owner, 1100, 8)
|
public LogCabin(Mobile owner) : base(0x9A, owner, 1100, 8)
|
||||||
{
|
{
|
||||||
|
|
@ -416,10 +281,6 @@ namespace Server.Multis
|
||||||
AddSouthDoor(1, 0, 29);
|
AddSouthDoor(1, 0, 29);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LogCabin(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DefaultPrice => 97800;
|
public override int DefaultPrice => 97800;
|
||||||
|
|
||||||
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[12];
|
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[12];
|
||||||
|
|
@ -428,23 +289,12 @@ namespace Server.Multis
|
||||||
public override Point3D BaseBanLocation => new(5, 8, 0);
|
public override Point3D BaseBanLocation => new(5, 8, 0);
|
||||||
|
|
||||||
public override HouseDeed GetDeed() => new LogCabinDeed();
|
public override HouseDeed GetDeed() => new LogCabinDeed();
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class SandStonePatio : BaseHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray = [new(-5, -4, 12, 8), new(-2, 4, 3, 1)];
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SandStonePatio : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray = { new(-5, -4, 12, 8), new(-2, 4, 3, 1) };
|
|
||||||
|
|
||||||
public SandStonePatio(Mobile owner) : base(0x9C, owner, 850, 6)
|
public SandStonePatio(Mobile owner) : base(0x9C, owner, 850, 6)
|
||||||
{
|
{
|
||||||
|
|
@ -455,10 +305,6 @@ namespace Server.Multis
|
||||||
SetSign(4, 6, 24);
|
SetSign(4, 6, 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SandStonePatio(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DefaultPrice => 90900;
|
public override int DefaultPrice => 90900;
|
||||||
|
|
||||||
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[35];
|
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[35];
|
||||||
|
|
@ -468,23 +314,12 @@ namespace Server.Multis
|
||||||
public override Point3D BaseBanLocation => new(4, 6, 0);
|
public override Point3D BaseBanLocation => new(4, 6, 0);
|
||||||
|
|
||||||
public override HouseDeed GetDeed() => new SandstonePatioDeed();
|
public override HouseDeed GetDeed() => new SandstonePatioDeed();
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class TwoStoryVilla : BaseHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray = [new(-5, -5, 11, 11), new(2, 6, 4, 1)];
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TwoStoryVilla : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray = { new(-5, -5, 11, 11), new(2, 6, 4, 1) };
|
|
||||||
|
|
||||||
public TwoStoryVilla(Mobile owner) : base(0x9E, owner, 1100, 8)
|
public TwoStoryVilla(Mobile owner) : base(0x9E, owner, 1100, 8)
|
||||||
{
|
{
|
||||||
|
|
@ -498,10 +333,6 @@ namespace Server.Multis
|
||||||
AddSouthDoor(-3, -1, 25);
|
AddSouthDoor(-3, -1, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TwoStoryVilla(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DefaultPrice => 136500;
|
public override int DefaultPrice => 136500;
|
||||||
|
|
||||||
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[31];
|
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[31];
|
||||||
|
|
@ -510,24 +341,13 @@ namespace Server.Multis
|
||||||
public override Point3D BaseBanLocation => new(3, 8, 0);
|
public override Point3D BaseBanLocation => new(3, 8, 0);
|
||||||
|
|
||||||
public override HouseDeed GetDeed() => new VillaDeed();
|
public override HouseDeed GetDeed() => new VillaDeed();
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class SmallShop : BaseHouse
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
public static readonly Rectangle2D[] AreaArray1 = [new(-3, -3, 7, 7), new(-1, 4, 4, 1)];
|
||||||
var version = reader.ReadInt();
|
public static readonly Rectangle2D[] AreaArray2 = [new(-3, -3, 7, 7), new(-2, 4, 3, 1)];
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SmallShop : BaseHouse
|
|
||||||
{
|
|
||||||
public static Rectangle2D[] AreaArray1 = { new(-3, -3, 7, 7), new(-1, 4, 4, 1) };
|
|
||||||
public static Rectangle2D[] AreaArray2 = { new(-3, -3, 7, 7), new(-2, 4, 3, 1) };
|
|
||||||
|
|
||||||
public SmallShop(Mobile owner, int id) : base(id, owner, 425, 3)
|
public SmallShop(Mobile owner, int id) : base(id, owner, 425, 3)
|
||||||
{
|
{
|
||||||
|
|
@ -550,10 +370,6 @@ namespace Server.Multis
|
||||||
SetSign(3, 4, 7 - (id == 0xA2 ? 2 : 0));
|
SetSign(3, 4, 7 - (id == 0xA2 ? 2 : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SmallShop(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Rectangle2D[] Area => ItemID == 0x40A2 ? AreaArray1 : AreaArray2;
|
public override Rectangle2D[] Area => ItemID == 0x40A2 ? AreaArray1 : AreaArray2;
|
||||||
public override Point3D BaseBanLocation => new(3, 4, 0);
|
public override Point3D BaseBanLocation => new(3, 4, 0);
|
||||||
|
|
||||||
|
|
@ -566,21 +382,7 @@ namespace Server.Multis
|
||||||
return ItemID switch
|
return ItemID switch
|
||||||
{
|
{
|
||||||
0xA0 => new StoneWorkshopDeed(),
|
0xA0 => new StoneWorkshopDeed(),
|
||||||
0xA2 => new MarbleWorkshopDeed(),
|
|
||||||
_ => new MarbleWorkshopDeed()
|
_ => new MarbleWorkshopDeed()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,24 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Network;
|
using Server.Network;
|
||||||
|
|
||||||
namespace Server.Multis
|
namespace Server.Multis;
|
||||||
{
|
|
||||||
public class MovingCrate : Container
|
|
||||||
{
|
|
||||||
public static readonly int MaxItemsPerSubcontainer = 20;
|
|
||||||
public static readonly int Rows = 3;
|
|
||||||
public static readonly int Columns = 5;
|
|
||||||
public static readonly int HorizontalSpacing = 25;
|
|
||||||
public static readonly int VerticalSpacing = 25;
|
|
||||||
|
|
||||||
private Timer m_InternalizeTimer;
|
[SerializationGenerator(0)]
|
||||||
|
public partial class MovingCrate : Container
|
||||||
|
{
|
||||||
|
private const int MaxItemsPerSubcontainer = 20;
|
||||||
|
private const int Rows = 3;
|
||||||
|
private const int Columns = 5;
|
||||||
|
private const int HorizontalSpacing = 25;
|
||||||
|
private const int VerticalSpacing = 25;
|
||||||
|
|
||||||
|
private Timer _internalizeTimer;
|
||||||
|
|
||||||
|
[SerializableField(0)]
|
||||||
|
private BaseHouse _house;
|
||||||
|
|
||||||
public MovingCrate(BaseHouse house) : base(0xE3D)
|
public MovingCrate(BaseHouse house) : base(0xE3D)
|
||||||
{
|
{
|
||||||
|
|
@ -23,14 +28,8 @@ namespace Server.Multis
|
||||||
House = house;
|
House = house;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MovingCrate(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1061690; // Packing Crate
|
public override int LabelNumber => 1061690; // Packing Crate
|
||||||
|
|
||||||
public BaseHouse House { get; set; }
|
|
||||||
|
|
||||||
public override int DefaultMaxItems => 0;
|
public override int DefaultMaxItems => 0;
|
||||||
public override int DefaultMaxWeight => 0;
|
public override int DefaultMaxWeight => 0;
|
||||||
|
|
||||||
|
|
@ -176,24 +175,24 @@ namespace Server.Multis
|
||||||
|
|
||||||
public void RestartTimer()
|
public void RestartTimer()
|
||||||
{
|
{
|
||||||
if (m_InternalizeTimer == null)
|
if (_internalizeTimer == null)
|
||||||
{
|
{
|
||||||
m_InternalizeTimer = new InternalizeTimer(this);
|
_internalizeTimer = new InternalizeTimer(this);
|
||||||
m_InternalizeTimer.Start();
|
_internalizeTimer.Start();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_InternalizeTimer.Stop();
|
_internalizeTimer.Stop();
|
||||||
m_InternalizeTimer.Start();
|
_internalizeTimer.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Hide()
|
public void Hide()
|
||||||
{
|
{
|
||||||
if (m_InternalizeTimer != null)
|
if (_internalizeTimer != null)
|
||||||
{
|
{
|
||||||
m_InternalizeTimer.Stop();
|
_internalizeTimer.Stop();
|
||||||
m_InternalizeTimer = null;
|
_internalizeTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var toRemove = new List<Item>();
|
var toRemove = new List<Item>();
|
||||||
|
|
@ -229,26 +228,12 @@ namespace Server.Multis
|
||||||
House.MovingCrate = null;
|
House.MovingCrate = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_InternalizeTimer?.Stop();
|
_internalizeTimer?.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[AfterDeserialization]
|
||||||
|
private void AfterDeserialization()
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.WriteEncodedInt(1);
|
|
||||||
|
|
||||||
writer.Write(House);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadEncodedInt();
|
|
||||||
|
|
||||||
House = reader.ReadEntity<BaseHouse>();
|
|
||||||
|
|
||||||
if (House != null)
|
if (House != null)
|
||||||
{
|
{
|
||||||
House.MovingCrate = this;
|
House.MovingCrate = this;
|
||||||
|
|
@ -258,11 +243,6 @@ namespace Server.Multis
|
||||||
{
|
{
|
||||||
Timer.StartTimer(Delete);
|
Timer.StartTimer(Delete);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version == 0)
|
|
||||||
{
|
|
||||||
MaxItems = -1; // reset to default
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InternalizeTimer : Timer
|
public class InternalizeTimer : Timer
|
||||||
|
|
@ -281,14 +261,11 @@ namespace Server.Multis
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PackingBox : BaseContainer
|
[SerializationGenerator(0)]
|
||||||
|
public partial class PackingBox : BaseContainer
|
||||||
{
|
{
|
||||||
public PackingBox() : base(0x9A8) => Movable = false;
|
public PackingBox() : base(0x9A8) => Movable = false;
|
||||||
|
|
||||||
public PackingBox(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int LabelNumber => 1061690; // Packing Crate
|
public override int LabelNumber => 1061690; // Packing Crate
|
||||||
|
|
||||||
public override int DefaultGumpID => 0x4B;
|
public override int DefaultGumpID => 0x4B;
|
||||||
|
|
@ -323,24 +300,4 @@ namespace Server.Multis
|
||||||
Delete();
|
Delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.WriteEncodedInt(1); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadEncodedInt();
|
|
||||||
|
|
||||||
if (version == 0)
|
|
||||||
{
|
|
||||||
MaxItems = -1; // reset to default
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
|
|
||||||
namespace Server.Multis
|
namespace Server.Multis;
|
||||||
|
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class PreviewHouse : BaseMulti
|
||||||
{
|
{
|
||||||
public class PreviewHouse : BaseMulti
|
[SerializableField(0)]
|
||||||
{
|
private List<Item> _previewComponents;
|
||||||
private List<Item> m_Components;
|
|
||||||
private Timer m_Timer;
|
private Timer _timer;
|
||||||
|
|
||||||
public PreviewHouse(int multiID) : base(multiID)
|
public PreviewHouse(int multiID) : base(multiID)
|
||||||
{
|
{
|
||||||
m_Components = new List<Item>();
|
|
||||||
|
|
||||||
var mcl = Components;
|
var mcl = Components;
|
||||||
|
|
||||||
for (var i = 1; i < mcl.List.Length; ++i)
|
for (var i = 1; i < mcl.List.Length; ++i)
|
||||||
|
|
@ -22,26 +24,22 @@ namespace Server.Multis
|
||||||
if (entry.Flags == 0)
|
if (entry.Flags == 0)
|
||||||
{
|
{
|
||||||
Item item = new Static(entry.ItemId);
|
Item item = new Static(entry.ItemId);
|
||||||
|
|
||||||
item.MoveToWorld(new Point3D(X + entry.OffsetX, Y + entry.OffsetY, Z + entry.OffsetZ), Map);
|
item.MoveToWorld(new Point3D(X + entry.OffsetX, Y + entry.OffsetY, Z + entry.OffsetZ), Map);
|
||||||
|
|
||||||
m_Components.Add(item);
|
_previewComponents ??= [];
|
||||||
|
_previewComponents.Add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Timer = new DecayTimer(this);
|
_timer = new DecayTimer(this);
|
||||||
m_Timer.Start();
|
_timer.Start();
|
||||||
}
|
|
||||||
|
|
||||||
public PreviewHouse(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnLocationChange(Point3D oldLocation)
|
public override void OnLocationChange(Point3D oldLocation)
|
||||||
{
|
{
|
||||||
base.OnLocationChange(oldLocation);
|
base.OnLocationChange(oldLocation);
|
||||||
|
|
||||||
if (m_Components == null)
|
if (_previewComponents == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -50,9 +48,9 @@ namespace Server.Multis
|
||||||
var yOffset = Y - oldLocation.Y;
|
var yOffset = Y - oldLocation.Y;
|
||||||
var zOffset = Z - oldLocation.Z;
|
var zOffset = Z - oldLocation.Z;
|
||||||
|
|
||||||
for (var i = 0; i < m_Components.Count; ++i)
|
for (var i = 0; i < _previewComponents.Count; ++i)
|
||||||
{
|
{
|
||||||
var item = m_Components[i];
|
var item = _previewComponents[i];
|
||||||
|
|
||||||
item.MoveToWorld(new Point3D(item.X + xOffset, item.Y + yOffset, item.Z + zOffset), Map);
|
item.MoveToWorld(new Point3D(item.X + xOffset, item.Y + yOffset, item.Z + zOffset), Map);
|
||||||
}
|
}
|
||||||
|
|
@ -62,16 +60,14 @@ namespace Server.Multis
|
||||||
{
|
{
|
||||||
base.OnMapChange();
|
base.OnMapChange();
|
||||||
|
|
||||||
if (m_Components == null)
|
if (_previewComponents == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < m_Components.Count; ++i)
|
for (var i = 0; i < _previewComponents.Count; ++i)
|
||||||
{
|
{
|
||||||
var item = m_Components[i];
|
_previewComponents[i].Map = Map;
|
||||||
|
|
||||||
item.Map = Map;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -79,69 +75,43 @@ namespace Server.Multis
|
||||||
{
|
{
|
||||||
base.OnDelete();
|
base.OnDelete();
|
||||||
|
|
||||||
if (m_Components == null)
|
if (_previewComponents == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < m_Components.Count; ++i)
|
for (var i = 0; i < _previewComponents.Count; ++i)
|
||||||
{
|
{
|
||||||
var item = m_Components[i];
|
_previewComponents[i]?.Delete();
|
||||||
|
|
||||||
item.Delete();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnAfterDelete()
|
public override void OnAfterDelete()
|
||||||
{
|
{
|
||||||
m_Timer?.Stop();
|
_timer?.Stop();
|
||||||
|
_timer = null;
|
||||||
m_Timer = null;
|
|
||||||
|
|
||||||
base.OnAfterDelete();
|
base.OnAfterDelete();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[AfterDeserialization(false)]
|
||||||
|
private void AfterDeserialization()
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
Delete();
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
|
|
||||||
writer.Write(m_Components);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
switch (version)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
m_Components = reader.ReadEntityList<Item>();
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer.StartTimer(Delete);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DecayTimer : Timer
|
private class DecayTimer : Timer
|
||||||
{
|
{
|
||||||
private readonly Item m_Item;
|
private readonly Item _item;
|
||||||
|
|
||||||
public DecayTimer(Item item) : base(TimeSpan.FromSeconds(20.0))
|
public DecayTimer(Item item) : base(TimeSpan.FromSeconds(20.0))
|
||||||
{
|
{
|
||||||
m_Item = item;
|
_item = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnTick()
|
protected override void OnTick()
|
||||||
{
|
{
|
||||||
m_Item.Delete();
|
_item.Delete();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue