Minor code changes.
This commit is contained in:
@ -206,7 +206,7 @@ final class SelMahumDrill extends AbstractNpcAI
|
||||
// group hate
|
||||
for (L2Character ch : npc.getKnownList().getKnownCharacters())
|
||||
{
|
||||
if (!ch.isInCombat() && ch.isMonster() && (((L2Npc) ch).getSpawn().getName() == npc.getSpawn().getName()))
|
||||
if (!ch.isInCombat() && ch.isMonster() && (((L2Npc) ch).getSpawn().getName().equals(npc.getSpawn().getName())))
|
||||
{
|
||||
addAttackDesire((L2Npc) ch, attacker);
|
||||
}
|
||||
|
@ -651,14 +651,11 @@ public final class Raina extends AbstractNpcAI
|
||||
for (PlayerClass pclass : availSubs)
|
||||
{
|
||||
// scan for already used subclasses
|
||||
final int availClassId = pclass.ordinal();
|
||||
final ClassId cid = ClassId.getClassId(availClassId);
|
||||
|
||||
for (SubClass subList : player.getSubClasses().values())
|
||||
{
|
||||
if (ClassId.getClassId(subList.getClassId()).equalsOrChildOf(cid))
|
||||
if (ClassId.getClassId(subList.getClassId()).equalsOrChildOf(ClassId.getClassId(pclass.ordinal())))
|
||||
{
|
||||
availSubs.remove(cid);
|
||||
availSubs.remove(pclass);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ final class FreyaCelebration extends LongTimeEvent
|
||||
{
|
||||
final long _curr_time = System.currentTimeMillis();
|
||||
final String value = loadGlobalQuestVar(player.getAccountName());
|
||||
final long _reuse_time = value == "" ? 0 : Long.parseLong(value);
|
||||
final long _reuse_time = value.equals("") ? 0 : Long.parseLong(value);
|
||||
|
||||
if (_curr_time > _reuse_time)
|
||||
{
|
||||
|
@ -369,7 +369,7 @@ public class AdminAdmin implements IAdminCommandHandler
|
||||
}
|
||||
else if (command.startsWith("admin_gmon"))
|
||||
{
|
||||
// nothing
|
||||
// TODO why is this empty?
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -638,16 +638,9 @@ public class AutoSpawnHandler
|
||||
return _locList.toArray(new Location[_locList.size()]);
|
||||
}
|
||||
|
||||
public L2Npc[] getNPCInstanceList()
|
||||
public List<L2Npc> getNPCInstanceList()
|
||||
{
|
||||
L2Npc[] ret;
|
||||
synchronized (_npcList)
|
||||
{
|
||||
ret = new L2Npc[_npcList.size()];
|
||||
_npcList.toArray(ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return _npcList;
|
||||
}
|
||||
|
||||
public List<L2Spawn> getSpawns()
|
||||
|
@ -386,10 +386,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_tacticalSigns == null)
|
||||
{
|
||||
_tacticalSigns = new ConcurrentHashMap<>(1);
|
||||
}
|
||||
_tacticalSigns = new ConcurrentHashMap<>(1);
|
||||
}
|
||||
}
|
||||
return _tacticalSigns;
|
||||
|
@ -8320,7 +8320,7 @@ public final class L2PcInstance extends L2Playable
|
||||
// Add Henna skills
|
||||
for (SkillHolder skill : henna.getSkills())
|
||||
{
|
||||
if (!getAllSkills().contains(skill))
|
||||
if (!getAllSkills().contains(skill.getSkill()))
|
||||
{
|
||||
addSkill(skill.getSkill(), true);
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ public class Friend
|
||||
|
||||
public String getName()
|
||||
{
|
||||
if (_name == "")
|
||||
if (_name.equals(""))
|
||||
{
|
||||
_name = CharNameTable.getInstance().getNameById(_friendOID);
|
||||
}
|
||||
|
@ -150,19 +150,17 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
PreparedStatement ps = con.prepareStatement(SQL_LOAD_GUARDS))
|
||||
{
|
||||
ps.setInt(1, _hall.getId());
|
||||
try (ResultSet rset = ps.executeQuery())
|
||||
final ResultSet rset = ps.executeQuery();
|
||||
while (rset.next())
|
||||
{
|
||||
while (rset.next())
|
||||
{
|
||||
final L2Spawn spawn = new L2Spawn(rset.getInt("npcId"));
|
||||
spawn.setX(rset.getInt("x"));
|
||||
spawn.setY(rset.getInt("y"));
|
||||
spawn.setZ(rset.getInt("z"));
|
||||
spawn.setHeading(rset.getInt("heading"));
|
||||
spawn.setRespawnDelay(rset.getInt("respawnDelay"));
|
||||
spawn.setAmount(1);
|
||||
_guards.add(spawn);
|
||||
}
|
||||
final L2Spawn spawn = new L2Spawn(rset.getInt("npcId"));
|
||||
spawn.setX(rset.getInt("x"));
|
||||
spawn.setY(rset.getInt("y"));
|
||||
spawn.setZ(rset.getInt("z"));
|
||||
spawn.setHeading(rset.getInt("heading"));
|
||||
spawn.setRespawnDelay(rset.getInt("respawnDelay"));
|
||||
spawn.setAmount(1);
|
||||
_guards.add(spawn);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -66,7 +66,7 @@ public class RequestAlchemyTryMixCube extends L2GameClientPacket
|
||||
activeChar.sendPacket(ExTryMixCube.FAIL);
|
||||
return;
|
||||
}
|
||||
if (activeChar.isInStoreMode() || activeChar.isInStoreMode())
|
||||
if (activeChar.isInStoreMode())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_ALCHEMY_WHILE_TRADING_OR_USING_A_PRIVATE_STORE_OR_SHOP);
|
||||
activeChar.sendPacket(ExTryMixCube.FAIL);
|
||||
|
@ -55,8 +55,8 @@ public final class RequestAnswerFriendInvite extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.getFriendList().containsValue(requestor.getObjectId()) //
|
||||
|| requestor.getFriendList().containsValue(player.getObjectId()))
|
||||
if (player.getFriendList().containsKey(requestor.getObjectId()) //
|
||||
|| requestor.getFriendList().containsKey(player.getObjectId()))
|
||||
{
|
||||
requestor.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THIS_PLAYER_IS_ALREADY_REGISTERED_ON_YOUR_FRIENDS_LIST));
|
||||
return;
|
||||
|
@ -74,7 +74,7 @@ public class PledgeShowMemberListAll extends L2GameServerPacket
|
||||
{
|
||||
_name = subPledge.getName();
|
||||
}
|
||||
writeD((_name == "") || (_name == name) ? 0 : 1);
|
||||
writeD((_name.equals("")) || (_name.equals(name)) ? 0 : 1);
|
||||
writeD(_clan.getId());
|
||||
writeD(Config.SERVER_ID);
|
||||
writeD(_pledgeType);
|
||||
|
@ -136,7 +136,7 @@ public class IPSubnet
|
||||
{
|
||||
return applyMask(((IPSubnet) o).getAddress());
|
||||
}
|
||||
else if (o instanceof InetAddress)
|
||||
if (o instanceof InetAddress)
|
||||
{
|
||||
return applyMask(((InetAddress) o).getAddress());
|
||||
}
|
||||
|
Reference in New Issue
Block a user