mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-05 08:39:04 +00:00
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:
committed by
Daniel Ginovker
parent
20303071de
commit
68256e41d8
@@ -234,7 +234,7 @@ public class PlayerHandler {
|
||||
players[i] = null;
|
||||
} else {
|
||||
if (!players[i].initialized) {
|
||||
players[i].loginPlayer();
|
||||
players[i].getPacketSender().loginPlayer();
|
||||
players[i].initialized = true;
|
||||
} else {
|
||||
players[i].update();
|
||||
@@ -278,7 +278,7 @@ public class PlayerHandler {
|
||||
int size = plr.npcListSize;
|
||||
plr.npcListSize = 0;
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (plr.RebuildNPCList == false && plr.withinDistance(plr.npcList[i]) == true) {
|
||||
if (plr.rebuildNPCList == false && plr.withinDistance(plr.npcList[i]) == true) {
|
||||
plr.npcList[i].updateNPCMovement(str);
|
||||
plr.npcList[i].appendNPCUpdateBlock(updateBlock);
|
||||
plr.npcList[plr.npcListSize++] = plr.npcList[i];
|
||||
@@ -294,7 +294,7 @@ public class PlayerHandler {
|
||||
for (Npc i : NpcHandler.npcs) {
|
||||
if (i != null) {
|
||||
int id = i.npcId;
|
||||
if (plr.RebuildNPCList == false
|
||||
if (plr.rebuildNPCList == false
|
||||
&& (plr.npcInListBitmap[id >> 3] & 1 << (id & 7)) != 0) {
|
||||
} else if (plr.withinDistance(i) == false) {
|
||||
} else {
|
||||
@@ -303,7 +303,7 @@ public class PlayerHandler {
|
||||
}
|
||||
}
|
||||
|
||||
plr.RebuildNPCList = false;
|
||||
plr.rebuildNPCList = false;
|
||||
|
||||
if (str != null) {
|
||||
if (updateBlock.currentOffset > 0) {
|
||||
|
||||
Reference in New Issue
Block a user