fix trophies

This commit is contained in:
brenoepics 2022-03-03 16:05:43 -03:00
parent d1344c0610
commit c4342e20af
2 changed files with 6 additions and 0 deletions

View File

@ -8,3 +8,5 @@ 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.trophies.length.max', '300');

View File

@ -1002,6 +1002,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);
}