More readable ZoneId enums.
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#Olympiad Properties
|
||||
#Tue Aug 20 13:40:12 EEST 2019
|
||||
NextWeeklyChange_DateFormat=27 \u0391\u03C5\u03B3 2019, 1\:35\:34 \u03BC.\u03BC.
|
||||
ValdationEnd=0
|
||||
NextWeeklyChange=1566902134230
|
||||
Period=0
|
||||
CurrentCycle=1
|
||||
OlympiadEnd=1567328400230
|
||||
OlympiadEnd_DateFormat=1 \u03A3\u03B5\u03C0 2019, 12\:00\:00 \u03BC.\u03BC.
|
@@ -485,7 +485,7 @@ public class MapRegionTable
|
||||
final PlayerInstance player = (PlayerInstance) creature;
|
||||
|
||||
// If in Monster Derby Track
|
||||
if (player.isInsideZone(ZoneId.MONSTERTRACK))
|
||||
if (player.isInsideZone(ZoneId.MONSTER_TRACK))
|
||||
{
|
||||
return new Location(12661, 181687, -3560);
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ public class AdminZone implements IAdminCommandHandler
|
||||
BuilderUtil.sendSysMessage(activeChar, "This is NOT a PvP zone.");
|
||||
}
|
||||
|
||||
if (activeChar.isInsideZone(ZoneId.NOLANDING))
|
||||
if (activeChar.isInsideZone(ZoneId.NO_LANDING))
|
||||
{
|
||||
BuilderUtil.sendSysMessage(activeChar, "This is a no landing zone.");
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class AdminZone implements IAdminCommandHandler
|
||||
BuilderUtil.sendSysMessage(activeChar, "This is NOT a no landing zone.");
|
||||
}
|
||||
|
||||
if (activeChar.isInsideZone(ZoneId.NOSTORE))
|
||||
if (activeChar.isInsideZone(ZoneId.NO_STORE))
|
||||
{
|
||||
BuilderUtil.sendSysMessage(activeChar, "This is a no-store zone.");
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ public class ClanGate implements ISkillHandler
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isInFunEvent() || player.isInsideZone(ZoneId.NOLANDING) || player.isInOlympiadMode() || player.isInsideZone(ZoneId.PVP) || (GrandBossManager.getInstance().getZone(player) != null))
|
||||
if (player.isInFunEvent() || player.isInsideZone(ZoneId.NO_LANDING) || player.isInOlympiadMode() || player.isInsideZone(ZoneId.PVP) || (GrandBossManager.getInstance().getZone(player) != null))
|
||||
{
|
||||
player.sendMessage("Cannot open the portal here.");
|
||||
return;
|
||||
|
@@ -168,7 +168,7 @@ public class SiegeFlag implements ISkillHandler
|
||||
{
|
||||
sm.addString("You have already placed the maximum number of flags possible");
|
||||
}
|
||||
else if (player.isInsideZone(ZoneId.NOHQ))
|
||||
else if (player.isInsideZone(ZoneId.NO_HQ))
|
||||
{
|
||||
sm.addString("You cannot place flag here.");
|
||||
}
|
||||
@@ -214,7 +214,7 @@ public class SiegeFlag implements ISkillHandler
|
||||
{
|
||||
sm.addString("You have already placed the maximum number of flags possible");
|
||||
}
|
||||
else if (player.isInsideZone(ZoneId.NOHQ))
|
||||
else if (player.isInsideZone(ZoneId.NO_HQ))
|
||||
{
|
||||
sm.addString("You cannot place flag here.");
|
||||
}
|
||||
|
@@ -373,7 +373,7 @@ public class Wedding implements IVoicedCommandHandler
|
||||
activeChar.sendMessage("You have a cursed weapon, you can't go to your partner.");
|
||||
return false;
|
||||
}
|
||||
else if (activeChar.isInsideZone(ZoneId.NOSUMMONFRIEND))
|
||||
else if (activeChar.isInsideZone(ZoneId.NO_SUMMON_FRIEND))
|
||||
{
|
||||
activeChar.sendMessage("You are in area which blocks summoning.");
|
||||
return false;
|
||||
|
@@ -154,7 +154,7 @@ public class CastleMagicianInstance extends NpcInstance
|
||||
*/
|
||||
private static final boolean validateGateCondition(PlayerInstance clanLeader, PlayerInstance player)
|
||||
{
|
||||
if (clanLeader.isAlikeDead() || clanLeader.isInStoreMode() || clanLeader.isRooted() || clanLeader.isInCombat() || clanLeader.isInOlympiadMode() || clanLeader.isFestivalParticipant() || clanLeader.inObserverMode() || clanLeader.isInsideZone(ZoneId.NOSUMMONFRIEND))
|
||||
if (clanLeader.isAlikeDead() || clanLeader.isInStoreMode() || clanLeader.isRooted() || clanLeader.isInCombat() || clanLeader.isInOlympiadMode() || clanLeader.isFestivalParticipant() || clanLeader.inObserverMode() || clanLeader.isInsideZone(ZoneId.NO_SUMMON_FRIEND))
|
||||
{
|
||||
player.sendMessage("Couldn't teleport to clan leader. The requirements was not meet.");
|
||||
return false;
|
||||
|
@@ -11767,7 +11767,7 @@ public class PlayerInstance extends Playable
|
||||
public boolean checkLandingState()
|
||||
{
|
||||
// Check if char is in a no landing zone
|
||||
if (isInsideZone(ZoneId.NOLANDING))
|
||||
if (isInsideZone(ZoneId.NO_LANDING))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -14636,7 +14636,7 @@ public class PlayerInstance extends Playable
|
||||
return false;
|
||||
}
|
||||
|
||||
if (summonerChar.isInsideZone(ZoneId.NOSUMMONFRIEND) || summonerChar.isFlying() || summonerChar.isMounted())
|
||||
if (summonerChar.isInsideZone(ZoneId.NO_SUMMON_FRIEND) || summonerChar.isFlying() || summonerChar.isMounted())
|
||||
{
|
||||
summonerChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING));
|
||||
return false;
|
||||
@@ -14697,7 +14697,7 @@ public class PlayerInstance extends Playable
|
||||
return false;
|
||||
}
|
||||
|
||||
if (targetChar.isInsideZone(ZoneId.NOSUMMONFRIEND))
|
||||
if (targetChar.isInsideZone(ZoneId.NO_SUMMON_FRIEND))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -26,18 +26,18 @@ public enum ZoneId
|
||||
PEACE,
|
||||
SIEGE,
|
||||
MOTHERTREE,
|
||||
CLANHALL,
|
||||
CLAN_HALL,
|
||||
UNUSED,
|
||||
NOLANDING,
|
||||
NO_LANDING,
|
||||
WATER,
|
||||
JAIL,
|
||||
MONSTERTRACK,
|
||||
MONSTER_TRACK,
|
||||
SWAMP,
|
||||
NOSUMMONFRIEND,
|
||||
OLY,
|
||||
NOHQ,
|
||||
DANGERAREA,
|
||||
NOSTORE;
|
||||
NO_SUMMON_FRIEND,
|
||||
OLYMPIAD,
|
||||
NO_HQ,
|
||||
DANGER_AREA,
|
||||
NO_STORE;
|
||||
|
||||
public static int getZoneCount()
|
||||
{
|
||||
|
@@ -89,13 +89,13 @@ public class CastleTeleportZone extends ZoneType
|
||||
@Override
|
||||
protected void onEnter(Creature creature)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.OLY, true);
|
||||
creature.setInsideZone(ZoneId.OLYMPIAD, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExit(Creature creature)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.OLY, false);
|
||||
creature.setInsideZone(ZoneId.OLYMPIAD, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -85,7 +85,7 @@ public class ClanHallZone extends ZoneType
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
// Set as in clan hall
|
||||
creature.setInsideZone(ZoneId.CLANHALL, true);
|
||||
creature.setInsideZone(ZoneId.CLAN_HALL, true);
|
||||
|
||||
ClanHall clanHall = ClanHallManager.getInstance().getClanHallById(_clanHallId);
|
||||
|
||||
@@ -112,7 +112,7 @@ public class ClanHallZone extends ZoneType
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
// Unset clanhall zone
|
||||
creature.setInsideZone(ZoneId.CLANHALL, false);
|
||||
creature.setInsideZone(ZoneId.CLAN_HALL, false);
|
||||
|
||||
// Send a message
|
||||
if ((((PlayerInstance) creature).getClanId() != 0) && (ClanHallManager.getInstance().getClanHallById(_clanHallId).getOwnerId() == ((PlayerInstance) creature).getClanId()))
|
||||
|
@@ -36,7 +36,7 @@ public class DerbyTrackZone extends PeaceZone
|
||||
{
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.MONSTERTRACK, true);
|
||||
creature.setInsideZone(ZoneId.MONSTER_TRACK, true);
|
||||
}
|
||||
super.onEnter(creature);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class DerbyTrackZone extends PeaceZone
|
||||
{
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.MONSTERTRACK, false);
|
||||
creature.setInsideZone(ZoneId.MONSTER_TRACK, false);
|
||||
}
|
||||
super.onExit(creature);
|
||||
}
|
||||
|
@@ -146,7 +146,7 @@ public class EffectZone extends ZoneType
|
||||
|
||||
if ((creature instanceof PlayerInstance) && _isShowDangerIcon)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.DANGERAREA, true);
|
||||
creature.setInsideZone(ZoneId.DANGER_AREA, true);
|
||||
creature.sendPacket(new EtcStatusUpdate((PlayerInstance) creature));
|
||||
}
|
||||
}
|
||||
@@ -156,8 +156,8 @@ public class EffectZone extends ZoneType
|
||||
{
|
||||
if ((creature instanceof PlayerInstance) && _isShowDangerIcon)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.DANGERAREA, false);
|
||||
if (!creature.isInsideZone(ZoneId.DANGERAREA))
|
||||
creature.setInsideZone(ZoneId.DANGER_AREA, false);
|
||||
if (!creature.isInsideZone(ZoneId.DANGER_AREA))
|
||||
{
|
||||
creature.sendPacket(new EtcStatusUpdate((PlayerInstance) creature));
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ public class JailZone extends ZoneType
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.JAIL, true);
|
||||
creature.setInsideZone(ZoneId.NOSUMMONFRIEND, true);
|
||||
creature.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
|
||||
if (Config.JAIL_IS_PVP)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.PVP, true);
|
||||
@@ -60,7 +60,7 @@ public class JailZone extends ZoneType
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.JAIL, false);
|
||||
creature.setInsideZone(ZoneId.NOSUMMONFRIEND, false);
|
||||
creature.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
|
||||
if (Config.JAIL_IS_PVP)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.PVP, false);
|
||||
|
@@ -37,7 +37,7 @@ public class NoHqZone extends ZoneType
|
||||
{
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.NOHQ, true);
|
||||
creature.setInsideZone(ZoneId.NO_HQ, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class NoHqZone extends ZoneType
|
||||
{
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.NOHQ, false);
|
||||
creature.setInsideZone(ZoneId.NO_HQ, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ public class NoLandingZone extends ZoneType
|
||||
{
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.NOLANDING, true);
|
||||
creature.setInsideZone(ZoneId.NO_LANDING, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class NoLandingZone extends ZoneType
|
||||
{
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.NOLANDING, false);
|
||||
creature.setInsideZone(ZoneId.NO_LANDING, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ public class NoStoreZone extends ZoneType
|
||||
{
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.NOSTORE, true);
|
||||
creature.setInsideZone(ZoneId.NO_STORE, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class NoStoreZone extends ZoneType
|
||||
{
|
||||
if (creature instanceof PlayerInstance)
|
||||
{
|
||||
creature.setInsideZone(ZoneId.NOSTORE, false);
|
||||
creature.setInsideZone(ZoneId.NO_STORE, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -74,7 +74,7 @@ public class RequestRecipeShopListSet extends GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isInsideZone(ZoneId.NOSTORE))
|
||||
if (player.isInsideZone(ZoneId.NO_STORE))
|
||||
{
|
||||
// player.sendPacket(new RecipeShopManageList(player, player.isDwarven()));
|
||||
player.sendMessage("Private manufacture are disable here. Try in another place.");
|
||||
|
@@ -96,7 +96,7 @@ public class SetPrivateStoreListBuy extends GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isInsideZone(ZoneId.NOSTORE))
|
||||
if (player.isInsideZone(ZoneId.NO_STORE))
|
||||
{
|
||||
player.sendPacket(new PrivateStoreManageListBuy(player));
|
||||
player.sendMessage("Trade are disable here. Try in another place.");
|
||||
|
@@ -96,7 +96,7 @@ public class SetPrivateStoreListSell extends GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isInsideZone(ZoneId.NOSTORE))
|
||||
if (player.isInsideZone(ZoneId.NO_STORE))
|
||||
{
|
||||
player.sendPacket(new PrivateStoreManageListSell(player));
|
||||
player.sendMessage("Trade are disable here. Try in another place.");
|
||||
|
@@ -55,7 +55,7 @@ public class EtcStatusUpdate extends GameServerPacket
|
||||
writeD(_player.getWeightPenalty()); // 1-4 weight penalty, lvl (1=50%, 2=66.6%, 3=80%, 4=100%)
|
||||
writeD(_player.isInRefusalMode() || _player.isChatBanned() ? 1 : 0); // 1 = block all chat
|
||||
// writeD(0x00); // 1 = danger area
|
||||
writeD(_player.isInsideZone(ZoneId.DANGERAREA)/* || _player.isInDangerArea() */ ? 1 : 0); // 1 = danger area
|
||||
writeD(_player.isInsideZone(ZoneId.DANGER_AREA)/* || _player.isInDangerArea() */ ? 1 : 0); // 1 = danger area
|
||||
writeD(Math.min(_player.getExpertisePenalty() + _player.getMasteryPenalty() + _player.getMasteryWeapPenalty(), 1)); // 1 = grade penalty
|
||||
writeD(_player.getCharmOfCourage() ? 1 : 0); // 1 = charm of courage (no xp loss in siege..)
|
||||
writeD(_player.getDeathPenaltyBuffLevel()); // 1-15 death penalty, lvl (combat ability decreased due to death)
|
||||
|
@@ -1029,7 +1029,7 @@ public class Formulas
|
||||
}
|
||||
}
|
||||
|
||||
if (player.isInsideZone(ZoneId.CLANHALL) && (player.getClan() != null))
|
||||
if (player.isInsideZone(ZoneId.CLAN_HALL) && (player.getClan() != null))
|
||||
{
|
||||
final int clanHallIndex = player.getClan().getHasHideout();
|
||||
if (clanHallIndex > 0)
|
||||
@@ -1108,7 +1108,7 @@ public class Formulas
|
||||
mpRegenBonus += 1;
|
||||
}
|
||||
|
||||
if (player.isInsideZone(ZoneId.CLANHALL) && (player.getClan() != null))
|
||||
if (player.isInsideZone(ZoneId.CLAN_HALL) && (player.getClan() != null))
|
||||
{
|
||||
final int clanHallIndex = player.getClan().getHasHideout();
|
||||
if (clanHallIndex > 0)
|
||||
|
Reference in New Issue
Block a user