Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
IdleNotifier: change isAttackable to support deadman mode (#2144)
Browse files Browse the repository at this point in the history
* change isAttackable to support deadman mode, where anyone from lvl 3 - 126 is attackable
  • Loading branch information
michaelcreatesstuff authored and xKylee committed Dec 20, 2019
1 parent 006900d commit 2af5ecb
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,19 @@ public static int getWildernessLevelFrom(WorldPoint point)
public static boolean isAttackable(Client client, Player player)
{
int wildernessLevel = 0;
if (!(client.getVar(Varbits.IN_WILDERNESS) == 1 || WorldType.isPvpWorld(client.getWorldType())))

if (!(client.getVar(Varbits.IN_WILDERNESS) == 1
|| WorldType.isPvpWorld(client.getWorldType())
|| WorldType.isDeadmanWorld(client.getWorldType())))
{
return false;
}

if (WorldType.isDeadmanWorld(client.getWorldType()))
{
return true;
}

if (WorldType.isPvpWorld(client.getWorldType()))
{
if (client.getVar(Varbits.IN_WILDERNESS) != 1)
Expand Down

0 comments on commit 2af5ecb

Please sign in to comment.