Fixed probable CharSummonTable NPE.

This commit is contained in:
MobiusDevelopment
2022-10-01 09:49:49 +00:00
parent 445aa48832
commit a1b8557c8f
24 changed files with 144 additions and 72 deletions

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -207,6 +207,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -214,6 +216,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -202,6 +202,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -209,6 +211,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -202,6 +202,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -209,6 +211,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);

View File

@@ -202,6 +202,8 @@ public class CharSummonTable
if (player.hasServitors()) if (player.hasServitors())
{ {
final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null); final Servitor summon = player.getServitors().values().stream().map(s -> ((Servitor) s)).filter(s -> s.getReferenceSkill() == skillId).findAny().orElse(null);
if (summon != null)
{
summon.setCurrentHp(curHp); summon.setCurrentHp(curHp);
summon.setCurrentMp(curMp); summon.setCurrentMp(curMp);
summon.setLifeTimeRemaining(time); summon.setLifeTimeRemaining(time);
@@ -209,6 +211,7 @@ public class CharSummonTable
} }
} }
} }
}
catch (SQLException e) catch (SQLException e)
{ {
LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e); LOGGER.warning(getClass().getSimpleName() + ": Servitor cannot be restored: " + e);