mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
New stuff 6 (#325)
* Some stuff on weight Some stuff on weight * Cleaned some code related to trading and fixed most likely the issue where the player stays busy and cant trade till relog Cleaned some code related to trading and fixed most likely the issue where the player stays busy and cant trade till relog * removed a shitload of '== true' I did a search and replace but I manually checked the changes that were made so there shouldn't be any issue with that. * Fixed drop issue
This commit is contained in:
@@ -967,7 +967,7 @@ public class NpcHandler {
|
||||
// These npcs shouldn't have drops
|
||||
return;
|
||||
}
|
||||
for (ItemDrop possible_drop : NPCDropsHandler.NPC_DROPS(getNpcListName(npcs[i].npcType).toLowerCase(), npcs[i].npcType)) {
|
||||
for (ItemDrop possible_drop : NPCDropsHandler.NPC_DROPS(getNpcListName(npcs[i].npcType).toLowerCase().replace(" ", "_"), npcs[i].npcType)) {
|
||||
if (Misc.random(possible_drop.getChance()) == 0) {
|
||||
int amt = possible_drop.getAmount();
|
||||
GameEngine.itemHandler.createGroundItem(c, possible_drop.getItemID(), npcs[i].absX, npcs[i].absY, amt, c.playerId);
|
||||
|
||||
@@ -820,7 +820,7 @@ public class Commands implements PacketType {
|
||||
boolean attackPlayer = NpcHandler.getNpcListCombat(newNPC) > 0;
|
||||
if (newNPC > 0) {
|
||||
NpcHandler.spawnNpc(player, newNPC, player.absX, player.absY, player.heightLevel, 0, NpcHandler.getNpcListHP(newNPC), maxHit, attack, defence, attackPlayer, false);
|
||||
player.getPacketSender().sendMessage("You spawn a " + NpcHandler.getNpcListName(newNPC).toLowerCase() + ".");
|
||||
player.getPacketSender().sendMessage("You spawn a " + NpcHandler.getNpcListName(newNPC) + ".");
|
||||
//player.npcSpawned = newNPC;
|
||||
} else {
|
||||
player.getPacketSender().sendMessage("Npc " + newNPC + " does not exist.");
|
||||
|
||||
Reference in New Issue
Block a user