@@ -9,24 +9,23 @@ public static class HousingHandler
99 [ Parser ( Opcode . CMSG_HOUSING_DECOR_REQUEST_STORAGE ) ]
1010 public static void HousingDecorRequestStorage ( Packet packet )
1111 {
12- packet . ReadPackedGuid128 ( "BnetAccountID " ) ;
12+ packet . ReadPackedGuid128 ( "BnetAccountGUID " ) ;
1313 }
14-
14+
1515 [ Parser ( Opcode . CMSG_HOUSING_DECOR_DELETE_FROM_STORAGE ) ]
1616 public static void HandleHousingDecorDeleteFromStorage ( Packet packet )
1717 {
18- packet . ReadPackedGuid128 ( "BnetAccountID" ) ;
19- packet . ReadUInt16 ( "CatalogEntryID" ) ;
20- packet . ReadUInt32 ( "Field_10" ) ;
18+ var count = packet . ReadBits ( 5 ) ;
19+ for ( var i = 0 ; i < count ; ++ i )
20+ packet . ReadPackedGuid128 ( "DecorGUID" , i ) ;
2121 }
2222
2323 [ Parser ( Opcode . CMSG_HOUSING_DECOR_DELETE_FROM_STORAGE_BY_ID ) ]
2424 public static void HandleHousingDecorDeleteFromStorageById ( Packet packet )
2525 {
26- packet . ReadUInt16 ( "CatalogEntryID" ) ;
27- packet . ReadUInt16 ( "Field_4" ) ;
26+ packet . ReadUInt32 ( "DecorID" ) ;
2827 }
29-
28+
3029 [ Parser ( Opcode . CMSG_HOUSING_DECOR_SET_DYE_SLOTS ) ]
3130 public static void HousingDecorSetDyeSlots ( Packet packet )
3231 {
@@ -52,7 +51,7 @@ public static void HandleHousingDecorMove(Packet packet)
5251 packet . ReadByte ( "RemovedFlags" ) ;
5352 packet . ReadBit ( "IncludeChildren" ) ;
5453 }
55-
54+
5655 [ Parser ( Opcode . CMSG_HOUSING_DECOR_REMOVE ) ]
5756 public static void HousingDecorRemove ( Packet packet )
5857 {
@@ -63,9 +62,10 @@ public static void HousingDecorRemove(Packet packet)
6362 public static void HousingDecorLock ( Packet packet )
6463 {
6564 packet . ReadPackedGuid128 ( "DecorGUID" ) ;
66- packet . ReadBool ( "Lock" ) ;
65+ packet . ReadBit ( "LockRequest" ) ;
66+ packet . ReadBit ( "IncludeChildren" ) ;
6767 }
68-
68+
6969 [ Parser ( Opcode . CMSG_HOUSING_DECOR_PLACE ) ]
7070 public static void HousingDecorPlace ( Packet packet )
7171 {
@@ -75,54 +75,54 @@ public static void HousingDecorPlace(Packet packet)
7575 packet . ReadSingle ( "Scale" ) ;
7676 packet . ReadPackedGuid128 ( "AttachParentGUID" ) ;
7777 packet . ReadPackedGuid128 ( "RoomGUID" ) ;
78- packet . ReadByte ( "Field_61" ) ;
79- packet . ReadByte ( "Field_62" ) ;
80- packet . ReadInt32 ( "Field_63" ) ;
78+ packet . ReadPackedGuid128 ( "ParentHouseFixtureGUID" ) ;
79+ packet . ReadInt32 ( "PlacedComponentID" ) ;
8180 }
82-
81+
8382 [ Parser ( Opcode . CMSG_HOUSING_DECOR_REDEEM_DEFERRED_DECOR ) ]
8483 public static void HousingDecorRedeemDeferredDecor ( Packet packet )
8584 {
86- packet . ReadUInt32 ( "CatalogEntryID " ) ;
87- packet . ReadUInt32 ( "Field_4 " ) ;
85+ packet . ReadUInt32 ( "DecorID " ) ;
86+ packet . ReadUInt32 ( "TransactionID " ) ;
8887 }
89-
88+
9089 [ Parser ( Opcode . CMSG_HOUSING_GET_PLAYER_PERMISSIONS ) ]
9190 public static void HousingGetPlayerPermission ( Packet packet )
9291 {
93- packet . ReadByte ( "Field_0" ) ;
94- packet . ReadPackedGuid128 ( "HouseGUID" ) ;
92+ var hasHouseGUID = packet . ReadBit ( "HasHouseGUID" ) ;
93+ if ( hasHouseGUID )
94+ packet . ReadPackedGuid128 ( "HouseGUID" ) ;
9595 }
96-
96+
9797 [ Parser ( Opcode . CMSG_HOUSING_ROOM_REMOVE ) ]
9898 public static void HandleHousingRoomRemove ( Packet packet )
9999 {
100100 packet . ReadPackedGuid128 ( "RoomGUID" ) ;
101101 }
102-
102+
103103 [ Parser ( Opcode . CMSG_HOUSING_ROOM_ROTATE ) ]
104104 public static void HousingRoomRotate ( Packet packet )
105105 {
106106 packet . ReadPackedGuid128 ( "RoomGUID" ) ;
107- packet . ReadBool ( "IsLeft ") ;
107+ packet . ReadBit ( "RotateRight ") ;
108108 }
109-
109+
110110 [ Parser ( Opcode . CMSG_HOUSING_SVCS_PLAYER_VIEW_HOUSES_BY_PLAYER ) ]
111111 public static void HandleHousingSvcsPlayerViewHousesByPlayer ( Packet packet )
112112 {
113- packet . ReadPackedGuid128 ( "PlayerGUID " ) ;
113+ packet . ReadPackedGuid128 ( "TargetPlayerGUID " ) ;
114114 }
115-
115+
116116 [ Parser ( Opcode . CMSG_HOUSING_SVCS_GET_POTENTIAL_HOUSE_OWNERS ) ]
117117 public static void HandleHousingSvcsGetPotentialHouseOwners ( Packet packet )
118118 {
119119 packet . ReadPackedGuid128 ( "HouseGUID" ) ;
120120 }
121-
121+
122122 [ Parser ( Opcode . CMSG_HOUSING_SVCS_GET_BNET_FRIEND_NEIGHBORHOODS ) ]
123123 public static void HandleHousingSvcsGetBneFriendNeighborhoods ( Packet packet )
124124 {
125- packet . ReadPackedGuid128 ( "BNetAccountGUID " ) ;
125+ packet . ReadPackedGuid128 ( "FriendBNetAccountGUID " ) ;
126126 }
127127
128128 [ Parser ( Opcode . CMSG_NEIGHBORHOOD_OPEN_CORNERSTONE_UI ) ]
@@ -131,103 +131,105 @@ public static void HandleNeighborhoodOpenCornerstoneUi(Packet packet)
131131 packet . ReadUInt32 ( "PlotID" ) ;
132132 packet . ReadPackedGuid128 ( "CornerstoneGUID" ) ;
133133 }
134-
134+
135135 [ Parser ( Opcode . CMSG_QUERY_NEIGHBORHOOD_INFO ) ]
136136 public static void HandleQueryNeighborhoodInfo ( Packet packet )
137137 {
138138 packet . ReadPackedGuid128 ( "NeighborhoodGUID" ) ;
139139 }
140-
140+
141141 [ Parser ( Opcode . SMSG_NEIGHBORHOOD_PLAYER_ENTER_PLOT ) ]
142142 public static void HandleNeighborhoodPlayerEnterPlot ( Packet packet )
143143 {
144- packet . ReadPackedGuid128 ( "AreaTriggerGuid " ) ;
144+ packet . ReadPackedGuid128 ( "AreaTriggerGUID " ) ;
145145 }
146-
146+
147147 [ Parser ( Opcode . SMSG_HOUSING_GET_CURRENT_HOUSE_INFO_RESPONSE ) ]
148148 public static void HandleHousingGetCurrentHouseInfoResponse ( Packet packet )
149149 {
150150 ReadHouse ( packet , "House" ) ;
151151 packet . ReadByteE < HousingResult > ( "Result" ) ;
152152 }
153-
153+
154154 [ Parser ( Opcode . SMSG_HOUSING_GET_PLAYER_PERMISSIONS_RESPONSE ) ]
155155 public static void HousingGetPlayerPermissionResponse ( Packet packet )
156156 {
157157 packet . ReadPackedGuid128 ( "HouseGUID" ) ;
158158 packet . ReadByteE < HousingResult > ( "Result" ) ;
159159 packet . ReadByte ( "Field_09" ) ;
160160 }
161-
161+
162162 [ Parser ( Opcode . SMSG_HOUSING_DECOR_REQUEST_STORAGE_RESPONSE ) ]
163163 public static void HousingDecorRequestStorageResponse ( Packet packet )
164164 {
165- packet . ReadPackedGuid128 ( "BnetAccountID " ) ;
165+ packet . ReadPackedGuid128 ( "BnetAccountGUID " ) ;
166166 packet . ReadByteE < HousingResult > ( "Result" ) ;
167+ if ( ClientVersion . AddedInVersion ( ClientVersionBuild . V12_0_0_65390 ) )
168+ packet . ReadBit ( "NewDataPulled" ) ;
167169 }
168-
170+
169171 [ Parser ( Opcode . SMSG_HOUSING_DECOR_SYSTEM_SET_DYE_SLOTS_RESPONSE ) ]
170172 public static void HandleHousingDecorSystemSetDyeSlotsResponse ( Packet packet )
171173 {
172174 packet . ReadPackedGuid128 ( "DecorGUID" ) ;
173175 packet . ReadByteE < HousingResult > ( "Result" ) ;
174176 }
175-
177+
176178 [ Parser ( Opcode . SMSG_HOUSING_DECOR_MOVE_RESPONSE ) ]
177179 public static void HandleHousingDecorMoveResponse ( Packet packet )
178180 {
179181 packet . ReadPackedGuid128 ( "PlayerGUID" ) ;
180- packet . ReadUInt32 ( "Field_09 " ) ;
182+ packet . ReadUInt32 ( "ClientDelay " ) ;
181183 packet . ReadPackedGuid128 ( "DecorGUID" ) ;
182184 packet . ReadByteE < HousingResult > ( "Result" ) ;
183- packet . ReadByte ( "Field_26 ") ;
185+ packet . ReadBit ( "IncludeChildren ") ;
184186 }
185-
187+
186188 [ Parser ( Opcode . SMSG_HOUSING_DECOR_REMOVE_RESPONSE ) ]
187189 public static void HandleHousingDecorRemoveResponse ( Packet packet )
188190 {
189191 packet . ReadPackedGuid128 ( "DecorGUID" ) ;
190- packet . ReadPackedGuid128 ( "UnknownGUID " ) ;
191- packet . ReadUInt32 ( "Field_32 " ) ;
192+ packet . ReadPackedGuid128 ( "PlayerGUID " ) ;
193+ packet . ReadUInt32 ( "ClientDelay " ) ;
192194 packet . ReadByteE < HousingResult > ( "Result" ) ;
193195 }
194-
196+
195197 [ Parser ( Opcode . SMSG_HOUSING_DECOR_LOCK_RESPONSE ) ]
196198 public static void HandleHousingDecorLockResponse ( Packet packet )
197199 {
198200 packet . ReadPackedGuid128 ( "DecorGUID" ) ;
199201 packet . ReadPackedGuid128 ( "PlayerGUID" ) ;
200- packet . ReadUInt32 ( "Field_16 " ) ;
202+ packet . ReadUInt32 ( "ClientDelay " ) ;
201203 packet . ReadByteE < HousingResult > ( "Result" ) ;
202- packet . ReadBit ( "Locked " ) ;
203- packet . ReadBit ( "Field_17 " ) ;
204+ packet . ReadBit ( "IsLocked " ) ;
205+ packet . ReadBit ( "IncludeChildren " ) ;
204206 }
205207
206208 [ Parser ( Opcode . SMSG_HOUSING_DECOR_SET_EDIT_MODE_RESPONSE ) ]
207209 public static void HandleHousingDecorSetEditModeResponse ( Packet packet )
208210 {
209211 packet . ReadPackedGuid128 ( "HouseGUID" ) ;
210- packet . ReadPackedGuid128 ( "BNetAccountGUID " ) ;
211- var allowedEditorCount = packet . ReadUInt32 ( "AllowedEditorCount " ) ;
212+ packet . ReadPackedGuid128 ( "HouseOwnerAccountGUID " ) ;
213+ var playersEditing = packet . ReadUInt32 ( "PlayerGUIDEditingCount " ) ;
212214 packet . ReadByteE < HousingResult > ( "Result" ) ;
213215
214- for ( var i = 0 ; i < allowedEditorCount ; ++ i )
215- packet . ReadPackedGuid128 ( "AllowedEditor " , i ) ;
216+ for ( var i = 0 ; i < playersEditing ; ++ i )
217+ packet . ReadPackedGuid128 ( "PlayerGUIDEditing " , i ) ;
216218 }
217219
218220 [ Parser ( Opcode . SMSG_HOUSING_REDEEM_DEFERRED_DECOR_RESPONSE ) ]
219221 public static void HandleHousingRedeemDeferredDecorResponse ( Packet packet )
220222 {
221223 packet . ReadPackedGuid128 ( "DecorGUID" ) ;
222224 packet . ReadByteE < HousingResult > ( "Result" ) ;
223- packet . ReadUInt32 ( "Field_13 " ) ;
225+ packet . ReadUInt32 ( "TransactionID " ) ;
224226 }
225227
226228 [ Parser ( Opcode . SMSG_HOUSING_DECOR_PLACE_RESPONSE ) ]
227229 public static void HandleHousingDecorPlaceResponse ( Packet packet )
228230 {
229231 packet . ReadPackedGuid128 ( "PlayerGUID" ) ;
230- packet . ReadUInt32 ( "Field_09 " ) ;
232+ packet . ReadUInt32 ( "ClientDelay " ) ;
231233 packet . ReadPackedGuid128 ( "DecorGUID" ) ;
232234 packet . ReadByteE < HousingResult > ( "Result" ) ;
233235 }
@@ -245,52 +247,62 @@ public static void HandleHousingExteriorLockResponse(Packet packet)
245247 public static void HandleHousingFixtureSetEditModeResponse ( Packet packet )
246248 {
247249 packet . ReadPackedGuid128 ( "HouseGUID" ) ;
248- packet . ReadPackedGuid128 ( "BNetAccountGUID " ) ;
250+ packet . ReadPackedGuid128 ( "PlayerGUIDEditing " ) ;
249251 packet . ReadByteE < HousingResult > ( "Result" ) ;
250252 }
251-
253+
252254 [ Parser ( Opcode . SMSG_HOUSING_ROOM_REMOVE_RESPONSE ) ]
253255 public static void HandleHousingRoomRemoveResponse ( Packet packet )
254256 {
255257 packet . ReadPackedGuid128 ( "RoomGUID" ) ;
256258 packet . ReadPackedGuid128 ( "PlayerGUID" ) ;
257259 packet . ReadByteE < HousingResult > ( "Result" ) ;
258260 }
259-
261+
260262 [ Parser ( Opcode . SMSG_HOUSING_ROOM_SET_LAYOUT_EDIT_MODE_RESPONSE ) ]
261263 public static void HandleHousingRoomSetLayoutEditModeResponse ( Packet packet )
262264 {
263265 packet . ReadPackedGuid128 ( "HouseGUID" ) ;
264266 packet . ReadByteE < HousingResult > ( "Result" ) ;
265- packet . ReadBool ( "Active ") ;
267+ packet . ReadBit ( "Enabled ") ;
266268 }
267-
269+
268270 [ Parser ( Opcode . SMSG_HOUSING_ROOM_UPDATE_RESPONSE ) ]
269271 public static void HousingRoomUpdateResponse ( Packet packet )
270272 {
271- packet . ReadPackedGuid128 ( "RoomGUID " ) ;
273+ packet . ReadPackedGuid128 ( "SourceRoomGUID " ) ;
272274 packet . ReadByteE < HousingResult > ( "Result" ) ;
273275 }
274-
276+
275277 [ Parser ( Opcode . SMSG_HOUSING_HOUSE_STATUS_RESPONSE ) ]
276278 public static void HandleHousingHouseStatusResponse ( Packet packet )
277279 {
278280 packet . ReadPackedGuid128 ( "HouseGUID" ) ;
279- packet . ReadPackedGuid128 ( "BnetAccountID" ) ;
280- packet . ReadPackedGuid128 ( "OwnerGUID" ) ;
281- packet . ReadUInt32 ( "Field_024" ) ;
281+ packet . ReadPackedGuid128 ( "HouseOwnerAccountGUID" ) ;
282+ packet . ReadPackedGuid128 ( "HouseOwnerGUID" ) ;
283+ packet . ReadPackedGuid128 ( "LockedDecorGUID" ) ;
284+ packet . ReadByteE < HousingResult > ( "Result" ) ;
285+ packet . ReadBit ( "DecorEditModeEnabled" ) ;
286+ packet . ReadBit ( "LayoutEditModeEnabled" ) ;
287+ packet . ReadBit ( "FixtureEditModeEnabled" ) ;
282288 }
283-
289+
284290 [ Parser ( Opcode . SMSG_HOUSING_SVCS_PLAYER_VIEW_HOUSES_RESPONSE ) ]
291+ public static void HandleHousingSvcsPlayerViewHousesResponse ( Packet packet )
292+ {
293+ var count = packet . ReadUInt32 ( "TargetHousesCount" ) ;
294+ packet . ReadByteE < HousingResult > ( "Result" ) ;
295+ for ( uint i = 0 ; i < count ; i ++ )
296+ ReadHouse ( packet , "TargetHouse" , i ) ;
297+ }
298+
285299 [ Parser ( Opcode . SMSG_HOUSING_SVCS_GET_PLAYER_HOUSES_INFO_RESPONSE ) ]
286- public static void HandleHousingSvcsGetHousesInfoResponse ( Packet packet )
300+ public static void HandleHousingSvcsGetPlayerHousesInfoResponse ( Packet packet )
287301 {
288- var count = packet . ReadUInt32 ( "Count " ) ;
302+ var count = packet . ReadUInt32 ( "PlayerHousesCount " ) ;
289303 packet . ReadByteE < HousingResult > ( "Result" ) ;
290304 for ( uint i = 0 ; i < count ; i ++ )
291- {
292- ReadHouse ( packet , i ) ;
293- }
305+ ReadHouse ( packet , "PlayerHouse" , i ) ;
294306 }
295307
296308 [ Parser ( Opcode . SMSG_INVALIDATE_NEIGHBORHOOD_NAME ) ]
@@ -303,10 +315,11 @@ public static void HandleInvalidateNeighborhoodName(Packet packet)
303315 public static void HandleQueryNeighborhoodNameResponse ( Packet packet )
304316 {
305317 packet . ReadPackedGuid128 ( "NeighborhoodGUID" ) ;
306- bool result = packet . ReadBool ( "Result ") ;
307- if ( ! result )
318+ var allow = packet . ReadBit ( "Allow ") ;
319+ if ( ! allow )
308320 return ;
309-
321+
322+ packet . ResetBitReader ( ) ;
310323 var nameLen = packet . ReadBits ( 8 ) ;
311324 packet . ReadWoWString ( "NeighborhoodName" , nameLen ) ;
312325 }
@@ -316,9 +329,9 @@ public static void HandleQueryNeighborhoodNameResponse(Packet packet)
316329 [ Parser ( Opcode . CMSG_HOUSING_ROOM_SET_LAYOUT_EDIT_MODE ) ]
317330 public static void HandleHousingSetEditMode ( Packet packet )
318331 {
319- packet . ReadBool ( "Active ") ;
332+ packet . ReadBit ( "IsEnabled ") ;
320333 }
321-
334+
322335 [ Parser ( Opcode . CMSG_HOUSING_HOUSE_STATUS ) ]
323336 [ Parser ( Opcode . CMSG_HOUSE_INTERIOR_LEAVE_HOUSE ) ]
324337 [ Parser ( Opcode . CMSG_HOUSING_GET_CURRENT_HOUSE_INFO ) ]
@@ -328,20 +341,20 @@ public static void HandleHousingSetEditMode(Packet packet)
328341 public static void HandleHousingNull ( Packet packet )
329342 {
330343 }
331-
344+
332345 private static void ReadHouse ( Packet packet , params object [ ] indexes )
333346 {
334347 packet . ResetBitReader ( ) ;
335- packet . ReadPackedGuid128 ( "HouseGUID " , indexes ) ;
336- packet . ReadPackedGuid128 ( "OwnerGUID " , indexes ) ;
348+ packet . ReadPackedGuid128 ( "GUID " , indexes ) ;
349+ packet . ReadPackedGuid128 ( "CosmeticOwner " , indexes ) ;
337350 packet . ReadPackedGuid128 ( "NeighborhoodGUID" , indexes ) ;
338351
339352 packet . ReadByte ( "PlotID" , indexes ) ;
340- packet . ReadInt32 ( "AccessFlags ", indexes ) ;
353+ packet . ReadUInt32 ( "HouseSettingFlags ", indexes ) ;
341354
342- var hasMoveOutTime = packet . ReadBit ( "HasMoveOutTime " , indexes ) ;
343- if ( hasMoveOutTime )
344- packet . ReadTime64 ( "MoveOutTime " , indexes ) ;
355+ var hasHasReservationTime = packet . ReadBit ( "HasReservationTime " , indexes ) ;
356+ if ( hasHasReservationTime )
357+ packet . ReadTime64 ( "HasReservationTime " , indexes ) ;
345358 }
346359 }
347360}
0 commit comments