mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 23:10:52 +01:00
Added new config - catalog.ltd.random
This commit is contained in:
parent
40ab27002b
commit
e225d4d7b4
@ -66,5 +66,6 @@ UPDATE `users_pets` LEFT JOIN `rooms` ON `users_pets`.`room_id` = `rooms`.`id` S
|
||||
ALTER TABLE `users_settings` ADD COLUMN `forums_post_count` int(11) NULL DEFAULT 0 AFTER `perk_trade`;
|
||||
|
||||
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('catalog.guild.hc_required', '1');
|
||||
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('catalog.ltd.random', '1');
|
||||
|
||||
#END DATABASE UPDATE: 2.0.0 -> DEV
|
@ -21,7 +21,13 @@ public class CatalogLimitedConfiguration implements Runnable
|
||||
this.itemId = itemId;
|
||||
this.totalSet = totalSet;
|
||||
this.limitedNumbers = availableNumbers;
|
||||
Collections.shuffle(this.limitedNumbers);
|
||||
|
||||
if(Emulator.getConfig().getBoolean("catalog.ltd.random", true)) {
|
||||
Collections.shuffle(this.limitedNumbers);
|
||||
}
|
||||
else {
|
||||
Collections.reverse(this.limitedNumbers);
|
||||
}
|
||||
}
|
||||
|
||||
public int getNumber()
|
||||
@ -80,7 +86,13 @@ public class CatalogLimitedConfiguration implements Runnable
|
||||
}
|
||||
|
||||
this.totalSet += amount;
|
||||
Collections.shuffle(this.limitedNumbers);
|
||||
|
||||
if(Emulator.getConfig().getBoolean("catalog.ltd.random", true)) {
|
||||
Collections.shuffle(this.limitedNumbers);
|
||||
}
|
||||
else {
|
||||
Collections.reverse(this.limitedNumbers);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user