Sync with L2JServer Jan 12th 2015.
This commit is contained in:
@@ -657,12 +657,12 @@ public final class SkillTreesData implements DocumentParser
|
||||
|
||||
for (L2SkillLearn skill : skills.values())
|
||||
{
|
||||
if (((skill.getSkillId() == CommonSkill.DIVINE_INSPIRATION.getId()) && (!Config.AUTO_LEARN_DIVINE_INSPIRATION && includeAutoGet) && !player.isGM()))
|
||||
if (((skill.getSkillId() == CommonSkill.DIVINE_INSPIRATION.getId()) && (!Config.AUTO_LEARN_DIVINE_INSPIRATION && includeAutoGet) && !player.isGM()) || (!includeAutoGet && skill.isAutoGet()) || (!includeByFs && skill.isLearnedByFS()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (((includeAutoGet && skill.isAutoGet()) || skill.isLearnedByNpc() || (includeByFs && skill.isLearnedByFS())) && (player.getLevel() >= skill.getGetLevel()))
|
||||
if (player.getLevel() >= skill.getGetLevel())
|
||||
{
|
||||
final Skill oldSkill = holder.getKnownSkill(skill.getSkillId());
|
||||
if (oldSkill != null)
|
||||
@@ -1300,7 +1300,7 @@ public final class SkillTreesData implements DocumentParser
|
||||
{
|
||||
for (L2SkillLearn s : skillTree.values())
|
||||
{
|
||||
if (s.isLearnedByNpc() && (player.getLevel() < s.getGetLevel()))
|
||||
if (player.getLevel() < s.getGetLevel())
|
||||
{
|
||||
if ((minLevel == 0) || (minLevel > s.getGetLevel()))
|
||||
{
|
||||
@@ -1326,7 +1326,11 @@ public final class SkillTreesData implements DocumentParser
|
||||
{
|
||||
for (L2SkillLearn skill : completeClassSkillTree.values())
|
||||
{
|
||||
if (((includeAutoGet && skill.isAutoGet()) || skill.isLearnedByNpc() || (includeByFs && skill.isLearnedByFS())) && (minLevelForNewSkill == skill.getGetLevel()))
|
||||
if ((!includeAutoGet && skill.isAutoGet()) || (!includeByFs && skill.isLearnedByFS()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (minLevelForNewSkill == skill.getGetLevel())
|
||||
{
|
||||
final Skill oldSkill = player.getKnownSkill(skill.getSkillId());
|
||||
if (oldSkill != null)
|
||||
|
@@ -109,7 +109,7 @@ import com.l2jserver.gameserver.model.conditions.ConditionPlayerVehicleMounted;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionPlayerWeight;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionSiegeZone;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionSlotItemId;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetAbnormal;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetAbnormalType;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetActiveEffectId;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetActiveSkillId;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetAggro;
|
||||
@@ -576,19 +576,19 @@ public abstract class DocumentBase
|
||||
}
|
||||
case "hp":
|
||||
{
|
||||
int hp = Integer.decode(getValue(a.getNodeValue(), null));
|
||||
int hp = Integer.decode(getValue(a.getNodeValue(), template));
|
||||
cond = joinAnd(cond, new ConditionPlayerHp(hp));
|
||||
break;
|
||||
}
|
||||
case "mp":
|
||||
{
|
||||
int hp = Integer.decode(getValue(a.getNodeValue(), null));
|
||||
cond = joinAnd(cond, new ConditionPlayerMp(hp));
|
||||
int mp = Integer.decode(getValue(a.getNodeValue(), template));
|
||||
cond = joinAnd(cond, new ConditionPlayerMp(mp));
|
||||
break;
|
||||
}
|
||||
case "cp":
|
||||
{
|
||||
int cp = Integer.decode(getValue(a.getNodeValue(), null));
|
||||
int cp = Integer.decode(getValue(a.getNodeValue(), template));
|
||||
cond = joinAnd(cond, new ConditionPlayerCp(cp));
|
||||
break;
|
||||
}
|
||||
@@ -1033,10 +1033,10 @@ public abstract class DocumentBase
|
||||
cond = joinAnd(cond, new ConditionTargetActiveSkillId(skill_id, skill_lvl));
|
||||
break;
|
||||
}
|
||||
case "abnormal":
|
||||
case "abnormaltype":
|
||||
{
|
||||
int abnormalId = Integer.decode(getValue(a.getNodeValue(), template));
|
||||
cond = joinAnd(cond, new ConditionTargetAbnormal(abnormalId));
|
||||
AbnormalType abnormalType = AbnormalType.getAbnormalType(getValue(a.getNodeValue(), template));
|
||||
cond = joinAnd(cond, new ConditionTargetAbnormalType(abnormalType));
|
||||
break;
|
||||
}
|
||||
case "mindistance":
|
||||
|
@@ -66,7 +66,8 @@ public enum NpcInfoType implements IUpdateTypeComponent
|
||||
PVP_FLAG(0x21, 1),
|
||||
NAME_COLOR(0x22, 4),
|
||||
CLAN(0x23, (5 * 4)),
|
||||
ABNORMALS(0x24, 0);
|
||||
ABNORMALS(0x24, 0),
|
||||
VISUAL_STATE(0x25, 1);
|
||||
|
||||
private final int _mask;
|
||||
private final int _blockLength;
|
||||
|
@@ -382,7 +382,7 @@ public class ClanEntryManager
|
||||
|
||||
public long getClanLockTime(int playerId)
|
||||
{
|
||||
return _clanLocked.get(playerId) == null ? 0 : _playerLocked.get(playerId).getDelay(TimeUnit.MINUTES);
|
||||
return _clanLocked.get(playerId) == null ? 0 : _clanLocked.get(playerId).getDelay(TimeUnit.MINUTES);
|
||||
}
|
||||
|
||||
private static void lockPlayer(int playerId)
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,6 @@
|
||||
package com.l2jserver.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
|
||||
|
||||
/**
|
||||
@@ -55,7 +54,6 @@ public final class Appearing extends L2GameClientPacket
|
||||
}
|
||||
|
||||
sendPacket(new UserInfo(activeChar));
|
||||
sendPacket(new ExBrExtraUserInfo(activeChar));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -117,7 +117,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS);
|
||||
activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE);
|
||||
activeChar.sendPacket(new EnchantResult(2, 0, 0));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
{
|
||||
Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " use autoenchant program ", Config.DEFAULT_PUNISH);
|
||||
activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE);
|
||||
activeChar.sendPacket(new EnchantResult(2, 0, 0));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
activeChar.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to enchant with a scroll he doesn't have", Config.DEFAULT_PUNISH);
|
||||
activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE);
|
||||
activeChar.sendPacket(new EnchantResult(2, 0, 0));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
activeChar.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to enchant with a support item he doesn't have", Config.DEFAULT_PUNISH);
|
||||
activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE);
|
||||
activeChar.sendPacket(new EnchantResult(2, 0, 0));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS);
|
||||
activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE);
|
||||
activeChar.sendPacket(new EnchantResult(2, 0, 0));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS);
|
||||
activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE);
|
||||
activeChar.sendPacket(new EnchantResult(2, 0, 0));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0));
|
||||
break;
|
||||
}
|
||||
case SUCCESS:
|
||||
@@ -187,7 +187,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
item.setEnchantLevel(item.getEnchantLevel() + 1);
|
||||
item.updateDatabase();
|
||||
}
|
||||
activeChar.sendPacket(new EnchantResult(0, 0, 0, item.getEnchantLevel()));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.SUCCESS, item));
|
||||
|
||||
if (Config.LOG_ITEM_ENCHANTS)
|
||||
{
|
||||
@@ -239,7 +239,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
{
|
||||
// safe enchant - remain old value
|
||||
activeChar.sendPacket(SystemMessageId.ENCHANT_FAILED_THE_ENCHANT_SKILL_FOR_THE_CORRESPONDING_ITEM_WILL_BE_EXACTLY_RETAINED);
|
||||
activeChar.sendPacket(new EnchantResult(5, 0, 0, item.getEnchantLevel()));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.SAFE_FAIL, item));
|
||||
|
||||
if (Config.LOG_ITEM_ENCHANTS)
|
||||
{
|
||||
@@ -291,7 +291,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
|
||||
item.setEnchantLevel(0);
|
||||
item.updateDatabase();
|
||||
activeChar.sendPacket(new EnchantResult(3, 0, 0));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.BLESSED_FAIL, 0, 0));
|
||||
|
||||
if (Config.LOG_ITEM_ENCHANTS)
|
||||
{
|
||||
@@ -323,7 +323,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
// unable to destroy item, cheater ?
|
||||
Util.handleIllegalPlayerAction(activeChar, "Unable to delete item on enchant failure from player " + activeChar.getName() + ", possible cheater !", Config.DEFAULT_PUNISH);
|
||||
activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE);
|
||||
activeChar.sendPacket(new EnchantResult(2, 0, 0));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0));
|
||||
|
||||
if (Config.LOG_ITEM_ENCHANTS)
|
||||
{
|
||||
@@ -363,11 +363,11 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
|
||||
if (crystalId == 0)
|
||||
{
|
||||
activeChar.sendPacket(new EnchantResult(4, 0, 0));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.NO_CRYSTAL, 0, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(new EnchantResult(1, crystalId, count));
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.FAIL, crystalId, count));
|
||||
}
|
||||
|
||||
if (Config.LOG_ITEM_ENCHANTS)
|
||||
|
@@ -32,7 +32,6 @@ import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillInfoDetail;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillResult;
|
||||
@@ -196,7 +195,6 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
}
|
||||
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
player.sendSkillList();
|
||||
final int afterEnchantSkillLevel = player.getSkillLevel(_skillId);
|
||||
player.sendPacket(new ExEnchantSkillInfo(_skillId, afterEnchantSkillLevel));
|
||||
|
@@ -32,7 +32,6 @@ import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillInfoDetail;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillResult;
|
||||
@@ -191,7 +190,6 @@ public final class RequestExEnchantSkillRouteChange extends L2GameClientPacket
|
||||
}
|
||||
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
|
||||
if (levelPenalty == 0)
|
||||
{
|
||||
|
@@ -32,7 +32,6 @@ import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillInfoDetail;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillResult;
|
||||
@@ -196,7 +195,6 @@ public final class RequestExEnchantSkillSafe extends L2GameClientPacket
|
||||
}
|
||||
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
player.sendSkillList();
|
||||
final int afterEnchantSkillLevel = player.getSkillLevel(_skillId);
|
||||
player.sendPacket(new ExEnchantSkillInfo(_skillId, afterEnchantSkillLevel));
|
||||
|
@@ -32,7 +32,6 @@ import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillInfoDetail;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillResult;
|
||||
@@ -174,7 +173,6 @@ public final class RequestExEnchantSkillUntrain extends L2GameClientPacket
|
||||
}
|
||||
|
||||
player.sendPacket(new UserInfo(player));
|
||||
player.sendPacket(new ExBrExtraUserInfo(player));
|
||||
|
||||
if (_skillLvl > 100)
|
||||
{
|
||||
|
@@ -52,13 +52,13 @@ public final class RequestExPledgeCrestLarge extends L2GameClientPacket
|
||||
{
|
||||
final byte[] fullChunk = new byte[14336];
|
||||
System.arraycopy(data, (14336 * i), fullChunk, 0, 14336);
|
||||
sendPacket(new ExPledgeEmblem(_crestId, fullChunk, _clanId, i, 14336));
|
||||
sendPacket(new ExPledgeEmblem(_crestId, fullChunk, _clanId, i));
|
||||
}
|
||||
else
|
||||
{
|
||||
final byte[] lastChunk = new byte[8320];
|
||||
System.arraycopy(data, (14336 * i), lastChunk, 0, 8320);
|
||||
sendPacket(new ExPledgeEmblem(_crestId, lastChunk, _clanId, i, 8320));
|
||||
sendPacket(new ExPledgeEmblem(_crestId, lastChunk, _clanId, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ public class RequestExRemoveEnchantSupportItem extends L2GameClientPacket
|
||||
|
||||
if ((supportItem == null) || (supportItem.getCount() < 1))
|
||||
{
|
||||
activeChar.sendPacket(new ExRemoveEnchantSupportItemResult());
|
||||
activeChar.sendPacket(ExRemoveEnchantSupportItemResult.STATIC_PACKET);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -20,6 +20,7 @@ package com.l2jserver.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jserver.gameserver.network.L2GameClient;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CharSelectionInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExLoginVitalityEffectInfo;
|
||||
|
||||
/**
|
||||
* (ch)
|
||||
@@ -39,6 +40,7 @@ public class RequestGotoLobby extends L2GameClientPacket
|
||||
protected void runImpl()
|
||||
{
|
||||
L2GameClient client = getClient();
|
||||
client.sendPacket(new ExLoginVitalityEffectInfo(client));
|
||||
client.sendPacket(new CharSelectionInfo(client.getAccountName(), client.getSessionId().playOkID1));
|
||||
}
|
||||
|
||||
|
@@ -24,6 +24,7 @@ import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.datatables.SkillTreesData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.skills.CommonSkill;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
@@ -63,7 +64,7 @@ public final class RequestMagicSkillUse extends L2GameClientPacket
|
||||
skill = activeChar.getCustomSkill(_magicId);
|
||||
if (skill == null)
|
||||
{
|
||||
if (SkillTreesData.getInstance().isSubClassChangeSkill(_magicId, 1))
|
||||
if ((_magicId == CommonSkill.HAIR_ACCESSORY_SET.getId()) || SkillTreesData.getInstance().isSubClassChangeSkill(_magicId, 1))
|
||||
{
|
||||
skill = SkillData.getInstance().getSkill(_magicId, 1);
|
||||
}
|
||||
|
@@ -80,9 +80,9 @@ public class RequestPledgeRecruitBoardAccess extends L2GameClientPacket
|
||||
ClanEntryManager.getInstance().removeFromClanList(clan.getId());
|
||||
break;
|
||||
}
|
||||
case 1: // update
|
||||
case 1: // add
|
||||
{
|
||||
if (ClanEntryManager.getInstance().updateClanList(clan.getId(), pledgeRecruitInfo))
|
||||
if (ClanEntryManager.getInstance().addToClanList(clan.getId(), pledgeRecruitInfo))
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.ENTRY_APPLICATION_COMPLETE_USE_ENTRY_APPLICATION_INFO_TO_CHECK_OR_CANCEL_YOUR_APPLICATION_APPLICATION_IS_AUTOMATICALLY_CANCELLED_AFTER_30_DAYS_IF_YOU_CANCEL_APPLICATION_YOU_CANNOT_APPLY_AGAIN_FOR_5_MINUTES);
|
||||
}
|
||||
@@ -94,9 +94,9 @@ public class RequestPledgeRecruitBoardAccess extends L2GameClientPacket
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: // add
|
||||
case 2: // update
|
||||
{
|
||||
if (ClanEntryManager.getInstance().addToClanList(clan.getId(), pledgeRecruitInfo))
|
||||
if (ClanEntryManager.getInstance().updateClanList(clan.getId(), pledgeRecruitInfo))
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.ENTRY_APPLICATION_COMPLETE_USE_ENTRY_APPLICATION_INFO_TO_CHECK_OR_CANCEL_YOUR_APPLICATION_APPLICATION_IS_AUTOMATICALLY_CANCELLED_AFTER_30_DAYS_IF_YOU_CANCEL_APPLICATION_YOU_CANNOT_APPLY_AGAIN_FOR_5_MINUTES);
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ import java.util.Collection;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SpawnItem;
|
||||
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
|
||||
|
||||
@@ -47,7 +46,6 @@ public class RequestRecordInfo extends L2GameClientPacket
|
||||
}
|
||||
|
||||
activeChar.sendPacket(new UserInfo(activeChar));
|
||||
activeChar.sendPacket(new ExBrExtraUserInfo(activeChar));
|
||||
|
||||
Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();
|
||||
for (L2Object object : objs)
|
||||
|
@@ -21,7 +21,6 @@ package com.l2jserver.gameserver.network.clientpackets;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExVoteSystemInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
|
||||
@@ -99,7 +98,6 @@ public final class RequestVoteNew extends L2GameClientPacket
|
||||
target.sendPacket(sm);
|
||||
|
||||
activeChar.sendPacket(new UserInfo(activeChar));
|
||||
sendPacket(new ExBrExtraUserInfo(activeChar));
|
||||
target.broadcastUserInfo();
|
||||
|
||||
activeChar.sendPacket(new ExVoteSystemInfo(activeChar));
|
||||
|
@@ -18,12 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.model.PcCondOverride;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2TrapInstance;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
|
||||
public abstract class AbstractNpcInfo extends L2GameServerPacket
|
||||
@@ -125,7 +122,7 @@ public abstract class AbstractNpcInfo extends L2GameServerPacket
|
||||
writeD(_trap.getPvpFlag());
|
||||
writeD(_trap.getKarma());
|
||||
|
||||
writeD(_trap.isInvisible() ? _trap.getAbnormalVisualEffects() | AbnormalVisualEffect.STEALTH.getMask() : _trap.getAbnormalVisualEffects());
|
||||
writeD(0); // was AVE and was adding stealth
|
||||
writeD(0x00); // clan id
|
||||
writeD(0x00); // crest id
|
||||
writeD(0000); // C2
|
||||
@@ -178,16 +175,6 @@ public abstract class AbstractNpcInfo extends L2GameServerPacket
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
boolean gmSeeInvis = false;
|
||||
if (isInvisible())
|
||||
{
|
||||
final L2PcInstance activeChar = getClient().getActiveChar();
|
||||
if ((activeChar != null) && activeChar.canOverrideCond(PcCondOverride.SEE_ALL_PLAYERS))
|
||||
{
|
||||
gmSeeInvis = true;
|
||||
}
|
||||
}
|
||||
|
||||
writeC(0x0c);
|
||||
writeD(_summon.getObjectId());
|
||||
writeD(_idTemplate + 1000000); // npctype id
|
||||
@@ -228,7 +215,7 @@ public abstract class AbstractNpcInfo extends L2GameServerPacket
|
||||
writeD(_summon.getPvpFlag());
|
||||
writeD(_summon.getKarma());
|
||||
|
||||
writeD(gmSeeInvis ? _summon.getAbnormalVisualEffects() | AbnormalVisualEffect.STEALTH.getMask() : _summon.getAbnormalVisualEffects());
|
||||
writeD(0); // was AVE and was adding stealth
|
||||
|
||||
writeD(0x00); // clan id
|
||||
writeD(0x00); // crest id
|
||||
@@ -246,7 +233,7 @@ public abstract class AbstractNpcInfo extends L2GameServerPacket
|
||||
writeD(_form); // CT1.5 Pet form and skills
|
||||
writeC(0x01);
|
||||
writeC(0x01);
|
||||
writeD(_summon.getAbnormalVisualEffectSpecial());
|
||||
// writeD(_summon.getAbnormalVisualEffectSpecial());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -18,12 +18,15 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import com.l2jserver.gameserver.model.PcCondOverride;
|
||||
import com.l2jserver.gameserver.model.actor.L2Decoy;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
|
||||
public class CharInfo extends L2GameServerPacket
|
||||
@@ -252,10 +255,11 @@ public class CharInfo extends L2GameServerPacket
|
||||
writeD((int) Math.round(_activeChar.getCurrentMp())); // Confirmed
|
||||
|
||||
writeC(0x00); // TODO: Find me!
|
||||
writeD(_activeChar.getAbnormalVisualEffectsList().size()); // Confirmed
|
||||
for (int abnormalId : _activeChar.getAbnormalVisualEffectsList())
|
||||
final Set<AbnormalVisualEffect> abnormalVisualEffects = _activeChar.getCurrentAbnormalVisualEffects();
|
||||
writeD(abnormalVisualEffects.size()); // Confirmed
|
||||
for (AbnormalVisualEffect abnormalVisualEffect : abnormalVisualEffects)
|
||||
{
|
||||
writeH(abnormalId); // Confirmed
|
||||
writeH(abnormalVisualEffect.getClientId()); // Confirmed
|
||||
}
|
||||
writeC(0x00); // TODO: Find me!
|
||||
writeC(_activeChar.isHairAccessoryEnabled() ? 0x01 : 0x00); // Hair accessory
|
||||
|
@@ -62,9 +62,8 @@ public class CharSelected extends L2GameServerPacket
|
||||
writeD(_activeChar.getKarma()); // thx evill33t
|
||||
writeD(_activeChar.getPkKills());
|
||||
writeD(GameTimeController.getInstance().getGameTime() % (24 * 60)); // "reset" on 24th hour
|
||||
writeD(_activeChar.getClassId().getId());
|
||||
|
||||
writeD(0x00);
|
||||
writeD(_activeChar.getClassId().getId());
|
||||
|
||||
writeB(new byte[16]);
|
||||
|
||||
|
@@ -18,24 +18,39 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
|
||||
public class EnchantResult extends L2GameServerPacket
|
||||
{
|
||||
public static int SUCCESS = 0;
|
||||
public static int FAIL = 1;
|
||||
public static int ERROR = 2;
|
||||
public static int BLESSED_FAIL = 3;
|
||||
public static int NO_CRYSTAL = 4;
|
||||
public static int SAFE_FAIL = 5;
|
||||
private final int _result;
|
||||
private final int _crystal;
|
||||
private final int _count;
|
||||
private final int _enchantLevel;
|
||||
private final int[] _enchantOptions;
|
||||
|
||||
public EnchantResult(int result, int crystal, int count)
|
||||
{
|
||||
this(result, crystal, count, 0);
|
||||
}
|
||||
|
||||
public EnchantResult(int result, int crystal, int count, int enchantLevel)
|
||||
public EnchantResult(int result, int crystal, int count, int enchantLevel, int[] options)
|
||||
{
|
||||
_result = result;
|
||||
_crystal = crystal;
|
||||
_count = count;
|
||||
_enchantLevel = enchantLevel;
|
||||
_enchantOptions = options;
|
||||
}
|
||||
|
||||
public EnchantResult(int result, int crystal, int count)
|
||||
{
|
||||
this(result, crystal, count, 0, L2ItemInstance.DEFAULT_ENCHANT_OPTIONS);
|
||||
}
|
||||
|
||||
public EnchantResult(int result, L2ItemInstance item)
|
||||
{
|
||||
this(result, 0, 0, 0, item.getEnchantOptions());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,8 +61,9 @@ public class EnchantResult extends L2GameServerPacket
|
||||
writeD(_crystal);
|
||||
writeQ(_count);
|
||||
writeD(_enchantLevel);
|
||||
writeH(0x00);
|
||||
writeH(0x00);
|
||||
writeH(0x00);
|
||||
for (int option : _enchantOptions)
|
||||
{
|
||||
writeH(option);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,53 +1,53 @@
|
||||
/*
|
||||
* 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.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.model.actor.stat.PcStat;
|
||||
import com.l2jserver.gameserver.model.variables.AccountVariables;
|
||||
import com.l2jserver.gameserver.network.L2GameClient;
|
||||
|
||||
/**
|
||||
* ExBrExtraUserInfo server packet implementation.
|
||||
* @author Kerberos, Zoey76
|
||||
* @author Sdw
|
||||
*/
|
||||
public class ExBrExtraUserInfo extends L2GameServerPacket
|
||||
public class ExLoginVitalityEffectInfo extends L2GameServerPacket
|
||||
{
|
||||
/** Player object ID. */
|
||||
private final int _charObjId;
|
||||
/** Event abnormal visual effects map. */
|
||||
private final int _abnormalVisualEffectsEvent;
|
||||
/** Lecture mark. */
|
||||
private final int _lectureMark;
|
||||
private final int _points;
|
||||
|
||||
public ExBrExtraUserInfo(L2PcInstance player)
|
||||
public ExLoginVitalityEffectInfo(L2GameClient client)
|
||||
{
|
||||
_charObjId = player.getObjectId();
|
||||
_abnormalVisualEffectsEvent = player.getAbnormalVisualEffectEvent();
|
||||
_lectureMark = 1; // TODO: Implement.
|
||||
setInvisible(player.isInvisible());
|
||||
final AccountVariables vars = new AccountVariables(client.getAccountName());
|
||||
_points = vars.getInt(PcStat.VITALITY_VARIABLE, Config.STARTING_VITALITY_POINTS);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xDB);
|
||||
writeD(_charObjId);
|
||||
writeD(_abnormalVisualEffectsEvent);
|
||||
writeC(_lectureMark);
|
||||
writeH(0x119);
|
||||
|
||||
writeD((int) (Config.RATE_VITALITY_EXP_MULTIPLIER * 100));
|
||||
writeD(5); // Remaining item counts
|
||||
|
||||
writeD(_points);
|
||||
writeD(0);
|
||||
writeD(0);
|
||||
writeD(0);
|
||||
}
|
||||
}
|
@@ -29,16 +29,14 @@ public class ExPledgeEmblem extends L2GameServerPacket
|
||||
private final int _clanId;
|
||||
private final byte[] _data;
|
||||
private final int _chunkId;
|
||||
private final int _chunkSize;
|
||||
private static final int TOTAL_SIZE = 65664;
|
||||
|
||||
public ExPledgeEmblem(int crestId, byte[] chunkedData, int clanId, int chunkId, int chunkSize)
|
||||
public ExPledgeEmblem(int crestId, byte[] chunkedData, int clanId, int chunkId)
|
||||
{
|
||||
_crestId = crestId;
|
||||
_data = chunkedData;
|
||||
_clanId = clanId;
|
||||
_chunkId = chunkId;
|
||||
_chunkSize = chunkSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -51,7 +49,6 @@ public class ExPledgeEmblem extends L2GameServerPacket
|
||||
writeD(_crestId);
|
||||
writeD(_chunkId);
|
||||
writeD(TOTAL_SIZE);
|
||||
writeD(_chunkSize);
|
||||
if (_data != null)
|
||||
{
|
||||
writeD(_data.length);
|
||||
|
@@ -23,6 +23,8 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
*/
|
||||
public class ExRemoveEnchantSupportItemResult extends L2GameServerPacket
|
||||
{
|
||||
public static final ExRemoveEnchantSupportItemResult STATIC_PACKET = new ExRemoveEnchantSupportItemResult();
|
||||
|
||||
public ExRemoveEnchantSupportItemResult()
|
||||
{
|
||||
}
|
||||
|
@@ -18,7 +18,10 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
@@ -40,11 +43,12 @@ public class ExUserInfoAbnormalVisualEffect extends L2GameServerPacket
|
||||
|
||||
writeD(_activeChar.getObjectId());
|
||||
writeD(_activeChar.getTransformationId());
|
||||
writeD(_activeChar.getAbnormalVisualEffectsList().size());
|
||||
|
||||
for (int abnormalVisualEffectId : _activeChar.getAbnormalVisualEffectsList())
|
||||
final Set<AbnormalVisualEffect> abnormalVisualEffects = _activeChar.getCurrentAbnormalVisualEffects();
|
||||
writeD(abnormalVisualEffects.size());
|
||||
for (AbnormalVisualEffect abnormalVisualEffect : abnormalVisualEffects)
|
||||
{
|
||||
writeH(abnormalVisualEffectId);
|
||||
writeH(abnormalVisualEffect.getClientId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -55,8 +55,8 @@ public final class HennaInfo extends L2GameServerPacket
|
||||
writeC(_activeChar.getHennaStatMEN()); // equip MEN
|
||||
writeC(_activeChar.getHennaStatDEX()); // equip DEX
|
||||
writeC(_activeChar.getHennaStatWIT()); // equip WIT
|
||||
writeC(0x00); // equip LUC
|
||||
writeC(0x00); // equip CHA
|
||||
writeC(_activeChar.getHennaStatLUC()); // equip LUC
|
||||
writeC(_activeChar.getHennaStatCHA()); // equip CHA
|
||||
writeD(3 - _activeChar.getHennaEmptySlots()); // Slots
|
||||
writeD(_hennas.size()); // Size
|
||||
for (L2Henna henna : _hennas)
|
||||
|
@@ -57,10 +57,10 @@ public class HennaItemDrawInfo extends L2GameServerPacket
|
||||
writeC(_activeChar.getDEX() + _henna.getStatDEX()); // equip DEX
|
||||
writeD(_activeChar.getWIT()); // current WIT
|
||||
writeC(_activeChar.getWIT() + _henna.getStatWIT()); // equip WIT
|
||||
writeD(0x00); // current LUC
|
||||
writeC(0x00); // equip LUC
|
||||
writeD(0x00); // current CHA
|
||||
writeC(0x00); // equip CHA
|
||||
writeD(_activeChar.getLUC()); // current LUC
|
||||
writeC(_activeChar.getLUC() + _henna.getStatLUC()); // equip LUC
|
||||
writeD(_activeChar.getCHA()); // current CHA
|
||||
writeC(_activeChar.getCHA() + _henna.getStatCHA()); // equip CHA
|
||||
writeD(0x00); // TODO: Find me!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -57,10 +57,10 @@ public final class HennaItemRemoveInfo extends L2GameServerPacket
|
||||
writeC(_activeChar.getDEX() - _henna.getStatDEX()); // equip DEX
|
||||
writeD(_activeChar.getWIT()); // current WIT
|
||||
writeC(_activeChar.getWIT() - _henna.getStatWIT()); // equip WIT
|
||||
writeD(0x00); // current LUC
|
||||
writeC(0x00); // equip LUC
|
||||
writeD(0x00); // current CHA
|
||||
writeC(0x00); // equip CHA
|
||||
writeD(_activeChar.getLUC()); // current LUC
|
||||
writeC(_activeChar.getLUC() - _henna.getStatLUC()); // equip LUC
|
||||
writeD(_activeChar.getCHA()); // current CHA
|
||||
writeC(_activeChar.getCHA() - _henna.getStatCHA()); // equip CHA
|
||||
writeD(0x00);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@ import com.l2jserver.gameserver.instancemanager.TownManager;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2GuardInstance;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
|
||||
/**
|
||||
@@ -42,7 +43,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
(byte) 0x0C,
|
||||
(byte) 0x0C,
|
||||
(byte) 0x00,
|
||||
(byte) 0x04
|
||||
(byte) 0x00
|
||||
};
|
||||
|
||||
private int _initSize = 0;
|
||||
@@ -54,10 +55,12 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
private int _allyId = 0;
|
||||
private int _clanId = 0;
|
||||
private int _statusMask = 0;
|
||||
private final Set<AbnormalVisualEffect> _abnormalVisualEffects;
|
||||
|
||||
public NpcInfo(L2Npc npc)
|
||||
{
|
||||
_npc = npc;
|
||||
_abnormalVisualEffects = npc.getCurrentAbnormalVisualEffects();
|
||||
|
||||
if (npc.getTemplate().getDisplayId() != npc.getTemplate().getId())
|
||||
{
|
||||
@@ -131,7 +134,7 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
addComponentType(NpcInfoType.NAME);
|
||||
}
|
||||
|
||||
if (!npc.getAbnormalVisualEffectsList().isEmpty())
|
||||
if (!_abnormalVisualEffects.isEmpty())
|
||||
{
|
||||
addComponentType(NpcInfoType.ABNORMALS);
|
||||
}
|
||||
@@ -182,8 +185,10 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
_statusMask |= 0x08;
|
||||
}
|
||||
|
||||
// Add one byte.
|
||||
_blockSize++;
|
||||
if (_statusMask != 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.VISUAL_STATE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -382,15 +387,17 @@ public class NpcInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
writeD(_allyCrest);
|
||||
}
|
||||
|
||||
writeC(_statusMask);
|
||||
if (containsMask(NpcInfoType.VISUAL_STATE))
|
||||
{
|
||||
writeC(_statusMask);
|
||||
}
|
||||
|
||||
if (containsMask(NpcInfoType.ABNORMALS))
|
||||
{
|
||||
final Set<Integer> visualEffects = _npc.getAbnormalVisualEffectsList();
|
||||
writeH(visualEffects.size());
|
||||
for (int visualEffect : visualEffects)
|
||||
writeH(_abnormalVisualEffects.size());
|
||||
for (AbnormalVisualEffect abnormalVisualEffect : _abnormalVisualEffects)
|
||||
{
|
||||
writeH(visualEffect);
|
||||
writeH(abnormalVisualEffect.getClientId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -18,9 +18,12 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2ServitorInstance;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
|
||||
public class PetInfo extends L2GameServerPacket
|
||||
{
|
||||
@@ -160,12 +163,13 @@ public class PetInfo extends L2GameServerPacket
|
||||
writeC(0x00); // Used Summon Points
|
||||
writeC(0x00); // Maximum Summon Points
|
||||
|
||||
writeH(_summon.getAbnormalVisualEffectsList().size()); // Confirmed
|
||||
for (int abnormalId : _summon.getAbnormalVisualEffectsList())
|
||||
final Set<AbnormalVisualEffect> aves = _summon.getCurrentAbnormalVisualEffects();
|
||||
writeH(aves.size()); // Confirmed
|
||||
for (AbnormalVisualEffect ave : aves)
|
||||
{
|
||||
writeH(abnormalId); // Confirmed
|
||||
writeH(ave.getClientId()); // Confirmed
|
||||
}
|
||||
|
||||
writeC(0x00); // TODO: Find me
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J Server
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
|
Reference in New Issue
Block a user