mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-05 16:49:06 +00:00
Merge pull request #527
* Various Fixes * Sea Turtle can be cooked, fixed xp received when cooking Manta Ray * Al kharid warrior has correct emote when fighting * Drop tables only roll once for items that do not have 100% drop rate (Prevents multiple items from rolling and dropping on same npc) * Nerfed Tree Spirit (Lost City) max hit (From 20 to 10) * Nerfed Abyssal Demon max hit (From 16 to 8)
This commit is contained in:
@@ -1049,10 +1049,14 @@ public class NpcHandler {
|
||||
// These npcs shouldn't have drops
|
||||
return;
|
||||
}
|
||||
boolean isDropped = false;
|
||||
for (ItemDrop possible_drop : NPCDropsHandler.getNpcDrops(getNpcListName(npcs[i].npcType).toLowerCase().replace(" ", "_"), npcs[i].npcType)) {
|
||||
if (Misc.random(possible_drop.getChance()) == 0) {
|
||||
if (Misc.random(possible_drop.getChance()) == 0 && !isDropped) {
|
||||
int amt = possible_drop.getAmount();
|
||||
GameEngine.itemHandler.createGroundItem(c, possible_drop.getItemID(), npcs[i].absX, npcs[i].absY, amt, c.playerId);
|
||||
//Making sure items that always drop don't cost us our drop table roll
|
||||
if (possible_drop.getChance() > 1)
|
||||
isDropped = true;
|
||||
}
|
||||
}
|
||||
switch (npcs[i].npcType) {
|
||||
|
||||
Reference in New Issue
Block a user