Some more minor clean up (#215)

* General clean up

- Reduced woodcutting code by alot, reverted the array to an enum
- Moved the login player method to the packet sender
- Deleted some dead code/cleaned up

* More random cleanup/refractoring

- Moved combat constants to combatconstants.java
- Moved dialogue options to dialogueoptions.java
- Deleted more dead code

* Replaced some poorly written methods

- refreshSkill, levelUp, and getTotalLevel all used way too much code for such a simple function so cleaned it up
- deleted a few other bits of dead code

* Fight caves

- Should fix fight caves npcs nulling out in the middle of your waves if they are too far away
- Also removed some unneeded scynchronization in itemassistant.java

* Gates

- Started cleaning up gate system, still can be improved a lot more
This commit is contained in:
Mr Extremez
2019-11-28 10:47:06 -06:00
committed by Daniel Ginovker
parent 20303071de
commit 68256e41d8
32 changed files with 1668 additions and 2126 deletions
@@ -2,6 +2,7 @@ package com.rebotted.game.content.combat.npcs;
import com.rebotted.GameConstants;
import com.rebotted.game.content.combat.CombatAssistant;
import com.rebotted.game.content.combat.CombatConstants;
import com.rebotted.game.content.combat.melee.MeleeData;
import com.rebotted.game.content.minigames.FightCaves;
import com.rebotted.game.content.music.sound.CombatSounds;
@@ -181,7 +182,7 @@ public class NpcCombat {
NpcHandler.npcs[i].attackTimer = NpcData.getNpcDelay(i);
NpcHandler.npcs[i].hitDelayTimer = NpcData.getHitDelay(i);
NpcHandler.npcs[i].attackType = 0;
if (GameConstants.COMBAT_SOUNDS
if (CombatConstants.COMBAT_SOUNDS
&& NpcHandler.npcs[i].npcType < 3177
&& NpcHandler.npcs[i].npcType > 3180) {
c.getPacketSender()
@@ -201,7 +202,7 @@ public class NpcCombat {
if (NpcHandler.multiAttacks(i)) {
multiAttackGfx(i, NpcHandler.npcs[i].projectileId);
NpcData.startAnimation(NpcEmotes.getAttackEmote(i), i);
if (GameConstants.COMBAT_SOUNDS
if (CombatConstants.COMBAT_SOUNDS
&& NpcHandler.npcs[i].npcType < 3177
&& NpcHandler.npcs[i].npcType > 3180) {
c.getPacketSender()
@@ -240,7 +241,7 @@ public class NpcCombat {
c.singleCombatDelay2 = System.currentTimeMillis();
NpcHandler.npcs[i].oldIndex = c.playerId;
NpcData.startAnimation(NpcEmotes.getAttackEmote(i), i);
if (GameConstants.COMBAT_SOUNDS
if (CombatConstants.COMBAT_SOUNDS
&& NpcHandler.npcs[i].npcType < 3177
&& NpcHandler.npcs[i].npcType > 3180) {
c.getPacketSender()