-
Catalog present_wrap* sprites and buying gifts serialization
I've trying to emulate the custom gifts system lately but I came across something I didn't understand.
There are around 10 gift cases presets for you to choose when sending them. Each one of them have, as far as I guess, one different sprite id. However, the client is sending to me same sprite ids for different gifts. For example,
I buy a gift in Habbo with the following settings:
sprite_id = 3089
ribbon = 3
color = 5
and that's exactly what I receive.
I buy a gift in my server and he is handled with the following settings:
sprite_id = 3089
ribbon = 3
color = 5
and the client sends to me the sprite_id equals to 3083;
Still, it's a valid sprite_id for a present, but It's not the one I choose.
My guess is that the client setup the gift wrapping tool automatically according to it's furnidata. But I may be wrong so I want to know if there is a way for me to control these sprites. I couldn't find anything related to this in the server. Also, that mysql table named items_base_gifts came up to be handled only for a function which isn't even used anymore. My packet logging for gifts came to be like this:
Message.AppendInt32((-1) * (int)this.Id);
Message.AppendString(this.mBaseItem.Type.ToString().ToUpper());
Message.AppendInt32(this.Id);
Message.AppendInt32(sprite);
Message.AppendInt32(9);
Message.AppendInt32(0);
Message.AppendString(this.ExtraData);
Message.AppendBoolean(this.GetBaseItem().AllowRecycle);
Message.AppendBoolean(this.GetBaseItem().AllowTrade);
Message.AppendBoolean(this.GetBaseItem().AllowInventoryStack);
Message.AppendBoolean(Marketplace.CanSellItem(this));
Message.AppendInt32(-1);
Message.AppendBoolean(false);
Message.AppendInt32(-1);
Message.AppendString("");
Message.AppendInt32((ribbon * 1000) + color);
Which is correct for most of the gifts ( not for *9 and *10 - They sum instead of multiply? why ? lol )
-