|
@@ -545,10 +545,9 @@ public abstract class L2Character extends L2Object
|
|
|
if (Config.DEBUG)
|
|
|
_log.fine("Broadcast Status Update for " + getObjectId() + "(" + getName() + "). HP: " + getCurrentHp());
|
|
|
|
|
|
- // Create the Server->Client packet StatusUpdate with current HP and MP
|
|
|
+ // Create the Server->Client packet StatusUpdate with current HP
|
|
|
StatusUpdate su = new StatusUpdate(getObjectId());
|
|
|
su.addAttribute(StatusUpdate.CUR_HP, (int)getCurrentHp());
|
|
|
- su.addAttribute(StatusUpdate.CUR_MP, (int)getCurrentMp());
|
|
|
|
|
|
// Go through the StatusListener
|
|
|
// Send the Server->Client packet StatusUpdate with current HP and MP
|
|
@@ -557,7 +556,8 @@ public abstract class L2Character extends L2Object
|
|
|
{
|
|
|
for (L2Character temp : getStatus().getStatusListener())
|
|
|
{
|
|
|
- try { temp.sendPacket(su); } catch (NullPointerException e) {}
|
|
|
+ if (temp != null)
|
|
|
+ temp.sendPacket(su);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -3824,11 +3824,11 @@ public abstract class L2Character extends L2Object
|
|
|
if (su == null) su = new StatusUpdate(getObjectId());
|
|
|
su.addAttribute(StatusUpdate.CAST_SPD, getMAtkSpd());
|
|
|
}
|
|
|
- //else if (stat==Stats.MAX_HP) // TODO: self only and add more stats...
|
|
|
- //{
|
|
|
- // if (su == null) su = new StatusUpdate(getObjectId());
|
|
|
- // su.addAttribute(StatusUpdate.MAX_HP, getMaxHp());
|
|
|
- //}
|
|
|
+ else if (stat == Stats.MAX_HP && this instanceof L2Attackable)
|
|
|
+ {
|
|
|
+ if (su == null) su = new StatusUpdate(getObjectId());
|
|
|
+ su.addAttribute(StatusUpdate.MAX_HP, getMaxHp());
|
|
|
+ }
|
|
|
/*else if (stat == Stats.MAX_CP)
|
|
|
{
|
|
|
if (this instanceof L2PcInstance)
|