Skip to content

Commit 0666611

Browse files
LuzifixShauren
authored andcommitted
Add parsing for a bunch of housing packets
1 parent c079c43 commit 0666611

5 files changed

Lines changed: 459 additions & 0 deletions

File tree

WowPacketParser/Enums/Housing.cs

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
namespace WowPacketParser.Enums
2+
{
3+
public enum HousingResult : byte
4+
{
5+
Success = 0,
6+
ActionLockedByCombat = 1,
7+
CannotAfford = 2,
8+
CharterComplete = 3,
9+
CollisionInvalid = 4,
10+
DbError = 5,
11+
DecorCannotBeRedeemed = 6,
12+
DecorItemNotDestroyable = 7,
13+
DecorNotFound = 8,
14+
DecorNotFoundInStorage = 9,
15+
DuplicateCharterSignature = 10,
16+
FilterRejected = 11,
17+
FixtureCantDeleteDoor = 12,
18+
FixtureHookEmpty = 13,
19+
FixtureHookOccupied = 14,
20+
FixtureHouseTypeMismatch = 15,
21+
FixtureNotFound = 16,
22+
FixtureNotOwned = 17,
23+
FixtureSizeMismatch = 18,
24+
FixtureTypeMismatch = 19,
25+
GenericFailure = 20,
26+
GuildMoreAccountsNeeded = 21,
27+
GuildMoreActivePlayersNeeded = 22,
28+
GuildNotLoaded = 23,
29+
HouseEditLockFailed = 24,
30+
HouseExteriorRootNotFound = 25,
31+
HookNotChildOfFixture = 26,
32+
HouseNotFound = 27,
33+
IncorrectFaction = 28,
34+
InvalidDecorItem = 29,
35+
InvalidDistance = 30,
36+
InvalidGuild = 31,
37+
InvalidHouse = 32,
38+
InvalidInstance = 33,
39+
InvalidInteraction = 34,
40+
InvalidMap = 35,
41+
InvalidNeighborhoodName = 36,
42+
InvalidRoomLayout = 37,
43+
LockedByOtherPlayer = 38,
44+
LockOperationFailed = 39,
45+
MaxDecorReached = 40,
46+
MissingCoreFixture = 41,
47+
MissingDye = 42,
48+
MissingExpansionAccess = 43,
49+
MissingFactionMap = 44,
50+
MissingPrivateNeighborhoodInvite = 45,
51+
MissingTheme = 46,
52+
MoreHouseSlotsNeeded = 47,
53+
MoreSignaturesNeeded = 48,
54+
NeighborhoodNotFound = 49,
55+
NotInDecorEditMode = 50,
56+
NoNeighborhoodOwnershipRequests = 51,
57+
NotInFixtureEditMode = 52,
58+
NotInLayoutEditMode = 53,
59+
NotInsideHouse = 54,
60+
NotOnOwnedPlot = 55,
61+
OperationAborted = 56,
62+
PermissionDenied = 57,
63+
PlacementTargetInvalid = 58,
64+
PlayerNotFound = 59,
65+
PlayerNotInInstance = 60,
66+
PlotNotFound = 61,
67+
PlotNotVacant = 62,
68+
PlotReservationCooldown = 63,
69+
PlotReserved = 64,
70+
RoomNotFound = 65,
71+
RoomUpdateFailed = 66,
72+
RpcFailure = 67,
73+
ServiceNotAvailable = 68,
74+
StaticDataNotFound = 69,
75+
TimeoutLimit = 70,
76+
TimerunningNotAllowed = 71,
77+
TokenRequired = 72,
78+
TooManyRequests = 73,
79+
TransactionFailure = 74,
80+
UnlockOperationFailed = 75
81+
}
82+
83+
public enum HousingGuidType : byte
84+
{
85+
Decor = 1,
86+
RoomComponent = 2,
87+
House = 3,
88+
Neighborhood = 4,
89+
}
90+
}

