mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-08 11:41:28 +01:00
Merge branch 'development'
This commit is contained in:
commit
d7ca994610
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateKits</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>2.6.15</version>
|
||||
<version>2.6.16</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>UltimateKits-${project.version}</finalName>
|
||||
|
@ -298,9 +298,7 @@ public class Kit implements Cloneable {
|
||||
// Amount of items from the kit to give to the player.
|
||||
if (kitAnimation == KitAnimation.ROULETTE)
|
||||
itemAmount = 1; //TODO how about kitAmount > 1? generateRandomItem() will only give 1 random item instead of kitAmount
|
||||
System.out.println("itemAmount" + ": " + itemAmount);
|
||||
int itemGiveAmount = kitAmount > 0 ? itemAmount * kitAmount : kitAmount;
|
||||
System.out.println(itemGiveAmount + " : " + kitAmount + " : " + itemAmount);
|
||||
int itemGiveAmount = kitAmount > 0 ? itemAmount * kitAmount : itemAmount;
|
||||
|
||||
if (Settings.NO_REDEEM_WHEN_FULL.getBoolean() && !hasRoom(player, itemGiveAmount)) {
|
||||
plugin.getLocale().getMessage("event.claim.full").sendPrefixedMessage(player);
|
||||
@ -321,7 +319,6 @@ public class Kit implements Cloneable {
|
||||
if (itemGiveAmount <= 0 && itemGivenAmount != 0) break;
|
||||
double ch = item.getChance() == 0 ? 100 : item.getChance();
|
||||
double rand = Math.random() * 100;
|
||||
System.out.println("We tryin here [" + ch + ":" + rand + "]");
|
||||
itemGiveAmount--;
|
||||
if (rand < ch || ch == 100) {
|
||||
itemGivenAmount++;
|
||||
|
Loading…
Reference in New Issue
Block a user