@@ -197,6 +197,10 @@ addon.onIncomingPacket = function(id, data)
197197 --- @type GP_SERV_COMMAND_SHOP_LIST
198198 local buyListPacket = backend .parsePacket (' incoming' , data )
199199 for _ , item in ipairs (buyListPacket .ShopItemTbl ) do
200+ if bit .band (item .ItemPrice , 0x80000000 ) ~= 0 then
201+ backend .msg (' ShopStock' , string.format (' Item %s has MSB set - Unknown meaning.' , backend .get_item_name (item .ItemNo )))
202+ end
203+
200204 local itemKey = string.format (' %s-%d' , addon .shopNpc .Name , item .ItemNo )
201205 local itemEntry =
202206 {
@@ -206,7 +210,7 @@ addon.onIncomingPacket = function(id, data)
206210 GuildInfo = item .GuildInfo ,
207211 ItemNo = item .ItemNo ,
208212 ItemName = backend .get_item_name (item .ItemNo ),
209- ItemPrice = item .ItemPrice ,
213+ ItemPrice = bit . band ( item .ItemPrice , 0x3FFFFFFF ), -- Not sure if MSB can be set in shop packets but just in case
210214 ShopIndex = item .ShopIndex ,
211215 Skill = item .Skill ,
212216 }
@@ -244,7 +248,7 @@ addon.onIncomingPacket = function(id, data)
244248 NpcZone = backend .zone_name (),
245249 ItemNo = invItem .Id ,
246250 ItemName = backend .get_item_name (invItem .Id ),
247- Price = sellPacket .Price ,
251+ Price = bit . band ( sellPacket .Price , 0x3FFFFFFF ), -- Not sure if MSB can be set in shop packets but just in case
248252 }
249253 if addon .databases .global .sellList then
250254 addon .databases .global .sellList :add_or_update (itemKey , itemEntry )
0 commit comments