WowPacketParser/Enums/Version/V11_2_7_64632/Opcodes.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,9 @@ public static BiDictionary<Opcode, int> Opcodes(Direction direction)
443443
{ Opcode.CMSG_HOUSING_FIXTURE_DELETE_FIXTURE, 0x310007 },
444444
{ Opcode.CMSG_HOUSING_FIXTURE_SET_CORE_FIXTURE, 0x310005 },
445445
{ Opcode.CMSG_HOUSING_FIXTURE_SET_EDIT_MODE, 0x310000 },
446+
{ Opcode.CMSG_HOUSING_HOUSE_STATUS, 0x350005 },
446447
{ Opcode.CMSG_HOUSING_GET_CURRENT_HOUSE_INFO, 0x350006 },
448+
{ Opcode.CMSG_HOUSING_GET_PLAYER_PERMISSIONS, 0x350007 },
447449
{ Opcode.CMSG_HOUSING_RESET_KIOSK_MODE, 0x350008 },
448450
{ Opcode.CMSG_HOUSING_ROOM_ADD, 0x320001 },
449451
{ Opcode.CMSG_HOUSING_ROOM_APPLY_COMPONENT_MATERIALS, 0x320006 },

WowPacketParser/Enums/Version/V11_2_7_64632/Opcodes_64877.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,9 @@ public static BiDictionary<Opcode, int> Opcodes(Direction direction)
442442
{ Opcode.CMSG_HOUSING_FIXTURE_DELETE_FIXTURE, 0x310007 },
443443
{ Opcode.CMSG_HOUSING_FIXTURE_SET_CORE_FIXTURE, 0x310005 },
444444
{ Opcode.CMSG_HOUSING_FIXTURE_SET_EDIT_MODE, 0x310000 },
445+
{ Opcode.CMSG_HOUSING_HOUSE_STATUS, 0x350005 },
445446
{ Opcode.CMSG_HOUSING_GET_CURRENT_HOUSE_INFO, 0x350006 },
447+
{ Opcode.CMSG_HOUSING_GET_PLAYER_PERMISSIONS, 0x350007 },
446448
{ Opcode.CMSG_HOUSING_RESET_KIOSK_MODE, 0x350008 },
447449
{ Opcode.CMSG_HOUSING_ROOM_ADD, 0x320001 },
448450
{ Opcode.CMSG_HOUSING_ROOM_APPLY_COMPONENT_MATERIALS, 0x320006 },

WowPacketParser/Misc/WowGuid.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,24 @@ public override string ToString()
160160
if (Low == 0 && High == 0)
161161
return "Full: 0x0";
162162

163+
string baseGuidPart = $"TypeName: {GetHighType()}; Full: 0x{High:X16}{Low:X16}";
164+
string endString = $"Low: {GetLow()}";
165+
switch (GetHighType())
166+
{
167+
case HighGuidType.Housing:
168+
{
169+
var subType = (HousingGuidType)((High >> 53) & 0x1F);
170+
return subType switch
171+
{
172+
HousingGuidType.Decor => $"{baseGuidPart}; SubType: {subType}; RealmID: {(High >> 32) & 0xFFFF}; DecorID: {High & 0xFFFFFFFF}; {endString}",
173+
HousingGuidType.Neighborhood => $"{baseGuidPart}; SubType: {subType}; NeighborhoodMapID: {(High >> 32) & 0xFFFF}; Arg2: {High & 0xFFFFFFFF}; {endString}",
174+
HousingGuidType.RoomComponent => $"{baseGuidPart}; SubType: {subType}; HouseRoomID: {High & 0xFFFFFFFF}; {endString}",
175+
HousingGuidType.House => $"{baseGuidPart}; SubType: {subType}; NeighborhoodMapID: {Low & 0x7FFF}; Arg2: {(Low >> 15) & 0x3F}; {endString}",
176+
_ => $"{baseGuidPart}; SubType: Unknown({(byte)subType}); {endString}",
177+
};
178+
}
179+
}
180+
163181
if (HasEntry())
164182
{
165183
StoreNameType type = StoreNameType.None;

0 commit comments

Comments
 (0)