Merge branch 'fix-trophies' into 'dev'

fix trophies

See merge request morningstar/Arcturus-Community!487
This commit is contained in:
Harmonic 2022-04-08 20:33:40 +00:00
commit 1096ff92a3
2 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,8 @@ 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');
-- Add friendship categories table
CREATE TABLE `messenger_categories` (
`id` int NOT NULL AUTO_INCREMENT,

View File

@ -983,6 +983,10 @@ public class CatalogManager {
extradata = "UMAD";
}
if (extradata.length() > Emulator.getConfig().getInt("hotel.trophies.length.max", 300)) {
extradata = extradata.substring(0, Emulator.getConfig().getInt("hotel.trophies.length.max", 300));
}
extradata = habbo.getClient().getHabbo().getHabboInfo().getUsername() + (char) 9 + Calendar.getInstance().get(Calendar.DAY_OF_MONTH) + "-" + (Calendar.getInstance().get(Calendar.MONTH) + 1) + "-" + Calendar.getInstance().get(Calendar.YEAR) + (char) 9 + Emulator.getGameEnvironment().getWordFilter().filter(extradata.replace(((char) 9) + "", ""), habbo);
}