New stuff 4 (#315)

* Added some sound, refactored fletching and arrowmaking a bit... I've maybe fixed the issue with fletching.. idk

Added some sound, refactored fletching and arrowmaking a bit... I've maybe fixed the issue with fletching.. idk

* Commented clipping server side check so we can work on it

Commented and brought back the old code so gates works while we work in the clipping check server side.

* Added Canifis bank to the bank boolean

* Fixed the drops problem
This commit is contained in:
Gptaqbc
2019-12-22 17:34:35 -05:00
committed by Daniel Ginovker
parent 7f7e00788e
commit b07dd8cfb7
2 changed files with 39 additions and 18 deletions
@@ -165,26 +165,43 @@ public enum NpcEmotes {
return -1; return -1;
} }
public static int getDeadEmote(Player player, int i) { // public static int getDeadEmote(Player player, int i) {
for (NpcEmotes e : NpcEmotes.values()) { // for (NpcEmotes e : NpcEmotes.values()) {
for (int f = 0; f < e.getNpcId().length; f++) { // for (int f = 0; f < e.getNpcId().length; f++) {
if (NpcHandler.npcs[i].npcType == e.getNpcId()[f]) { // if (NpcHandler.npcs[i].npcType == e.getNpcId()[f]) {
return e.getDead(); // return e.getDead();
} else { // } else {
switch (NpcHandler.npcs[i].npcType) { // 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) {
case 2745: case 2745:
return 2654; return 2654;
case 1158:
GameEngine.npcHandler.spawnSecondForm(player, i);
return 6242;
case 1160:
GameEngine.npcHandler.spawnFirstForm(player, i);
return 6233;
}
} }
} }
} }
return 2304;
} }
return 2304;
}
} }
@@ -651,11 +651,15 @@ public class NpcHandler {
&& npcs[i].needRespawn == false) { && npcs[i].needRespawn == false) {
npcs[i].updateRequired = true; npcs[i].updateRequired = true;
npcs[i].facePlayer(0); 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]; Player c = (Client) PlayerHandler.players[npcs[i].killedBy];
if (c != null) { if (c != null) {
if (npcs[i].killedBy <= 0) // if (npcs[i].killedBy <= 0)
npcs[i].killedBy = NpcData.getNpcKillerId(i); // npcs[i].killedBy = NpcData.getNpcKillerId(i);
npcs[i].animNumber = NpcEmotes.getDeadEmote(c, i); // dead emote // npcs[i].animNumber = NpcEmotes.getDeadEmote(c, i); // dead emote
if (CombatConstants.COMBAT_SOUNDS if (CombatConstants.COMBAT_SOUNDS
&& NpcHandler.npcs[i].npcType < 3177 && NpcHandler.npcs[i].npcType < 3177
&& NpcHandler.npcs[i].npcType > 3180) { && NpcHandler.npcs[i].npcType > 3180) {