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:
Olivier
2022-04-18 19:40:19 -07:00
committed by GitHub
parent 81cd126a33
commit 7514826803
5 changed files with 19 additions and 13 deletions
@@ -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) {