Method giveItemRandomly should calculate double chance values.
This commit is contained in:
parent
438bbb88b7
commit
67fffe36d7
@ -2876,7 +2876,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2920,6 +2920,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2876,7 +2876,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2920,6 +2920,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2877,7 +2877,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2921,6 +2921,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2877,7 +2877,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2921,6 +2921,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2877,7 +2877,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2921,6 +2921,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2877,7 +2877,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2921,6 +2921,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2877,7 +2877,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2921,6 +2921,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2877,7 +2877,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2921,6 +2921,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2473,7 +2473,7 @@ public abstract class AbstractScript extends ManagedScript
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2517,6 +2517,7 @@ public abstract class AbstractScript extends ManagedScript
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2473,7 +2473,7 @@ public abstract class AbstractScript extends ManagedScript
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2517,6 +2517,7 @@ public abstract class AbstractScript extends ManagedScript
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2851,7 +2851,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2895,6 +2895,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2851,7 +2851,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2895,6 +2895,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2851,7 +2851,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2895,6 +2895,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2851,7 +2851,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2895,6 +2895,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2851,7 +2851,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2895,6 +2895,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2851,7 +2851,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2895,6 +2895,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2851,7 +2851,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
|
|
||||||
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
long minAmountWithBonus = (long) (minAmount * Config.RATE_QUEST_DROP);
|
||||||
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
long maxAmountWithBonus = (long) (maxAmount * Config.RATE_QUEST_DROP);
|
||||||
long dropChanceWithBonus = (long) (dropChance * Config.RATE_QUEST_DROP); // TODO separate configs for rate and amount
|
double dropChanceWithBonus = dropChance * Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||||
{
|
{
|
||||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||||
@ -2895,6 +2895,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
|||||||
{
|
{
|
||||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is no limit, return true every time an item is given
|
// if there is no limit, return true every time an item is given
|
||||||
if (limit <= 0)
|
if (limit <= 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user