@@ -83,6 +83,18 @@ public static void ReadCraftingOrderItem(Packet packet, params object[] indexes)
8383 packet . ReadByte ( "DataSlotIndex" , indexes ) ;
8484 }
8585
86+ public static void ReadCraftingOrderCustomer ( Packet packet , params object [ ] indexes )
87+ {
88+ packet . ReadPackedGuid128 ( "CustomerGUID" , indexes ) ;
89+ packet . ReadPackedGuid128 ( "CustomerAccountGUID" , indexes ) ;
90+ }
91+
92+ public static void ReadCraftingOrderNpcCustomer ( Packet packet , params object [ ] indexes )
93+ {
94+ packet . ReadInt64 ( "NpcCraftingOrderCustomerID" , indexes ) ;
95+ packet . ReadInt32 ( "NpcCraftingOrderSetFlags" , indexes ) ;
96+ }
97+
8698 public static void ReadCraftingOrderData ( Packet packet , params object [ ] indexes )
8799 {
88100 packet . ReadInt32 ( "field_0" , indexes ) ;
@@ -103,29 +115,26 @@ public static void ReadCraftingOrderData(Packet packet, params object[] indexes)
103115 packet . ReadUInt32 ( "Flags" , indexes ) ;
104116
105117 if ( ClientVersion . RemovedInVersion ( ClientVersionBuild . V11_0_2_55959 ) )
106- {
107- packet . ReadPackedGuid128 ( "CustomerGUID" , indexes ) ;
108- packet . ReadPackedGuid128 ( "CustomerAccountGUID" , indexes ) ;
109- }
118+ ReadCraftingOrderCustomer ( packet , indexes , "Customer" ) ;
110119
111120 packet . ReadPackedGuid128 ( "CrafterGUID" , indexes ) ;
112121 packet . ReadPackedGuid128 ( "PersonalCrafterGUID" , indexes ) ;
113122
114123 if ( ClientVersion . AddedInVersion ( ClientVersionBuild . V11_0_2_55959 ) )
115124 {
116- packet . ReadInt32 ( "NpcCraftingOrderSetId " , indexes ) ;
117- packet . ReadInt32 ( "NpcCraftingTreasureId " , indexes ) ;
125+ packet . ReadInt32 ( "NpcCraftingOrderSetID " , indexes ) ;
126+ packet . ReadInt32 ( "NpcTreasureID " , indexes ) ;
118127 }
119128
120129 var reagentsCount = packet . ReadUInt32 ( ) ;
121130 var customerNotesLength = packet . ReadBits ( 10 ) ;
122131
123- var hasCustomerGuid = false ;
132+ var hasCustomer = false ;
124133 var hasNpcCraftingData = false ;
125134 if ( ClientVersion . AddedInVersion ( ClientVersionBuild . V11_0_2_55959 ) )
126135 {
127- hasCustomerGuid = packet . ReadBit ( "HasCustomerGuid" , indexes ) ;
128- hasNpcCraftingData = packet . ReadBit ( "HasNpcCraftingData" , indexes ) ;
136+ hasCustomer = packet . ReadBit ( ) ;
137+ hasNpcCraftingData = packet . ReadBit ( ) ;
129138 }
130139
131140 var hasOutputItem = packet . ReadBit ( ) ;
@@ -138,17 +147,11 @@ public static void ReadCraftingOrderData(Packet packet, params object[] indexes)
138147
139148 packet . ReadWoWString ( "CustomerNotes" , customerNotesLength , indexes ) ;
140149
141- if ( hasCustomerGuid )
142- {
143- packet . ReadPackedGuid128 ( "CustomerGUID" , indexes ) ;
144- packet . ReadPackedGuid128 ( "CustomerAccountGUID" , indexes ) ;
145- }
150+ if ( hasCustomer )
151+ ReadCraftingOrderCustomer ( packet , indexes , "Customer" ) ;
146152
147153 if ( hasNpcCraftingData )
148- {
149- packet . ReadUInt64 ( "NpcCraftingCustomerId" , indexes ) ;
150- packet . ReadUInt32 ( "NpcCraftingOrderSetFlags" , indexes ) ;
151- }
154+ ReadCraftingOrderNpcCustomer ( packet , indexes , "NpcCustomer" ) ;
152155
153156 if ( hasOutputItem )
154157 ReadCraftingOrderItem ( packet , indexes , "OutputItem" ) ;
0 commit comments