Addition of SkillFinishType enumeration.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 org.l2jmobius.gameserver.enums;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public enum SkillFinishType
|
||||
{
|
||||
NORMAL,
|
||||
REMOVED,
|
||||
SILENT;
|
||||
}
|
@@ -28,6 +28,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.enums.DuelResult;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.enums.Team;
|
||||
import org.l2jmobius.gameserver.instancemanager.DuelManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
@@ -165,7 +166,7 @@ public class Duel
|
||||
{
|
||||
if (skill != null)
|
||||
{
|
||||
_player.stopSkillEffects(true, skill.getId());
|
||||
_player.stopSkillEffects(SkillFinishType.REMOVED, skill.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@ import java.util.function.Predicate;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
@@ -541,16 +542,16 @@ public class EffectList
|
||||
* Removes the stats from the creature.<br>
|
||||
* Updates the effect flags and icons.<br>
|
||||
* Presents overload:<br>
|
||||
* {@link #stopSkillEffects(boolean, Skill)}
|
||||
* @param removed {@code true} if the effect is removed, {@code false} otherwise
|
||||
* {@link #stopSkillEffects(SkillFinishType, Skill)}
|
||||
* @param type determines the system message that will be sent.
|
||||
* @param skillId the skill ID
|
||||
*/
|
||||
public void stopSkillEffects(boolean removed, int skillId)
|
||||
public void stopSkillEffects(SkillFinishType type, int skillId)
|
||||
{
|
||||
final BuffInfo info = getBuffInfoBySkillId(skillId);
|
||||
if (info != null)
|
||||
{
|
||||
remove(info, removed, true, true);
|
||||
remove(info, type, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,13 +561,13 @@ public class EffectList
|
||||
* Removes the stats from the creature.<br>
|
||||
* Updates the effect flags and icons.<br>
|
||||
* Presents overload:<br>
|
||||
* {@link #stopSkillEffects(boolean, int)}
|
||||
* @param removed {@code true} if the effect is removed, {@code false} otherwise
|
||||
* {@link #stopSkillEffects(SkillFinishType, int)}
|
||||
* @param type determines the system message that will be sent.
|
||||
* @param skill the skill
|
||||
*/
|
||||
public void stopSkillEffects(boolean removed, Skill skill)
|
||||
public void stopSkillEffects(SkillFinishType type, Skill skill)
|
||||
{
|
||||
stopSkillEffects(removed, skill.getId());
|
||||
stopSkillEffects(type, skill.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -774,17 +775,17 @@ public class EffectList
|
||||
*/
|
||||
private void remove(BuffInfo info)
|
||||
{
|
||||
remove(info, true, false, false);
|
||||
remove(info, SkillFinishType.REMOVED, false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a set of effects from this effect list.
|
||||
* @param info the effects to remove
|
||||
* @param removed {@code true} if the effect is removed, {@code false} otherwise
|
||||
* @param type determines the system message that will be sent.
|
||||
* @param update {@code true} if effect flags and icons should be updated after this removal, {@code false} otherwise.
|
||||
* @param broadcast {@code true} to broadcast update packets if updating, {@code false} otherwise.
|
||||
*/
|
||||
public void remove(BuffInfo info, boolean removed, boolean update, boolean broadcast)
|
||||
public void remove(BuffInfo info, SkillFinishType type, boolean update, boolean broadcast)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
@@ -794,17 +795,17 @@ public class EffectList
|
||||
if (info.getOption() != null)
|
||||
{
|
||||
// Remove separately if its an option.
|
||||
removeOption(info, removed);
|
||||
removeOption(info, type);
|
||||
}
|
||||
else if (info.getSkill().isPassive())
|
||||
{
|
||||
// Remove Passive effect.
|
||||
removePassive(info, removed);
|
||||
removePassive(info, type);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove active effect.
|
||||
removeActive(info, removed);
|
||||
removeActive(info, type);
|
||||
if (_owner.isNpc()) // Fix for all NPC debuff animations removed.
|
||||
{
|
||||
updateEffectList(broadcast);
|
||||
@@ -818,11 +819,7 @@ public class EffectList
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param info
|
||||
* @param removed
|
||||
*/
|
||||
private void removeActive(BuffInfo info, boolean removed)
|
||||
private void removeActive(BuffInfo info, SkillFinishType type)
|
||||
{
|
||||
if (!_actives.isEmpty())
|
||||
{
|
||||
@@ -836,7 +833,7 @@ public class EffectList
|
||||
}
|
||||
|
||||
// Stop the buff effects.
|
||||
info.stopAllEffects(removed);
|
||||
info.stopAllEffects(type);
|
||||
|
||||
// Decrease specific buff count
|
||||
increaseDecreaseCount(info, false);
|
||||
@@ -844,21 +841,21 @@ public class EffectList
|
||||
}
|
||||
}
|
||||
|
||||
private void removePassive(BuffInfo info, boolean removed)
|
||||
private void removePassive(BuffInfo info, SkillFinishType type)
|
||||
{
|
||||
if (!_passives.isEmpty())
|
||||
{
|
||||
_passives.remove(info);
|
||||
info.stopAllEffects(removed);
|
||||
info.stopAllEffects(type);
|
||||
}
|
||||
}
|
||||
|
||||
private void removeOption(BuffInfo info, boolean removed)
|
||||
private void removeOption(BuffInfo info, SkillFinishType type)
|
||||
{
|
||||
if (!_options.isEmpty())
|
||||
{
|
||||
_options.remove(info);
|
||||
info.stopAllEffects(removed);
|
||||
info.stopAllEffects(type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -59,6 +59,7 @@ import org.l2jmobius.gameserver.enums.InstanceType;
|
||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.enums.ShotType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.enums.StatusUpdateType;
|
||||
import org.l2jmobius.gameserver.enums.Team;
|
||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||
@@ -2427,17 +2428,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
/**
|
||||
* Stop and remove the effects corresponding to the skill ID.
|
||||
* @param removed if {@code true} the effect will be set as removed, and a system message will be sent
|
||||
* @param type determines the system message that will be sent.
|
||||
* @param skillId the skill Id
|
||||
*/
|
||||
public void stopSkillEffects(boolean removed, int skillId)
|
||||
public void stopSkillEffects(SkillFinishType type, int skillId)
|
||||
{
|
||||
_effectList.stopSkillEffects(removed, skillId);
|
||||
_effectList.stopSkillEffects(type, skillId);
|
||||
}
|
||||
|
||||
public void stopSkillEffects(Skill skill)
|
||||
{
|
||||
_effectList.stopSkillEffects(true, skill.getId());
|
||||
_effectList.stopSkillEffects(SkillFinishType.REMOVED, skill.getId());
|
||||
}
|
||||
|
||||
public void stopEffects(EffectFlag effectFlag)
|
||||
@@ -4165,7 +4166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Stop all effects of that skill
|
||||
if (oldSkill.isPassive())
|
||||
{
|
||||
_effectList.stopSkillEffects(true, oldSkill);
|
||||
_effectList.stopSkillEffects(SkillFinishType.REMOVED, oldSkill);
|
||||
}
|
||||
|
||||
_stat.recalculateStats(true);
|
||||
@@ -4202,7 +4203,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// Stop effects.
|
||||
if (cancelEffect || oldSkill.isToggle() || oldSkill.isPassive())
|
||||
{
|
||||
stopSkillEffects(true, oldSkill.getId());
|
||||
stopSkillEffects(SkillFinishType.REMOVED, oldSkill.getId());
|
||||
_stat.recalculateStats(true);
|
||||
}
|
||||
}
|
||||
|
@@ -44,6 +44,7 @@ import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.InstanceType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||
import org.l2jmobius.gameserver.handler.ItemHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
@@ -895,9 +896,9 @@ public class PetInstance extends Summon
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopSkillEffects(boolean removed, int skillId)
|
||||
public void stopSkillEffects(SkillFinishType type, int skillId)
|
||||
{
|
||||
super.stopSkillEffects(removed, skillId);
|
||||
super.stopSkillEffects(type, skillId);
|
||||
final Collection<SummonEffect> effects = SummonEffectTable.getInstance().getPetEffects().get(getControlObjectId());
|
||||
if ((effects != null) && !effects.isEmpty())
|
||||
{
|
||||
|
@@ -105,6 +105,7 @@ import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.enums.Sex;
|
||||
import org.l2jmobius.gameserver.enums.ShortcutType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.enums.StatusUpdateType;
|
||||
import org.l2jmobius.gameserver.enums.SubclassInfoType;
|
||||
import org.l2jmobius.gameserver.enums.Team;
|
||||
@@ -2594,7 +2595,7 @@ public class PlayerInstance extends Playable
|
||||
// fix when learning toggle skills
|
||||
if (skill.isToggle() && !skill.isNecessaryToggle() && isAffectedBySkill(skill.getId()))
|
||||
{
|
||||
stopSkillEffects(true, skill.getId());
|
||||
stopSkillEffects(SkillFinishType.REMOVED, skill.getId());
|
||||
}
|
||||
|
||||
// Mobius: Keep sublevel on skill level increase.
|
||||
@@ -8433,7 +8434,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
if (!usedSkill.isNecessaryToggle())
|
||||
{
|
||||
stopSkillEffects(true, usedSkill.getId());
|
||||
stopSkillEffects(SkillFinishType.REMOVED, usedSkill.getId());
|
||||
}
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return false;
|
||||
|
@@ -38,6 +38,7 @@ import org.l2jmobius.gameserver.data.sql.SummonEffectTable.SummonEffect;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||
import org.l2jmobius.gameserver.enums.InstanceType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
@@ -231,9 +232,9 @@ public class ServitorInstance extends Summon implements Runnable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopSkillEffects(boolean removed, int skillId)
|
||||
public void stopSkillEffects(SkillFinishType type, int skillId)
|
||||
{
|
||||
super.stopSkillEffects(removed, skillId);
|
||||
super.stopSkillEffects(type, skillId);
|
||||
final Map<Integer, Collection<SummonEffect>> servitorEffects = SummonEffectTable.getInstance().getServitorEffects(getOwner());
|
||||
if (servitorEffects != null)
|
||||
{
|
||||
|
@@ -20,6 +20,7 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.data.xml.NpcNameLocalisationData;
|
||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.instancemanager.DuelManager;
|
||||
import org.l2jmobius.gameserver.model.Duel;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@@ -180,7 +181,7 @@ public class PlayerStatus extends PlayableStatus
|
||||
if (mpDam > getActiveChar().getCurrentMp())
|
||||
{
|
||||
getActiveChar().sendPacket(SystemMessageId.MP_HAS_REACHED_0_THE_MANA_ARMOR_HAS_DISAPPEARED);
|
||||
getActiveChar().stopSkillEffects(true, 1556);
|
||||
getActiveChar().stopSkillEffects(SkillFinishType.REMOVED, 1556);
|
||||
amount = mpDam - getActiveChar().getCurrentMp();
|
||||
getActiveChar().setCurrentMp(0);
|
||||
}
|
||||
|
@@ -45,6 +45,7 @@ import org.l2jmobius.gameserver.data.xml.ClanLevelData;
|
||||
import org.l2jmobius.gameserver.data.xml.ClanMasteryData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.SiegeManager;
|
||||
@@ -510,7 +511,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
|
||||
// remove Clan skills from Player
|
||||
removeSkillEffects(player);
|
||||
player.getEffectList().stopSkillEffects(true, 19009);
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, 19009);
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
|
@@ -41,6 +41,7 @@ import org.l2jmobius.gameserver.data.xml.ArmorSetData;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.ArmorSet;
|
||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
@@ -483,7 +484,7 @@ public abstract class Inventory extends ItemContainer
|
||||
if ((skill.isToggle() && player.isAffectedBySkill(skill.getId()) && !skill.checkConditions(SkillConditionScope.GENERAL, player, player)) //
|
||||
|| (it.isWeapon() && skill.isRemovedOnUnequipWeapon()))
|
||||
{
|
||||
player.stopSkillEffects(true, skill.getId());
|
||||
player.stopSkillEffects(SkillFinishType.REMOVED, skill.getId());
|
||||
update = true;
|
||||
}
|
||||
}
|
||||
|
@@ -19,6 +19,7 @@ package org.l2jmobius.gameserver.model.options;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
@@ -220,7 +221,7 @@ public class Options
|
||||
{
|
||||
if (info.getOption() == this)
|
||||
{
|
||||
player.getEffectList().remove(info, false, true, true);
|
||||
player.getEffectList().remove(info, SkillFinishType.NORMAL, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
@@ -37,7 +38,7 @@ public class BuffFinishTask
|
||||
final BuffInfo info = entry.getKey();
|
||||
if ((info.getEffected() != null) && (entry.getValue().incrementAndGet() > info.getAbnormalTime()))
|
||||
{
|
||||
info.getEffected().getEffectList().stopSkillEffects(false, info.getSkill().getId());
|
||||
info.getEffected().getEffectList().stopSkillEffects(SkillFinishType.NORMAL, info.getSkill().getId());
|
||||
}
|
||||
}
|
||||
}, 0, 1000);
|
||||
|
@@ -24,6 +24,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.EffectList;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
@@ -62,7 +63,7 @@ public class BuffInfo
|
||||
private int _periodStartTicks;
|
||||
// Misc
|
||||
/** If {@code true} then this effect has been cancelled. */
|
||||
private volatile boolean _isRemoved = false;
|
||||
private volatile SkillFinishType _finishType = SkillFinishType.NORMAL;
|
||||
/** If {@code true} then this effect is in use (or has been stop because an Herb took place). */
|
||||
private volatile boolean _isInUse = true;
|
||||
private final boolean _hideStartMessage;
|
||||
@@ -207,16 +208,16 @@ public class BuffInfo
|
||||
*/
|
||||
public boolean isRemoved()
|
||||
{
|
||||
return _isRemoved;
|
||||
return _finishType == SkillFinishType.REMOVED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the buff info to removed.
|
||||
* @param value the value to set
|
||||
* @param type the SkillFinishType to set
|
||||
*/
|
||||
public void setRemoved(boolean value)
|
||||
public void setFinishType(SkillFinishType type)
|
||||
{
|
||||
_isRemoved = value;
|
||||
_finishType = type;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -288,12 +289,13 @@ public class BuffInfo
|
||||
* Stops all the effects for this buff info.<br>
|
||||
* Removes effects stats.<br>
|
||||
* <b>It will not remove the buff info from the effect list</b>.<br>
|
||||
* Instead call {@link EffectList#stopSkillEffects(boolean, Skill)}
|
||||
* @param removed if {@code true} the skill will be handled as removed
|
||||
* Instead call {@link EffectList#stopSkillEffects(SkillFinishType, Skill)}
|
||||
* @param type determines the system message that will be sent.
|
||||
*/
|
||||
public void stopAllEffects(boolean removed)
|
||||
public void stopAllEffects(SkillFinishType type)
|
||||
{
|
||||
setRemoved(removed);
|
||||
setFinishType(type);
|
||||
|
||||
// Remove this buff info from BuffFinishTask.
|
||||
_effected.removeBuffInfoTime(this);
|
||||
finishEffects();
|
||||
@@ -373,7 +375,7 @@ public class BuffInfo
|
||||
{
|
||||
schedule.cancel(true); // Don't allow to finish current run.
|
||||
}
|
||||
_effected.getEffectList().stopSkillEffects(true, _skill); // Remove the buff from the effect list.
|
||||
_effected.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, _skill); // Remove the buff from the effect list.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -407,11 +409,15 @@ public class BuffInfo
|
||||
if ((_skill != null) && !(_effected.isSummon() && !((Summon) _effected).getOwner().hasSummon()) && !_skill.isHidingMessages())
|
||||
{
|
||||
SystemMessageId smId = null;
|
||||
if (_skill.isToggle())
|
||||
if (_finishType == SkillFinishType.SILENT)
|
||||
{
|
||||
// smId is null.
|
||||
}
|
||||
else if (_skill.isToggle())
|
||||
{
|
||||
smId = SystemMessageId.S1_HAS_BEEN_ABORTED;
|
||||
}
|
||||
else if (_isRemoved)
|
||||
else if (_finishType == SkillFinishType.REMOVED)
|
||||
{
|
||||
smId = SystemMessageId.THE_EFFECT_OF_S1_HAS_BEEN_REMOVED;
|
||||
}
|
||||
|
@@ -39,6 +39,7 @@ import org.l2jmobius.gameserver.enums.AttributeType;
|
||||
import org.l2jmobius.gameserver.enums.BasicProperty;
|
||||
import org.l2jmobius.gameserver.enums.NextActionType;
|
||||
import org.l2jmobius.gameserver.enums.ShotType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.AffectScopeHandler;
|
||||
import org.l2jmobius.gameserver.handler.IAffectScopeHandler;
|
||||
import org.l2jmobius.gameserver.handler.ITargetTypeHandler;
|
||||
@@ -1471,7 +1472,7 @@ public class Skill implements IIdentifiable
|
||||
{
|
||||
if (caster.isAffectedBySkill(_id))
|
||||
{
|
||||
caster.stopSkillEffects(true, _id);
|
||||
caster.stopSkillEffects(SkillFinishType.REMOVED, _id);
|
||||
}
|
||||
applyEffects(caster, caster, true, false, true, 0, item);
|
||||
}
|
||||
|
@@ -19,6 +19,7 @@ package org.l2jmobius.gameserver.network.clientpackets;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.AbnormalType;
|
||||
@@ -76,20 +77,20 @@ public class RequestDispel implements IClientIncomingPacket
|
||||
}
|
||||
if (player.getObjectId() == _objectId)
|
||||
{
|
||||
player.stopSkillEffects(true, _skillId);
|
||||
player.stopSkillEffects(SkillFinishType.REMOVED, _skillId);
|
||||
}
|
||||
else
|
||||
{
|
||||
final Summon pet = player.getPet();
|
||||
if ((pet != null) && (pet.getObjectId() == _objectId))
|
||||
{
|
||||
pet.stopSkillEffects(true, _skillId);
|
||||
pet.stopSkillEffects(SkillFinishType.REMOVED, _skillId);
|
||||
}
|
||||
|
||||
final Summon servitor = player.getServitor(_objectId);
|
||||
if (servitor != null)
|
||||
{
|
||||
servitor.stopSkillEffects(true, _skillId);
|
||||
servitor.stopSkillEffects(SkillFinishType.REMOVED, _skillId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.SkillLearn;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.ceremonyofchaos.CeremonyOfChaosEvent;
|
||||
@@ -95,8 +96,7 @@ public class RequestResetAbilityPoint implements IClientIncomingPacket
|
||||
if (skill != null)
|
||||
{
|
||||
player.removeSkill(skill);
|
||||
// TODO: Check if this needs to be moved to PlayerIstance removeSkill method.
|
||||
player.getEffectList().stopSkillEffects(false, skill);
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.SILENT, skill); // TODO: Check if retail shows system message.
|
||||
}
|
||||
}
|
||||
player.setAbilityPointsUsed(0);
|
||||
|
Reference in New Issue
Block a user