Fixed probable CharSummonTable NPE.
This commit is contained in:
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
Reference in New Issue
Block a user