Fix dark wizzies aggro, add more togglerender commands and add it to ::commands itself, fixed spam clicking tree gives a ton of logs (#185)

* Finish #167

* Fix #182

* Fixed #183
This commit is contained in:
Daniel Ginovker
2019-11-16 18:17:54 -05:00
committed by GitHub
parent 7366de67e1
commit 165f156814
9 changed files with 14 additions and 5 deletions
@@ -13,7 +13,7 @@ public class NpcAggressive {
1155, 374, 1157, 1158, 1159, 1160, 141, 1459, 1456, 96, 97, 142,
2550, 2551, 2552, 2553, 2558, 2559, 2560, 2561, 2562, 2563,
2564, 2565, 2892, 2894, 2881, 2882, 2883, 172, 1593, 144, 112, 84, 3068,
50, 1590, 1591, 1592, 53, 54, 55, 178, 49, 174, 2455, 2456, 2454,
50, 1590, 1591, 1592, 53, 54, 55, 178, 49, 2455, 2456, 2454,
82, 752, 1608, 1609, 1610, 1827, 2783, 1926, 1931, 2457, 412, 1604, 1612,
110, 1611, 83, 941, 49, 117, 111, 125, 1154, 107, 1342, 1338, 447, 448, 449, 917,
1265, 1267
@@ -202,6 +202,7 @@ public class Woodcutting {
}
public static void startWoodcutting(final Client player, final int j, final int x, final int y, final int type) {
CycleEventHandler.getSingleton().stopEvents(player, "WoodcuttingEvent".hashCode());
if (player.isWoodcutting || player.isFletching || player.isFiremaking || player.playerIsFletching) {
return;
}
@@ -236,7 +237,7 @@ public class Woodcutting {
return;
}
if (Misc.goodDistance(player.objectX, player.objectY, player.absX, player.absY, 3)) {
if (player.isWoodcutting == true) {
if (player.isWoodcutting) {
player.getActionSender().sendMessage("You are already woodcutting!");
return;
}
@@ -258,7 +259,7 @@ public class Woodcutting {
} else {
player.getActionSender().sendMessage("You swing your axe at the tree.");
}
CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
CycleEventHandler.getSingleton().addEvent("WoodcuttingEvent".hashCode(), player, new CycleEvent() {
@Override
public void execute(CycleEventContainer container) {