Sync with L2JServer Jan 12th 2015.
This commit is contained in:
@@ -105,7 +105,6 @@ public class L2Attackable extends L2Npc
|
||||
private final Map<Integer, AbsorberInfo> _absorbersList = new ConcurrentHashMap<>();
|
||||
// Misc
|
||||
private boolean _mustGiveExpSp;
|
||||
protected int _onKillDelay = 5000;
|
||||
|
||||
/**
|
||||
* Constructor of L2Attackable (use L2Character and L2NpcInstance constructor).<br>
|
||||
@@ -349,7 +348,7 @@ public class L2Attackable extends L2Npc
|
||||
if ((killer != null) && killer.isPlayable())
|
||||
{
|
||||
// Delayed notification
|
||||
EventDispatcher.getInstance().notifyEventAsyncDelayed(new OnAttackableKill(killer.getActingPlayer(), this, killer.isSummon()), this, _onKillDelay);
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnAttackableKill(killer.getActingPlayer(), this, killer.isSummon()), this);
|
||||
}
|
||||
|
||||
// Notify to minions if there are.
|
||||
@@ -1561,20 +1560,6 @@ public class L2Attackable extends L2Npc
|
||||
return _seeded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set delay for onKill() call, in ms Default: 5000 ms
|
||||
* @param delay
|
||||
*/
|
||||
public final void setOnKillDelay(int delay)
|
||||
{
|
||||
_onKillDelay = delay;
|
||||
}
|
||||
|
||||
public final int getOnKillDelay()
|
||||
{
|
||||
return _onKillDelay;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the server allows Random Animation.
|
||||
*/
|
||||
|
||||
@@ -25,8 +25,10 @@ import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -35,6 +37,8 @@ import java.util.concurrent.LinkedBlockingDeque;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
@@ -251,14 +255,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
private SkillChannelized _channelized = null;
|
||||
|
||||
/** Map 32 bits, containing all abnormal visual effects in progress. */
|
||||
private int _abnormalVisualEffects;
|
||||
/** Map 32 bits, containing all special abnormal visual effects in progress. */
|
||||
private int _abnormalVisualEffectsSpecial;
|
||||
/** Map 32 bits, containing all event abnormal visual effects in progress. */
|
||||
private int _abnormalVisualEffectsEvent;
|
||||
/** Set containg all event abnormal visual effects ID in progress */
|
||||
private final Set<Integer> _abnormalVisualEffectsList = Collections.newSetFromMap(new ConcurrentHashMap<Integer, Boolean>());
|
||||
private volatile Set<AbnormalVisualEffect> _abnormalVisualEffects;
|
||||
private volatile Set<AbnormalVisualEffect> _currentAbnormalVisualEffects;
|
||||
|
||||
/** Movement data of this L2Character */
|
||||
protected MoveData _move;
|
||||
@@ -3132,116 +3130,87 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the abnormal visual effects affecting this character.
|
||||
* @return a map of 32 bits containing all abnormal visual effects in progress for this character
|
||||
* Resets the abnormal visual effects recalculating all of them that are applied from skills and sending packet for updating them on client if a change is found.
|
||||
*/
|
||||
public int getAbnormalVisualEffects()
|
||||
public void resetCurrentAbnormalVisualEffects()
|
||||
{
|
||||
return _abnormalVisualEffects;
|
||||
final Collection<BuffInfo> passives = getEffectList().hasPassives() ? new ArrayList<>(getEffectList().getPassives().values()) : null;
|
||||
//@formatter:off
|
||||
final Set<AbnormalVisualEffect> abnormalVisualEffects = Stream.concat(getEffectList().getEffects().stream(), passives != null ? passives.stream() : Stream.empty())
|
||||
.filter(Objects::nonNull)
|
||||
.map(BuffInfo::getSkill)
|
||||
.filter(Skill::hasAbnormalVisualEffects)
|
||||
.flatMap(s -> s.getAbnormalVisualEffects().stream())
|
||||
.collect(Collectors.toCollection(HashSet::new));
|
||||
//@formatter:on
|
||||
|
||||
if (_abnormalVisualEffects != null)
|
||||
{
|
||||
abnormalVisualEffects.addAll(_abnormalVisualEffects);
|
||||
}
|
||||
|
||||
if ((_currentAbnormalVisualEffects == null) || !_currentAbnormalVisualEffects.equals(abnormalVisualEffects))
|
||||
{
|
||||
_currentAbnormalVisualEffects = abnormalVisualEffects;
|
||||
updateAbnormalVisualEffects();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the special abnormal visual effects affecting this character.
|
||||
* @return a map of 32 bits containing all special effect in progress for this character
|
||||
* Gets the currently applied abnormal visual effects.
|
||||
* @return the abnormal visual effects
|
||||
*/
|
||||
public int getAbnormalVisualEffectSpecial()
|
||||
public Set<AbnormalVisualEffect> getCurrentAbnormalVisualEffects()
|
||||
{
|
||||
return _abnormalVisualEffectsSpecial;
|
||||
return _currentAbnormalVisualEffects != null ? _currentAbnormalVisualEffects : Collections.emptySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the event abnormal visual effects affecting this character.
|
||||
* @return a map of 32 bits containing all event abnormal visual effects in progress for this character
|
||||
*/
|
||||
public int getAbnormalVisualEffectEvent()
|
||||
{
|
||||
return _abnormalVisualEffectsEvent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the event abnormal visual effects affecting this character.
|
||||
* @return a sets containing all event abnormal visual effects ID in progress for this character
|
||||
*/
|
||||
public Set<Integer> getAbnormalVisualEffectsList()
|
||||
{
|
||||
return _abnormalVisualEffectsList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if this creature is affected by the given abnormal visual effect.
|
||||
* Checks if the creature has the abnormal visual effect.
|
||||
* @param ave the abnormal visual effect
|
||||
* @return {@code true} if the creature is affected by the abnormal visual effect, {@code false} otherwise
|
||||
* @return {@code true} if the creature has the abnormal visual effect, {@code false} otherwise
|
||||
*/
|
||||
public boolean hasAbnormalVisualEffect(AbnormalVisualEffect ave)
|
||||
{
|
||||
if (ave.isEvent())
|
||||
{
|
||||
return (getAbnormalVisualEffectEvent() & ave.getMask()) == ave.getMask();
|
||||
}
|
||||
|
||||
if (ave.isSpecial())
|
||||
{
|
||||
return (getAbnormalVisualEffectSpecial() & ave.getMask()) == ave.getMask();
|
||||
}
|
||||
|
||||
return (getAbnormalVisualEffects() & ave.getMask()) == ave.getMask();
|
||||
return (_abnormalVisualEffects != null) && _abnormalVisualEffects.contains(ave);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the abnormal visual effect flags in the binary mask and send Server->Client UserInfo/CharInfo packet.
|
||||
* @param update if {@code true} update packets will be sent
|
||||
* Adds the abnormal visual and sends packet for updating them in client.
|
||||
* @param aves the abnormal visual effects
|
||||
*/
|
||||
public final void startAbnormalVisualEffect(boolean update, AbnormalVisualEffect... aves)
|
||||
public final void startAbnormalVisualEffect(AbnormalVisualEffect... aves)
|
||||
{
|
||||
for (AbnormalVisualEffect ave : aves)
|
||||
{
|
||||
if (ave.isEvent())
|
||||
if (_abnormalVisualEffects == null)
|
||||
{
|
||||
_abnormalVisualEffectsEvent |= ave.getMask();
|
||||
synchronized (this)
|
||||
{
|
||||
if (_abnormalVisualEffects == null)
|
||||
{
|
||||
_abnormalVisualEffects = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ave.isSpecial())
|
||||
{
|
||||
_abnormalVisualEffectsSpecial |= ave.getMask();
|
||||
}
|
||||
else
|
||||
{
|
||||
_abnormalVisualEffects |= ave.getMask();
|
||||
}
|
||||
_abnormalVisualEffectsList.add(ave.ordinal());
|
||||
}
|
||||
if (update)
|
||||
{
|
||||
updateAbnormalEffect();
|
||||
_abnormalVisualEffects.add(ave);
|
||||
}
|
||||
resetCurrentAbnormalVisualEffects();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the abnormal visual effect flags from the binary mask and send Server->Client UserInfo/CharInfo packet.
|
||||
* @param update if {@code true} update packets will be sent
|
||||
* Removes the abnormal visual and sends packet for updating them in client.
|
||||
* @param aves the abnormal visual effects
|
||||
*/
|
||||
public final void stopAbnormalVisualEffect(boolean update, AbnormalVisualEffect... aves)
|
||||
public final void stopAbnormalVisualEffect(AbnormalVisualEffect... aves)
|
||||
{
|
||||
for (AbnormalVisualEffect ave : aves)
|
||||
if (_abnormalVisualEffects != null)
|
||||
{
|
||||
if (ave.isEvent())
|
||||
for (AbnormalVisualEffect ave : aves)
|
||||
{
|
||||
_abnormalVisualEffectsEvent &= ~ave.getMask();
|
||||
_abnormalVisualEffects.remove(ave);
|
||||
}
|
||||
else if (ave.isSpecial())
|
||||
{
|
||||
_abnormalVisualEffectsSpecial &= ~ave.getMask();
|
||||
}
|
||||
else
|
||||
{
|
||||
_abnormalVisualEffects &= ~ave.getMask();
|
||||
}
|
||||
_abnormalVisualEffectsList.remove(ave.ordinal());
|
||||
}
|
||||
if (update)
|
||||
{
|
||||
updateAbnormalEffect();
|
||||
resetCurrentAbnormalVisualEffects();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3284,7 +3253,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
}
|
||||
updateAbnormalEffect();
|
||||
}
|
||||
|
||||
public final void startParalyze()
|
||||
@@ -3403,7 +3371,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
||||
}
|
||||
updateAbnormalEffect();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3436,10 +3403,10 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
getAI().notifyEvent(CtrlEvent.EVT_THINK);
|
||||
}
|
||||
updateAbnormalEffect();
|
||||
updateAbnormalVisualEffects();
|
||||
}
|
||||
|
||||
public abstract void updateAbnormalEffect();
|
||||
public abstract void updateAbnormalVisualEffects();
|
||||
|
||||
/**
|
||||
* Update active skills in progress (In Use and Not In Use because stacked) icons on client.<br>
|
||||
|
||||
@@ -52,7 +52,7 @@ public abstract class L2Decoy extends L2Character
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAbnormalEffect()
|
||||
public void updateAbnormalVisualEffects()
|
||||
{
|
||||
Collection<L2PcInstance> plrs = getKnownList().getKnownPlayers().values();
|
||||
|
||||
|
||||
@@ -550,7 +550,7 @@ public class L2Npc extends L2Character
|
||||
* Send a packet NpcInfo with state of abnormal effect to all L2PcInstance in the _KnownPlayers of the L2NpcInstance.
|
||||
*/
|
||||
@Override
|
||||
public void updateAbnormalEffect()
|
||||
public void updateAbnormalVisualEffects()
|
||||
{
|
||||
// Send a Server->Client packet NpcInfo with state of abnormal effect to all L2PcInstance in the _KnownPlayers of the L2NpcInstance
|
||||
Collection<L2PcInstance> plrs = getKnownList().getKnownPlayers().values();
|
||||
@@ -1391,26 +1391,26 @@ public class L2Npc extends L2Character
|
||||
public void setLHandId(int newWeaponId)
|
||||
{
|
||||
_currentLHandId = newWeaponId;
|
||||
updateAbnormalEffect();
|
||||
broadcastInfo();
|
||||
}
|
||||
|
||||
public void setRHandId(int newWeaponId)
|
||||
{
|
||||
_currentRHandId = newWeaponId;
|
||||
updateAbnormalEffect();
|
||||
broadcastInfo();
|
||||
}
|
||||
|
||||
public void setLRHandId(int newLWeaponId, int newRWeaponId)
|
||||
{
|
||||
_currentRHandId = newRWeaponId;
|
||||
_currentLHandId = newLWeaponId;
|
||||
updateAbnormalEffect();
|
||||
broadcastInfo();
|
||||
}
|
||||
|
||||
public void setEnchant(int newEnchantValue)
|
||||
{
|
||||
_currentEnchant = newEnchantValue;
|
||||
updateAbnormalEffect();
|
||||
broadcastInfo();
|
||||
}
|
||||
|
||||
public boolean isShowName()
|
||||
|
||||
@@ -214,7 +214,7 @@ public abstract class L2Summon extends L2Playable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAbnormalEffect()
|
||||
public void updateAbnormalVisualEffects()
|
||||
{
|
||||
for (L2PcInstance player : getKnownList().getKnownPlayers().values())
|
||||
{
|
||||
|
||||
@@ -466,7 +466,7 @@ public abstract class L2Vehicle extends L2Character
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAbnormalEffect()
|
||||
public void updateAbnormalVisualEffects()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ public class L2AirShipInstance extends L2Vehicle
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAbnormalEffect()
|
||||
public void updateAbnormalVisualEffects()
|
||||
{
|
||||
broadcastPacket(new ExAirShipInfo(this));
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jserver.gameserver.model.base.ClassId;
|
||||
import com.l2jserver.gameserver.model.holders.ItemHolder;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.TutorialCloseHtml;
|
||||
import com.l2jserver.gameserver.network.serverpackets.TutorialShowHtml;
|
||||
@@ -101,7 +100,6 @@ public final class L2ClassMasterInstance extends L2MerchantInstance
|
||||
{
|
||||
player.setNoble(true);
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/classmaster/nobleok.htm");
|
||||
player.sendPacket(html);
|
||||
|
||||
@@ -189,7 +189,7 @@ public class L2ControllableAirShipInstance extends L2AirShipInstance
|
||||
return false;
|
||||
}
|
||||
}
|
||||
updateAbnormalEffect();
|
||||
updateAbnormalVisualEffects();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ public class L2ControllableAirShipInstance extends L2AirShipInstance
|
||||
}
|
||||
|
||||
setFuel(fuel);
|
||||
updateAbnormalEffect();
|
||||
updateAbnormalVisualEffects();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ public class L2DoorInstance extends L2Character
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAbnormalEffect()
|
||||
public void updateAbnormalVisualEffects()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -263,7 +263,6 @@ import com.l2jserver.gameserver.network.serverpackets.ExAbnormalStatusUpdateFrom
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExAcquireAPSkillList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExAdenaInvenCount;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExAutoSoulShot;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExDuelUpdateUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExFishingEnd;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExFishingStart;
|
||||
@@ -630,6 +629,8 @@ public final class L2PcInstance extends L2Playable
|
||||
private int _hennaMEN;
|
||||
private int _hennaWIT;
|
||||
private int _hennaCON;
|
||||
private int _hennaLUC;
|
||||
private int _hennaCHA;
|
||||
|
||||
/** The L2Summon of the L2PcInstance */
|
||||
private L2Summon _summon = null;
|
||||
@@ -1717,7 +1718,6 @@ public final class L2PcInstance extends L2Playable
|
||||
UserInfo ui = new UserInfo(this, false);
|
||||
ui.addComponentType(UserInfoType.SOCIAL);
|
||||
sendPacket(ui);
|
||||
sendPacket(new ExBrExtraUserInfo(this));
|
||||
|
||||
// If this player has a pet update the pets pvp flag as well
|
||||
if (hasSummon())
|
||||
@@ -2088,7 +2088,6 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
sendPacket(new EtcStatusUpdate(this));
|
||||
broadcastPacket(new CharInfo(this));
|
||||
broadcastPacket(new ExBrExtraUserInfo(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5597,7 +5596,6 @@ public final class L2PcInstance extends L2Playable
|
||||
UserInfo ui = new UserInfo(this, false);
|
||||
ui.addComponentType(UserInfoType.SOCIAL);
|
||||
sendPacket(ui);
|
||||
sendPacket(new ExBrExtraUserInfo(this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5629,7 +5627,6 @@ public final class L2PcInstance extends L2Playable
|
||||
UserInfo ui = new UserInfo(this, false);
|
||||
ui.addComponentType(UserInfoType.SOCIAL);
|
||||
sendPacket(ui);
|
||||
sendPacket(new ExBrExtraUserInfo(this));
|
||||
}
|
||||
|
||||
public void updatePvPStatus()
|
||||
@@ -6746,7 +6743,6 @@ public final class L2PcInstance extends L2Playable
|
||||
if (broadcastType == 1)
|
||||
{
|
||||
sendPacket(new UserInfo(this));
|
||||
sendPacket(new ExBrExtraUserInfo(this));
|
||||
}
|
||||
if (broadcastType == 2)
|
||||
{
|
||||
@@ -6763,7 +6759,6 @@ public final class L2PcInstance extends L2Playable
|
||||
StatusUpdate su = new StatusUpdate(this);
|
||||
su.addAttribute(StatusUpdate.PVP_FLAG, getKarma());
|
||||
sendPacket(su);
|
||||
sendPacket(new ExBrExtraUserInfo(this));
|
||||
Collection<L2PcInstance> plrs = getKnownList().getKnownPlayers().values();
|
||||
for (L2PcInstance player : plrs)
|
||||
{
|
||||
@@ -8187,7 +8182,6 @@ public final class L2PcInstance extends L2Playable
|
||||
UserInfo ui = new UserInfo(this, false);
|
||||
ui.addComponentType(UserInfoType.BASE_STATS, UserInfoType.MAX_HPCPMP, UserInfoType.STATS, UserInfoType.SPEED);
|
||||
sendPacket(ui);
|
||||
sendPacket(new ExBrExtraUserInfo(this));
|
||||
// Add the recovered dyes to the player's inventory and notify them.
|
||||
getInventory().addItem("Henna", henna.getDyeItemId(), henna.getCancelCount(), this, null);
|
||||
reduceAdena("Henna", henna.getCancelFee(), this, false);
|
||||
@@ -8240,7 +8234,6 @@ public final class L2PcInstance extends L2Playable
|
||||
UserInfo ui = new UserInfo(this, false);
|
||||
ui.addComponentType(UserInfoType.BASE_STATS, UserInfoType.MAX_HPCPMP, UserInfoType.STATS, UserInfoType.SPEED);
|
||||
sendPacket(ui);
|
||||
sendPacket(new ExBrExtraUserInfo(this));
|
||||
|
||||
// Notify to scripts
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerHennaRemove(this, henna), this);
|
||||
@@ -8261,6 +8254,8 @@ public final class L2PcInstance extends L2Playable
|
||||
_hennaMEN = 0;
|
||||
_hennaWIT = 0;
|
||||
_hennaDEX = 0;
|
||||
_hennaLUC = 0;
|
||||
_hennaCHA = 0;
|
||||
|
||||
for (L2Henna h : _henna)
|
||||
{
|
||||
@@ -8275,6 +8270,8 @@ public final class L2PcInstance extends L2Playable
|
||||
_hennaCON += ((_hennaCON + h.getStatCON()) > 5) ? 5 - _hennaCON : h.getStatCON();
|
||||
_hennaWIT += ((_hennaWIT + h.getStatWIT()) > 5) ? 5 - _hennaWIT : h.getStatWIT();
|
||||
_hennaDEX += ((_hennaDEX + h.getStatDEX()) > 5) ? 5 - _hennaDEX : h.getStatDEX();
|
||||
_hennaLUC += ((_hennaLUC + h.getStatLUC()) > 5) ? 5 - _hennaLUC : h.getStatLUC();
|
||||
_hennaCHA += ((_hennaCHA + h.getStatCHA()) > 5) ? 5 - _hennaCHA : h.getStatCHA();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8362,6 +8359,22 @@ public final class L2PcInstance extends L2Playable
|
||||
return _hennaDEX;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the LUC Henna modifier of this L2PcInstance.
|
||||
*/
|
||||
public int getHennaStatLUC()
|
||||
{
|
||||
return _hennaLUC;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the CHA Henna modifier of this L2PcInstance.
|
||||
*/
|
||||
public int getHennaStatCHA()
|
||||
{
|
||||
return _hennaCHA;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the L2PcInstance is autoAttackable.<br>
|
||||
* <B><U>Actions</U>:</B>
|
||||
@@ -9311,7 +9324,7 @@ public final class L2PcInstance extends L2Playable
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : DON'T SEND UserInfo packet to other players instead of CharInfo packet. Indeed, UserInfo packet contains PRIVATE DATA as MaxHP, STR, DEX...</B></FONT>
|
||||
*/
|
||||
@Override
|
||||
public void updateAbnormalEffect()
|
||||
public void updateAbnormalVisualEffects()
|
||||
{
|
||||
sendPacket(new ExUserInfoAbnormalVisualEffect(this));
|
||||
broadcastPacket(new CharInfo(this));
|
||||
@@ -10067,7 +10080,7 @@ public final class L2PcInstance extends L2Playable
|
||||
_noble = val;
|
||||
|
||||
sendSkillList();
|
||||
if (val && (getLevel() == 99))
|
||||
if (val && (getLevel() == ExperienceTable.getInstance().getMaxLevel()))
|
||||
{
|
||||
sendPacket(new ExAcquireAPSkillList(this));
|
||||
}
|
||||
@@ -10558,7 +10571,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_taskWarnUserTakeBreak == null)
|
||||
{
|
||||
_taskWarnUserTakeBreak = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new WarnUserTakeBreakTask(this), 7200000, 7200000);
|
||||
_taskWarnUserTakeBreak = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new WarnUserTakeBreakTask(this), 3600000, 3600000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13210,7 +13223,6 @@ public final class L2PcInstance extends L2Playable
|
||||
setXYZ(getBoat().getLocation());
|
||||
|
||||
activeChar.sendPacket(new CharInfo(this));
|
||||
activeChar.sendPacket(new ExBrExtraUserInfo(this));
|
||||
int relation1 = getRelation(activeChar);
|
||||
int relation2 = activeChar.getRelation(this);
|
||||
Integer oldrelation = getKnownList().getKnownRelations().get(activeChar.getObjectId());
|
||||
@@ -13237,7 +13249,6 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
setXYZ(getAirShip().getLocation());
|
||||
activeChar.sendPacket(new CharInfo(this));
|
||||
activeChar.sendPacket(new ExBrExtraUserInfo(this));
|
||||
int relation1 = getRelation(activeChar);
|
||||
int relation2 = activeChar.getRelation(this);
|
||||
Integer oldrelation = getKnownList().getKnownRelations().get(activeChar.getObjectId());
|
||||
@@ -13263,7 +13274,6 @@ public final class L2PcInstance extends L2Playable
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(new CharInfo(this));
|
||||
activeChar.sendPacket(new ExBrExtraUserInfo(this));
|
||||
int relation1 = getRelation(activeChar);
|
||||
int relation2 = activeChar.getRelation(this);
|
||||
Integer oldrelation = getKnownList().getKnownRelations().get(activeChar.getObjectId());
|
||||
|
||||
@@ -65,7 +65,7 @@ public final class L2QuestGuardInstance extends L2GuardInstance
|
||||
if (killer instanceof L2Attackable)
|
||||
{
|
||||
// Delayed notification
|
||||
EventDispatcher.getInstance().notifyEventAsyncDelayed(new OnAttackableKill(null, this, false), this, _onKillDelay);
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnAttackableKill(null, this, false), this);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ public final class L2StaticObjectInstance extends L2Character
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAbnormalEffect()
|
||||
public void updateAbnormalVisualEffects()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ public final class L2TrapInstance extends L2Npc
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAbnormalEffect()
|
||||
public void updateAbnormalVisualEffects()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExAcquirableSkillListByClass;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.MagicSkillLaunched;
|
||||
import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
@@ -1071,7 +1070,6 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
{
|
||||
leaderPlayer.setPledgeClass(L2ClanMember.calculatePledgeClass(leaderPlayer));
|
||||
leaderPlayer.sendPacket(new UserInfo(leaderPlayer));
|
||||
leaderPlayer.sendPacket(new ExBrExtraUserInfo(leaderPlayer));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1158,7 +1156,6 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
{
|
||||
leaderPlayer.setPledgeClass(L2ClanMember.calculatePledgeClass(leaderPlayer));
|
||||
leaderPlayer.sendPacket(new UserInfo(leaderPlayer));
|
||||
leaderPlayer.sendPacket(new ExBrExtraUserInfo(leaderPlayer));
|
||||
}
|
||||
|
||||
clan.broadcastClanStatus();
|
||||
|
||||
@@ -40,7 +40,6 @@ import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.AcquireSkillList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExAcquireAPSkillList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExVitalityPointInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExVoteSystemInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PartySmallWindowUpdate;
|
||||
@@ -104,7 +103,6 @@ public class PcStat extends PlayableStat
|
||||
|
||||
// EXP status update currently not used in retail
|
||||
activeChar.sendPacket(new UserInfo(activeChar));
|
||||
activeChar.sendPacket(new ExBrExtraUserInfo(activeChar));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -313,7 +311,7 @@ public class PcStat extends PlayableStat
|
||||
partyWindow.addUpdateType(PartySmallWindowUpdateType.LEVEL);
|
||||
getActiveChar().getParty().broadcastToPartyMembers(getActiveChar(), partyWindow);
|
||||
}
|
||||
if ((getLevel() == 99) && getActiveChar().isNoble())
|
||||
if ((getLevel() == ExperienceTable.getInstance().getMaxLevel()) && getActiveChar().isNoble())
|
||||
{
|
||||
getActiveChar().sendPacket(new ExAcquireAPSkillList(getActiveChar()));
|
||||
}
|
||||
|
||||
@@ -18,14 +18,17 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.actor.tasks.player;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
/**
|
||||
* Task dedicated to warn user to take a break.
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class WarnUserTakeBreakTask implements Runnable
|
||||
public final class WarnUserTakeBreakTask implements Runnable
|
||||
{
|
||||
private final L2PcInstance _player;
|
||||
|
||||
@@ -41,7 +44,8 @@ public class WarnUserTakeBreakTask implements Runnable
|
||||
{
|
||||
if (_player.isOnline())
|
||||
{
|
||||
_player.sendPacket(SystemMessageId.YOU_HAVE_PLAYED_FOR_S1_HOUR_S_PLEASE_TAKE_A_BREAK);
|
||||
final long hours = TimeUnit.MILLISECONDS.toHours(_player.getUptime());
|
||||
_player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_PLAYED_FOR_S1_HOUR_S_PLEASE_TAKE_A_BREAK).addLong(hours));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user