mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40: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,8 +21,14 @@ public class CatalogLimitedConfiguration implements Runnable
|
||||
this.itemId = itemId;
|
||||
this.totalSet = totalSet;
|
||||
this.limitedNumbers = availableNumbers;
|
||||
|
||||
if(Emulator.getConfig().getBoolean("catalog.ltd.random", true)) {
|
||||
Collections.shuffle(this.limitedNumbers);
|
||||
}
|
||||
else {
|
||||
Collections.reverse(this.limitedNumbers);
|
||||
}
|
||||
}
|
||||
|
||||
public int getNumber()
|
||||
{
|
||||
@ -80,8 +86,14 @@ public class CatalogLimitedConfiguration implements Runnable
|
||||
}
|
||||
|
||||
this.totalSet += amount;
|
||||
|
||||
if(Emulator.getConfig().getBoolean("catalog.ltd.random", true)) {
|
||||
Collections.shuffle(this.limitedNumbers);
|
||||
}
|
||||
else {
|
||||
Collections.reverse(this.limitedNumbers);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int available()
|
||||
|
Loading…
Reference in New Issue
Block a user