Sync with L2JServer Jan 12th 2015.
This commit is contained in:
@@ -58,7 +58,6 @@ import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExSubPledgeSkillAdd;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ItemList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
@@ -2087,7 +2086,6 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
{
|
||||
cm.getPlayerInstance().getClanPrivileges().setBitmask(privs);
|
||||
cm.getPlayerInstance().sendPacket(new UserInfo(cm.getPlayerInstance()));
|
||||
cm.getPlayerInstance().sendPacket(new ExBrExtraUserInfo(cm.getPlayerInstance()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2507,7 +2505,6 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
updateClanInDB();
|
||||
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
|
||||
// TODO: Need correct message id
|
||||
player.sendMessage("Alliance " + allyName + " has been created.");
|
||||
|
||||
@@ -115,13 +115,13 @@ public final class L2Crest implements IIdentifiable
|
||||
{
|
||||
final byte[] fullChunk = new byte[14336];
|
||||
System.arraycopy(data, (14336 * i), fullChunk, 0, 14336);
|
||||
activeChar.sendPacket(new ExPledgeEmblem(getId(), fullChunk, 0, i, 14336));
|
||||
activeChar.sendPacket(new ExPledgeEmblem(getId(), fullChunk, 0, i));
|
||||
}
|
||||
else
|
||||
{
|
||||
final byte[] lastChunk = new byte[8320];
|
||||
System.arraycopy(data, (14336 * i), lastChunk, 0, 8320);
|
||||
activeChar.sendPacket(new ExPledgeEmblem(getId(), lastChunk, 0, i, 8320));
|
||||
activeChar.sendPacket(new ExPledgeEmblem(getId(), lastChunk, 0, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1,47 +1,48 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.conditions;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.items.L2Item;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* The Class ConditionTargetAbnormal.
|
||||
* @author janiii
|
||||
*/
|
||||
public class ConditionTargetAbnormal extends Condition
|
||||
{
|
||||
private final int _abnormalId;
|
||||
|
||||
/**
|
||||
* Instantiates a new condition target abnormal.
|
||||
* @param abnormalId the abnormal id
|
||||
*/
|
||||
public ConditionTargetAbnormal(int abnormalId)
|
||||
{
|
||||
_abnormalId = abnormalId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean testImpl(L2Character effector, L2Character effected, Skill skill, L2Item item)
|
||||
{
|
||||
return (effected.getAbnormalVisualEffects() & _abnormalId) != 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.conditions;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.items.L2Item;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalType;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* The Class ConditionTargetAbnormal.
|
||||
* @author janiii
|
||||
*/
|
||||
public class ConditionTargetAbnormalType extends Condition
|
||||
{
|
||||
private final AbnormalType _abnormalType;
|
||||
|
||||
/**
|
||||
* Instantiates a new condition target abnormal type.
|
||||
* @param abnormalType the abnormal type
|
||||
*/
|
||||
public ConditionTargetAbnormalType(AbnormalType abnormalType)
|
||||
{
|
||||
_abnormalType = abnormalType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean testImpl(L2Character effector, L2Character effected, Skill skill, L2Item item)
|
||||
{
|
||||
return effected.getEffectList().getBuffInfoByAbnormalType(_abnormalType) != null;
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,6 @@ import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.model.olympiad.Olympiad;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SocialAction;
|
||||
@@ -975,7 +974,6 @@ public class Hero
|
||||
player.setHero(true);
|
||||
player.broadcastPacket(new SocialAction(player.getObjectId(), 20016)); // Hero Animation
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
player.broadcastUserInfo();
|
||||
// Set Gained hero and reload data
|
||||
setHeroGained(player.getObjectId());
|
||||
|
||||
@@ -51,7 +51,6 @@ import com.l2jserver.gameserver.model.L2WorldRegion;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.TeleportWhereType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
@@ -564,7 +563,7 @@ public final class Instance
|
||||
List<L2Spawn> manualSpawn = new ArrayList<>();
|
||||
for (Node d = group.getFirstChild(); d != null; d = d.getNextSibling())
|
||||
{
|
||||
int npcId = 0, x = 0, y = 0, z = 0, heading = 0, respawn = 0, respawnRandom = 0, delay = -1;
|
||||
int npcId = 0, x = 0, y = 0, z = 0, heading = 0, respawn = 0, respawnRandom = 0;
|
||||
Boolean allowRandomWalk = null;
|
||||
if ("spawn".equalsIgnoreCase(d.getNodeName()))
|
||||
{
|
||||
@@ -575,10 +574,6 @@ public final class Instance
|
||||
z = Integer.parseInt(d.getAttributes().getNamedItem("z").getNodeValue());
|
||||
heading = Integer.parseInt(d.getAttributes().getNamedItem("heading").getNodeValue());
|
||||
respawn = Integer.parseInt(d.getAttributes().getNamedItem("respawn").getNodeValue());
|
||||
if (d.getAttributes().getNamedItem("onKillDelay") != null)
|
||||
{
|
||||
delay = Integer.parseInt(d.getAttributes().getNamedItem("onKillDelay").getNodeValue());
|
||||
}
|
||||
if (d.getAttributes().getNamedItem("respawnRandom") != null)
|
||||
{
|
||||
respawnRandom = Integer.parseInt(d.getAttributes().getNamedItem("respawnRandom").getNodeValue());
|
||||
@@ -616,11 +611,7 @@ public final class Instance
|
||||
}
|
||||
if (spawnGroup.equals("general"))
|
||||
{
|
||||
L2Npc spawned = spawnDat.doSpawn();
|
||||
if ((delay >= 0) && (spawned instanceof L2Attackable))
|
||||
{
|
||||
((L2Attackable) spawned).setOnKillDelay(delay);
|
||||
}
|
||||
spawnDat.doSpawn();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -46,7 +46,6 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jserver.gameserver.model.holders.PlayerEventHolder;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CharInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
|
||||
@@ -300,7 +299,6 @@ public class L2Event
|
||||
player.broadcastPacket(info1);
|
||||
UserInfo info2 = new UserInfo(player);
|
||||
player.sendPacket(info2);
|
||||
player.broadcastPacket(new ExBrExtraUserInfo(player));
|
||||
|
||||
player.stopTransformation(true);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ import com.l2jserver.gameserver.model.events.impl.sieges.castle.OnCastleSiegeFin
|
||||
import com.l2jserver.gameserver.model.events.impl.sieges.castle.OnCastleSiegeOwnerChange;
|
||||
import com.l2jserver.gameserver.model.events.impl.sieges.castle.OnCastleSiegeStart;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.RelationChanged;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SiegeInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
@@ -611,7 +610,6 @@ public class Siege implements Siegable
|
||||
}
|
||||
}
|
||||
member.sendPacket(new UserInfo(member));
|
||||
member.sendPacket(new ExBrExtraUserInfo(member));
|
||||
for (L2PcInstance player : member.getKnownList().getKnownPlayers().values())
|
||||
{
|
||||
if (player == null)
|
||||
@@ -660,7 +658,6 @@ public class Siege implements Siegable
|
||||
}
|
||||
}
|
||||
member.sendPacket(new UserInfo(member));
|
||||
member.sendPacket(new ExBrExtraUserInfo(member));
|
||||
|
||||
for (L2PcInstance player : member.getKnownList().getKnownPlayers().values())
|
||||
{
|
||||
|
||||
@@ -314,7 +314,7 @@ public abstract class AbstractScript extends ManagedScript
|
||||
// ---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Provides delayed (Depending on {@link com.l2jserver.gameserver.model.actor.L2Attackable#getOnKillDelay()}) callback operation when L2Attackable dies from a player.
|
||||
* Provides callback operation when L2Attackable dies from a player.
|
||||
* @param callback
|
||||
* @param npcIds
|
||||
* @return
|
||||
@@ -325,7 +325,7 @@ public abstract class AbstractScript extends ManagedScript
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides delayed (Depending on {@link com.l2jserver.gameserver.model.actor.L2Attackable#getOnKillDelay()}) callback operation when L2Attackable dies from a player.
|
||||
* Provides callback operation when L2Attackable dies from a player.
|
||||
* @param callback
|
||||
* @param npcIds
|
||||
* @return
|
||||
|
||||
@@ -39,6 +39,8 @@ public class L2Henna
|
||||
private final int _int;
|
||||
private final int _men;
|
||||
private final int _wit;
|
||||
private final int _luc;
|
||||
private final int _cha;
|
||||
private final int _wear_fee;
|
||||
private final int _wear_count;
|
||||
private final int _cancel_fee;
|
||||
@@ -56,6 +58,8 @@ public class L2Henna
|
||||
_int = set.getInt("int");
|
||||
_men = set.getInt("men");
|
||||
_wit = set.getInt("wit");
|
||||
_luc = set.getInt("luc");
|
||||
_cha = set.getInt("cha");
|
||||
_wear_fee = set.getInt("wear_fee");
|
||||
_wear_count = set.getInt("wear_count");
|
||||
_cancel_fee = set.getInt("cancel_fee");
|
||||
@@ -135,6 +139,22 @@ public class L2Henna
|
||||
return _wit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the LUC stat.
|
||||
*/
|
||||
public int getStatLUC()
|
||||
{
|
||||
return _luc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the CHA stat.
|
||||
*/
|
||||
public int getStatCHA()
|
||||
{
|
||||
return _cha;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the wear fee, cost for adding this dye to the player.
|
||||
*/
|
||||
|
||||
@@ -20,109 +20,172 @@ package com.l2jserver.gameserver.model.skills;
|
||||
|
||||
/**
|
||||
* Abnormal Visual Effect enumerated.
|
||||
* @author DrHouse, Zoey76
|
||||
* @author NosBit
|
||||
*/
|
||||
public enum AbnormalVisualEffect
|
||||
{
|
||||
NONE(0x0000000, 0),
|
||||
DOT_BLEEDING(0x00000001, 0),
|
||||
DOT_POISON(0x00000002, 0),
|
||||
DOT_FIRE(0x00000004, 0),
|
||||
DOT_WATER(0x00000008, 0),
|
||||
DOT_WIND(0x00000010, 0),
|
||||
DOT_SOIL(0x00000020, 0),
|
||||
STUN(0x00000040, 0),
|
||||
SLEEP(0x00000080, 0),
|
||||
SILENCE(0x00000100, 0),
|
||||
ROOT(0x00000200, 0),
|
||||
PARALYZE(0x00000400, 0),
|
||||
FLESH_STONE(0x00000800, 0),
|
||||
DOT_MP(0x00001000, 0),
|
||||
BIG_HEAD(0x00002000, 0),
|
||||
DOT_FIRE_AREA(0x00004000, 0),
|
||||
CHANGE_TEXTURE(0x00008000, 0),
|
||||
BIG_BODY(0x00010000, 0),
|
||||
FLOATING_ROOT(0x00020000, 0),
|
||||
DANCE_ROOT(0x00040000, 0),
|
||||
GHOST_STUN(0x00080000, 0),
|
||||
STEALTH(0x00100000, 0),
|
||||
SEIZURE1(0x00200000, 0),
|
||||
SEIZURE2(0x00400000, 0),
|
||||
MAGIC_SQUARE(0x00800000, 0),
|
||||
FREEZING(0x01000000, 0),
|
||||
SHAKE(0x02000000, 0),
|
||||
BLIND(0x04000000, 0),
|
||||
ULTIMATE_DEFENCE(0x08000000, 0),
|
||||
VP_UP(0x10000000, 0),
|
||||
REAL_TARGET(0x20000000, 0),
|
||||
DEATH_MARK(0x40000000, 0),
|
||||
TURN_FLEE(0x80000000, 0),
|
||||
VP_KEEP(0x10000000, 0), // TODO: Find.
|
||||
// Special
|
||||
INVINCIBILITY(0x000001, 1),
|
||||
AIR_BATTLE_SLOW(0x000002, 1),
|
||||
AIR_BATTLE_ROOT(0x000004, 1),
|
||||
CHANGE_WP(0x000008, 1),
|
||||
CHANGE_HAIR_G(0x000010, 1),
|
||||
CHANGE_HAIR_P(0x000020, 1),
|
||||
CHANGE_HAIR_B(0x000040, 1),
|
||||
STIGMA_OF_SILEN(0x000100, 1),
|
||||
SPEED_DOWN(0x000200, 1),
|
||||
FROZEN_PILLAR(0x000400, 1),
|
||||
CHANGE_VES_S(0x000800, 1),
|
||||
CHANGE_VES_C(0x001000, 1),
|
||||
CHANGE_VES_D(0x002000, 1),
|
||||
TIME_BOMB(0x004000, 1), // High Five
|
||||
MP_SHIELD(0x008000, 1), // High Five
|
||||
NAVIT_ADVENT(0x080000, 1), // High Five
|
||||
// Event
|
||||
// TODO: Fix, currently not working.
|
||||
BR_NONE(0x000000, 2),
|
||||
BR_AFRO_NORMAL(0x000001, 2),
|
||||
BR_AFRO_PINK(0x000002, 2),
|
||||
BR_AFRO_GOLD(0x000004, 2),
|
||||
BR_POWER_OF_EVA(0x000008, 2), // High Five
|
||||
BR_HEADPHONE(0x000010, 2), // High Five
|
||||
BR_VESPER1(0x000020, 2),
|
||||
BR_VESPER2(0x000040, 2),
|
||||
BR_VESPER3(0x000080, 2),
|
||||
BR_SOUL_AVATAR(0x000100, 2); // High Five
|
||||
DOT_BLEEDING(1),
|
||||
DOT_POISON(2),
|
||||
DOT_FIRE(3),
|
||||
DOT_WATER(4),
|
||||
DOT_WIND(5),
|
||||
DOT_SOIL(6),
|
||||
STUN(7),
|
||||
SLEEP(8),
|
||||
SILENCE(9),
|
||||
ROOT(10),
|
||||
PARALYZE(11),
|
||||
FLESH_STONE(12),
|
||||
DOT_MP(13),
|
||||
BIG_HEAD(14),
|
||||
DOT_FIRE_AREA(15),
|
||||
CHANGE_TEXTURE(16),
|
||||
BIG_BODY(17),
|
||||
FLOATING_ROOT(18),
|
||||
DANCE_ROOT(19),
|
||||
GHOST_STUN(20),
|
||||
STEALTH(21),
|
||||
SEIZURE1(22),
|
||||
SEIZURE2(23),
|
||||
MAGIC_SQUARE(24),
|
||||
FREEZING(25),
|
||||
SHAKE(26),
|
||||
ULTIMATE_DEFENCE(28),
|
||||
VP_UP(29),
|
||||
REAL_TARGET(30),
|
||||
DEATH_MARK(31),
|
||||
TURN_FLEE(32),
|
||||
INVINCIBILITY(33),
|
||||
AIR_BATTLE_SLOW(34),
|
||||
AIR_BATTLE_ROOT(35),
|
||||
CHANGE_WEAPON(36),
|
||||
CHANGE_GOLD_AFRO(37),
|
||||
CHANGE_PINK_AFRO(38),
|
||||
CHANGE_BLACK_AFRO(39),
|
||||
STIGMA_OF_SILEN(41),
|
||||
SPEED_DOWN(42),
|
||||
FROZEN_PILLAR(43),
|
||||
CHANGE_VESPER_S(44),
|
||||
CHANGE_VESPER_C(45),
|
||||
CHANGE_VESPER_D(46),
|
||||
TIME_BOMB(47),
|
||||
MP_SHIELD(48),
|
||||
AIR_BIND(49),
|
||||
CHANGE_BODY(50),
|
||||
KNOCK_DOWN(51),
|
||||
NAVIT_ADVENT(52),
|
||||
KNOCK_BACK(53),
|
||||
CHANGE_7TH_ANNIVERSARY(54),
|
||||
ON_SPOT_MOVEMENT(55),
|
||||
DEPORT(56),
|
||||
AURA_BUFF(57),
|
||||
AURA_BUFF_SELF(58),
|
||||
AURA_DEBUFF(59),
|
||||
AURA_DEBUFF_SELF(60),
|
||||
HURRICANE(61),
|
||||
HURRICANE_SELF(62),
|
||||
BLACK_MARK(63),
|
||||
SOUL_AVATAR(64),
|
||||
CHANGE_8TH_ANNIVERSARY(65),
|
||||
NO_CHAT(68),
|
||||
HERB_OF_POWER(69),
|
||||
HERB_OF_MAGIC(70),
|
||||
TALISMAN_DECO_DARK_PURPLE(71),
|
||||
TALISMAN_DECO_GOLD(73),
|
||||
TALISMAN_DECO_ORANGE(74),
|
||||
TALISMAN_DECO_BLUE(75),
|
||||
TALISMAN_DECO_LIGHT_PURPLE(76),
|
||||
CHANGE_CURIOUS_HOUSE(77),
|
||||
CHANGE_MEMORY_N(78),
|
||||
CHANGE_MEMORY_D(79),
|
||||
CHANGE_MEMORY_C(80),
|
||||
CHANGE_MEMORY_B(81),
|
||||
CHANGE_MEMORY_A(82),
|
||||
CHANGE_SWIMSUIT_A(83),
|
||||
CHANGE_SWIMSUIT_B(84),
|
||||
CHANGE_XMAS(85),
|
||||
CARD_PC_DECO(86),
|
||||
CHANGE_DINOS(87),
|
||||
CHANGE_VALENTINE(88),
|
||||
CHOCOLATE(89),
|
||||
CANDY(90),
|
||||
COOKIE(91),
|
||||
STARS_0(92),
|
||||
STARS_1(93),
|
||||
STARS_2(94),
|
||||
STARS_3(95),
|
||||
STARS_4(96),
|
||||
STARS_5(97),
|
||||
DUELING(98),
|
||||
FREEZING2(99),
|
||||
CHANGE_YOGI(100),
|
||||
YOGI(101),
|
||||
MUSICAL_NOTE_YELLOW(102),
|
||||
MUSICAL_NOTE_BLUE(103),
|
||||
MUSICAL_NOTE_GREEN(104),
|
||||
TENTH_ANNIVERSARY(105),
|
||||
XMAS_SOCKS(106),
|
||||
XMAS_TREE(107),
|
||||
XMAS_SNOWMAN(108),
|
||||
OTHELL_ROGUE_BLUFF(109),
|
||||
HE_PROTECT(110),
|
||||
SU_SUMCROSS(111),
|
||||
WIND_STUN(112),
|
||||
STORM_SIGN2(113),
|
||||
STORM_SIGN1(114),
|
||||
WIND_BLEND(115),
|
||||
DECEPTIVE_BLINK(116),
|
||||
WIND_HIDE(117),
|
||||
PSY_POWER(118),
|
||||
SQUALL(119),
|
||||
WIND_ILLUSION(120),
|
||||
SAYHA_FURY(121),
|
||||
HIDE4(123),
|
||||
PMENTAL_TRAIL(124),
|
||||
HOLD_LIGHTING(125),
|
||||
GRAVITY_SPACE_3(126),
|
||||
SPACEREF(127),
|
||||
HE_ASPECT(128),
|
||||
CHANGE_AR1(129),
|
||||
CHANGE_AR2(130),
|
||||
CHANGE_AR3(131),
|
||||
CHANGE_AR4(132),
|
||||
CHANGE_AR5(133),
|
||||
CHANGE_AR6(134),
|
||||
CHANGE_WP1(135),
|
||||
CHANGE_WP2(136),
|
||||
CHANGE_HALLOWEEN(1000);
|
||||
|
||||
/** Int mask. */
|
||||
private final int _mask;
|
||||
/** Type: 0 Normal, 1 Special, 2 Event. */
|
||||
private final int _type;
|
||||
private final int _clientId;
|
||||
|
||||
private AbnormalVisualEffect(int mask, int type)
|
||||
private AbnormalVisualEffect(int clientId)
|
||||
{
|
||||
_mask = mask;
|
||||
_type = type;
|
||||
_clientId = clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the int bitmask for the abnormal visual effect.
|
||||
* @return the int bitmask
|
||||
* Gets the client id.
|
||||
* @return the client id
|
||||
*/
|
||||
public final int getMask()
|
||||
public int getClientId()
|
||||
{
|
||||
return _mask;
|
||||
return _clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if it's a special abnormal visual effect.
|
||||
* @return {@code true} it's a special abnormal visual effect, {@code false} otherwise
|
||||
* Finds abnormal visual effect by name.
|
||||
* @param name the name
|
||||
* @return The abnormal visual effect if its found, {@code null} otherwise
|
||||
*/
|
||||
public final boolean isSpecial()
|
||||
public static final AbnormalVisualEffect findByName(String name)
|
||||
{
|
||||
return _type == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if it's an event abnormal visual effect.
|
||||
* @return {@code true} it's an event abnormal visual effect, {@code false} otherwise
|
||||
*/
|
||||
public final boolean isEvent()
|
||||
{
|
||||
return _type == 2;
|
||||
for (AbnormalVisualEffect abnormalVisualEffect : values())
|
||||
{
|
||||
if (abnormalVisualEffect.name().equalsIgnoreCase(name))
|
||||
{
|
||||
return abnormalVisualEffect;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -269,7 +269,9 @@ public final class BuffInfo
|
||||
_scheduledFutureTimeTask = ThreadPoolManager.getInstance().scheduleEffectAtFixedRate(new BuffTimeTask(this), 0, 1000L);
|
||||
}
|
||||
|
||||
boolean update = false;
|
||||
// Reset abnormal visual effects.
|
||||
resetAbnormalVisualEffects();
|
||||
|
||||
for (AbstractEffect effect : _effects)
|
||||
{
|
||||
if (effect.isInstant() || (_effected.isDead() && !_skill.isPassive()))
|
||||
@@ -292,14 +294,6 @@ public final class BuffInfo
|
||||
|
||||
// Add stats.
|
||||
_effected.addStatFuncs(effect.getStatFuncs(_effector, _effected, _skill));
|
||||
|
||||
update = true;
|
||||
}
|
||||
|
||||
if (update)
|
||||
{
|
||||
// Add abnormal visual effects.
|
||||
addAbnormalVisualEffects();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,7 +346,7 @@ public final class BuffInfo
|
||||
}
|
||||
}
|
||||
// Remove abnormal visual effects.
|
||||
removeAbnormalVisualEffects();
|
||||
resetAbnormalVisualEffects();
|
||||
// Set the proper system message.
|
||||
if (!(_effected.isSummon() && !((L2Summon) _effected).getOwner().hasSummon()))
|
||||
{
|
||||
@@ -388,54 +382,12 @@ public final class BuffInfo
|
||||
* Applies all the abnormal visual effects to the effected.<br>
|
||||
* Prevents multiple updates.
|
||||
*/
|
||||
private void addAbnormalVisualEffects()
|
||||
private void resetAbnormalVisualEffects()
|
||||
{
|
||||
if (_skill.hasAbnormalVisualEffects())
|
||||
{
|
||||
_effected.startAbnormalVisualEffect(false, _skill.getAbnormalVisualEffects());
|
||||
_effected.resetCurrentAbnormalVisualEffects();
|
||||
}
|
||||
|
||||
if (_effected.isPlayer() && _skill.hasAbnormalVisualEffectsEvent())
|
||||
{
|
||||
_effected.startAbnormalVisualEffect(false, _skill.getAbnormalVisualEffectsEvent());
|
||||
}
|
||||
|
||||
if (_skill.hasAbnormalVisualEffectsSpecial())
|
||||
{
|
||||
_effected.startAbnormalVisualEffect(false, _skill.getAbnormalVisualEffectsSpecial());
|
||||
}
|
||||
|
||||
// Update abnormal visual effects.
|
||||
_effected.updateAbnormalEffect();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all the abnormal visual effects from the effected.<br>
|
||||
* Prevents multiple updates.
|
||||
*/
|
||||
private void removeAbnormalVisualEffects()
|
||||
{
|
||||
if ((_effected == null) || (_skill == null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_skill.hasAbnormalVisualEffects())
|
||||
{
|
||||
_effected.stopAbnormalVisualEffect(false, _skill.getAbnormalVisualEffects());
|
||||
}
|
||||
|
||||
if (_effected.isPlayer() && _skill.hasAbnormalVisualEffectsEvent())
|
||||
{
|
||||
_effected.stopAbnormalVisualEffect(false, _skill.getAbnormalVisualEffectsEvent());
|
||||
}
|
||||
|
||||
if (_skill.hasAbnormalVisualEffectsSpecial())
|
||||
{
|
||||
_effected.stopAbnormalVisualEffect(false, _skill.getAbnormalVisualEffectsSpecial());
|
||||
}
|
||||
|
||||
_effected.updateAbnormalEffect();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,7 +55,8 @@ public enum CommonSkill
|
||||
IMPRIT_OF_LIGHT(19034, 1),
|
||||
IMPRIT_OF_DARKNESS(19035, 1),
|
||||
ABILITY_OF_LIGHT(19032, 1),
|
||||
ABILITY_OF_DARKNESS(19033, 1);
|
||||
ABILITY_OF_DARKNESS(19033, 1),
|
||||
HAIR_ACCESSORY_SET(17192, 1);
|
||||
|
||||
private final SkillHolder _holder;
|
||||
|
||||
|
||||
@@ -115,11 +115,7 @@ public final class Skill implements IIdentifiable
|
||||
/** Abnormal time: global effect duration time. */
|
||||
private final int _abnormalTime;
|
||||
/** Abnormal visual effect: the visual effect displayed ingame. */
|
||||
private AbnormalVisualEffect[] _abnormalVisualEffects = null;
|
||||
/** Abnormal visual effect special: the visual effect displayed ingame. */
|
||||
private AbnormalVisualEffect[] _abnormalVisualEffectsSpecial = null;
|
||||
/** Abnormal visual effect event: the visual effect displayed ingame. */
|
||||
private AbnormalVisualEffect[] _abnormalVisualEffectsEvent = null;
|
||||
private Set<AbnormalVisualEffect> _abnormalVisualEffects;
|
||||
/** If {@code true} this skill's effect should stay after death. */
|
||||
private final boolean _stayAfterDeath;
|
||||
/** If {@code true} this skill's effect should stay after class-subclass change. */
|
||||
@@ -536,9 +532,9 @@ public final class Skill implements IIdentifiable
|
||||
* Gets the skill abnormal visual effect.
|
||||
* @return the abnormal visual effect
|
||||
*/
|
||||
public AbnormalVisualEffect[] getAbnormalVisualEffects()
|
||||
public Set<AbnormalVisualEffect> getAbnormalVisualEffects()
|
||||
{
|
||||
return _abnormalVisualEffects;
|
||||
return (_abnormalVisualEffects != null) ? _abnormalVisualEffects : Collections.emptySet();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -547,43 +543,7 @@ public final class Skill implements IIdentifiable
|
||||
*/
|
||||
public boolean hasAbnormalVisualEffects()
|
||||
{
|
||||
return (_abnormalVisualEffects != null) && (_abnormalVisualEffects.length > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the skill special abnormal visual effect.
|
||||
* @return the abnormal visual effect
|
||||
*/
|
||||
public AbnormalVisualEffect[] getAbnormalVisualEffectsSpecial()
|
||||
{
|
||||
return _abnormalVisualEffectsSpecial;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if the skill has special abnormal visual effects.
|
||||
* @return {@code true} if the skill has special abnormal visual effects, {@code false} otherwise
|
||||
*/
|
||||
public boolean hasAbnormalVisualEffectsSpecial()
|
||||
{
|
||||
return (_abnormalVisualEffectsSpecial != null) && (_abnormalVisualEffectsSpecial.length > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the skill event abnormal visual effect.
|
||||
* @return the abnormal visual effect
|
||||
*/
|
||||
public AbnormalVisualEffect[] getAbnormalVisualEffectsEvent()
|
||||
{
|
||||
return _abnormalVisualEffectsEvent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if the skill has event abnormal visual effects.
|
||||
* @return {@code true} if the skill has event abnormal visual effects, {@code false} otherwise
|
||||
*/
|
||||
public boolean hasAbnormalVisualEffectsEvent()
|
||||
{
|
||||
return (_abnormalVisualEffectsEvent != null) && (_abnormalVisualEffectsEvent.length > 0);
|
||||
return (_abnormalVisualEffects != null) && !_abnormalVisualEffects.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1728,55 +1688,23 @@ public final class Skill implements IIdentifiable
|
||||
if (abnormalVisualEffects != null)
|
||||
{
|
||||
final String[] data = abnormalVisualEffects.split(";");
|
||||
List<AbnormalVisualEffect> avesEvent = null;
|
||||
List<AbnormalVisualEffect> avesSpecial = null;
|
||||
List<AbnormalVisualEffect> aves = null;
|
||||
for (String ave2 : data)
|
||||
final Set<AbnormalVisualEffect> aves = new HashSet<>(1);
|
||||
for (String aveString : data)
|
||||
{
|
||||
final AbnormalVisualEffect ave = AbnormalVisualEffect.valueOf(ave2);
|
||||
final AbnormalVisualEffect ave = AbnormalVisualEffect.findByName(aveString);
|
||||
if (ave != null)
|
||||
{
|
||||
if (ave.isEvent())
|
||||
{
|
||||
if (avesEvent == null)
|
||||
{
|
||||
avesEvent = new ArrayList<>(1);
|
||||
}
|
||||
avesEvent.add(ave);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ave.isSpecial())
|
||||
{
|
||||
if (avesSpecial == null)
|
||||
{
|
||||
avesSpecial = new ArrayList<>(1);
|
||||
}
|
||||
avesSpecial.add(ave);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (aves == null)
|
||||
{
|
||||
aves = new ArrayList<>(1);
|
||||
}
|
||||
aves.add(ave);
|
||||
}
|
||||
else
|
||||
{
|
||||
_log.warning("Invalid AbnormalVisualEffect(" + aveString + ") found for Skill(" + this + ")");
|
||||
}
|
||||
}
|
||||
|
||||
if (avesEvent != null)
|
||||
if (!aves.isEmpty())
|
||||
{
|
||||
_abnormalVisualEffectsEvent = avesEvent.toArray(new AbnormalVisualEffect[avesEvent.size()]);
|
||||
}
|
||||
|
||||
if (avesSpecial != null)
|
||||
{
|
||||
_abnormalVisualEffectsSpecial = avesSpecial.toArray(new AbnormalVisualEffect[avesSpecial.size()]);
|
||||
}
|
||||
|
||||
if (aves != null)
|
||||
{
|
||||
_abnormalVisualEffects = aves.toArray(new AbnormalVisualEffect[aves.size()]);
|
||||
_abnormalVisualEffects = aves;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user