Fixed unset global variables issue.
This commit is contained in:
@@ -80,8 +80,8 @@ public final class Core extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
final String test = GlobalVariablesManager.getInstance().getString("Core_Attacked");
|
||||
if (test.equalsIgnoreCase("true"))
|
||||
final boolean test = GlobalVariablesManager.getInstance().getBoolean("Core_Attacked", false);
|
||||
if (test)
|
||||
{
|
||||
_firstAttacked = true;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public final class Core extends AbstractNpcAI
|
||||
@Override
|
||||
public void onSave()
|
||||
{
|
||||
GlobalVariablesManager.getInstance().set("Core_Attacked", Boolean.toString(_firstAttacked));
|
||||
GlobalVariablesManager.getInstance().set("Core_Attacked", _firstAttacked);
|
||||
}
|
||||
|
||||
public void spawnBoss(L2GrandBossInstance npc)
|
||||
|
||||
@@ -87,8 +87,8 @@ public final class QueenShyeed extends AbstractNpcAI
|
||||
|
||||
private void spawnShyeed()
|
||||
{
|
||||
final String respawn = GlobalVariablesManager.getInstance().getString("QueenShyeedRespawn");
|
||||
final long remain = !respawn.isEmpty() ? Long.parseLong(respawn) - System.currentTimeMillis() : 0;
|
||||
final long respawn = GlobalVariablesManager.getInstance().getLong("QueenShyeedRespawn", 0);
|
||||
final long remain = respawn != 0 ? respawn - System.currentTimeMillis() : 0;
|
||||
if (remain > 0)
|
||||
{
|
||||
startQuestTimer("respawn", remain, null, null);
|
||||
|
||||
Reference in New Issue
Block a user