Replaced qualified names with simple names.
This commit is contained in:
@@ -3399,7 +3399,7 @@ public final class Config
|
||||
*/
|
||||
public static void saveHexid(int serverId, String hexId)
|
||||
{
|
||||
Config.saveHexid(serverId, hexId, HEXID_FILE);
|
||||
saveHexid(serverId, hexId, HEXID_FILE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -84,7 +84,7 @@ public final class CommonUtil
|
||||
{
|
||||
final byte[] data = new byte[buf.remaining()];
|
||||
buf.get(data);
|
||||
final String hex = CommonUtil.printData(data, data.length);
|
||||
final String hex = printData(data, data.length);
|
||||
buf.position(buf.position() - data.length);
|
||||
return hex;
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ public final class NewCrypt
|
||||
*/
|
||||
public static boolean verifyChecksum(byte[] raw)
|
||||
{
|
||||
return NewCrypt.verifyChecksum(raw, 0, raw.length);
|
||||
return verifyChecksum(raw, 0, raw.length);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,7 +97,7 @@ public final class NewCrypt
|
||||
*/
|
||||
public static void appendChecksum(byte[] raw)
|
||||
{
|
||||
NewCrypt.appendChecksum(raw, 0, raw.length);
|
||||
appendChecksum(raw, 0, raw.length);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,7 +142,7 @@ public final class NewCrypt
|
||||
*/
|
||||
public static void encXORPass(byte[] raw, int key)
|
||||
{
|
||||
NewCrypt.encXORPass(raw, 0, raw.length, key);
|
||||
encXORPass(raw, 0, raw.length, key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1696,7 +1696,7 @@ public class SevenSigns
|
||||
{
|
||||
// Gives "Victor of War" passive skill to all online characters with Cabal, which controls Seal of Strife
|
||||
final int cabal = getPlayerCabal(player.getObjectId());
|
||||
if (cabal != SevenSigns.CABAL_NULL)
|
||||
if (cabal != CABAL_NULL)
|
||||
{
|
||||
if (cabal == strifeOwner)
|
||||
{
|
||||
|
@@ -857,22 +857,22 @@ public class SevenSignsFestival implements SpawnListener
|
||||
|
||||
switch (festivalId)
|
||||
{
|
||||
case SevenSignsFestival.FESTIVAL_LEVEL_MAX_31:
|
||||
case FESTIVAL_LEVEL_MAX_31:
|
||||
{
|
||||
maxLevel = 31;
|
||||
break;
|
||||
}
|
||||
case SevenSignsFestival.FESTIVAL_LEVEL_MAX_42:
|
||||
case FESTIVAL_LEVEL_MAX_42:
|
||||
{
|
||||
maxLevel = 42;
|
||||
break;
|
||||
}
|
||||
case SevenSignsFestival.FESTIVAL_LEVEL_MAX_53:
|
||||
case FESTIVAL_LEVEL_MAX_53:
|
||||
{
|
||||
maxLevel = 53;
|
||||
break;
|
||||
}
|
||||
case SevenSignsFestival.FESTIVAL_LEVEL_MAX_64:
|
||||
case FESTIVAL_LEVEL_MAX_64:
|
||||
{
|
||||
maxLevel = 64;
|
||||
break;
|
||||
|
@@ -426,7 +426,7 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
_fearTask.cancel(true);
|
||||
_fearTask = null;
|
||||
_actor.stopAbnormalVisualEffect(true, AbnormalVisualEffect.TURN_FLEE);
|
||||
setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
setIntention(AI_INTENTION_IDLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -614,7 +614,7 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
}
|
||||
|
||||
// Set the AI Intention to AI_INTENTION_ATTACK
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
|
||||
setIntention(AI_INTENTION_ATTACK, hated);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -834,7 +834,7 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
// Check if the L2Object is inside the Faction Range of the actor
|
||||
if (called.hasAI())
|
||||
{
|
||||
if ((Math.abs(originalAttackTarget.getZ() - called.getZ()) < 600) && npc.getAttackByList().contains(originalAttackTarget) && ((called.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (called.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE)) && (called.getInstanceId() == npc.getInstanceId()))
|
||||
if ((Math.abs(originalAttackTarget.getZ() - called.getZ()) < 600) && npc.getAttackByList().contains(originalAttackTarget) && ((called.getAI()._intention == AI_INTENTION_IDLE) || (called.getAI()._intention == AI_INTENTION_ACTIVE)) && (called.getInstanceId() == npc.getInstanceId()))
|
||||
{
|
||||
if (originalAttackTarget.isPlayable())
|
||||
{
|
||||
@@ -854,10 +854,10 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
called.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, originalAttackTarget, 1);
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnAttackableFactionCall(called, getActiveChar(), originalAttackTarget.getActingPlayer(), originalAttackTarget.isSummon()), called);
|
||||
}
|
||||
else if ((called instanceof L2Attackable) && (getAttackTarget() != null) && (called.getAI()._intention != CtrlIntention.AI_INTENTION_ATTACK))
|
||||
else if ((called instanceof L2Attackable) && (getAttackTarget() != null) && (called.getAI()._intention != AI_INTENTION_ATTACK))
|
||||
{
|
||||
((L2Attackable) called).addDamageHate(getAttackTarget(), 0, npc.getHating(getAttackTarget()));
|
||||
called.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, getAttackTarget());
|
||||
called.getAI().setIntention(AI_INTENTION_ATTACK, getAttackTarget());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2329,11 +2329,11 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
// Set the Intention to AI_INTENTION_ATTACK
|
||||
if (getIntention() != AI_INTENTION_ATTACK)
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
|
||||
setIntention(AI_INTENTION_ATTACK, attacker);
|
||||
}
|
||||
else if (me.getMostHated() != getAttackTarget())
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
|
||||
setIntention(AI_INTENTION_ATTACK, attacker);
|
||||
}
|
||||
|
||||
if (me instanceof L2MonsterInstance)
|
||||
@@ -2377,7 +2377,7 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
me.addDamageHate(target, 0, aggro);
|
||||
|
||||
// Set the actor AI Intention to AI_INTENTION_ATTACK
|
||||
if (getIntention() != CtrlIntention.AI_INTENTION_ATTACK)
|
||||
if (getIntention() != AI_INTENTION_ATTACK)
|
||||
{
|
||||
// Set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance
|
||||
if (!me.isRunning())
|
||||
@@ -2385,7 +2385,7 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
me.setRunning();
|
||||
}
|
||||
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
setIntention(AI_INTENTION_ATTACK, target);
|
||||
}
|
||||
|
||||
if (me instanceof L2MonsterInstance)
|
||||
|
@@ -911,7 +911,7 @@ public class L2CharacterAI extends AbstractAI
|
||||
}
|
||||
|
||||
// If pathfinding enabled the creature will go to the destination or it will go to the nearest obstacle.
|
||||
setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, Config.PATHFINDING ? GeoEngine.getInstance().canMoveToTargetLoc(_actor.getX(), _actor.getY(), _actor.getZ(), posX, posY, posZ, _actor.getInstanceId()) : new Location(posX, posY, posZ));
|
||||
setIntention(AI_INTENTION_MOVE_TO, Config.PATHFINDING ? GeoEngine.getInstance().canMoveToTargetLoc(_actor.getX(), _actor.getY(), _actor.getZ(), posX, posY, posZ, _actor.getInstanceId()) : new Location(posX, posY, posZ));
|
||||
}
|
||||
|
||||
protected boolean maybeMoveToPosition(ILocational worldPosition, int offset)
|
||||
@@ -1046,16 +1046,16 @@ public class L2CharacterAI extends AbstractAI
|
||||
{
|
||||
// If player is trying attack target but he cannot move to attack target
|
||||
// change his intention to idle
|
||||
if (_actor.getAI().getIntention() == CtrlIntention.AI_INTENTION_ATTACK)
|
||||
if (_actor.getAI().getIntention() == AI_INTENTION_ATTACK)
|
||||
{
|
||||
_actor.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
_actor.getAI().setIntention(AI_INTENTION_IDLE);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// while flying there is no move to cast
|
||||
if ((_actor.getAI().getIntention() == CtrlIntention.AI_INTENTION_CAST) && (_actor instanceof L2PcInstance) && _actor.isTransformed() && !_actor.getTransformation().isCombat())
|
||||
if ((_actor.getAI().getIntention() == AI_INTENTION_CAST) && (_actor instanceof L2PcInstance) && _actor.isTransformed() && !_actor.getTransformation().isCombat())
|
||||
{
|
||||
_actor.sendPacket(SystemMessageId.THE_DISTANCE_IS_TOO_FAR_AND_SO_THE_CASTING_HAS_BEEN_STOPPED);
|
||||
_actor.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
|
@@ -88,9 +88,9 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
||||
{
|
||||
case AI_IDLE:
|
||||
{
|
||||
if (getIntention() != CtrlIntention.AI_INTENTION_ACTIVE)
|
||||
if (getIntention() != AI_INTENTION_ACTIVE)
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
setIntention(AI_INTENTION_ACTIVE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -367,7 +367,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
||||
}
|
||||
|
||||
_actor.setRunning();
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
|
||||
setIntention(AI_INTENTION_ATTACK, hated);
|
||||
}
|
||||
|
||||
private boolean checkAutoAttackCondition(L2Character target)
|
||||
|
@@ -285,7 +285,7 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
|
||||
// Set the AI Intention to AI_INTENTION_ATTACK
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated, null);
|
||||
setIntention(AI_INTENTION_ATTACK, hated, null);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -395,7 +395,7 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
|
||||
if (npc.getAI() != null) // TODO: possibly check not needed
|
||||
{
|
||||
if (!npc.isDead() && (Math.abs(target.getZ() - npc.getZ()) < 600) && ((npc.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (npc.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE)) && target.isInsideRadius(npc, 1500, true, false) && GeoEngine.getInstance().canSeeTarget(npc, target))
|
||||
if (!npc.isDead() && (Math.abs(target.getZ() - npc.getZ()) < 600) && ((npc.getAI()._intention == AI_INTENTION_IDLE) || (npc.getAI()._intention == AI_INTENTION_ACTIVE)) && target.isInsideRadius(npc, 1500, true, false) && GeoEngine.getInstance().canSeeTarget(npc, target))
|
||||
{
|
||||
// Notify the L2Object AI with EVT_AGGRESSION
|
||||
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, getAttackTarget(), 1);
|
||||
@@ -694,7 +694,7 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
// Set the Intention to AI_INTENTION_ATTACK
|
||||
if (getIntention() != AI_INTENTION_ATTACK)
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker, null);
|
||||
setIntention(AI_INTENTION_ATTACK, attacker, null);
|
||||
}
|
||||
|
||||
super.onEvtAttacked(attacker);
|
||||
@@ -738,7 +738,7 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
|
||||
// Set the actor AI Intention to AI_INTENTION_ATTACK
|
||||
if (getIntention() != CtrlIntention.AI_INTENTION_ATTACK)
|
||||
if (getIntention() != AI_INTENTION_ATTACK)
|
||||
{
|
||||
// Set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance
|
||||
if (!_actor.isRunning())
|
||||
@@ -753,7 +753,7 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
// Check if the L2SiegeGuardInstance is not too far from its home location
|
||||
if (((homeX * homeX) + (homeY * homeY)) < 3240000)
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target, null);
|
||||
setIntention(AI_INTENTION_ATTACK, target, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -283,7 +283,7 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
|
||||
// Set the AI Intention to AI_INTENTION_ATTACK
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated, null);
|
||||
setIntention(AI_INTENTION_ATTACK, hated, null);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -393,7 +393,7 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
|
||||
if (npc.getAI() != null) // TODO: possibly check not needed
|
||||
{
|
||||
if (!npc.isDead() && (Math.abs(target.getZ() - npc.getZ()) < 600) && ((npc.getAI()._intention == CtrlIntention.AI_INTENTION_IDLE) || (npc.getAI()._intention == CtrlIntention.AI_INTENTION_ACTIVE)) && target.isInsideRadius(npc, 1500, true, false) && GeoEngine.getInstance().canSeeTarget(npc, target))
|
||||
if (!npc.isDead() && (Math.abs(target.getZ() - npc.getZ()) < 600) && ((npc.getAI()._intention == AI_INTENTION_IDLE) || (npc.getAI()._intention == AI_INTENTION_ACTIVE)) && target.isInsideRadius(npc, 1500, true, false) && GeoEngine.getInstance().canSeeTarget(npc, target))
|
||||
{
|
||||
// Notify the L2Object AI with EVT_AGGRESSION
|
||||
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, getAttackTarget(), 1);
|
||||
@@ -702,7 +702,7 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
// Set the Intention to AI_INTENTION_ATTACK
|
||||
if (getIntention() != AI_INTENTION_ATTACK)
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker, null);
|
||||
setIntention(AI_INTENTION_ATTACK, attacker, null);
|
||||
}
|
||||
|
||||
super.onEvtAttacked(attacker);
|
||||
@@ -746,7 +746,7 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
}
|
||||
|
||||
// Set the actor AI Intention to AI_INTENTION_ATTACK
|
||||
if (getIntention() != CtrlIntention.AI_INTENTION_ATTACK)
|
||||
if (getIntention() != AI_INTENTION_ATTACK)
|
||||
{
|
||||
// Set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance
|
||||
if (!_actor.isRunning())
|
||||
@@ -761,7 +761,7 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
// Check if the L2SiegeGuardInstance is not too far from its home location
|
||||
if (((homeX * homeX) + (homeY * homeY)) < 3240000)
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target, null);
|
||||
setIntention(AI_INTENTION_ATTACK, target, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -202,7 +202,7 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
|
||||
}
|
||||
else
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
|
||||
setIntention(AI_INTENTION_ATTACK, _lastAttack);
|
||||
_lastAttack = null;
|
||||
}
|
||||
}
|
||||
|
@@ -88,9 +88,9 @@ public class TopicBBSManager extends BaseBBSManager
|
||||
else
|
||||
{
|
||||
f.vload();
|
||||
final Topic t = new Topic(Topic.ConstructorType.CREATE, TopicBBSManager.getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), activeChar.getName(), activeChar.getObjectId(), Topic.MEMO, 0);
|
||||
final Topic t = new Topic(Topic.ConstructorType.CREATE, getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), activeChar.getName(), activeChar.getObjectId(), Topic.MEMO, 0);
|
||||
f.addTopic(t);
|
||||
TopicBBSManager.getInstance().setMaxID(t.getID(), f);
|
||||
getInstance().setMaxID(t.getID(), f);
|
||||
final Post p = new Post(activeChar.getName(), activeChar.getObjectId(), Calendar.getInstance().getTimeInMillis(), t.getID(), f.getID(), ar4);
|
||||
PostBBSManager.getInstance().addPostByTopic(p, t);
|
||||
parsecmd("_bbsmemo", activeChar);
|
||||
|
@@ -146,17 +146,17 @@ public final class SkillData
|
||||
{
|
||||
final Skill[] temp = new Skill[2 + (addNoble ? 1 : 0) + (hasCastle ? 2 : 0)];
|
||||
int i = 0;
|
||||
temp[i++] = _skills.get(SkillData.getSkillHashCode(246, 1));
|
||||
temp[i++] = _skills.get(SkillData.getSkillHashCode(247, 1));
|
||||
temp[i++] = _skills.get(getSkillHashCode(246, 1));
|
||||
temp[i++] = _skills.get(getSkillHashCode(247, 1));
|
||||
|
||||
if (addNoble)
|
||||
{
|
||||
temp[i++] = _skills.get(SkillData.getSkillHashCode(326, 1));
|
||||
temp[i++] = _skills.get(getSkillHashCode(326, 1));
|
||||
}
|
||||
if (hasCastle)
|
||||
{
|
||||
temp[i++] = _skills.get(SkillData.getSkillHashCode(844, 1));
|
||||
temp[i++] = _skills.get(SkillData.getSkillHashCode(845, 1));
|
||||
temp[i++] = _skills.get(getSkillHashCode(844, 1));
|
||||
temp[i++] = _skills.get(getSkillHashCode(845, 1));
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
@@ -312,7 +312,7 @@ public final class HandysBlockCheckerManager
|
||||
{
|
||||
final int arena = player.getBlockCheckerArena();
|
||||
final int team = getHolder(arena).getPlayerTeam(player);
|
||||
HandysBlockCheckerManager.getInstance().removePlayer(player, arena, team);
|
||||
getInstance().removePlayer(player, arena, team);
|
||||
if (player.getTeam() == Team.NONE)
|
||||
{
|
||||
return;
|
||||
|
@@ -104,7 +104,7 @@ public final class QuestManager
|
||||
LOGGER.log(Level.SEVERE, "Failed loading scripts.cfg, no script going to be loaded!", e);
|
||||
}
|
||||
|
||||
QuestManager.getInstance().report();
|
||||
getInstance().report();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -666,7 +666,7 @@ public final class ZoneManager implements IGameXmlReader
|
||||
return null;
|
||||
}
|
||||
|
||||
for (L2ZoneType temp : ZoneManager.getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
||||
for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
||||
{
|
||||
if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character))
|
||||
{
|
||||
@@ -689,7 +689,7 @@ public final class ZoneManager implements IGameXmlReader
|
||||
return null;
|
||||
}
|
||||
|
||||
for (L2ZoneType temp : ZoneManager.getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
||||
for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ()))
|
||||
{
|
||||
if ((temp instanceof L2OlympiadStadiumZone) && temp.isCharacterInZone(character))
|
||||
{
|
||||
|
@@ -260,7 +260,7 @@ public class BlockList
|
||||
final L2PcInstance player = L2World.getInstance().getPlayer(ownerId);
|
||||
if (player != null)
|
||||
{
|
||||
return BlockList.isBlocked(player, targetId);
|
||||
return isBlocked(player, targetId);
|
||||
}
|
||||
if (!OFFLINE_LIST.containsKey(ownerId))
|
||||
{
|
||||
|
@@ -1839,7 +1839,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
pledgeType = getAvailablePledgeTypes(pledgeType);
|
||||
if (pledgeType == 0)
|
||||
{
|
||||
if (pledgeType == L2Clan.SUBUNIT_ACADEMY)
|
||||
if (pledgeType == SUBUNIT_ACADEMY)
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOUR_CLAN_HAS_ALREADY_ESTABLISHED_A_CLAN_ACADEMY);
|
||||
}
|
||||
@@ -1857,7 +1857,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
|
||||
// Royal Guard 5000 points per each
|
||||
// Order of Knights 10000 points per each
|
||||
if ((pledgeType != -1) && (((getReputationScore() < Config.ROYAL_GUARD_COST) && (pledgeType < L2Clan.SUBUNIT_KNIGHT1)) || ((getReputationScore() < Config.KNIGHT_UNIT_COST) && (pledgeType > L2Clan.SUBUNIT_ROYAL2))))
|
||||
if ((pledgeType != -1) && (((getReputationScore() < Config.ROYAL_GUARD_COST) && (pledgeType < SUBUNIT_KNIGHT1)) || ((getReputationScore() < Config.KNIGHT_UNIT_COST) && (pledgeType > SUBUNIT_ROYAL2))))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.THE_CLAN_REPUTATION_SCORE_IS_TOO_LOW);
|
||||
return null;
|
||||
@@ -1879,7 +1879,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
{
|
||||
// Royal Guard 5000 points per each
|
||||
// Order of Knights 10000 points per each
|
||||
if (pledgeType < L2Clan.SUBUNIT_KNIGHT1)
|
||||
if (pledgeType < SUBUNIT_KNIGHT1)
|
||||
{
|
||||
setReputationScore(getReputationScore() - Config.ROYAL_GUARD_COST, true);
|
||||
}
|
||||
@@ -2403,7 +2403,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
player.sendPacket(SystemMessageId.TO_CREATE_AN_ALLIANCE_YOUR_CLAN_MUST_BE_LEVEL_5_OR_HIGHER);
|
||||
return;
|
||||
}
|
||||
if ((getAllyPenaltyExpiryTime() > System.currentTimeMillis()) && (getAllyPenaltyType() == L2Clan.PENALTY_TYPE_DISSOLVE_ALLY))
|
||||
if ((getAllyPenaltyExpiryTime() > System.currentTimeMillis()) && (getAllyPenaltyType() == PENALTY_TYPE_DISSOLVE_ALLY))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_CREATE_A_NEW_ALLIANCE_WITHIN_1_DAY_OF_DISSOLUTION);
|
||||
return;
|
||||
@@ -2476,7 +2476,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
setAllyId(0);
|
||||
setAllyName(null);
|
||||
changeAllyCrest(0, false);
|
||||
setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000L), L2Clan.PENALTY_TYPE_DISSOLVE_ALLY); // 24*60*60*1000 = 86400000
|
||||
setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000L), PENALTY_TYPE_DISSOLVE_ALLY); // 24*60*60*1000 = 86400000
|
||||
updateClanInDB();
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,6 @@ import java.util.logging.Logger;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
@@ -236,7 +235,7 @@ public class TradeList
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((Inventory.MAX_ADENA / count) < price)
|
||||
if ((MAX_ADENA / count) < price)
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
||||
return null;
|
||||
@@ -292,7 +291,7 @@ public class TradeList
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((Inventory.MAX_ADENA / count) < price)
|
||||
if ((MAX_ADENA / count) < price)
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Attempt to overflow adena !");
|
||||
return null;
|
||||
|
@@ -683,7 +683,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
setIsTeleporting(true);
|
||||
setTarget(null);
|
||||
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
|
||||
if (Config.OFFSET_ON_TELEPORT_ENABLED && (randomOffset > 0))
|
||||
{
|
||||
@@ -872,7 +872,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
final TerminateReturn attackReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttack(this, target), this, TerminateReturn.class);
|
||||
if ((attackReturn != null) && attackReturn.terminate())
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
@@ -881,7 +881,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target), target, TerminateReturn.class);
|
||||
if ((attackedReturn != null) && attackedReturn.terminate())
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
@@ -890,7 +890,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
if ((isNpc() && target.isAlikeDead()) || !isInSurroundingRegion(target))
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
@@ -898,7 +898,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
if (target.isDead())
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
@@ -957,14 +957,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
// Checking if target has moved to peace zone
|
||||
else if (target.isInsidePeaceZone(getActingPlayer()))
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (isInsidePeaceZone(this, target))
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
@@ -977,7 +977,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
||||
{
|
||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
@@ -4962,7 +4962,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
return;
|
||||
}
|
||||
// Notify AI with AI_INTENTION_ATTACK
|
||||
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);
|
||||
player.getAI().setIntention(AI_INTENTION_ATTACK, this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5539,7 +5539,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
if ((getAI().getNextIntention() == null) || (getAI().getNextIntention().getCtrlIntention() != CtrlIntention.AI_INTENTION_MOVE_TO))
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
getAI().setIntention(AI_INTENTION_ATTACK, target);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -8228,7 +8228,7 @@ public final class L2PcInstance extends L2Playable
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((getActiveEnchantItemId() != L2PcInstance.ID_NONE) || (getActiveEnchantAttrItemId() != L2PcInstance.ID_NONE))
|
||||
if ((getActiveEnchantItemId() != ID_NONE) || (getActiveEnchantAttrItemId() != ID_NONE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -880,7 +880,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
*/
|
||||
public static boolean isAssignableTo(Object obj, Class<?> clazz)
|
||||
{
|
||||
return L2NpcTemplate.isAssignableTo(obj.getClass(), clazz);
|
||||
return isAssignableTo(obj.getClass(), clazz);
|
||||
}
|
||||
|
||||
public boolean canTeach(ClassId classId)
|
||||
|
@@ -844,25 +844,25 @@ public class FortSiege implements Siegable
|
||||
if (delay > 3600000) // more than hour, how this can happens ? spawn suspicious merchant
|
||||
{
|
||||
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(3600), delay - 3600000);
|
||||
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(3600), delay - 3600000);
|
||||
}
|
||||
if (delay > 600000) // more than 10 min, spawn suspicious merchant
|
||||
{
|
||||
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(600), delay - 600000);
|
||||
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(600), delay - 600000);
|
||||
}
|
||||
else if (delay > 300000)
|
||||
{
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(300), delay - 300000);
|
||||
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(300), delay - 300000);
|
||||
}
|
||||
else if (delay > 60000)
|
||||
{
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(60), delay - 60000);
|
||||
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(60), delay - 60000);
|
||||
}
|
||||
else
|
||||
{
|
||||
// lower than 1 min, set to 1 min
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(60), 0);
|
||||
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(60), 0);
|
||||
}
|
||||
|
||||
LOGGER.info("Siege of " + getFort().getName() + " fort: " + getFort().getSiegeDate().getTime());
|
||||
@@ -892,7 +892,7 @@ public class FortSiege implements Siegable
|
||||
}
|
||||
|
||||
// Execute siege auto start
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(3600), 0);
|
||||
_siegeStartTask = ThreadPool.schedule(new ScheduleStartSiegeTask(3600), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1028,7 +1028,7 @@ public class Siege implements Siegable
|
||||
{
|
||||
_scheduledStartSiegeTask.cancel(false);
|
||||
}
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(getCastle()), 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1345,7 +1345,7 @@ public class Siege implements Siegable
|
||||
if (_scheduledStartSiegeTask != null)
|
||||
{
|
||||
_scheduledStartSiegeTask.cancel(true);
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(getCastle()), 1000);
|
||||
}
|
||||
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
|
@@ -1272,7 +1272,7 @@ public abstract class Inventory extends ItemContainer
|
||||
*/
|
||||
public L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot)
|
||||
{
|
||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
||||
final ChangeRecorder recorder = newRecorder();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1303,7 +1303,7 @@ public abstract class Inventory extends ItemContainer
|
||||
*/
|
||||
public L2ItemInstance[] unEquipItemInSlotAndRecord(int slot)
|
||||
{
|
||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
||||
final ChangeRecorder recorder = newRecorder();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1469,7 +1469,7 @@ public abstract class Inventory extends ItemContainer
|
||||
*/
|
||||
public L2ItemInstance[] equipItemAndRecord(L2ItemInstance item)
|
||||
{
|
||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
||||
final ChangeRecorder recorder = newRecorder();
|
||||
|
||||
try
|
||||
{
|
||||
|
@@ -59,7 +59,6 @@ import com.l2jmobius.gameserver.model.events.impl.character.player.inventory.OnP
|
||||
import com.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
|
||||
import com.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Armor;
|
||||
import com.l2jmobius.gameserver.model.items.L2EtcItem;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
@@ -269,7 +268,7 @@ public final class L2ItemInstance extends L2Object
|
||||
ItemsOnGroundManager.getInstance().removeObject(this);
|
||||
}
|
||||
|
||||
if (!Config.DISABLE_TUTORIAL && ((itemId == Inventory.ADENA_ID) || (itemId == 6353)))
|
||||
if (!Config.DISABLE_TUTORIAL && ((itemId == ADENA_ID) || (itemId == 6353)))
|
||||
{
|
||||
// Note from UnAfraid:
|
||||
// Unhardcode this?
|
||||
@@ -847,7 +846,7 @@ public final class L2ItemInstance extends L2Object
|
||||
&& (player.getActiveEnchantItemId() != getObjectId()) // Not momentarily used enchant scroll
|
||||
&& (player.getActiveEnchantSupportItemId() != getObjectId()) // Not momentarily used enchant support item
|
||||
&& (player.getActiveEnchantAttrItemId() != getObjectId()) // Not momentarily used enchant attribute item
|
||||
&& (allowAdena || (getId() != Inventory.ADENA_ID)) // Not Adena
|
||||
&& (allowAdena || (getId() != ADENA_ID)) // Not Adena
|
||||
&& ((player.getCurrentSkill() == null) || (player.getCurrentSkill().getSkill().getItemConsumeId() != getId())) && (!player.isCastingSimultaneouslyNow() || (player.getLastSimultaneousSkillCast() == null) || (player.getLastSimultaneousSkillCast().getItemConsumeId() != getId())) && (allowNonTradeable || (isTradeable() && (!((getItem().getItemType() == EtcItemType.PET_COLLAR) && player.havePetInvItems())))));
|
||||
}
|
||||
|
||||
|
@@ -548,12 +548,12 @@ public final class Formulas
|
||||
|
||||
switch (shld)
|
||||
{
|
||||
case Formulas.SHIELD_DEFENSE_SUCCEED:
|
||||
case SHIELD_DEFENSE_SUCCEED:
|
||||
{
|
||||
defence += target.getShldDef();
|
||||
break;
|
||||
}
|
||||
case Formulas.SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
|
||||
case SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -619,12 +619,12 @@ public final class Formulas
|
||||
|
||||
switch (shld)
|
||||
{
|
||||
case Formulas.SHIELD_DEFENSE_SUCCEED:
|
||||
case SHIELD_DEFENSE_SUCCEED:
|
||||
{
|
||||
defence += target.getShldDef();
|
||||
break;
|
||||
}
|
||||
case Formulas.SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
|
||||
case SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -1975,7 +1975,7 @@ public final class Formulas
|
||||
}
|
||||
|
||||
// If the skill is a mastery skill, the effect will last twice the default time.
|
||||
if (Formulas.calcSkillMastery(caster, skill))
|
||||
if (calcSkillMastery(caster, skill))
|
||||
{
|
||||
time *= 2;
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ public final class SystemMessage extends AbstractMessagePacket<SystemMessage>
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_2);
|
||||
final SystemMessage sm = getSystemMessage(SystemMessageId.S1_2);
|
||||
sm.addString(text);
|
||||
return sm;
|
||||
}
|
||||
|
@@ -95,7 +95,7 @@ public final class OfflineTradeUtil
|
||||
*/
|
||||
public static boolean enteredOfflineMode(L2PcInstance player)
|
||||
{
|
||||
if (!OfflineTradeUtil.offlineMode(player))
|
||||
if (!offlineMode(player))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -364,7 +364,7 @@ public final class GameServerTable implements IGameXmlReader
|
||||
public String getName()
|
||||
{
|
||||
// this value can't be stored in a private variable because the ID can be changed by setId()
|
||||
return GameServerTable.getInstance().getServerNameById(_id);
|
||||
return getInstance().getServerNameById(_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -67,7 +67,7 @@ public class GameServerThread extends Thread
|
||||
public void run()
|
||||
{
|
||||
_connectionIPAddress = _connection.getInetAddress().getHostAddress();
|
||||
if (GameServerThread.isBannedGameserverIP(_connectionIPAddress))
|
||||
if (isBannedGameserverIP(_connectionIPAddress))
|
||||
{
|
||||
LOGGER.info("GameServerRegistration: IP Address " + _connectionIPAddress + " is on Banned IP list.");
|
||||
forceClose(LoginServerFail.REASON_IP_BANNED);
|
||||
|
@@ -155,7 +155,7 @@ public abstract class BaseGameServerRegister
|
||||
{
|
||||
if (!GameServerTable.getInstance().hasRegisteredGameServerOnId(e.getKey()))
|
||||
{
|
||||
BaseGameServerRegister.registerGameServer(e.getKey(), outDir);
|
||||
registerGameServer(e.getKey(), outDir);
|
||||
return e.getKey();
|
||||
}
|
||||
}
|
||||
@@ -219,7 +219,7 @@ public abstract class BaseGameServerRegister
|
||||
{
|
||||
try
|
||||
{
|
||||
BaseGameServerRegister.unregisterAllGameServers();
|
||||
unregisterAllGameServers();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user