Minor code optimizations.

This commit is contained in:
MobiusDev
2015-07-13 13:55:34 +00:00
parent 97ba8260fa
commit 53b32c4b98
6 changed files with 6 additions and 7 deletions

View File

@@ -135,7 +135,7 @@ public final class DenOfEvil extends AbstractNpcAI
zone.addSkill(skillId, skillLevel + 1); zone.addSkill(skillId, skillLevel + 1);
if (skillLevel == 3) // 3+1=4 if (skillLevel == 3) // 3+1=4
{ {
ThreadPoolManager.getInstance().scheduleAi(new KashaDestruction(zone), 2 * 60 * 1000l); ThreadPoolManager.getInstance().scheduleAi(new KashaDestruction(zone), 2 * 60 * 1000L);
zone.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.DEFEAT_KASHA_S_EYES_TO_LIFT_THE_GREAT_CURSE)); zone.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.DEFEAT_KASHA_S_EYES_TO_LIFT_THE_GREAT_CURSE));
} }
else if (skillLevel == 2) else if (skillLevel == 2)

View File

@@ -149,7 +149,7 @@ public class FactionManager extends AbstractNpcAI
private void broadcastMessageToFaction(String factionName, String message) private void broadcastMessageToFaction(String factionName, String message)
{ {
if (factionName == Config.FACTION_GOOD_TEAM_NAME) if (factionName.equals(Config.FACTION_GOOD_TEAM_NAME))
{ {
for (L2PcInstance player : L2World.getInstance().getAllGoodPlayers()) for (L2PcInstance player : L2World.getInstance().getAllGoodPlayers())
{ {

View File

@@ -815,7 +815,7 @@ public final class Stage1 extends Quest
@Override @Override
public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon) public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon)
{ {
if ((isSummon == false) && (player != null)) if (!isSummon && (player != null))
{ {
InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(player.getInstanceId()); InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(player.getInstanceId());
if (tmpworld instanceof SOD1World) if (tmpworld instanceof SOD1World)

View File

@@ -746,7 +746,7 @@ public final class DarkCloudMansion extends AbstractInstance
{ {
npcobj.isDead = true; npcobj.isDead = true;
} }
if (npcobj.isDead == false) if (!npcobj.isDead)
{ {
cont = false; cont = false;
} }

View File

@@ -14504,7 +14504,7 @@ public final class L2PcInstance extends L2Playable
_log.warning("Premium System: Could not restore premium system data for " + account + "." + e); _log.warning("Premium System: Could not restore premium system data for " + account + "." + e);
e.printStackTrace(); e.printStackTrace();
} }
if (success == false) if (!success)
{ {
PremiumManager.getInstance().removePremiumStatus(player.getAccountName()); PremiumManager.getInstance().removePremiumStatus(player.getAccountName());
player.setPremiumStatus(false); player.setPremiumStatus(false);

View File

@@ -2150,8 +2150,7 @@ public final class Formulas
} }
/** /**
* Calculates karma gain upon playable kill.</br> * Calculates karma gain upon playable kill.</br> Updated to High Five on 10.09.2014 by Zealar tested in retail.
* Updated to High Five on 10.09.2014 by Zealar tested in retail.
* @param pkCount * @param pkCount
* @param isSummon * @param isSummon
* @return karma points that will be added to the player. * @return karma points that will be added to the player.