mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 23:10:52 +01:00
Merge branch 'dev' into 'fix-trophies'
# Conflicts: # sqlupdates/3_0_0 to 3_0_1.sql
This commit is contained in:
commit
b2e0cc6347
159
README.md
159
README.md
@ -1,84 +1,59 @@
|
||||
# Arcturus Morningstar #
|
||||
|
||||
## What is Arcturus Morningstar? ##
|
||||
Arcturus Morningstar is the community project for the Arcturus Emulator by TheGeneral.
|
||||
|
||||
The community project was made because the Arcturus Emulator has been abandoned by TheGeneral with lack of updates, an intent to monetize the project, and make the project private.
|
||||
|
||||
TheGeneral's own words were "dont like it then dont use it". We did not like what he was doing, so we made our own version.
|
||||
|
||||
## License ##
|
||||
Arcturus Morningstar is released under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.txt).
|
||||
|
||||
## Versions ##
|
||||
[![image](https://img.shields.io/badge/VERSION-3.0.0-success.svg?style=for-the-badge&logo=appveyor)](#)
|
||||
[![image](https://img.shields.io/badge/STATUS-STABLE-blue.svg?style=for-the-badge&logo=appveyor)](#)
|
||||
[![image](https://img.shields.io/discord/557240155040251905?style=for-the-badge&logo=discord&color=7289DA&label=DISCORD&logoColor=fff)](https://discord.gg/BzfFsTp)
|
||||
|
||||
Compiled Download: https://git.krews.org/morningstar/Arcturus-Community/-/releases
|
||||
|
||||
Client build: **PRODUCTION-201611291003-338511768**
|
||||
|
||||
## Reporting problems ##
|
||||
You can report problems via the Issue Tracker at https://git.krews.org/morningstar/Arcturus-Community/issues
|
||||
When making an bug report or a feature request use the template we provide so that it can be categorized correctly and we have more information to replicate a bug or implement a feature correctly.
|
||||
|
||||
## Credits ##
|
||||
- TheGeneral
|
||||
- Beny
|
||||
- Alejandro
|
||||
- Capheus
|
||||
- Skeletor
|
||||
- Harmonic
|
||||
- Mike
|
||||
- Remco
|
||||
- zGrav
|
||||
- Quadral
|
||||
- Harmony
|
||||
- Swirny
|
||||
- ArpyAge
|
||||
- Mikkel
|
||||
- Rodolfo
|
||||
- Rasmus
|
||||
- Kitt Mustang
|
||||
- Snaiker
|
||||
- nttzx
|
||||
- necmi
|
||||
- Dome
|
||||
- Jose Flores
|
||||
- Cam
|
||||
- Oliver
|
||||
- Narzo
|
||||
- Tenshie
|
||||
- MartenM
|
||||
- Ridge
|
||||
- SenpaiDipper
|
||||
- Snaiker
|
||||
- Thijmen
|
||||
Arcturus Morningstar is as a fork of Arcturus Emulator by TheGeneral. Arcturus Morningstar is released under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.txt) and is developed for free by talented developers at Krews.org and is compatible with the following client revision/community projects:
|
||||
|
||||
|
||||
## Discord ##
|
||||
Join us on Discord at https://discord.gg/BzfFsTp
|
||||
| Flash | Community Clients |
|
||||
| ------------- | ------------- |
|
||||
| [PRODUCTION-201611291003-338511768](https://git.krews.org/morningstar/apollyon/uploads/dc669a26613bf2356e48eb653734ab29/patched-habbo.swf) | [Nitro (Recommended)*](https://git.krews.org/nitro) |
|
||||
|
||||
## Contributing ##
|
||||
Anyone is allowed to fork the project and make pull requests. We make no guarantee that pull requests will be approved into the project.
|
||||
###### *Note to use Nitro you will need to use the following [plugin](https://git.krews.org/nitro/ms-websockets/-/releases) with Arcturus Morningstar #######
|
||||
|
||||
## Branches ##
|
||||
There will be 2 branches of the Arcturus Morningstar emulator:
|
||||
|
||||
`master` - The master branch will be the stable branch. Everything here has been tested on a live hotel and contains no known problems.
|
||||
|
||||
`dev` - The dev branch will be the unstable branch. This one is the most up to date, but things may not work as intended.
|
||||
|
||||
There is no set timeframe on when new versions will be released or when the stable branch will be updated.
|
||||
|
||||
## Custom features ##
|
||||
Do not implement custom features into the source.
|
||||
A custom feature will be defined as a feature or ability which is not possible in Habbo.com
|
||||
Use plugins for custom features, and if a plugin is not possible, you should adapt the source to enable plugins to do that.
|
||||
[![image](https://img.shields.io/discord/557240155040251905?style=for-the-badge&logo=discord&color=7289DA&label=KREWS&logoColor=fff)](https://discord.gg/BzfFsTp)
|
||||
|
||||
## Why always make things as plugins? ##
|
||||
Why always make things as plugins?
|
||||
## Download ##
|
||||
[![image](https://img.shields.io/badge/STABLE%20RELEASES-3.0.0-success.svg?style=for-the-badge&logo=appveyor)](https://git.krews.org/morningstar/Arcturus-Community/-/releases)
|
||||
|
||||
[![image](https://img.shields.io/badge/DEVELOPER%20BUILDS-3.1.0-red.svg?style=for-the-badge&logo=appveyor)](https://git.krews.org/morningstar/Arcturus-Community/-/jobs) *
|
||||
|
||||
[![image](https://img.shields.io/badge/RECOMMENDED%20PLUGINS-blue.svg?style=for-the-badge&logo=)](https://git.krews.org/official-plugins)
|
||||
|
||||
###### * Note to use these builds you will need to run any database updates from [here](https://git.krews.org/morningstar/Arcturus-Community/-/tree/dev/sqlupdates) #######
|
||||
|
||||
|
||||
### Branches ###
|
||||
There are two main branches in use on the Arcturus Morningstar git. Below the pros an
|
||||
|
||||
| master | Tested on a production hotel and is stable for every day use with no known serious exploits. |
|
||||
| ------------- | ------------- |
|
||||
|
||||
| dev | The most up-to-date, but features may not work as intended. |
|
||||
| ------------- | ------------- |
|
||||
|
||||
|
||||
|
||||
|
||||
There is no set timeframe on when new versions will be released or when the stable branch will be updated
|
||||
|
||||
|
||||
## Can I Help!? ##
|
||||
#### Reporting Bugs: ####
|
||||
You can report problems via the [Issue Tracker](https://git.krews.org/morningstar/Arcturus-Community/issues)*
|
||||
###### * When making an bug report or a feature request use the template we provide so that it can be categorized correctly and we have more information to replicate a bug or implement a feature correctly. ######
|
||||
#### Can I contribute code to this project? ####
|
||||
Of Course! if you have fixed a bug from the git please feel free to do a [merge request](https://git.krews.org/morningstar/Arcturus-Community/issues)*
|
||||
###### * Anyone is allowed to fork the project and make pull requests, we make no guarantee that pull requests will be approved into the project. Please Do NOT push code which does not replicate behaviour on habbo.com, instead make the behaviour configurable or as a plugin. ######
|
||||
|
||||
|
||||
|
||||
## Plugin System ##
|
||||
The robust Plugin System included in the original Arcturus release is also included in Arcturus Morningstar, if you're interested in making your own plugins, feel free to ask around on our discord and we'll point you in the right direction!
|
||||
|
||||
A lot of the community aren't used to modifying things in this way, so we've written a few pros:
|
||||
1. Other people will see that plugins are the normal way of adding custom features
|
||||
2. Plugins can be added and removed at the hotel owner's choice, it makes customizing the hotel easier
|
||||
3. Developers will be able to read plugin source code to learn how to make their own plugins, without the need to look in complicated source code
|
||||
@ -91,8 +66,46 @@ Sale of a special edition of a *source code* will not be permitted. You may use
|
||||
If we ever are to make paid features or plugins, we will not prevent or discourage developers from creating alternative options for users.
|
||||
|
||||
|
||||
## Plugins - Official Plugins ##
|
||||
You can find official plugins to add custom features to Arcturus Morningstar at the following URL:
|
||||
|
||||
[View the respository here.](https://git.krews.org/official-plugins)
|
||||
|
||||
|
||||
|
||||
### Credits ###
|
||||
|
||||
- TheGeneral (Arcturus Emulator)
|
||||
- Beny
|
||||
- Alejandro
|
||||
- Capheus
|
||||
- Skeletor
|
||||
- Harmonic
|
||||
- Mike
|
||||
- Remco
|
||||
- zGrav
|
||||
- Quadral
|
||||
- Harmony
|
||||
- Swirny
|
||||
- ArpyAge
|
||||
- Mikkel
|
||||
- Rodolfo
|
||||
- Rasmus
|
||||
- Kitt Mustang
|
||||
- Snaiker
|
||||
- nttzx
|
||||
- necmi
|
||||
- Dome
|
||||
- Jose Flores
|
||||
- Cam
|
||||
- Oliver
|
||||
- Narzo
|
||||
- Tenshie
|
||||
- MartenM
|
||||
- Ridge
|
||||
- SenpaiDipper
|
||||
- Thijmen
|
||||
- Brenoepic
|
||||
- Stankman
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -9,4 +9,6 @@ INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('console.mode', '1');
|
||||
-- Youtube Api v3 key to YoutubeManager
|
||||
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('youtube.apikey', '');
|
||||
|
||||
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.gifts.length.max', '300');
|
||||
|
||||
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.trophies.length.max', '300');
|
@ -6,6 +6,7 @@ import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboInfo;
|
||||
import com.eu.habbo.habbohotel.users.HabboManager;
|
||||
import com.eu.habbo.habbohotel.users.HabboStats;
|
||||
import com.eu.habbo.habbohotel.users.subscriptions.Subscription;
|
||||
|
||||
/**
|
||||
@ -42,8 +43,7 @@ public class SubscriptionCommand extends Command {
|
||||
HabboInfo info = HabboManager.getOfflineHabboInfo(params[1]);
|
||||
|
||||
if (info != null) {
|
||||
Habbo habbo = Emulator.getGameServer().getGameClientManager().getHabbo(params[1]);
|
||||
|
||||
HabboStats stats = info.getHabboStats();
|
||||
String subscription = params[2].toUpperCase();
|
||||
String action = params[3];
|
||||
|
||||
@ -67,11 +67,11 @@ public class SubscriptionCommand extends Command {
|
||||
return true;
|
||||
}
|
||||
|
||||
habbo.getHabboStats().createSubscription(subscription, timeToAdd);
|
||||
stats.createSubscription(subscription, timeToAdd);
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_subscription.success_add_time", "Successfully added %time% seconds to %subscription% on %user%").replace("%time%", timeToAdd + "").replace("%user%", params[1]).replace("%subscription%", subscription), RoomChatMessageBubbles.ALERT);
|
||||
}
|
||||
else if(action.equalsIgnoreCase("remove") || action.equalsIgnoreCase("-") || action.equalsIgnoreCase("r")) {
|
||||
Subscription s = habbo.getHabboStats().getSubscription(subscription);
|
||||
Subscription s = stats.getSubscription(subscription);
|
||||
|
||||
if (s == null) {
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_subscription.user_not_have", "%user% does not have the %subscription% subscription").replace("%user%", params[1]).replace("%subscription%", subscription), RoomChatMessageBubbles.ALERT);
|
||||
|
@ -37,7 +37,7 @@ public class InteractionPressurePlate extends InteractionDefault {
|
||||
|
||||
@Override
|
||||
public void onClick(GameClient client, Room room, Object[] objects) throws Exception {
|
||||
super.onClick(client, room, objects);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -66,6 +66,11 @@ public class InteractionPressurePlate extends InteractionDefault {
|
||||
updateState(room);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPickUp(Room room) {
|
||||
this.setExtradata("0");
|
||||
}
|
||||
|
||||
public void updateState(Room room) {
|
||||
boolean occupied = false;
|
||||
|
||||
|
@ -3974,6 +3974,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
}
|
||||
|
||||
if (habbo != null) {
|
||||
this.ejectUserFurni(habbo.getHabboInfo().getId());
|
||||
habbo.getRoomUnit().setRightsLevel(RoomRightLevels.NONE);
|
||||
habbo.getRoomUnit().removeStatus(RoomUnitStatus.FLAT_CONTROL);
|
||||
this.refreshRightsForHabbo(habbo);
|
||||
@ -3981,6 +3982,10 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
}
|
||||
|
||||
public void removeAllRights() {
|
||||
for (int userId : rights.toArray()) {
|
||||
this.ejectUserFurni(userId);
|
||||
}
|
||||
|
||||
this.rights.clear();
|
||||
|
||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM room_rights WHERE room_id = ?")) {
|
||||
|
@ -15,6 +15,8 @@ import com.eu.habbo.messages.outgoing.generic.PickMonthlyClubGiftNotificationCom
|
||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.*;
|
||||
import gnu.trove.map.hash.THashMap;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@ -29,6 +31,7 @@ import java.util.TreeMap;
|
||||
* @author Beny
|
||||
*/
|
||||
public class SubscriptionHabboClub extends Subscription {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(SubscriptionHabboClub.class);
|
||||
|
||||
public static boolean HC_PAYDAY_ENABLED = false;
|
||||
public static int HC_PAYDAY_NEXT_DATE = Integer.MAX_VALUE; // yyyy-MM-dd HH:mm:ss
|
||||
@ -393,9 +396,18 @@ public class SubscriptionHabboClub extends Subscription {
|
||||
break;
|
||||
|
||||
default:
|
||||
pointCurrency = -1;
|
||||
try {
|
||||
pointCurrency = Integer.parseInt(currency);
|
||||
}
|
||||
catch (NumberFormatException ex) {
|
||||
LOGGER.error("Couldn't convert the type point currency {} on HC PayDay. The number must be a integer and positive.", pointCurrency);
|
||||
}
|
||||
|
||||
if (pointCurrency >= 0) {
|
||||
habbo.getClient().getHabbo().getHabboInfo().addCurrencyAmount(pointCurrency, amount);
|
||||
habbo.getClient().sendResponse(new UserPointsComposer(habbo.getClient().getHabbo().getHabboInfo().getCurrencyAmount(pointCurrency), amount, pointCurrency));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,10 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.length() > Emulator.getConfig().getInt("hotel.gifts.length.max", 300)) {
|
||||
message = message.substring(0, Emulator.getConfig().getInt("hotel.gifts.length.max", 300));
|
||||
}
|
||||
|
||||
Integer iItemId = Emulator.getGameEnvironment().getCatalogManager().giftWrappers.get(spriteId);
|
||||
|
||||
if (iItemId == null)
|
||||
@ -172,7 +176,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
int limitedNumber = 0;
|
||||
if (item.isLimited()) {
|
||||
count = 1;
|
||||
if (Emulator.getGameEnvironment().getCatalogManager().getLimitedConfig(item).available() == 0) {
|
||||
if (Emulator.getGameEnvironment().getCatalogManager().getLimitedConfig(item).available() == 0 && habbo != null) {
|
||||
habbo.getClient().sendResponse(new AlertLimitedSoldOutComposer());
|
||||
return;
|
||||
}
|
||||
@ -269,7 +273,7 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
||||
return;
|
||||
} else {
|
||||
if (baseItem.getInteractionType().getType() == InteractionTrophy.class || baseItem.getInteractionType().getType() == InteractionBadgeDisplay.class) {
|
||||
if (baseItem.getInteractionType().getType() == InteractionBadgeDisplay.class && !habbo.getClient().getHabbo().getInventory().getBadgesComponent().hasBadge(extraData)) {
|
||||
if (baseItem.getInteractionType().getType() == InteractionBadgeDisplay.class && habbo != null && !habbo.getClient().getHabbo().getInventory().getBadgesComponent().hasBadge(extraData)) {
|
||||
ScripterManager.scripterDetected(habbo.getClient(), Emulator.getTexts().getValue("scripter.warning.catalog.badge_display").replace("%username%", habbo.getClient().getHabbo().getHabboInfo().getUsername()).replace("%badge%", extraData));
|
||||
extraData = "UMAD";
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import com.eu.habbo.habbohotel.modtool.ModToolSanctionItem;
|
||||
import com.eu.habbo.habbohotel.modtool.ModToolSanctions;
|
||||
import com.eu.habbo.habbohotel.navigation.NavigatorSavedSearch;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomManager;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboManager;
|
||||
import com.eu.habbo.habbohotel.users.clothingvalidation.ClothingValidationManager;
|
||||
@ -13,7 +14,6 @@ import com.eu.habbo.habbohotel.users.subscriptions.SubscriptionHabboClub;
|
||||
import com.eu.habbo.messages.NoAuthMessage;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.achievements.AchievementListComposer;
|
||||
import com.eu.habbo.messages.outgoing.gamecenter.GameCenterAccountInfoComposer;
|
||||
import com.eu.habbo.messages.outgoing.gamecenter.GameCenterGameListComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
|
||||
@ -24,13 +24,13 @@ import com.eu.habbo.messages.outgoing.handshake.SecureLoginOKComposer;
|
||||
import com.eu.habbo.messages.outgoing.handshake.AvailabilityStatusMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.handshake.PingComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.InventoryAchievementsComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.InventoryRefreshComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.UserEffectsListComposer;
|
||||
import com.eu.habbo.messages.outgoing.modtool.CfhTopicsMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.modtool.ModToolComposer;
|
||||
import com.eu.habbo.messages.outgoing.modtool.ModToolSanctionInfoComposer;
|
||||
import com.eu.habbo.messages.outgoing.navigator.*;
|
||||
import com.eu.habbo.messages.outgoing.unknown.BuildersClubExpiredComposer;
|
||||
import com.eu.habbo.messages.outgoing.mysterybox.MysteryBoxKeysComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.*;
|
||||
import com.eu.habbo.plugin.events.emulator.SSOAuthenticationEvent;
|
||||
import com.eu.habbo.plugin.events.users.UserLoginEvent;
|
||||
@ -73,9 +73,7 @@ public class SecureLoginEvent extends MessageHandler {
|
||||
|
||||
if (sso.isEmpty()) {
|
||||
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
||||
if (Emulator.getConfig().getBoolean("debug.mode")) {
|
||||
LOGGER.warn("Client is trying to connect without SSO ticket! Closed connection...");
|
||||
}
|
||||
LOGGER.debug("Client is trying to connect without SSO ticket! Closed connection...");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -117,7 +115,15 @@ public class SecureLoginEvent extends MessageHandler {
|
||||
ArrayList<ServerMessage> messages = new ArrayList<>();
|
||||
|
||||
messages.add(new SecureLoginOKComposer().compose());
|
||||
messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), 0).compose());
|
||||
|
||||
int roomIdToEnter = 0;
|
||||
|
||||
if (!this.client.getHabbo().getHabboStats().nux || Emulator.getConfig().getBoolean("retro.style.homeroom") && this.client.getHabbo().getHabboInfo().getHomeRoom() != 0)
|
||||
roomIdToEnter = this.client.getHabbo().getHabboInfo().getHomeRoom();
|
||||
else if (!this.client.getHabbo().getHabboStats().nux || Emulator.getConfig().getBoolean("retro.style.homeroom") && RoomManager.HOME_ROOM_ID > 0)
|
||||
roomIdToEnter = RoomManager.HOME_ROOM_ID;
|
||||
|
||||
messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), roomIdToEnter).compose());
|
||||
messages.add(new UserEffectsListComposer(habbo, this.client.getHabbo().getInventory().getEffectsComponent().effects.values()).compose());
|
||||
messages.add(new UserClothesComposer(this.client.getHabbo()).compose());
|
||||
messages.add(new NewUserIdentityComposer(habbo).compose());
|
||||
@ -127,7 +133,7 @@ public class SecureLoginEvent extends MessageHandler {
|
||||
messages.add(new EnableNotificationsComposer(Emulator.getConfig().getBoolean("bubblealerts.enabled", true)).compose());
|
||||
messages.add(new UserAchievementScoreComposer(this.client.getHabbo()).compose());
|
||||
messages.add(new IsFirstLoginOfDayComposer(true).compose());
|
||||
messages.add(new UnknownComposer5().compose());
|
||||
messages.add(new MysteryBoxKeysComposer().compose());
|
||||
messages.add(new BuildersClubExpiredComposer().compose());
|
||||
messages.add(new CfhTopicsMessageComposer().compose());
|
||||
messages.add(new FavoriteRoomsCountComposer(this.client.getHabbo()).compose());
|
||||
@ -135,8 +141,6 @@ public class SecureLoginEvent extends MessageHandler {
|
||||
messages.add(new GameCenterAccountInfoComposer(3, 100).compose());
|
||||
messages.add(new GameCenterAccountInfoComposer(0, 100).compose());
|
||||
|
||||
//messages.add(new MessengerInitComposer(this.client.getHabbo()).compose());
|
||||
//messages.add(new FriendsComposer(this.client.getHabbo()).compose());
|
||||
messages.add(new UserClubComposer(this.client.getHabbo(), SubscriptionHabboClub.HABBO_CLUB, UserClubComposer.RESPONSE_TYPE_LOGIN).compose());
|
||||
|
||||
if (this.client.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL)) {
|
||||
@ -146,16 +150,8 @@ public class SecureLoginEvent extends MessageHandler {
|
||||
this.client.sendResponses(messages);
|
||||
|
||||
//Hardcoded
|
||||
this.client.sendResponse(new NewNavigatorSettingsComposer(this.client.getHabbo().getHabboStats().navigatorWindowSettings));
|
||||
this.client.sendResponse(new NewNavigatorMetaDataComposer());
|
||||
this.client.sendResponse(new NewNavigatorLiftedRoomsComposer());
|
||||
this.client.sendResponse(new NewNavigatorCollapsedCategoriesComposer());
|
||||
this.client.sendResponse(new NewNavigatorSavedSearchesComposer(this.client.getHabbo().getHabboInfo().getSavedSearches()));
|
||||
this.client.sendResponse(new NewNavigatorEventCategoriesComposer());
|
||||
this.client.sendResponse(new InventoryRefreshComposer());
|
||||
//this.client.sendResponse(new ForumsTestComposer());
|
||||
this.client.sendResponse(new InventoryAchievementsComposer());
|
||||
this.client.sendResponse(new AchievementListComposer(this.client.getHabbo()));
|
||||
|
||||
ModToolSanctions modToolSanctions = Emulator.getGameEnvironment().getModToolSanctions();
|
||||
|
||||
|
@ -12,6 +12,5 @@ public class RequestNewNavigatorDataEvent extends MessageHandler {
|
||||
this.client.sendResponse(new NewNavigatorCollapsedCategoriesComposer());
|
||||
this.client.sendResponse(new NewNavigatorSavedSearchesComposer(this.client.getHabbo().getHabboInfo().getSavedSearches()));
|
||||
this.client.sendResponse(new NewNavigatorEventCategoriesComposer());
|
||||
this.client.sendResponse(new NewNavigatorSettingsComposer(this.client.getHabbo().getHabboStats().navigatorWindowSettings));
|
||||
}
|
||||
}
|
||||
|
@ -21,12 +21,15 @@ public class AnswerPollEvent extends MessageHandler {
|
||||
int pollId = this.packet.readInt();
|
||||
int questionId = this.packet.readInt();
|
||||
int count = this.packet.readInt();
|
||||
String answers = this.packet.readString();
|
||||
|
||||
StringBuilder answer = new StringBuilder();
|
||||
for (int i = 0; i < count; i++) {
|
||||
answer.append(":").append(this.packet.readString());
|
||||
answer.append(":").append(answers);
|
||||
}
|
||||
|
||||
if(answer.length() <= 0) return;
|
||||
|
||||
if (pollId == 0 && questionId <= 0) {
|
||||
this.client.getHabbo().getHabboInfo().getCurrentRoom().handleWordQuiz(this.client.getHabbo(), answer.toString());
|
||||
return;
|
||||
|
@ -10,7 +10,7 @@ public class SetHomeRoomEvent extends MessageHandler {
|
||||
|
||||
if (roomId != this.client.getHabbo().getHabboInfo().getHomeRoom()) {
|
||||
this.client.getHabbo().getHabboInfo().setHomeRoom(roomId);
|
||||
this.client.sendResponse(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()));
|
||||
this.client.sendResponse(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,12 +39,12 @@ public class PostItSaveDataEvent extends MessageHandler {
|
||||
if (!(item instanceof InteractionPostIt))
|
||||
return;
|
||||
|
||||
if (!color.equalsIgnoreCase(PostItColor.YELLOW.hexColor) && !room.hasRights(this.client.getHabbo()) && item.getUserId() != this.client.getHabbo().getHabboInfo().getId()) {
|
||||
if (!color.equalsIgnoreCase(PostItColor.YELLOW.hexColor) && !room.hasRights(this.client.getHabbo())) {
|
||||
if (!text.startsWith(item.getExtradata().replace(item.getExtradata().split(" ")[0], ""))) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!room.hasRights(this.client.getHabbo()) && item.getUserId() != this.client.getHabbo().getHabboInfo().getId())
|
||||
if (!room.hasRights(this.client.getHabbo()))
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -43,11 +43,6 @@ public class RequestUserDataEvent extends MessageHandler {
|
||||
messages.add(new UserDataComposer(this.client.getHabbo()).compose());
|
||||
messages.add(new UserPerksComposer(this.client.getHabbo()).compose());
|
||||
|
||||
if (!this.client.getHabbo().getHabboStats().nux || Emulator.getConfig().getBoolean("retro.style.homeroom") && this.client.getHabbo().getHabboInfo().getHomeRoom() != 0)
|
||||
messages.add(new ForwardToRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom()).compose());
|
||||
else if (!this.client.getHabbo().getHabboStats().nux || Emulator.getConfig().getBoolean("retro.style.homeroom") && RoomManager.HOME_ROOM_ID > 0)
|
||||
messages.add(new ForwardToRoomComposer(RoomManager.HOME_ROOM_ID).compose());
|
||||
|
||||
messages.add(new MeMenuSettingsComposer(this.client.getHabbo()).compose());
|
||||
|
||||
|
||||
|
@ -212,7 +212,7 @@ public class Outgoing {
|
||||
|
||||
//Uknown but work
|
||||
public final static int IsFirstLoginOfDayComposer = 793; // PRODUCTION-201611291003-338511768 //Quest Engine
|
||||
public final static int UnknownComposer5 = 2833; // PRODUCTION-201611291003-338511768 //Mysterbox
|
||||
public final static int MysteryBoxKeysComposer = 2833; // PRODUCTION-201611291003-338511768 //Mysterbox
|
||||
public final static int IgnoredUsersComposer = 126; // PRODUCTION-201611291003-338511768
|
||||
public final static int NewNavigatorMetaDataComposer = 3052; // PRODUCTION-201611291003-338511768
|
||||
public final static int NewNavigatorSearchResultsComposer = 2690; // PRODUCTION-201611291003-338511768
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.eu.habbo.messages.incoming.handshake;
|
||||
package com.eu.habbo.messages.outgoing.mysterybox;
|
||||
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class UnknownComposer5 extends MessageComposer {
|
||||
public class MysteryBoxKeysComposer extends MessageComposer {
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.UnknownComposer5);
|
||||
this.response.init(Outgoing.MysteryBoxKeysComposer);
|
||||
this.response.appendString(""); //Box color
|
||||
this.response.appendString(""); //Key color
|
||||
return this.response;
|
@ -1,14 +0,0 @@
|
||||
package com.eu.habbo.messages.outgoing.unknown;
|
||||
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class UnknownComposer5 extends MessageComposer {
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.UnknownComposer5);
|
||||
this.response.appendInt(0);
|
||||
return this.response;
|
||||
}
|
||||
}
|
@ -6,18 +6,18 @@ import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class UserHomeRoomComposer extends MessageComposer {
|
||||
private final int homeRoom;
|
||||
private final int newRoom;
|
||||
private final int roomToEnter;
|
||||
|
||||
public UserHomeRoomComposer(int homeRoom, int newRoom) {
|
||||
public UserHomeRoomComposer(int homeRoom, int roomToEnter) {
|
||||
this.homeRoom = homeRoom;
|
||||
this.newRoom = newRoom;
|
||||
this.roomToEnter = roomToEnter;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.UserHomeRoomComposer);
|
||||
this.response.appendInt(this.homeRoom);
|
||||
this.response.appendInt(this.newRoom);
|
||||
this.response.appendInt(this.roomToEnter);
|
||||
return this.response;
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ public class HabboGiveHandItemToHabbo implements Runnable {
|
||||
if (itemId > 0) {
|
||||
this.from.getRoomUnit().setHandItem(0);
|
||||
this.from.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserHandItemComposer(this.from.getRoomUnit()).compose());
|
||||
this.target.getRoomUnit().lookAtPoint(this.from.getRoomUnit().getCurrentLocation());
|
||||
this.target.getRoomUnit().statusUpdate(true);
|
||||
this.target.getClient().sendResponse(new RoomUserReceivedHandItemComposer(this.from.getRoomUnit(), itemId));
|
||||
this.target.getRoomUnit().setHandItem(itemId);
|
||||
this.target.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserHandItemComposer(this.target.getRoomUnit()).compose());
|
||||
|
Loading…
Reference in New Issue
Block a user