diff --git a/2006Redone Server/src/com/rebotted/game/content/combat/CombatAssistant.java b/2006Redone Server/src/com/rebotted/game/content/combat/CombatAssistant.java index 55a437d4..70dd1ad9 100644 --- a/2006Redone Server/src/com/rebotted/game/content/combat/CombatAssistant.java +++ b/2006Redone Server/src/com/rebotted/game/content/combat/CombatAssistant.java @@ -61,7 +61,7 @@ public class CombatAssistant { NpcHandler.npcs[i].animUpdateRequired = true; NpcHandler.npcs[i].updateRequired = true; } - if (CombatConstants.COMBAT_SOUNDS && NpcHandler.npcs[i].npcType < 3177 && NpcHandler.npcs[i].npcType > 3180) { + if (CombatConstants.COMBAT_SOUNDS) { c.getPacketSender().sendSound(CombatSounds.getNpcBlockSound(NpcHandler.npcs[c.oldNpcIndex].npcType), 100, 0); } NpcHandler.npcs[i].facePlayer(c.playerId); @@ -644,9 +644,7 @@ public class CombatAssistant { return; } if (c.usingRangeWeapon || c.usingBow - && CombatConstants.COMBAT_SOUNDS - && NpcHandler.npcs[i].npcType < 3177 - && NpcHandler.npcs[i].npcType > 3180) { + && CombatConstants.COMBAT_SOUNDS) { c.getPacketSender().sendSound(SoundList.SHOOT_ARROW, 100, 0); } diff --git a/2006Redone Server/src/com/rebotted/game/content/combat/npcs/NpcCombat.java b/2006Redone Server/src/com/rebotted/game/content/combat/npcs/NpcCombat.java index a3172158..2f681ddf 100644 --- a/2006Redone Server/src/com/rebotted/game/content/combat/npcs/NpcCombat.java +++ b/2006Redone Server/src/com/rebotted/game/content/combat/npcs/NpcCombat.java @@ -241,9 +241,7 @@ public class NpcCombat { c.singleCombatDelay2 = System.currentTimeMillis(); NpcHandler.npcs[i].oldIndex = c.playerId; NpcData.startAnimation(NpcEmotes.getAttackEmote(i), i); - if (CombatConstants.COMBAT_SOUNDS - && NpcHandler.npcs[i].npcType < 3177 - && NpcHandler.npcs[i].npcType > 3180) { + if (CombatConstants.COMBAT_SOUNDS) { c.getPacketSender() .sendSound( CombatSounds diff --git a/2006Redone Server/src/com/rebotted/game/content/combat/npcs/NpcEmotes.java b/2006Redone Server/src/com/rebotted/game/content/combat/npcs/NpcEmotes.java index 07d65e1d..344ca3fc 100644 --- a/2006Redone Server/src/com/rebotted/game/content/combat/npcs/NpcEmotes.java +++ b/2006Redone Server/src/com/rebotted/game/content/combat/npcs/NpcEmotes.java @@ -165,43 +165,25 @@ public enum NpcEmotes { return -1; } -// public static int getDeadEmote(Player player, int i) { -// for (NpcEmotes e : NpcEmotes.values()) { -// for (int f = 0; f < e.getNpcId().length; f++) { -// if (NpcHandler.npcs[i].npcType == e.getNpcId()[f]) { -// return e.getDead(); -// } else { -// switch (NpcHandler.npcs[i].npcType) { -// case 2745: -// return 2654; -// case 1158: -// GameEngine.npcHandler.spawnSecondForm(player, i); -// return 6242; -// case 1160: -// GameEngine.npcHandler.spawnFirstForm(player, i); -// return 6233; -// } -// } -// } -// } -// return 2304; -// } -// -//} -public static int getDeadEmote(int i) { - for (NpcEmotes e : NpcEmotes.values()) { - for (int f = 0; f < e.getNpcId().length; f++) { - if (NpcHandler.npcs[i].npcType == e.getNpcId()[f]) { - return e.getDead(); - } else { - switch (NpcHandler.npcs[i].npcType) { + public static int getDeadEmote(Player player, int i) { + for (NpcEmotes e : NpcEmotes.values()) { + for (int f = 0; f < e.getNpcId().length; f++) { + if (NpcHandler.npcs[i].npcType == e.getNpcId()[f]) { + return e.getDead(); + } else { + switch (NpcHandler.npcs[i].npcType) { case 2745: return 2654; + case 1158: + GameEngine.npcHandler.spawnSecondForm(player, i); + return 6242; + case 1160: + GameEngine.npcHandler.spawnFirstForm(player, i); + return 6233; + } } } } + return 2304; } - return 2304; -} - } \ No newline at end of file diff --git a/2006Redone Server/src/com/rebotted/game/npcs/NpcHandler.java b/2006Redone Server/src/com/rebotted/game/npcs/NpcHandler.java index ae14d0d4..56668136 100644 --- a/2006Redone Server/src/com/rebotted/game/npcs/NpcHandler.java +++ b/2006Redone Server/src/com/rebotted/game/npcs/NpcHandler.java @@ -647,27 +647,16 @@ public class NpcHandler { } if (npcs[i].isDead) { - if (npcs[i].actionTimer == 0 && npcs[i].applyDead == false - && npcs[i].needRespawn == false) { + if (npcs[i].actionTimer == 0 && npcs[i].applyDead == false && npcs[i].needRespawn == false) { npcs[i].updateRequired = true; npcs[i].facePlayer(0); if (npcs[i].killedBy <= 0) npcs[i].killedBy = NpcData.getNpcKillerId(i); - npcs[i].animNumber = NpcEmotes.getDeadEmote(i); // dead - // emote Player c = (Client) PlayerHandler.players[npcs[i].killedBy]; if (c != null) { -// if (npcs[i].killedBy <= 0) -// npcs[i].killedBy = NpcData.getNpcKillerId(i); -// npcs[i].animNumber = NpcEmotes.getDeadEmote(c, i); // dead emote - if (CombatConstants.COMBAT_SOUNDS - && NpcHandler.npcs[i].npcType < 3177 - && NpcHandler.npcs[i].npcType > 3180) { - c.getPacketSender() - .sendSound( - CombatSounds - .getNpcDeathSounds(npcs[i].npcType), - 100, 0); + npcs[i].animNumber = NpcEmotes.getDeadEmote(c, i); // dead emote + if (CombatConstants.COMBAT_SOUNDS) { + c.getPacketSender().sendSound(CombatSounds.getNpcDeathSounds(npcs[i].npcType), 100, 0); } } npcs[i].animUpdateRequired = true; diff --git a/2006Redone Server/src/com/rebotted/game/players/Player.java b/2006Redone Server/src/com/rebotted/game/players/Player.java index 8f630bd8..b1d70eb6 100644 --- a/2006Redone Server/src/com/rebotted/game/players/Player.java +++ b/2006Redone Server/src/com/rebotted/game/players/Player.java @@ -1706,7 +1706,15 @@ public abstract class Player { || absX >= 2371 && absX <= 2422 && absY >= 5062 && absY <= 5117 || absX >= 2896 && absX <= 2927 && absY >= 3595 && absY <= 3630 || absX >= 2892 && absX <= 2932 && absY >= 4435 && absY <= 4464 - || absX >= 2256 && absX <= 2287 && absY >= 4680 && absY <= 4711) { + || absX >= 2256 && absX <= 2287 && absY >= 4680 && absY <= 4711 + || inKqArea()) { + return true; + } + return false; + } + + public boolean inKqArea() { + if (absX >= 3467 && absX <= 3506 && absY >= 9477 && absY <= 9513) { return true; } return false;