Avoid users wears non-purchasable clothing on mannequin. [Plus EMU R2]

airil96

New Member
Jul 19, 2010
14
0
Hello guys..

As said on the title above, my retro is currently using our own custom coded Plus EMU R2 , and the situation is explained as below :
- User A purchased a clothing from catalog, and mirrors it on their own mannequin.
- User B used a clothing placed on user A mannequin, without purchasing the clothing, also they can save inside their wardrobe.

However I managed to minimize these issues by customizing the mannequin coding, where only users with room rights able to use the mannequins.
However some users with room rights are able to bypass these fixes.

Is there any way to do clothing checks before using mannequin? E.g if users doesn't own the clothings, they can't use the mannequin.
Your replies might help other hotels also :)
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
You can check in the mannequin code, loop through each clothing item and only give them the clothing they have - or give them a popup that says "One or more of the items you are not able to wear"
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
Personally,

I would create a class that you can send in the figure the user wants to wear, and the user who is attempting to wear it, and do the check if they can wear those items. That way it is reusable for anything:

Mannequins, Mimic Command, Football Gate, Wired Effects, etc
Post automatically merged:

Further Help -



Each Habbo.cs file should have a reference to this ClothingComponent. When it is initialized, the db is loaded and adds those figures into here.

Step 1) Check if the clothing is buyable. If the users buy the clothing from the catalog you can use this class ->

Step 2) Check if that item is owned by the ClothingComponent class / Habbo
 
Last edited:

airil96

New Member
Jul 19, 2010
14
0
Same issue happens when using the mimic command. Probably need to add more checks to see if the user actually owns the item.
Yes exactly, we've disabled the mimic commands due to these issues.

Personally,

I would create a class that you can send in the figure the user wants to wear, and the user who is attempting to wear it, and do the check if they can wear those items. That way it is reusable for anything:

Mannequins, Mimic Command, Football Gate, Wired Effects, etc
Post automatically merged:

Further Help -



Each Habbo.cs file should have a reference to this ClothingComponent. When it is initialized, the db is loaded and adds those figures into here.

Step 1) Check if the clothing is buyable. If the users buy the clothing from the catalog you can use this class ->

Step 2) Check if that item is owned by the ClothingComponent class / Habbo
Thank you for the guidance, I'll go through again those codes, and I'll might create custom codes for the checks.
I've recently checked Arc MS codes, and they have clothing checks implemented by using permissions.
 

Hypothesis

Programmer
Jan 6, 2019
524
361
A way to fix this would be to add checks like previously stated.
You could do something like create a character array then use the foreach loop to check for if the clothing exists in the purchasable clothing manager.

C#:
char[] cha1 = new char[1] { '.' };
            foreach (string str in Session.GetHabbo().Look.Split(cha1)) // loop
            {
                char[] cha2 = new char[1] { '-' }; // check for dash
                if (PlusEnvironment.GetGame().GetCatalog().GetClothingManager().GetClothing(int.Parse(str.Split(cha2)[1])) != null) // check clothing manager
                {
                    // return true
                }
             }
 
Last edited:

Users who are viewing this thread

Top