Addition of SkillFinishType enumeration.
This commit is contained in:
parent
c2d8864dd7
commit
471b06e031
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package ai.areas.GuillotineFortress;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
@ -65,7 +66,7 @@ public class GuillotineFortress extends AbstractNpcAI
|
||||
{
|
||||
if ((npc.getCurrentHpPercent() <= 85) && npc.isScriptValue(1))
|
||||
{
|
||||
npc.getEffectList().stopSkillEffects(true, CHAOS_SHIELD.getSkillId());
|
||||
npc.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CHAOS_SHIELD.getSkillId());
|
||||
if (player.getParty() == null)
|
||||
{
|
||||
player.broadcastPacket(new ExShowScreenMessage(NpcStringId.CHAOS_SHIELD_BREAKTHROUGH, ExShowScreenMessage.BOTTOM_CENTER, 10000, false));
|
||||
|
@ -18,6 +18,7 @@ package ai.bosses.Kimerian;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
@ -124,7 +125,7 @@ public class KimerianCommon extends AbstractInstance
|
||||
if (npc.getVariables().getBoolean("INVUL_CAN_BE_CANCELLED", true))
|
||||
{
|
||||
npc.getVariables().set("INVUL_CAN_BE_CANCELLED", false);
|
||||
npc.getEffectList().stopSkillEffects(true, INVUL_SKILL.getSkillId());
|
||||
npc.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, INVUL_SKILL.getSkillId());
|
||||
npc.disableCoreAI(false);
|
||||
npc.setTargetable(true);
|
||||
addAttackPlayerDesire(npc, player, 23);
|
||||
|
@ -26,6 +26,7 @@ import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.SpawnTable;
|
||||
import org.l2jmobius.gameserver.data.xml.DoorData;
|
||||
import org.l2jmobius.gameserver.enums.Movie;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
@ -873,7 +874,7 @@ public class Trasken extends AbstractNpcAI
|
||||
final BuffInfo traskenBuff = creature.getEffectList().getBuffInfoBySkillId(SKILL_TRASKEN_BUFF.getSkillId());
|
||||
if (traskenBuff != null)
|
||||
{
|
||||
creature.getEffectList().stopSkillEffects(true, traskenBuff.getSkill());
|
||||
creature.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, traskenBuff.getSkill());
|
||||
}
|
||||
}
|
||||
ThreadPool.schedule(() ->
|
||||
|
@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Event;
|
||||
@ -368,8 +369,8 @@ public class Race extends Event
|
||||
}
|
||||
|
||||
player.getEffectList().stopEffects(AbnormalType.SPEED_UP);
|
||||
player.stopSkillEffects(true, 268);
|
||||
player.stopSkillEffects(true, 298); // Rabbit Spirit Totem
|
||||
player.stopSkillEffects(SkillFinishType.REMOVED, 268);
|
||||
player.stopSkillEffects(SkillFinishType.REMOVED, 298); // Rabbit Spirit Totem
|
||||
SkillData.getInstance().getSkill(_skill, 1).applyEffects(player, player);
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.enums.Team;
|
||||
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
@ -615,7 +616,7 @@ public class TvT extends Event
|
||||
// Removed invulnerability shield.
|
||||
if (player.isAffectedBySkill(GHOST_WALKING))
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, GHOST_WALKING.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, GHOST_WALKING.getSkill());
|
||||
}
|
||||
}
|
||||
return super.onExitZone(creature, zone);
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package events.HuntForSanta;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
@ -150,9 +151,9 @@ public class HuntForSanta extends LongTimeEvent
|
||||
|
||||
private void removeBuffs(PlayerInstance player)
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, BUFF_STOCKING.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, BUFF_TREE.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, BUFF_SNOWMAN.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_STOCKING.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_TREE.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_SNOWMAN.getSkill());
|
||||
cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player);
|
||||
cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player);
|
||||
cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player);
|
||||
|
@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.data.ItemTable;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -213,7 +214,7 @@ public class SavingSanta extends LongTimeEvent
|
||||
// What a bunch of losers.
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NPC_STRINGS[6 + getRandom(2)]));
|
||||
pl.broadcastPacket(new MagicSkillUse(pl, pl, 23023, 1, 3000, 1));
|
||||
pl.getEffectList().stopSkillEffects(true, 23022);
|
||||
pl.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, 23022);
|
||||
}
|
||||
else if ((result == 1) || (result == -2))
|
||||
{
|
||||
|
@ -25,6 +25,7 @@ import java.util.StringTokenizer;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -364,7 +365,7 @@ public class AdminBuffs implements IAdminCommandHandler
|
||||
{
|
||||
if (target.isAffectedBySkill(skillId))
|
||||
{
|
||||
target.stopSkillEffects(true, skillId);
|
||||
target.stopSkillEffects(SkillFinishType.REMOVED, skillId);
|
||||
BuilderUtil.sendSysMessage(activeChar, "Removed skill ID: " + skillId + " effects from " + target.getName() + " (" + objId + ").");
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package handlers.admincommandhandlers;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
@ -53,7 +54,7 @@ public class AdminSuperHaste implements IAdminCommandHandler
|
||||
{
|
||||
final int val = Integer.parseInt(st.nextToken());
|
||||
final boolean sendMessage = player.isAffectedBySkill(SUPER_HASTE_ID);
|
||||
player.stopSkillEffects((val == 0) && sendMessage, SUPER_HASTE_ID);
|
||||
player.stopSkillEffects((val == 0) && sendMessage ? SkillFinishType.REMOVED : SkillFinishType.NORMAL, SUPER_HASTE_ID);
|
||||
if ((val >= 1) && (val <= 4))
|
||||
{
|
||||
int time = 0;
|
||||
|
@ -19,6 +19,7 @@ package handlers.effecthandlers;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.DispelSlotType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
@ -68,7 +69,7 @@ public class DispelByCategory extends AbstractEffect
|
||||
final List<BuffInfo> canceled = Formulas.calcCancelStealEffects(effector, effected, skill, _slot, _rate, _max);
|
||||
for (BuffInfo can : canceled)
|
||||
{
|
||||
effected.getEffectList().stopSkillEffects(true, can.getSkill());
|
||||
effected.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, can.getSkill());
|
||||
}
|
||||
}
|
||||
}
|
@ -19,6 +19,7 @@ package handlers.effecthandlers;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.DispelSlotType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
@ -76,7 +77,7 @@ public class StealAbnormal extends AbstractEffect
|
||||
stolen.setAbnormalTime(infoToSteal.getTime()); // Copy the remaining time.
|
||||
// To include all the effects, it's required to go through the template rather the buff info.
|
||||
infoToSteal.getSkill().applyEffectScope(EffectScope.GENERAL, stolen, true, true);
|
||||
effected.getEffectList().remove(infoToSteal, true, true, true);
|
||||
effected.getEffectList().remove(infoToSteal, SkillFinishType.REMOVED, true, true);
|
||||
effector.getEffectList().add(stolen);
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import java.util.logging.Level;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.TargetHandler;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -128,7 +129,7 @@ public class TriggerSkillByMagicType extends AbstractEffect
|
||||
// Remove existing effect, otherwise time will not be renewed at max level.
|
||||
if (_replace)
|
||||
{
|
||||
((Creature) target).getEffectList().stopSkillEffects(true, triggerSkill);
|
||||
((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
|
||||
}
|
||||
|
||||
SkillCaster.triggerCast(event.getCaster(), (Creature) target, triggerSkill);
|
||||
|
@ -20,6 +20,7 @@ import java.util.logging.Level;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.TargetHandler;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -127,7 +128,7 @@ public class TriggerSkillBySkill extends AbstractEffect
|
||||
// Remove existing effect, otherwise time will not be renewed at max level.
|
||||
if (_replace)
|
||||
{
|
||||
((Creature) target).getEffectList().stopSkillEffects(false, triggerSkill);
|
||||
((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
|
||||
}
|
||||
|
||||
SkillCaster.triggerCast(event.getCaster(), (Creature) target, triggerSkill);
|
||||
|
@ -18,6 +18,7 @@ package instances.Nursery;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -182,9 +183,9 @@ public class Nursery extends AbstractInstance
|
||||
|
||||
npcVars.set("GAME_POINTS", npcVars.getInt("GAME_POINTS", 0) + addPoints);
|
||||
showOnScreenMsg(instance, NpcStringId.SOLDIER_TIE_ABSORBED_REPRODUCTIVE_ENERGY_FROM_YOUR_BODY_AND_CONVERTED_S1_PIECES_OF_BIO_ENERGY, ExShowScreenMessage.TOP_CENTER, 3000, String.valueOf(addPoints));
|
||||
player.getEffectList().stopSkillEffects(true, ENERGY_SKILL_1.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, ENERGY_SKILL_2.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, ENERGY_SKILL_3.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, ENERGY_SKILL_1.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, ENERGY_SKILL_2.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, ENERGY_SKILL_3.getSkill());
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
|
@ -18,6 +18,7 @@ package quests.Q00500_BrothersBoundInChains;
|
||||
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.events.Containers;
|
||||
@ -217,7 +218,7 @@ public class Q00500_BrothersBoundInChains extends Quest
|
||||
}
|
||||
|
||||
cancelQuestTimer("buff", null, player);
|
||||
player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE);
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, HOUR_OF_PENITENCE);
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_ATTACKABLE_KILL)
|
||||
|
@ -19,6 +19,7 @@ package village_master.ClanMaster;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
@ -126,13 +127,13 @@ public class ClanMaster extends AbstractNpcAI
|
||||
{
|
||||
if (member.isOnline())
|
||||
{
|
||||
member.getPlayerInstance().getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
member.getPlayerInstance().getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
}
|
||||
});
|
||||
}
|
||||
if (player.getClan() != null)
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,7 +163,7 @@ public class ClanMaster extends AbstractNpcAI
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerClanLeft(OnPlayerClanLeft event)
|
||||
{
|
||||
event.getClanMember().getPlayerInstance().getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
event.getClanMember().getPlayerInstance().getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@ -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)
|
||||
@ -4166,7 +4167,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);
|
||||
@ -4203,7 +4204,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;
|
||||
@ -892,9 +893,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())
|
||||
{
|
||||
|
@ -99,6 +99,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;
|
||||
@ -2647,7 +2648,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.
|
||||
@ -8430,7 +8431,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;
|
||||
@ -179,7 +180,7 @@ public class PlayerStatus extends PlayableStatus
|
||||
if (mpDam > getActiveChar().getCurrentMp())
|
||||
{
|
||||
getActiveChar().sendPacket(SystemMessageId.MP_BECAME_0_AND_THE_ARCANE_SHIELD_IS_DISAPPEARING);
|
||||
getActiveChar().stopSkillEffects(true, 1556);
|
||||
getActiveChar().stopSkillEffects(SkillFinishType.REMOVED, 1556);
|
||||
amount = mpDam - getActiveChar().getCurrentMp();
|
||||
getActiveChar().setCurrentMp(0);
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ import org.l2jmobius.gameserver.data.sql.CrestTable;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.ClanRewardType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.enums.UserInfoType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
@ -504,7 +505,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
|
||||
// remove Clan skills from Player
|
||||
removeSkillEffects(player);
|
||||
player.getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
|
@ -40,6 +40,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;
|
||||
@ -449,7 +450,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;
|
||||
@ -97,8 +98,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);
|
||||
|
@ -23,6 +23,7 @@ import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.SpawnTable;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Spawn;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
@ -521,7 +522,7 @@ public class AteliaManager extends AbstractNpcAI
|
||||
for (Npc monster : spawn.getSpawnedNpcs())
|
||||
{
|
||||
monster.getEffectList().stopEffects(AbnormalType.ALL_ATTACK_DOWN);
|
||||
monster.stopSkillEffects(true, 16526);
|
||||
monster.stopSkillEffects(SkillFinishType.REMOVED, 16526);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -536,7 +537,7 @@ public class AteliaManager extends AbstractNpcAI
|
||||
for (Npc monster : spawn.getSpawnedNpcs())
|
||||
{
|
||||
monster.getEffectList().stopEffects(AbnormalType.MAX_HP_DOWN);
|
||||
monster.stopSkillEffects(true, 16542);
|
||||
monster.stopSkillEffects(SkillFinishType.REMOVED, 16542);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -551,7 +552,7 @@ public class AteliaManager extends AbstractNpcAI
|
||||
for (Npc monster : spawn.getSpawnedNpcs())
|
||||
{
|
||||
monster.getEffectList().stopEffects(AbnormalType.MAX_HP_DOWN);
|
||||
monster.stopSkillEffects(true, 16542);
|
||||
monster.stopSkillEffects(SkillFinishType.REMOVED, 16542);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package ai.areas.GuillotineFortress;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
@ -65,7 +66,7 @@ public class GuillotineFortress extends AbstractNpcAI
|
||||
{
|
||||
if ((npc.getCurrentHpPercent() <= 85) && npc.isScriptValue(1))
|
||||
{
|
||||
npc.getEffectList().stopSkillEffects(true, CHAOS_SHIELD.getSkillId());
|
||||
npc.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CHAOS_SHIELD.getSkillId());
|
||||
if (player.getParty() == null)
|
||||
{
|
||||
player.broadcastPacket(new ExShowScreenMessage(NpcStringId.CHAOS_SHIELD_BREAKTHROUGH, ExShowScreenMessage.BOTTOM_CENTER, 10000, false));
|
||||
|
@ -18,6 +18,7 @@ package ai.bosses.Kimerian;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
@ -124,7 +125,7 @@ public class KimerianCommon extends AbstractInstance
|
||||
if (npc.getVariables().getBoolean("INVUL_CAN_BE_CANCELLED", true))
|
||||
{
|
||||
npc.getVariables().set("INVUL_CAN_BE_CANCELLED", false);
|
||||
npc.getEffectList().stopSkillEffects(true, INVUL_SKILL.getSkillId());
|
||||
npc.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, INVUL_SKILL.getSkillId());
|
||||
npc.disableCoreAI(false);
|
||||
npc.setTargetable(true);
|
||||
addAttackPlayerDesire(npc, player, 23);
|
||||
|
@ -26,6 +26,7 @@ import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.SpawnTable;
|
||||
import org.l2jmobius.gameserver.data.xml.DoorData;
|
||||
import org.l2jmobius.gameserver.enums.Movie;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
@ -873,7 +874,7 @@ public class Trasken extends AbstractNpcAI
|
||||
final BuffInfo traskenBuff = creature.getEffectList().getBuffInfoBySkillId(SKILL_TRASKEN_BUFF.getSkillId());
|
||||
if (traskenBuff != null)
|
||||
{
|
||||
creature.getEffectList().stopSkillEffects(true, traskenBuff.getSkill());
|
||||
creature.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, traskenBuff.getSkill());
|
||||
}
|
||||
}
|
||||
ThreadPool.schedule(() ->
|
||||
|
@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Event;
|
||||
@ -368,8 +369,8 @@ public class Race extends Event
|
||||
}
|
||||
|
||||
player.getEffectList().stopEffects(AbnormalType.SPEED_UP);
|
||||
player.stopSkillEffects(true, 268);
|
||||
player.stopSkillEffects(true, 298); // Rabbit Spirit Totem
|
||||
player.stopSkillEffects(SkillFinishType.REMOVED, 268);
|
||||
player.stopSkillEffects(SkillFinishType.REMOVED, 298); // Rabbit Spirit Totem
|
||||
SkillData.getInstance().getSkill(_skill, 1).applyEffects(player, player);
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.enums.Team;
|
||||
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
@ -615,7 +616,7 @@ public class TvT extends Event
|
||||
// Removed invulnerability shield.
|
||||
if (player.isAffectedBySkill(GHOST_WALKING))
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, GHOST_WALKING.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, GHOST_WALKING.getSkill());
|
||||
}
|
||||
}
|
||||
return super.onExitZone(creature, zone);
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package events.HuntForSanta;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
@ -150,9 +151,9 @@ public class HuntForSanta extends LongTimeEvent
|
||||
|
||||
private void removeBuffs(PlayerInstance player)
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, BUFF_STOCKING.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, BUFF_TREE.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, BUFF_SNOWMAN.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_STOCKING.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_TREE.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_SNOWMAN.getSkill());
|
||||
cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player);
|
||||
cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player);
|
||||
cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player);
|
||||
|
@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.data.ItemTable;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -213,7 +214,7 @@ public class SavingSanta extends LongTimeEvent
|
||||
// What a bunch of losers.
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NPC_STRINGS[6 + getRandom(2)]));
|
||||
pl.broadcastPacket(new MagicSkillUse(pl, pl, 23023, 1, 3000, 1));
|
||||
pl.getEffectList().stopSkillEffects(true, 23022);
|
||||
pl.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, 23022);
|
||||
}
|
||||
else if ((result == 1) || (result == -2))
|
||||
{
|
||||
|
@ -25,6 +25,7 @@ import java.util.StringTokenizer;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -364,7 +365,7 @@ public class AdminBuffs implements IAdminCommandHandler
|
||||
{
|
||||
if (target.isAffectedBySkill(skillId))
|
||||
{
|
||||
target.stopSkillEffects(true, skillId);
|
||||
target.stopSkillEffects(SkillFinishType.REMOVED, skillId);
|
||||
BuilderUtil.sendSysMessage(activeChar, "Removed skill ID: " + skillId + " effects from " + target.getName() + " (" + objId + ").");
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package handlers.admincommandhandlers;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
@ -53,7 +54,7 @@ public class AdminSuperHaste implements IAdminCommandHandler
|
||||
{
|
||||
final int val = Integer.parseInt(st.nextToken());
|
||||
final boolean sendMessage = player.isAffectedBySkill(SUPER_HASTE_ID);
|
||||
player.stopSkillEffects((val == 0) && sendMessage, SUPER_HASTE_ID);
|
||||
player.stopSkillEffects((val == 0) && sendMessage ? SkillFinishType.REMOVED : SkillFinishType.NORMAL, SUPER_HASTE_ID);
|
||||
if ((val >= 1) && (val <= 4))
|
||||
{
|
||||
int time = 0;
|
||||
|
@ -19,6 +19,7 @@ package handlers.effecthandlers;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.DispelSlotType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
@ -68,7 +69,7 @@ public class DispelByCategory extends AbstractEffect
|
||||
final List<BuffInfo> canceled = Formulas.calcCancelStealEffects(effector, effected, skill, _slot, _rate, _max);
|
||||
for (BuffInfo can : canceled)
|
||||
{
|
||||
effected.getEffectList().stopSkillEffects(true, can.getSkill());
|
||||
effected.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, can.getSkill());
|
||||
}
|
||||
}
|
||||
}
|
@ -19,6 +19,7 @@ package handlers.effecthandlers;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.DispelSlotType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
@ -76,7 +77,7 @@ public class StealAbnormal extends AbstractEffect
|
||||
stolen.setAbnormalTime(infoToSteal.getTime()); // Copy the remaining time.
|
||||
// To include all the effects, it's required to go through the template rather the buff info.
|
||||
infoToSteal.getSkill().applyEffectScope(EffectScope.GENERAL, stolen, true, true);
|
||||
effected.getEffectList().remove(infoToSteal, true, true, true);
|
||||
effected.getEffectList().remove(infoToSteal, SkillFinishType.REMOVED, true, true);
|
||||
effector.getEffectList().add(stolen);
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import java.util.logging.Level;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.TargetHandler;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -128,7 +129,7 @@ public class TriggerSkillByMagicType extends AbstractEffect
|
||||
// Remove existing effect, otherwise time will not be renewed at max level.
|
||||
if (_replace)
|
||||
{
|
||||
((Creature) target).getEffectList().stopSkillEffects(true, triggerSkill);
|
||||
((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
|
||||
}
|
||||
|
||||
SkillCaster.triggerCast(event.getCaster(), (Creature) target, triggerSkill);
|
||||
|
@ -20,6 +20,7 @@ import java.util.logging.Level;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.TargetHandler;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -127,7 +128,7 @@ public class TriggerSkillBySkill extends AbstractEffect
|
||||
// Remove existing effect, otherwise time will not be renewed at max level.
|
||||
if (_replace)
|
||||
{
|
||||
((Creature) target).getEffectList().stopSkillEffects(false, triggerSkill);
|
||||
((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
|
||||
}
|
||||
|
||||
SkillCaster.triggerCast(event.getCaster(), (Creature) target, triggerSkill);
|
||||
|
@ -18,6 +18,7 @@ package instances.Nursery;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -182,9 +183,9 @@ public class Nursery extends AbstractInstance
|
||||
|
||||
npcVars.set("GAME_POINTS", npcVars.getInt("GAME_POINTS", 0) + addPoints);
|
||||
showOnScreenMsg(instance, NpcStringId.SOLDIER_TIE_ABSORBED_REPRODUCTIVE_ENERGY_FROM_YOUR_BODY_AND_CONVERTED_S1_PIECES_OF_BIO_ENERGY, ExShowScreenMessage.TOP_CENTER, 3000, String.valueOf(addPoints));
|
||||
player.getEffectList().stopSkillEffects(true, ENERGY_SKILL_1.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, ENERGY_SKILL_2.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, ENERGY_SKILL_3.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, ENERGY_SKILL_1.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, ENERGY_SKILL_2.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, ENERGY_SKILL_3.getSkill());
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
|
@ -18,6 +18,7 @@ package quests.Q00500_BrothersBoundInChains;
|
||||
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.events.Containers;
|
||||
@ -217,7 +218,7 @@ public class Q00500_BrothersBoundInChains extends Quest
|
||||
}
|
||||
|
||||
cancelQuestTimer("buff", null, player);
|
||||
player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE);
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, HOUR_OF_PENITENCE);
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_ATTACKABLE_KILL)
|
||||
|
@ -19,6 +19,7 @@ package village_master.ClanMaster;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
@ -126,13 +127,13 @@ public class ClanMaster extends AbstractNpcAI
|
||||
{
|
||||
if (member.isOnline())
|
||||
{
|
||||
member.getPlayerInstance().getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
member.getPlayerInstance().getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
}
|
||||
});
|
||||
}
|
||||
if (player.getClan() != null)
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,7 +163,7 @@ public class ClanMaster extends AbstractNpcAI
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerClanLeft(OnPlayerClanLeft event)
|
||||
{
|
||||
event.getClanMember().getPlayerInstance().getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
event.getClanMember().getPlayerInstance().getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@ -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)
|
||||
@ -4166,7 +4167,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);
|
||||
@ -4203,7 +4204,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;
|
||||
@ -892,9 +893,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())
|
||||
{
|
||||
|
@ -100,6 +100,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;
|
||||
@ -2653,7 +2654,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.
|
||||
@ -8437,7 +8438,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;
|
||||
@ -179,7 +180,7 @@ public class PlayerStatus extends PlayableStatus
|
||||
if (mpDam > getActiveChar().getCurrentMp())
|
||||
{
|
||||
getActiveChar().sendPacket(SystemMessageId.MP_BECAME_0_AND_THE_ARCANE_SHIELD_IS_DISAPPEARING);
|
||||
getActiveChar().stopSkillEffects(true, 1556);
|
||||
getActiveChar().stopSkillEffects(SkillFinishType.REMOVED, 1556);
|
||||
amount = mpDam - getActiveChar().getCurrentMp();
|
||||
getActiveChar().setCurrentMp(0);
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ import org.l2jmobius.gameserver.data.sql.CrestTable;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.ClanRewardType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.enums.UserInfoType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
@ -505,7 +506,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
|
||||
// remove Clan skills from Player
|
||||
removeSkillEffects(player);
|
||||
player.getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
|
@ -40,6 +40,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;
|
||||
@ -452,7 +453,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;
|
||||
@ -97,8 +98,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);
|
||||
|
@ -23,6 +23,7 @@ import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.SpawnTable;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Spawn;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
@ -521,7 +522,7 @@ public class AteliaManager extends AbstractNpcAI
|
||||
for (Npc monster : spawn.getSpawnedNpcs())
|
||||
{
|
||||
monster.getEffectList().stopEffects(AbnormalType.ALL_ATTACK_DOWN);
|
||||
monster.stopSkillEffects(true, 16526);
|
||||
monster.stopSkillEffects(SkillFinishType.REMOVED, 16526);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -536,7 +537,7 @@ public class AteliaManager extends AbstractNpcAI
|
||||
for (Npc monster : spawn.getSpawnedNpcs())
|
||||
{
|
||||
monster.getEffectList().stopEffects(AbnormalType.MAX_HP_DOWN);
|
||||
monster.stopSkillEffects(true, 16542);
|
||||
monster.stopSkillEffects(SkillFinishType.REMOVED, 16542);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -551,7 +552,7 @@ public class AteliaManager extends AbstractNpcAI
|
||||
for (Npc monster : spawn.getSpawnedNpcs())
|
||||
{
|
||||
monster.getEffectList().stopEffects(AbnormalType.MAX_HP_DOWN);
|
||||
monster.stopSkillEffects(true, 16542);
|
||||
monster.stopSkillEffects(SkillFinishType.REMOVED, 16542);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package ai.areas.GuillotineFortress;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
@ -65,7 +66,7 @@ public class GuillotineFortress extends AbstractNpcAI
|
||||
{
|
||||
if ((npc.getCurrentHpPercent() <= 85) && npc.isScriptValue(1))
|
||||
{
|
||||
npc.getEffectList().stopSkillEffects(true, CHAOS_SHIELD.getSkillId());
|
||||
npc.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CHAOS_SHIELD.getSkillId());
|
||||
if (player.getParty() == null)
|
||||
{
|
||||
player.broadcastPacket(new ExShowScreenMessage(NpcStringId.CHAOS_SHIELD_BREAKTHROUGH, ExShowScreenMessage.BOTTOM_CENTER, 10000, false));
|
||||
|
@ -18,6 +18,7 @@ package ai.bosses.Kimerian;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
@ -124,7 +125,7 @@ public class KimerianCommon extends AbstractInstance
|
||||
if (npc.getVariables().getBoolean("INVUL_CAN_BE_CANCELLED", true))
|
||||
{
|
||||
npc.getVariables().set("INVUL_CAN_BE_CANCELLED", false);
|
||||
npc.getEffectList().stopSkillEffects(true, INVUL_SKILL.getSkillId());
|
||||
npc.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, INVUL_SKILL.getSkillId());
|
||||
npc.disableCoreAI(false);
|
||||
npc.setTargetable(true);
|
||||
addAttackPlayerDesire(npc, player, 23);
|
||||
|
@ -26,6 +26,7 @@ import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.SpawnTable;
|
||||
import org.l2jmobius.gameserver.data.xml.DoorData;
|
||||
import org.l2jmobius.gameserver.enums.Movie;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
@ -873,7 +874,7 @@ public class Trasken extends AbstractNpcAI
|
||||
final BuffInfo traskenBuff = creature.getEffectList().getBuffInfoBySkillId(SKILL_TRASKEN_BUFF.getSkillId());
|
||||
if (traskenBuff != null)
|
||||
{
|
||||
creature.getEffectList().stopSkillEffects(true, traskenBuff.getSkill());
|
||||
creature.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, traskenBuff.getSkill());
|
||||
}
|
||||
}
|
||||
ThreadPool.schedule(() ->
|
||||
|
@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Event;
|
||||
@ -368,8 +369,8 @@ public class Race extends Event
|
||||
}
|
||||
|
||||
player.getEffectList().stopEffects(AbnormalType.SPEED_UP);
|
||||
player.stopSkillEffects(true, 268);
|
||||
player.stopSkillEffects(true, 298); // Rabbit Spirit Totem
|
||||
player.stopSkillEffects(SkillFinishType.REMOVED, 268);
|
||||
player.stopSkillEffects(SkillFinishType.REMOVED, 298); // Rabbit Spirit Totem
|
||||
SkillData.getInstance().getSkill(_skill, 1).applyEffects(player, player);
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.enums.Team;
|
||||
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
@ -615,7 +616,7 @@ public class TvT extends Event
|
||||
// Removed invulnerability shield.
|
||||
if (player.isAffectedBySkill(GHOST_WALKING))
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, GHOST_WALKING.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, GHOST_WALKING.getSkill());
|
||||
}
|
||||
}
|
||||
return super.onExitZone(creature, zone);
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package events.HuntForSanta;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
@ -150,9 +151,9 @@ public class HuntForSanta extends LongTimeEvent
|
||||
|
||||
private void removeBuffs(PlayerInstance player)
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, BUFF_STOCKING.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, BUFF_TREE.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, BUFF_SNOWMAN.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_STOCKING.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_TREE.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF_SNOWMAN.getSkill());
|
||||
cancelQuestTimer("rewardBuffStocking" + player.getObjectId(), null, player);
|
||||
cancelQuestTimer("rewardBuffTree" + player.getObjectId(), null, player);
|
||||
cancelQuestTimer("rewardBuffSnowman" + player.getObjectId(), null, player);
|
||||
|
@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.data.ItemTable;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -213,7 +214,7 @@ public class SavingSanta extends LongTimeEvent
|
||||
// What a bunch of losers.
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NPC_STRINGS[6 + getRandom(2)]));
|
||||
pl.broadcastPacket(new MagicSkillUse(pl, pl, 23023, 1, 3000, 1));
|
||||
pl.getEffectList().stopSkillEffects(true, 23022);
|
||||
pl.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, 23022);
|
||||
}
|
||||
else if ((result == 1) || (result == -2))
|
||||
{
|
||||
|
@ -25,6 +25,7 @@ import java.util.StringTokenizer;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -364,7 +365,7 @@ public class AdminBuffs implements IAdminCommandHandler
|
||||
{
|
||||
if (target.isAffectedBySkill(skillId))
|
||||
{
|
||||
target.stopSkillEffects(true, skillId);
|
||||
target.stopSkillEffects(SkillFinishType.REMOVED, skillId);
|
||||
BuilderUtil.sendSysMessage(activeChar, "Removed skill ID: " + skillId + " effects from " + target.getName() + " (" + objId + ").");
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package handlers.admincommandhandlers;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
@ -53,7 +54,7 @@ public class AdminSuperHaste implements IAdminCommandHandler
|
||||
{
|
||||
final int val = Integer.parseInt(st.nextToken());
|
||||
final boolean sendMessage = player.isAffectedBySkill(SUPER_HASTE_ID);
|
||||
player.stopSkillEffects((val == 0) && sendMessage, SUPER_HASTE_ID);
|
||||
player.stopSkillEffects((val == 0) && sendMessage ? SkillFinishType.REMOVED : SkillFinishType.NORMAL, SUPER_HASTE_ID);
|
||||
if ((val >= 1) && (val <= 4))
|
||||
{
|
||||
int time = 0;
|
||||
|
@ -19,6 +19,7 @@ package handlers.effecthandlers;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.DispelSlotType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
@ -68,7 +69,7 @@ public class DispelByCategory extends AbstractEffect
|
||||
final List<BuffInfo> canceled = Formulas.calcCancelStealEffects(effector, effected, skill, _slot, _rate, _max);
|
||||
for (BuffInfo can : canceled)
|
||||
{
|
||||
effected.getEffectList().stopSkillEffects(true, can.getSkill());
|
||||
effected.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, can.getSkill());
|
||||
}
|
||||
}
|
||||
}
|
@ -19,6 +19,7 @@ package handlers.effecthandlers;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.DispelSlotType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
@ -76,7 +77,7 @@ public class StealAbnormal extends AbstractEffect
|
||||
stolen.setAbnormalTime(infoToSteal.getTime()); // Copy the remaining time.
|
||||
// To include all the effects, it's required to go through the template rather the buff info.
|
||||
infoToSteal.getSkill().applyEffectScope(EffectScope.GENERAL, stolen, true, true);
|
||||
effected.getEffectList().remove(infoToSteal, true, true, true);
|
||||
effected.getEffectList().remove(infoToSteal, SkillFinishType.REMOVED, true, true);
|
||||
effector.getEffectList().add(stolen);
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import java.util.logging.Level;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.TargetHandler;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -128,7 +129,7 @@ public class TriggerSkillByMagicType extends AbstractEffect
|
||||
// Remove existing effect, otherwise time will not be renewed at max level.
|
||||
if (_replace)
|
||||
{
|
||||
((Creature) target).getEffectList().stopSkillEffects(true, triggerSkill);
|
||||
((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
|
||||
}
|
||||
|
||||
SkillCaster.triggerCast(event.getCaster(), (Creature) target, triggerSkill);
|
||||
|
@ -20,6 +20,7 @@ import java.util.logging.Level;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.handler.TargetHandler;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@ -127,7 +128,7 @@ public class TriggerSkillBySkill extends AbstractEffect
|
||||
// Remove existing effect, otherwise time will not be renewed at max level.
|
||||
if (_replace)
|
||||
{
|
||||
((Creature) target).getEffectList().stopSkillEffects(false, triggerSkill);
|
||||
((Creature) target).stopSkillEffects(SkillFinishType.SILENT, triggerSkill.getId());
|
||||
}
|
||||
|
||||
SkillCaster.triggerCast(event.getCaster(), (Creature) target, triggerSkill);
|
||||
|
@ -18,6 +18,7 @@ package instances.Nursery;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -182,9 +183,9 @@ public class Nursery extends AbstractInstance
|
||||
|
||||
npcVars.set("GAME_POINTS", npcVars.getInt("GAME_POINTS", 0) + addPoints);
|
||||
showOnScreenMsg(instance, NpcStringId.SOLDIER_TIE_ABSORBED_REPRODUCTIVE_ENERGY_FROM_YOUR_BODY_AND_CONVERTED_S1_PIECES_OF_BIO_ENERGY, ExShowScreenMessage.TOP_CENTER, 3000, String.valueOf(addPoints));
|
||||
player.getEffectList().stopSkillEffects(true, ENERGY_SKILL_1.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, ENERGY_SKILL_2.getSkill());
|
||||
player.getEffectList().stopSkillEffects(true, ENERGY_SKILL_3.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, ENERGY_SKILL_1.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, ENERGY_SKILL_2.getSkill());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, ENERGY_SKILL_3.getSkill());
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
|
@ -18,6 +18,7 @@ package quests.Q00500_BrothersBoundInChains;
|
||||
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.enums.QuestType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.events.Containers;
|
||||
@ -217,7 +218,7 @@ public class Q00500_BrothersBoundInChains extends Quest
|
||||
}
|
||||
|
||||
cancelQuestTimer("buff", null, player);
|
||||
player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE);
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, HOUR_OF_PENITENCE);
|
||||
}
|
||||
|
||||
@RegisterEvent(EventType.ON_ATTACKABLE_KILL)
|
||||
|
@ -19,6 +19,7 @@ package village_master.ClanMaster;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
@ -126,13 +127,13 @@ public class ClanMaster extends AbstractNpcAI
|
||||
{
|
||||
if (member.isOnline())
|
||||
{
|
||||
member.getPlayerInstance().getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
member.getPlayerInstance().getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
}
|
||||
});
|
||||
}
|
||||
if (player.getClan() != null)
|
||||
{
|
||||
player.getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,7 +163,7 @@ public class ClanMaster extends AbstractNpcAI
|
||||
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
|
||||
public void onPlayerClanLeft(OnPlayerClanLeft event)
|
||||
{
|
||||
event.getClanMember().getPlayerInstance().getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
event.getClanMember().getPlayerInstance().getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@ -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)
|
||||
@ -4166,7 +4167,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);
|
||||
@ -4203,7 +4204,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;
|
||||
@ -892,9 +893,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())
|
||||
{
|
||||
|
@ -101,6 +101,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;
|
||||
@ -2655,7 +2656,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.
|
||||
@ -8439,7 +8440,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;
|
||||
@ -179,7 +180,7 @@ public class PlayerStatus extends PlayableStatus
|
||||
if (mpDam > getActiveChar().getCurrentMp())
|
||||
{
|
||||
getActiveChar().sendPacket(SystemMessageId.MP_BECAME_0_AND_THE_ARCANE_SHIELD_IS_DISAPPEARING);
|
||||
getActiveChar().stopSkillEffects(true, 1556);
|
||||
getActiveChar().stopSkillEffects(SkillFinishType.REMOVED, 1556);
|
||||
amount = mpDam - getActiveChar().getCurrentMp();
|
||||
getActiveChar().setCurrentMp(0);
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ import org.l2jmobius.gameserver.data.sql.CrestTable;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.ClanRewardType;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.enums.UserInfoType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
@ -505,7 +506,7 @@ public class Clan implements IIdentifiable, INamable
|
||||
|
||||
// remove Clan skills from Player
|
||||
removeSkillEffects(player);
|
||||
player.getEffectList().stopSkillEffects(true, CommonSkill.CLAN_ADVENT.getId());
|
||||
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CommonSkill.CLAN_ADVENT.getId());
|
||||
|
||||
// remove Residential skills
|
||||
if (player.getClan().getCastleId() > 0)
|
||||
|
@ -40,6 +40,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;
|
||||
@ -452,7 +453,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;
|
||||
@ -97,8 +98,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);
|
||||
|
@ -23,6 +23,7 @@ import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.SpawnTable;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Spawn;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
@ -521,7 +522,7 @@ public class AteliaManager extends AbstractNpcAI
|
||||
for (Npc monster : spawn.getSpawnedNpcs())
|
||||
{
|
||||
monster.getEffectList().stopEffects(AbnormalType.ALL_ATTACK_DOWN);
|
||||
monster.stopSkillEffects(true, 16526);
|
||||
monster.stopSkillEffects(SkillFinishType.REMOVED, 16526);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -536,7 +537,7 @@ public class AteliaManager extends AbstractNpcAI
|
||||
for (Npc monster : spawn.getSpawnedNpcs())
|
||||
{
|
||||
monster.getEffectList().stopEffects(AbnormalType.MAX_HP_DOWN);
|
||||
monster.stopSkillEffects(true, 16542);
|
||||
monster.stopSkillEffects(SkillFinishType.REMOVED, 16542);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -551,7 +552,7 @@ public class AteliaManager extends AbstractNpcAI
|
||||
for (Npc monster : spawn.getSpawnedNpcs())
|
||||
{
|
||||
monster.getEffectList().stopEffects(AbnormalType.MAX_HP_DOWN);
|
||||
monster.stopSkillEffects(true, 16542);
|
||||
monster.stopSkillEffects(SkillFinishType.REMOVED, 16542);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package ai.areas.GuillotineFortress;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.SkillFinishType;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
@ -65,7 +66,7 @@ public class GuillotineFortress extends AbstractNpcAI
|
||||
{
|
||||
if ((npc.getCurrentHpPercent() <= 85) && npc.isScriptValue(1))
|
||||
{
|
||||
npc.getEffectList().stopSkillEffects(true, CHAOS_SHIELD.getSkillId());
|
||||
npc.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, CHAOS_SHIELD.getSkillId());
|
||||
if (player.getParty() == null)
|
||||
{
|
||||
player.broadcastPacket(new ExShowScreenMessage(NpcStringId.CHAOS_SHIELD_BREAKTHROUGH, ExShowScreenMessage.BOTTOM_CENTER, 10000, false));
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user