Replaced qualified names with simple names.
This commit is contained in:
@ -1950,7 +1950,7 @@ public final class Config
|
||||
CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
|
||||
ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
|
||||
ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!");
|
||||
ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + Config.EOL + Config.EOL + "Sincerely, Alegria");
|
||||
ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria");
|
||||
ENABLE_BLOCK_CHECKER_EVENT = General.getBoolean("EnableBlockCheckerEvent", false);
|
||||
MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
|
||||
if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
|
||||
@ -2984,7 +2984,7 @@ public final class Config
|
||||
*/
|
||||
public static void saveHexid(int serverId, String hexId)
|
||||
{
|
||||
Config.saveHexid(serverId, hexId, HEXID_FILE);
|
||||
saveHexid(serverId, hexId, HEXID_FILE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -88,7 +88,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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -700,7 +700,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
|
||||
public boolean isFollowing()
|
||||
{
|
||||
return (getTarget() instanceof L2Character) && (getIntention() == CtrlIntention.AI_INTENTION_FOLLOW);
|
||||
return (getTarget() instanceof L2Character) && (getIntention() == AI_INTENTION_FOLLOW);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -164,7 +164,7 @@ public class DoppelgangerAI extends L2CharacterAI
|
||||
}
|
||||
else
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, _lastAttack);
|
||||
setIntention(AI_INTENTION_ATTACK, _lastAttack);
|
||||
_lastAttack = null;
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +490,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;
|
||||
@ -1254,11 +1254,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() != target)
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
|
||||
setIntention(AI_INTENTION_ATTACK, attacker);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1305,7 +1305,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())
|
||||
@ -1313,7 +1313,7 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
me.setRunning();
|
||||
}
|
||||
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
setIntention(AI_INTENTION_ATTACK, target);
|
||||
}
|
||||
|
||||
if (me.isMonster())
|
||||
|
@ -972,16 +972,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)
|
||||
if (_actor.getAI().getIntention() == AI_INTENTION_CAST)
|
||||
{
|
||||
if (_actor.checkTransformed(transform -> !transform.isCombat()))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
@ -386,7 +386,7 @@ public final class L2ControllableMobAI extends L2AttackableAI
|
||||
if (hated != null)
|
||||
{
|
||||
_actor.setRunning();
|
||||
setIntention(CtrlIntention.AI_INTENTION_ATTACK, hated);
|
||||
setIntention(AI_INTENTION_ATTACK, hated);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,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);
|
||||
|
@ -378,8 +378,8 @@ public class ClanTable
|
||||
|
||||
public void deleteclanswars(int clanId1, int clanId2)
|
||||
{
|
||||
final L2Clan clan1 = ClanTable.getInstance().getClan(clanId1);
|
||||
final L2Clan clan2 = ClanTable.getInstance().getClan(clanId2);
|
||||
final L2Clan clan1 = getInstance().getClan(clanId1);
|
||||
final L2Clan clan2 = getInstance().getClan(clanId2);
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnClanWarFinish(clan1, clan2));
|
||||
|
||||
|
@ -187,19 +187,19 @@ public class SkillData implements IGameXmlReader
|
||||
{
|
||||
final List<Skill> temp = new LinkedList<>();
|
||||
|
||||
temp.add(_skills.get(SkillData.getSkillHashCode(CommonSkill.IMPRIT_OF_LIGHT.getId(), 1)));
|
||||
temp.add(_skills.get(SkillData.getSkillHashCode(CommonSkill.IMPRIT_OF_DARKNESS.getId(), 1)));
|
||||
temp.add(_skills.get(getSkillHashCode(CommonSkill.IMPRIT_OF_LIGHT.getId(), 1)));
|
||||
temp.add(_skills.get(getSkillHashCode(CommonSkill.IMPRIT_OF_DARKNESS.getId(), 1)));
|
||||
|
||||
temp.add(_skills.get(SkillData.getSkillHashCode(247, 1))); // Build Headquarters
|
||||
temp.add(_skills.get(getSkillHashCode(247, 1))); // Build Headquarters
|
||||
|
||||
if (addNoble)
|
||||
{
|
||||
temp.add(_skills.get(SkillData.getSkillHashCode(326, 1))); // Build Advanced Headquarters
|
||||
temp.add(_skills.get(getSkillHashCode(326, 1))); // Build Advanced Headquarters
|
||||
}
|
||||
if (hasCastle)
|
||||
{
|
||||
temp.add(_skills.get(SkillData.getSkillHashCode(844, 1))); // Outpost Construction
|
||||
temp.add(_skills.get(SkillData.getSkillHashCode(845, 1))); // Outpost Demolition
|
||||
temp.add(_skills.get(getSkillHashCode(844, 1))); // Outpost Construction
|
||||
temp.add(_skills.get(getSkillHashCode(845, 1))); // Outpost Demolition
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
@ -331,7 +331,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)
|
||||
{
|
||||
player.stopAllEffects();
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -665,7 +665,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))
|
||||
{
|
||||
@ -688,7 +688,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))
|
||||
{
|
||||
|
@ -255,7 +255,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))
|
||||
{
|
||||
|
@ -1836,7 +1836,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);
|
||||
}
|
||||
@ -1854,7 +1854,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_IS_TOO_LOW);
|
||||
return null;
|
||||
@ -1876,7 +1876,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);
|
||||
}
|
||||
@ -2399,7 +2399,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;
|
||||
@ -2471,7 +2471,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;
|
||||
@ -234,7 +233,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;
|
||||
@ -290,7 +289,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;
|
||||
|
@ -773,7 +773,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
setIsTeleporting(true);
|
||||
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
|
||||
// Adjust position a bit
|
||||
z += 5;
|
||||
@ -922,7 +922,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;
|
||||
}
|
||||
@ -930,7 +930,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;
|
||||
}
|
||||
@ -966,14 +966,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;
|
||||
}
|
||||
@ -986,7 +986,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;
|
||||
}
|
||||
@ -1030,7 +1030,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
if (!checkAndEquipAmmunition(weaponItem.getItemType().isCrossbow() ? EtcItemType.BOLT : EtcItemType.ARROW))
|
||||
{
|
||||
// Cancel the action because the L2PcInstance have no arrow
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
sendPacket(SystemMessageId.YOU_HAVE_RUN_OUT_OF_ARROWS);
|
||||
return;
|
||||
@ -1040,7 +1040,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
// Other melee is checked in movement code and for offensive spells a check is done every time
|
||||
if (target.isInsidePeaceZone(getActingPlayer()))
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
getAI().setIntention(AI_INTENTION_ACTIVE);
|
||||
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
|
@ -151,7 +151,7 @@ public class L2Npc extends L2Character
|
||||
private NpcStringId _nameString;
|
||||
|
||||
private StatsSet _params;
|
||||
private DBSpawnManager.DBStatusType _raidStatus;
|
||||
private DBStatusType _raidStatus;
|
||||
|
||||
/** Contains information about local tax payments. */
|
||||
private L2TaxZone _taxZone = null;
|
||||
|
@ -949,7 +949,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 List<Integer> getExtendDrop()
|
||||
|
@ -854,25 +854,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(getClass().getSimpleName() + ": Siege of " + getFort().getName() + " fort: " + getFort().getSiegeDate().getTime());
|
||||
@ -902,7 +902,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);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1346,7 +1346,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();
|
||||
|
@ -1242,7 +1242,7 @@ public abstract class Inventory extends ItemContainer
|
||||
*/
|
||||
public L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot)
|
||||
{
|
||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
||||
final ChangeRecorder recorder = newRecorder();
|
||||
|
||||
try
|
||||
{
|
||||
@ -1273,7 +1273,7 @@ public abstract class Inventory extends ItemContainer
|
||||
*/
|
||||
public L2ItemInstance[] unEquipItemInSlotAndRecord(int slot)
|
||||
{
|
||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
||||
final ChangeRecorder recorder = newRecorder();
|
||||
|
||||
try
|
||||
{
|
||||
@ -1449,7 +1449,7 @@ public abstract class Inventory extends ItemContainer
|
||||
*/
|
||||
public L2ItemInstance[] equipItemAndRecord(L2ItemInstance item)
|
||||
{
|
||||
final Inventory.ChangeRecorder recorder = newRecorder();
|
||||
final ChangeRecorder recorder = newRecorder();
|
||||
|
||||
try
|
||||
{
|
||||
@ -1963,7 +1963,7 @@ public abstract class Inventory extends ItemContainer
|
||||
|
||||
public int getWeaponEnchant()
|
||||
{
|
||||
final L2ItemInstance item = getPaperdollItem(Inventory.PAPERDOLL_RHAND);
|
||||
final L2ItemInstance item = getPaperdollItem(PAPERDOLL_RHAND);
|
||||
return item != null ? item.getEnchantLevel() : 0;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,6 @@ import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerItemP
|
||||
import com.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
|
||||
import com.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
|
||||
import com.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
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;
|
||||
@ -892,7 +891,7 @@ public final class L2ItemInstance extends L2Object
|
||||
&& ((getItem().getType2() != L2Item.TYPE2_MONEY) || (getItem().getType1() != L2Item.TYPE1_SHIELD_ARMOR)) // not money, not shield
|
||||
&& ((pet == null) || (getObjectId() != pet.getControlObjectId())) // Not Control item of currently summoned pet
|
||||
&& !(player.isProcessingItem(getObjectId())) // Not momentarily used enchant scroll
|
||||
&& (allowAdena || (getId() != Inventory.ADENA_ID)) // Not Adena
|
||||
&& (allowAdena || (getId() != ADENA_ID)) // Not Adena
|
||||
&& (!player.isCastingNow(s -> s.getSkill().getItemConsumeId() != getId())) && (allowNonTradeable || (isTradeable() && (!((getItem().getItemType() == EtcItemType.PET_COLLAR) && player.havePetInvItems())))));
|
||||
}
|
||||
|
||||
|
@ -1088,17 +1088,17 @@ public class Olympiad extends ListenersContainer
|
||||
if (!_nobles.containsKey(player.getObjectId()))
|
||||
{
|
||||
final StatsSet statDat = new StatsSet();
|
||||
statDat.set(Olympiad.CLASS_ID, player.getBaseClass());
|
||||
statDat.set(Olympiad.CHAR_NAME, player.getName());
|
||||
statDat.set(Olympiad.POINTS, Olympiad.DEFAULT_POINTS);
|
||||
statDat.set(Olympiad.COMP_DONE, 0);
|
||||
statDat.set(Olympiad.COMP_WON, 0);
|
||||
statDat.set(Olympiad.COMP_LOST, 0);
|
||||
statDat.set(Olympiad.COMP_DRAWN, 0);
|
||||
statDat.set(Olympiad.COMP_DONE_WEEK, 0);
|
||||
statDat.set(Olympiad.COMP_DONE_WEEK_CLASSED, 0);
|
||||
statDat.set(Olympiad.COMP_DONE_WEEK_NON_CLASSED, 0);
|
||||
statDat.set(Olympiad.COMP_DONE_WEEK_TEAM, 0);
|
||||
statDat.set(CLASS_ID, player.getBaseClass());
|
||||
statDat.set(CHAR_NAME, player.getName());
|
||||
statDat.set(POINTS, DEFAULT_POINTS);
|
||||
statDat.set(COMP_DONE, 0);
|
||||
statDat.set(COMP_WON, 0);
|
||||
statDat.set(COMP_LOST, 0);
|
||||
statDat.set(COMP_DRAWN, 0);
|
||||
statDat.set(COMP_DONE_WEEK, 0);
|
||||
statDat.set(COMP_DONE_WEEK_CLASSED, 0);
|
||||
statDat.set(COMP_DONE_WEEK_NON_CLASSED, 0);
|
||||
statDat.set(COMP_DONE_WEEK_TEAM, 0);
|
||||
statDat.set("to_save", true);
|
||||
addNobleStats(player.getObjectId(), statDat);
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ public class SkillCaster implements Runnable
|
||||
EventDispatcher.getInstance().notifyEvent(new OnCreatureSkillFinishCast(caster, target, _skill, _skill.isWithoutAction()), caster);
|
||||
|
||||
// Call the skill's effects and AI interraction and stuff.
|
||||
SkillCaster.callSkill(caster, target, _targets, _skill, _item);
|
||||
callSkill(caster, target, _targets, _skill, _item);
|
||||
|
||||
// Start attack stance.
|
||||
if (!_skill.isWithoutAction())
|
||||
@ -726,7 +726,7 @@ public class SkillCaster implements Runnable
|
||||
{
|
||||
if ((_skill.getNextAction() == NextActionType.ATTACK) && (target != null) && (target != caster) && target.isAutoAttackable(caster))
|
||||
{
|
||||
caster.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
caster.getAI().setIntention(AI_INTENTION_ATTACK, target);
|
||||
}
|
||||
else if ((_skill.getNextAction() == NextActionType.CAST) && (target != null) && (target != caster) && target.isAutoAttackable(caster))
|
||||
{
|
||||
|
@ -82,12 +82,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;
|
||||
}
|
||||
@ -1114,7 +1114,7 @@ public final class Formulas
|
||||
int time = (skill == null) || skill.isPassive() || skill.isToggle() ? -1 : skill.getAbnormalTime();
|
||||
|
||||
// If the skill is a mastery skill, the effect will last twice the default time.
|
||||
if ((skill != null) && Formulas.calcSkillMastery(caster, skill))
|
||||
if ((skill != null) && 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_3);
|
||||
final SystemMessage sm = getSystemMessage(SystemMessageId.S1_3);
|
||||
sm.addString(text);
|
||||
return sm;
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ public final class ScriptEngineManager implements IGameXmlReader
|
||||
public static final Path SCRIPT_FOLDER = Paths.get(Config.DATAPACK_ROOT.getAbsolutePath(), "data", "scripts");
|
||||
public static final Path MASTER_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "MasterHandler.java");
|
||||
public static final Path EFFECT_MASTER_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "EffectMasterHandler.java");
|
||||
public static final Path SKILL_CONDITION_HANDLER_FILE = Paths.get(ScriptEngineManager.SCRIPT_FOLDER.toString(), "handlers", "SkillConditionMasterHandler.java");
|
||||
public static final Path CONDITION_HANDLER_FILE = Paths.get(ScriptEngineManager.SCRIPT_FOLDER.toString(), "handlers", "ConditionMasterHandler.java");
|
||||
public static final Path SKILL_CONDITION_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "SkillConditionMasterHandler.java");
|
||||
public static final Path CONDITION_HANDLER_FILE = Paths.get(SCRIPT_FOLDER.toString(), "handlers", "ConditionMasterHandler.java");
|
||||
|
||||
private final Map<String, IExecutionContext> _extEngines = new HashMap<>();
|
||||
private IExecutionContext _currentExecutionContext = null;
|
||||
|
@ -95,7 +95,7 @@ public final class OfflineTradeUtil
|
||||
*/
|
||||
public static boolean enteredOfflineMode(L2PcInstance player)
|
||||
{
|
||||
if (!OfflineTradeUtil.offlineMode(player))
|
||||
if (!offlineMode(player))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -408,9 +408,9 @@ public class ProcessTask extends Task
|
||||
StringBuffer b = new StringBuffer();
|
||||
b.append("Task[");
|
||||
b.append("cmd=");
|
||||
b.append(ProcessTask.listStrings(command));
|
||||
b.append(listStrings(command));
|
||||
b.append(", env=");
|
||||
b.append(ProcessTask.listStrings(envs));
|
||||
b.append(listStrings(envs));
|
||||
b.append(", ");
|
||||
b.append("dir=");
|
||||
b.append(directory);
|
||||
|
@ -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);
|
||||
|
@ -108,7 +108,7 @@ public abstract class BaseGameServerRegister
|
||||
{
|
||||
interactive = false;
|
||||
|
||||
BaseGameServerRegister.printHelp();
|
||||
printHelp();
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ public abstract class BaseGameServerRegister
|
||||
{
|
||||
if (interactive)
|
||||
{
|
||||
BaseGameServerRegister.startCMD();
|
||||
startCMD();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -129,7 +129,7 @@ public abstract class BaseGameServerRegister
|
||||
}
|
||||
catch (HeadlessException e)
|
||||
{
|
||||
BaseGameServerRegister.startCMD();
|
||||
startCMD();
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ public abstract class BaseGameServerRegister
|
||||
{
|
||||
if (!GameServerTable.getInstance().hasRegisteredGameServerOnId(e.getKey()))
|
||||
{
|
||||
BaseGameServerRegister.registerGameServer(e.getKey(), outDir);
|
||||
registerGameServer(e.getKey(), outDir);
|
||||
return e.getKey();
|
||||
}
|
||||
}
|
||||
@ -372,7 +372,7 @@ public abstract class BaseGameServerRegister
|
||||
{
|
||||
if (_id < 0)
|
||||
{
|
||||
final int registeredId = BaseGameServerRegister.registerFirstAvailable(_outDir);
|
||||
final int registeredId = registerFirstAvailable(_outDir);
|
||||
|
||||
if (registeredId < 0)
|
||||
{
|
||||
@ -392,14 +392,14 @@ public abstract class BaseGameServerRegister
|
||||
if (_force)
|
||||
{
|
||||
System.out.printf(getBundle().getString("forcingRegistration") + Config.EOL, _id);
|
||||
BaseGameServerRegister.unregisterGameServer(_id);
|
||||
BaseGameServerRegister.registerGameServer(_id, _outDir);
|
||||
unregisterGameServer(_id);
|
||||
registerGameServer(_id, _outDir);
|
||||
System.out.printf(getBundle().getString("registrationOk") + Config.EOL, _id);
|
||||
}
|
||||
else if (_fallback)
|
||||
{
|
||||
System.out.println(getBundle().getString("fallingBack"));
|
||||
final int registeredId = BaseGameServerRegister.registerFirstAvailable(_outDir);
|
||||
final int registeredId = registerFirstAvailable(_outDir);
|
||||
|
||||
if (registeredId < 0)
|
||||
{
|
||||
@ -418,7 +418,7 @@ public abstract class BaseGameServerRegister
|
||||
else
|
||||
{
|
||||
System.out.println(getBundle().getString("no"));
|
||||
BaseGameServerRegister.registerGameServer(_id, _outDir);
|
||||
registerGameServer(_id, _outDir);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -456,7 +456,7 @@ public abstract class BaseGameServerRegister
|
||||
System.out.printf(getBundle().getString("removingGsId") + Config.EOL, _id);
|
||||
try
|
||||
{
|
||||
BaseGameServerRegister.unregisterGameServer(_id);
|
||||
unregisterGameServer(_id);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
@ -475,7 +475,7 @@ public abstract class BaseGameServerRegister
|
||||
{
|
||||
try
|
||||
{
|
||||
BaseGameServerRegister.unregisterAllGameServers();
|
||||
unregisterAllGameServers();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user