brenoepics / morningstar

An open-source Arcturus Community Fork.
GNU General Public License v3.0
3 stars 2 forks source link

Gift-system improvements & NPE #602

Open brenoepics opened 4 years ago

brenoepics commented 4 years ago

In GitLab by @ghost on May 5, 2020, 08:44

Some random bugs I found scattered around the gift system in my Hotel.

NPE for opening gifts

Has something to do with i.setUserId(this.habbo.getHabboInfo().getId());.

Sending a badge as an gift

case BADGE:
                        if (!unseenItems.containsKey(AddHabboItemComposer.AddHabboItemCategory.BADGE))
                            unseenItems.put(AddHabboItemComposer.AddHabboItemCategory.BADGE, new ArrayList<>());

                        unseenItems.get(AddHabboItemComposer.AddHabboItemCategory.BADGE).add(item.getId()); // badges cannot be placed so no need for gift adjusted ID
                        break;

Sending a pet as an gift

case PET:
                        if (!unseenItems.containsKey(AddHabboItemComposer.AddHabboItemCategory.PET))
                            unseenItems.put(AddHabboItemComposer.AddHabboItemCategory.PET, new ArrayList<>());

                        unseenItems.get(AddHabboItemComposer.AddHabboItemCategory.PET).add(item.getGiftAdjustedId());
                        break;

Sending a bot as an gift

case ROBOT:
                        if (!unseenItems.containsKey(AddHabboItemComposer.AddHabboItemCategory.BOT))
                            unseenItems.put(AddHabboItemComposer.AddHabboItemCategory.BOT, new ArrayList<>());

                        unseenItems.get(AddHabboItemComposer.AddHabboItemCategory.BOT).add(item.getGiftAdjustedId());
                        break;

Can't get the packets for this one. Sorry 'bout that. This bug results in an black box in your inventory, as Arc tries to send it as an normal item, where as it should be an actual bot. Upon placing the "black box", you disconnect. It becomes invisible until you :pickall.

No errors to provide, I do have an .GIF though.

https://gyazo.com/e161d95a44f68f7b13b0476683667230

brenoepics commented 4 years ago

In GitLab by @ghost on May 7, 2020, 09:20

Thanks to an admin from my Hotel, I got access to his account. This is the packetlog for giving a pig as an gift (referring to task "Sending a pet as an gift").

Sending

--------------------
[91dc98f09eaacac57f2ca65ff5ed5a77]
Incoming[1394, _-1im] <- [0][0][0]*[5]r[1][0][0][0][0][0][5]Olkku[0][0][0][5][0][0][0][2][0][6]FFFFFF[0][0][0][2][0][0][0][0][0][0][0][0]
--------------------
[AddHabboItem] [b1f5149edc67ded09c6f00b372fbfdb3]
Incoming[3011, _-5rX] <- [0][0][0][11]Ã[0][0][0][1][0][0][0][4][0][0][0][1][0][0][1]<
--------------------
[UserCredits] [494106ca0e88d0e11d7263a390c4dbfb]
Incoming[2396, _-4vE] <- [0][0][0][8][9]\[0][4]63.0
{l}{u:2396}{s:63.0}
--------------------
[1f355ff5ddce6709ce19cb6beb5eced6]
Incoming[2230, _-6P] <- [0][0][0]:[8]¶[0][0][0][0][0][0][1][0][0][1]<[0][13]ACH_PetLover1[0][0][0][10][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]i[0][0][0][4]pets[0]
{l}{u:2230}{i:23}{i:1}{i:316}{s:ACH_PetLover1}{i:10}{i:0}{i:0}{i:0}{i:105}{s:}{s:pets}{b:False}
--------------------

https://gyazo.com/f9ae20597c17d47552976a01400cc163

Opening

--------------------
[91dc98f09eaacac57f2ca65ff5ed5a77]
Incoming[1394, _-1im] <- [0][0][0]*[5]r[0][0][12]§p[0][5]Olkku[0][0][0][5][0][0][0][2][0][6]FFFFFF[0][0][0][2][0][0][0][0][0][0][0][1]
--------------------
[48d01dfc7a5b4711535ed8473498b8d0]
Incoming[3105, _-4RM] <- [0][0][0]*[12]![0][12]§p[0][5]Olkku[0][0][0][5][0][0][0][2][0][6]FFFFFF[0][0][0][2][0][0][0][0][0][0][0][1][1]
--------------------
[AchievementProgress] [bf976e9bb1bf3bde1b491cd8aba9a72f]
Incoming[254, _-3YZ] <- [0][0][0]>[0]þ[0][0][0][0][0][0][4][0][13]ACH_PetLover4[0][0][0][5][0][0][0][10][0][0][0][0][0][0][0][0][0][0][0][9][0][0][4]pets[0][0][0][0][0][10][0][0][0][0]
{l}{u:254}{i:23}{i:4}{s:ACH_PetLover4}{i:5}{i:10}{i:0}{i:0}{i:9}{b:False}{s:pets}{s:}{i:10}{i:0}
--------------------
[InventoryRefresh] [6ae53b598f5edf8b94fb52a623d07bd2]
Incoming[1391, _-2QE] <- [0][0][0][2][5]o
{l}{u:1391}
--------------------
[22148669d255a8f7bf5aae3932681b7e]
Incoming[51, _-2f6] <- [0][0][0][6][0]3[0][12]§p
{l}{u:51}{i:829296}
--------------------
[ItemExtraData] [8fffbfc45500be15f990b361b707e859]
Incoming[607, _-345] <- [0][0][0]ÿ[2]_[0][8]96702967[0][0][0][1][0][0][0][6][0][7]MESSAGE[0][0][0][11]EXTRA_PARAM[0]Olkku[10]2[10]FFFFFF[0]PURCHASER_FIGURE[0]phr-3829-45.hd-180-19.ch-3498-1408.lg-280-82.sh-295-1408.ha-3767-71.ea-3925-66-1320.fa-3276-72.wa-2012.cc-3917-71[0]PURCHASER_NAME[0][12]Juristihemmo[0][12]PRODUCT_CODE[0][7]a0 pet5[0][5]state[0][1]1
--------------------

Upon opening the gift, pet stayed in the room, and the food went right into my inventory.

https://gyazo.com/d49b606faabc5c749204492db4436eb8

brenoepics commented 2 years ago

In GitLab by @Remco on Mar 3, 2022, 11:38

marked the checklist item NPE as completed

brenoepics commented 2 years ago

In GitLab by @Remco on Mar 3, 2022, 11:38

marked the checklist item NPE as incomplete