Renamed Skill method getEffects to applyEffects.

This commit is contained in:
MobiusDevelopment 2021-03-16 07:53:02 +00:00
parent 44ffd64510
commit 6c86d1d864
86 changed files with 181 additions and 181 deletions

View File

@ -151,7 +151,7 @@ public class Q365_DevilsLegacy extends Quest
final Skill skill = SkillTable.getInstance().getSkill(4082, 1);
if ((skill != null) && (player.getFirstEffect(skill) == null))
{
skill.getEffects(npc, player);
skill.applyEffects(npc, player);
}
}
}

View File

@ -236,7 +236,7 @@ public class Q421_LittleWingsBigAdventure extends Quest
final Skill skill = SkillTable.getInstance().getSkill(4167, 1);
if ((skill != null) && (player.getFirstEffect(skill) == null))
{
skill.getEffects(npc, player);
skill.applyEffects(npc, player);
}
}
break;
@ -312,7 +312,7 @@ public class Q421_LittleWingsBigAdventure extends Quest
final Skill skill = SkillTable.getInstance().getSkill(4243, 1);
if ((skill != null) && (originalKiller.getFirstEffect(skill) == null))
{
skill.getEffects(npc, originalKiller);
skill.applyEffects(npc, originalKiller);
}
}

View File

@ -169,7 +169,7 @@ public class Q501_ProofOfClanAlliance extends Quest
st.takeItems(SYMBOL_OF_LOYALTY, 1);
st.takeItems(SYMBOL_OF_LOYALTY, 1);
st.giveItems(ANTIDOTE_RECIPE_LIST, 1);
SkillTable.getInstance().getSkill(4082, 1).getEffects(npc, player);
SkillTable.getInstance().getSkill(4082, 1).applyEffects(npc, player);
startQuestTimer("poison", 60000, npc, player, true);
st.playSound(QuestState.SOUND_MIDDLE);
}

View File

@ -87,7 +87,7 @@ public class EnergyStone implements IItemHandler
final Skill dummy = SkillTable.getInstance().getSkill(skill.getId(), skill.getLevel());
if (dummy != null)
{
dummy.getEffects(player, player);
dummy.applyEffects(player, player);
player.sendPacket(new MagicSkillUse(playable, player, skill.getId(), 1, 1, 0));
player.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
}

View File

@ -113,7 +113,7 @@ public class Blow implements ISkillHandler
target.stopSkillEffects(skill.getId());
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skill);
target.sendPacket(sm);
@ -272,7 +272,7 @@ public class Blow implements ISkillHandler
{
effect.exit(false);
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
}
}

View File

@ -46,7 +46,7 @@ public class Charge implements ISkillHandler
continue;
}
final PlayerInstance target = (PlayerInstance) target1;
skill.getEffects(creature, target, false, false, false);
skill.applyEffects(creature, target, false, false, false);
}
// self Effect :]
@ -56,7 +56,7 @@ public class Charge implements ISkillHandler
// Replace old effect with new one.
effect.exit(false);
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
}
@Override

View File

@ -78,7 +78,7 @@ public class ClanGate implements ISkillHandler
{
effect.exit(false);
}
skill.getEffectsSelf(player);
skill.applySelfEffects(player);
}
private class RemoveClanGate implements Runnable

View File

@ -217,7 +217,7 @@ public class Continuous implements ISkillHandler
continue;
}
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
if (skill.getSkillType() == SkillType.AGGDEBUFF)
{
@ -263,7 +263,7 @@ public class Continuous implements ISkillHandler
}
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
}
@Override

View File

@ -88,7 +88,7 @@ public class CpDam implements ISkillHandler
target.breakAttack();
target.breakCast();
}
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
creature.sendDamageMessage(target, damage, false, false, false);
target.setCurrentCp(target.getCurrentCp() - damage);
}

View File

@ -105,7 +105,7 @@ public class Disablers implements ISkillHandler
{
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else
{
@ -119,7 +119,7 @@ public class Disablers implements ISkillHandler
case FAKE_DEATH:
{
// stun/fakedeath is not mdef dependant, it depends on lvl difference, target CON and power of stun
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
break;
}
case STUN:
@ -145,7 +145,7 @@ public class Disablers implements ISkillHandler
}
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (creature instanceof PlayerInstance)
{
@ -165,7 +165,7 @@ public class Disablers implements ISkillHandler
}
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (creature instanceof PlayerInstance)
{
@ -185,7 +185,7 @@ public class Disablers implements ISkillHandler
}
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (creature instanceof PlayerInstance)
{
@ -209,7 +209,7 @@ public class Disablers implements ISkillHandler
e.exit(false);
}
}
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (creature instanceof PlayerInstance)
{
@ -224,7 +224,7 @@ public class Disablers implements ISkillHandler
target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, creature, (int) ((150 * skill.getPower()) / (target.getLevel() + 7)));
}
// TODO [Nemesiss] should this have 100% chance?
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
break;
}
case AGGREDUCE:
@ -232,7 +232,7 @@ public class Disablers implements ISkillHandler
// these skills needs to be rechecked
if (target instanceof Attackable)
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
final double aggdiff = ((Attackable) target).getHating(creature) - target.calcStat(Stat.AGGRESSION, ((Attackable) target).getHating(creature), target, skill);
if (skill.getPower() > 0)
{
@ -263,7 +263,7 @@ public class Disablers implements ISkillHandler
attackable.setWalking();
}
}
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
@ -279,7 +279,7 @@ public class Disablers implements ISkillHandler
targ.setWalking();
}
}
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (creature instanceof PlayerInstance)
{
@ -754,7 +754,7 @@ public class Disablers implements ISkillHandler
// Replace old effect with new one.
effect.exit(false);
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
}
private void negateEffect(Creature target, SkillType type, double power)

View File

@ -92,7 +92,7 @@ public class Mdam implements ISkillHandler
if (target.reflectSkill(skill))
{
creature.stopSkillEffects(skill.getId());
skill.getEffects(null, creature, false, sps, bss);
skill.applyEffects(null, creature, false, sps, bss);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skill.getId());
creature.sendPacket(sm);
@ -101,7 +101,7 @@ public class Mdam implements ISkillHandler
{
// Like L2OFF must remove the first effect only if the second effect is successful
target.stopSkillEffects(skill.getId());
skill.getEffects(creature, target, false, sps, bss);
skill.applyEffects(creature, target, false, sps, bss);
}
else
{
@ -132,7 +132,7 @@ public class Mdam implements ISkillHandler
// Replace old effect with new one.
effect.exit(false);
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
if (skill.isSuicideAttack())
{

View File

@ -150,7 +150,7 @@ public class Pdam implements ISkillHandler
{
creature.stopSkillEffects(skill.getId());
skill.getEffects(null, creature, ss, sps, bss);
skill.applyEffects(null, creature, ss, sps, bss);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skill.getId());
creature.sendPacket(sm);
@ -158,7 +158,7 @@ public class Pdam implements ISkillHandler
else if (f.calcSkillSuccess(creature, target, skill, soul, false, false)) // activate attacked effects, if any
{
// Like L2OFF must remove the first effect if the second effect lands
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skill.getId());
target.sendPacket(sm);
@ -307,12 +307,12 @@ public class Pdam implements ISkillHandler
else if (skill.getId() == 345) // Sonic Rage
{
final Skill dummy = SkillTable.getInstance().getSkill(8, 7); // Lv7 Sonic Focus
dummy.getEffects(creature, creature, ss, sps, bss);
dummy.applyEffects(creature, creature, ss, sps, bss);
}
else if (skill.getId() == 346) // Raging Force
{
final Skill dummy = SkillTable.getInstance().getSkill(50, 7); // Lv7 Focused Force
dummy.getEffects(creature, creature, ss, sps, bss);
dummy.applyEffects(creature, creature, ss, sps, bss);
}
}
// self Effect :]
@ -322,7 +322,7 @@ public class Pdam implements ISkillHandler
// Replace old effect with new one.
effect.exit(false);
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
}
if (skill.isMagic())

View File

@ -168,7 +168,7 @@ public class Wedding implements IVoicedCommandHandler
final Skill skill = SkillTable.getInstance().getSkill(skillId, skillLevel);
if (activeChar.getFirstEffect(skill) == null)
{
skill.getEffects(activeChar, activeChar, false, false, false);
skill.applyEffects(activeChar, activeChar, false, false, false);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skillId);
activeChar.sendPacket(sm);

View File

@ -61,7 +61,7 @@ public class ForceBuff
final Skill force = SkillTable.getInstance().getSkill(_forceId, _forceLevel);
if (force != null)
{
force.getEffects(_caster, _target, false, false, false);
force.applyEffects(_caster, _target, false, false, false);
}
else
{

View File

@ -2648,12 +2648,12 @@ public abstract class Skill
return (_effectTemplates != null) && (_effectTemplates.length > 0);
}
public Effect[] getEffects(Creature effector, Creature effected)
public Effect[] applyEffects(Creature effector, Creature effected)
{
return getEffects(effector, effected, false, false, false);
return applyEffects(effector, effected, false, false, false);
}
public Effect[] getEffects(Creature effector, Creature effected, boolean ss, boolean sps, boolean bss)
public Effect[] applyEffects(Creature effector, Creature effected, boolean ss, boolean sps, boolean bss)
{
if (isPassive())
{
@ -2714,7 +2714,7 @@ public abstract class Skill
return effects.toArray(new Effect[effects.size()]);
}
public Effect[] getEffectsSelf(Creature effector)
public Effect[] applySelfEffects(Creature effector)
{
if (isPassive())
{

View File

@ -6141,7 +6141,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
abortAttack();
abortCast();
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
skill.getEffects(target, this, false, false, false);
skill.applyEffects(target, this, false, false, false);
if (this instanceof Summon)
{
final Summon src = ((Summon) this);
@ -6150,7 +6150,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
src.getOwner().abortAttack();
src.getOwner().abortCast();
src.getOwner().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
skill.getEffects(target, src.getOwner(), false, false, false);
skill.applyEffects(target, src.getOwner(), false, false, false);
}
}
}
@ -7894,7 +7894,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
abortAttack();
abortCast();
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
tempSkill.getEffects(creature, this, false, false, false);
tempSkill.applyEffects(creature, this, false, false, false);
if (this instanceof Summon)
{
final Summon src = ((Summon) this);
@ -7903,7 +7903,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
src.getOwner().abortAttack();
src.getOwner().abortCast();
src.getOwner().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
tempSkill.getEffects(creature, src.getOwner(), false, false, false);
tempSkill.applyEffects(creature, src.getOwner(), false, false, false);
}
}
}
@ -7917,7 +7917,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
final Skill tempSkill = SkillTable.getInstance().getSkill(4515, 1);
if (tempSkill != null)
{
tempSkill.getEffects(creature, this, false, false, false);
tempSkill.applyEffects(creature, this, false, false, false);
}
else
{

View File

@ -161,7 +161,7 @@ public class CabaleBufferInstance extends NpcInstance
final Skill skill = SkillTable.getInstance().getSkill(skillId, skillLevel);
if (player.getFirstEffect(skill) == null)
{
skill.getEffects(_caster, player, false, false, false);
skill.applyEffects(_caster, player, false, false, false);
broadcastPacket(new MagicSkillUse(_caster, player, skill.getId(), skillLevel, skill.getHitTime(), 0));
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skillId);

View File

@ -212,7 +212,7 @@ public class ChestInstance extends MonsterInstance
final Skill skill = SkillTable.getInstance().getSkill(skillId, skillLevel);
if (creature.getFirstEffect(skill) == null)
{
skill.getEffects(this, creature, false, false, false);
skill.applyEffects(this, creature, false, false, false);
broadcastPacket(new MagicSkillUse(this, creature, skill.getId(), skillLevel, skill.getHitTime(), 0));
return true;
}

View File

@ -632,7 +632,7 @@ public class CubicInstance
}
}
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
}
@ -685,7 +685,7 @@ public class CubicInstance
}
if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill))
{
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
}
@ -716,7 +716,7 @@ public class CubicInstance
{
if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill))
{
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
break;
}
@ -724,7 +724,7 @@ public class CubicInstance
{
if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill))
{
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
break;
}
@ -755,7 +755,7 @@ public class CubicInstance
{
if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill))
{
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
break;
}
@ -767,7 +767,7 @@ public class CubicInstance
{
target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, activeCubic.getOwner(), (int) ((150 * skill.getPower()) / (target.getLevel() + 7)));
}
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
break;
}

View File

@ -1930,7 +1930,7 @@ public class NpcInstance extends Creature
if (skill != null)
{
broadcastPacket(new MagicSkillUse(this, player, skill.getId(), skill.getLevel(), 0, 0));
skill.getEffects(this, player);
skill.applyEffects(this, player);
}
player.setCurrentCp(player.getMaxCp());
@ -2003,7 +2003,7 @@ public class NpcInstance extends Creature
else
{
broadcastPacket(new MagicSkillUse(this, player, skill.getId(), skill.getLevel(), 0, 0));
skill.getEffects(this, player);
skill.applyEffects(this, player);
}
}
}

View File

@ -2876,7 +2876,7 @@ public class PlayerInstance extends Playable
{
// stop old toggle skill effect, and give new toggle skill effect back
toggleEffect.exit(false);
sk.getEffects(this, this, false, false, false);
sk.applyEffects(this, this, false, false, false);
}
}
@ -9095,7 +9095,7 @@ public class PlayerInstance extends Playable
if (activateEffects)
{
final Skill skill = SkillTable.getInstance().getSkill(skillId, skillLevel);
skill.getEffects(this, this, false, false, false);
skill.applyEffects(this, this, false, false, false);
for (Effect effect : getAllEffects())
{
if (effect.getSkill().getId() == skillId)

View File

@ -82,7 +82,7 @@ public class ProtectorInstance extends NpcInstance
if (player.getFirstEffect(skill) == null)
{
final int objId = _caster.getObjectId();
skill.getEffects(_caster, player, false, false, false);
skill.applyEffects(_caster, player, false, false, false);
broadcastPacket(new MagicSkillUse(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
broadcastPacket(new CreatureSay(objId, ChatType.GENERAL, getName(), Config.PROTECTOR_MESSAGE));
return true;
@ -103,7 +103,7 @@ public class ProtectorInstance extends NpcInstance
if (player.getFirstEffect(skill) == null)
{
final int objId = _caster.getObjectId();
skill.getEffects(_caster, player, false, false, false);
skill.applyEffects(_caster, player, false, false, false);
broadcastPacket(new MagicSkillUse(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
broadcastPacket(new CreatureSay(objId, ChatType.GENERAL, getName(), Config.PROTECTOR_MESSAGE));
return true;

View File

@ -116,7 +116,7 @@ public class SchemeBufferInstance extends FolkInstance
{
for (int skillId : SchemeBufferTable.getInstance().getScheme(player.getObjectId(), schemeName))
{
SkillTable.getInstance().getSkill(skillId, SchemeBufferTable.getInstance().getAvailableBuff(skillId).getLevel()).getEffects(this, target);
SkillTable.getInstance().getSkill(skillId, SchemeBufferTable.getInstance().getAvailableBuff(skillId).getLevel()).applyEffects(this, target);
}
}
}

View File

@ -525,7 +525,7 @@ public class SepulcherMonsterInstance extends MonsterInstance
public void run()
{
final Skill fp = SkillTable.getInstance().getSkill(4616, 1); // Invulnerable by petrification
fp.getEffects(activeChar, activeChar, false, false, false);
fp.applyEffects(activeChar, activeChar, false, false, false);
}
}

View File

@ -46,7 +46,7 @@ public class CancelSkillRestoreTask implements Runnable
{
continue;
}
skill.getEffects(_player, _player);
skill.applyEffects(_player, _player);
}
}
}

View File

@ -591,7 +591,7 @@ public abstract class Item
{
target.removeEffect(target.getFirstEffect(skill.getId()));
}
for (Effect e : skill.getEffects(caster, target, false, false, false))
for (Effect e : skill.applyEffects(caster, target, false, false, false))
{
effects.add(e);
}

View File

@ -343,7 +343,7 @@ public class Weapon extends Item
{
target.getFirstEffect(skill.getId()).exit(false);
}
for (Effect e : skill.getEffects(caster, target, false, false, false))
for (Effect e : skill.applyEffects(caster, target, false, false, false))
{
effects.add(e);
}

View File

@ -429,7 +429,7 @@ class OlympiadGame
Skill skill;
SystemMessage sm;
skill = SkillTable.getInstance().getSkill(1204, 2);
skill.getEffects(player, player);
skill.applyEffects(player, player);
player.broadcastPacket(new MagicSkillUse(player, player, skill.getId(), 2, skill.getHitTime(), 0));
sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(1204);
@ -438,7 +438,7 @@ class OlympiadGame
{
// Haste Buff to Fighters
skill = SkillTable.getInstance().getSkill(1086, 1);
skill.getEffects(player, player);
skill.applyEffects(player, player);
player.broadcastPacket(new MagicSkillUse(player, player, skill.getId(), 1, skill.getHitTime(), 0));
sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(1086);
@ -448,7 +448,7 @@ class OlympiadGame
{
// Acumen Buff to Mages
skill = SkillTable.getInstance().getSkill(1085, 1);
skill.getEffects(player, player);
skill.applyEffects(player, player);
player.broadcastPacket(new MagicSkillUse(player, player, skill.getId(), 1, skill.getHitTime(), 0));
sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(1085);

View File

@ -78,7 +78,7 @@ public class EffectForce extends Effect
final Skill newSkill = SkillTable.getInstance().getSkill(getSkill().getId(), forces);
if (newSkill != null)
{
newSkill.getEffects(getEffector(), getEffected(), false, false, false);
newSkill.applyEffects(getEffector(), getEffected(), false, false, false);
}
}

View File

@ -72,6 +72,6 @@ public class EffectFusion extends Effect
private void updateBuff()
{
exit(false);
SkillTable.getInstance().getSkill(getSkill().getId(), _effect).getEffects(getEffector(), getEffected(), false, false, false);
SkillTable.getInstance().getSkill(getSkill().getId(), _effect).applyEffects(getEffector(), getEffected(), false, false, false);
}
}

View File

@ -86,15 +86,15 @@ public class EffectSignet extends Effect
{
if ((creature instanceof PlayerInstance) && (((((PlayerInstance) creature).getClanId() > 0) && (caster.getClanId() > 0) && (((PlayerInstance) creature).getClanId() != caster.getClanId())) || ((((PlayerInstance) creature).getAllyId() > 0) && (caster.getAllyId() > 0) && (((PlayerInstance) creature).getAllyId() != caster.getAllyId())) || ((creature.getParty() != null) && (caster.getParty() != null) && !creature.getParty().equals(caster.getParty()))))
{
_skill.getEffects(_actor, creature, false, false, false);
_skill.applyEffects(_actor, creature, false, false, false);
}
}
else if (creature instanceof PlayerInstance)
{
if (((creature.getParty() != null) && (caster.getParty() != null) && creature.getParty().equals(caster.getParty())) || ((((PlayerInstance) creature).getClanId() > 0) && (caster.getClanId() > 0) && (((PlayerInstance) creature).getClanId() == caster.getClanId())) || ((((PlayerInstance) creature).getAllyId() > 0) && (caster.getAllyId() > 0) && (((PlayerInstance) creature).getAllyId() == caster.getAllyId())))
{
_skill.getEffects(_actor, creature, false, false, false);
_skill.getEffects(_actor, caster, false, false, false); // Affect caster too.
_skill.applyEffects(_actor, creature, false, false, false);
_skill.applyEffects(_actor, caster, false, false, false); // Affect caster too.
}
}
}

View File

@ -89,9 +89,9 @@ public class SkillCharge extends Skill
}
return;
}
getEffects(caster, caster, false, false, false);
applyEffects(caster, caster, false, false, false);
// cast self effect if any
getEffectsSelf(caster);
applySelfEffects(caster);
}
}

View File

@ -148,6 +148,6 @@ public class SkillChargeDmg extends Skill
seffect.exit(false);
}
// cast self effect if any
getEffectsSelf(caster);
applySelfEffects(caster);
}
}

View File

@ -87,7 +87,7 @@ public class SkillChargeEffect extends Skill
{
for (WorldObject target : targets)
{
getEffects(creature, (Creature) target, false, false, false);
applyEffects(creature, (Creature) target, false, false, false);
}
}
}

View File

@ -122,7 +122,7 @@ public class SkillDrain extends Skill
if (target.reflectSkill(this))
{
creature.stopSkillEffects(getId());
getEffects(null, creature, false, sps, bss);
applyEffects(null, creature, false, sps, bss);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(getId());
creature.sendPacket(sm);
@ -133,7 +133,7 @@ public class SkillDrain extends Skill
target.stopSkillEffects(getId());
if (Formulas.getInstance().calcSkillSuccess(creature, target, this, false, sps, bss))
{
getEffects(creature, target, false, sps, bss);
applyEffects(creature, target, false, sps, bss);
}
else
{
@ -172,7 +172,7 @@ public class SkillDrain extends Skill
effect.exit(false);
}
// cast self effect if any
getEffectsSelf(creature);
applySelfEffects(creature);
}
public void useCubicSkill(CubicInstance activeCubic, List<Creature> targets)

View File

@ -122,7 +122,7 @@ public class SkillElemental extends Skill
// activate attacked effects, if any
target.stopSkillEffects(getId());
getEffects(creature, target, false, sps, bss);
applyEffects(creature, target, false, sps, bss);
}
if (bss)

View File

@ -52,7 +52,7 @@ public class SkillSeed extends Skill
final EffectSeed oldEffect = (EffectSeed) target.getFirstEffect(getId());
if (oldEffect == null)
{
getEffects(caster, target, false, false, false);
applyEffects(caster, target, false, false, false);
}
else
{

View File

@ -68,7 +68,7 @@ public class SkillSignet extends Skill
z = wordPosition.getZ();
}
}
getEffects(caster, effectPoint, false, false, false);
applyEffects(caster, effectPoint, false, false, false);
effectPoint.setInvul(true);
effectPoint.spawnMe(x, y, z);
}

View File

@ -42,6 +42,6 @@ public class SkillSignetCasttime extends Skill
return;
}
getEffectsSelf(caster);
applySelfEffects(caster);
}
}

View File

@ -62,7 +62,7 @@ public class DynamicZone extends ZoneType
((PlayerInstance) creature).sendMessage("You have entered a temporary zone!");
}
_skill.getEffects(_owner, creature, false, false, false);
_skill.applyEffects(_owner, creature, false, false, false);
}
catch (NullPointerException e)
{
@ -126,6 +126,6 @@ public class DynamicZone extends ZoneType
@Override
protected void onReviveInside(Creature creature)
{
_skill.getEffects(_owner, creature, false, false, false);
_skill.applyEffects(_owner, creature, false, false, false);
}
}

View File

@ -258,7 +258,7 @@ public class EffectZone extends ZoneType
{
if (character.getFirstEffect(e.getKey()) == null)
{
skill.getEffects(character, character);
skill.applyEffects(character, character);
}
}
}

View File

@ -164,7 +164,7 @@ public class PoisonZone extends ZoneType
}
else
{
skill.getEffects(temp, temp, false, false, false);
skill.applyEffects(temp, temp, false, false, false);
}
}
}

View File

@ -884,7 +884,7 @@ public class Frintezza extends Quest
final Skill skill = SkillTable.getInstance().getSkill(5017, 1);
if (skill != null)
{
skill.getEffects(_weakScarlet, _weakScarlet, false, false, false);
skill.applyEffects(_weakScarlet, _weakScarlet, false, false, false);
}
startQuestTimer("morph_end", 6000, _weakScarlet, null);
@ -976,7 +976,7 @@ public class Frintezza extends Quest
final Skill skill = SkillTable.getInstance().getSkill(5017, 1);
if (skill != null)
{
skill.getEffects(_strongScarlet, _strongScarlet, false, false, false);
skill.applyEffects(_strongScarlet, _strongScarlet, false, false, false);
}
startQuestTimer("morph_end", 9000, _strongScarlet, null);
@ -1155,7 +1155,7 @@ public class Frintezza extends Quest
{
if ((creature instanceof PlayerInstance) && (Rnd.get(100) < 80))
{
skill.getEffects(_frintezza, creature, false, false, false);
skill.applyEffects(_frintezza, creature, false, false, false);
creature.sendPacket(new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU).addSkillName(5008, 4));
}
}
@ -1173,7 +1173,7 @@ public class Frintezza extends Quest
creature.setImmobilized(true);
creature.setParalyzed(true);
creature.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
skill.getEffects(_frintezza, creature, false, false, false);
skill.applyEffects(_frintezza, creature, false, false, false);
creature.startAbnormalEffect(Creature.ABNORMAL_EFFECT_DANCE_STUNNED);
creature.sendPacket(new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU).addSkillName(5008, 5));
}

View File

@ -1152,7 +1152,7 @@ public class VanHalter extends Quest
{
if (pc.getFirstEffect(bleed) == null)
{
bleed.getEffects(tr, pc, false, false, false);
bleed.applyEffects(tr, pc, false, false, false);
tr.broadcastPacket(new MagicSkillUse(tr, pc, bleed.getId(), 12, 1, 1));
}

View File

@ -151,7 +151,7 @@ public class Q365_DevilsLegacy extends Quest
final Skill skill = SkillTable.getInstance().getSkill(4082, 1);
if ((skill != null) && (player.getFirstEffect(skill) == null))
{
skill.getEffects(npc, player);
skill.applyEffects(npc, player);
}
}
}

View File

@ -236,7 +236,7 @@ public class Q421_LittleWingsBigAdventure extends Quest
final Skill skill = SkillTable.getInstance().getSkill(4167, 1);
if ((skill != null) && (player.getFirstEffect(skill) == null))
{
skill.getEffects(npc, player);
skill.applyEffects(npc, player);
}
}
break;
@ -312,7 +312,7 @@ public class Q421_LittleWingsBigAdventure extends Quest
final Skill skill = SkillTable.getInstance().getSkill(4243, 1);
if ((skill != null) && (originalKiller.getFirstEffect(skill) == null))
{
skill.getEffects(npc, originalKiller);
skill.applyEffects(npc, originalKiller);
}
}

View File

@ -169,7 +169,7 @@ public class Q501_ProofOfClanAlliance extends Quest
st.takeItems(SYMBOL_OF_LOYALTY, 1);
st.takeItems(SYMBOL_OF_LOYALTY, 1);
st.giveItems(ANTIDOTE_RECIPE_LIST, 1);
SkillTable.getInstance().getSkill(4082, 1).getEffects(npc, player);
SkillTable.getInstance().getSkill(4082, 1).applyEffects(npc, player);
startQuestTimer("poison", 60000, npc, player, true);
st.playSound(QuestState.SOUND_MIDDLE);
}

View File

@ -88,7 +88,7 @@ public class EnergyStone implements IItemHandler
final Skill dummy = SkillTable.getInstance().getSkill(skill.getId(), skill.getLevel());
if (dummy != null)
{
dummy.getEffects(player, player);
dummy.applyEffects(player, player);
player.sendPacket(new MagicSkillUse(playable, player, skill.getId(), 1, 1, 0));
player.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
}

View File

@ -113,7 +113,7 @@ public class Blow implements ISkillHandler
target.stopSkillEffects(skill.getId());
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skill);
target.sendPacket(sm);
@ -279,7 +279,7 @@ public class Blow implements ISkillHandler
{
effect.exit(false);
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
}
}

View File

@ -46,7 +46,7 @@ public class Charge implements ISkillHandler
continue;
}
final PlayerInstance target = (PlayerInstance) target1;
skill.getEffects(creature, target, false, false, false);
skill.applyEffects(creature, target, false, false, false);
}
// self Effect :]
@ -56,7 +56,7 @@ public class Charge implements ISkillHandler
// Replace old effect with new one.
effect.exit(false);
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
}
@Override

View File

@ -78,7 +78,7 @@ public class ClanGate implements ISkillHandler
{
effect.exit(false);
}
skill.getEffectsSelf(player);
skill.applySelfEffects(player);
}
private class RemoveClanGate implements Runnable

View File

@ -237,7 +237,7 @@ public class Continuous implements ISkillHandler
final DuelManager dm = DuelManager.getInstance();
if (dm != null)
{
final Effect[] effects = skill.getEffects(creature, target, ss, sps, bss);
final Effect[] effects = skill.applyEffects(creature, target, ss, sps, bss);
if (effects != null)
{
for (Effect buff : effects)
@ -252,7 +252,7 @@ public class Continuous implements ISkillHandler
}
else
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
if (skill.getSkillType() == SkillType.AGGDEBUFF)
@ -299,7 +299,7 @@ public class Continuous implements ISkillHandler
}
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
}
@Override

View File

@ -88,7 +88,7 @@ public class CpDam implements ISkillHandler
target.breakAttack();
target.breakCast();
}
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
creature.sendDamageMessage(target, damage, false, false, false);
target.setCurrentCp(target.getCurrentCp() - damage);
}

View File

@ -105,7 +105,7 @@ public class Disablers implements ISkillHandler
{
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else
{
@ -119,7 +119,7 @@ public class Disablers implements ISkillHandler
case FAKE_DEATH:
{
// stun/fakedeath is not mdef dependant, it depends on lvl difference, target CON and power of stun
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
break;
}
case STUN:
@ -145,7 +145,7 @@ public class Disablers implements ISkillHandler
}
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (creature instanceof PlayerInstance)
{
@ -165,7 +165,7 @@ public class Disablers implements ISkillHandler
}
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (creature instanceof PlayerInstance)
{
@ -185,7 +185,7 @@ public class Disablers implements ISkillHandler
}
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (creature instanceof PlayerInstance)
{
@ -209,7 +209,7 @@ public class Disablers implements ISkillHandler
e.exit(false);
}
}
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (creature instanceof PlayerInstance)
{
@ -224,7 +224,7 @@ public class Disablers implements ISkillHandler
target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, creature, (int) ((150 * skill.getPower()) / (target.getLevel() + 7)));
}
// TODO [Nemesiss] should this have 100% chance?
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
break;
}
case AGGREDUCE:
@ -232,7 +232,7 @@ public class Disablers implements ISkillHandler
// these skills needs to be rechecked
if (target instanceof Attackable)
{
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
final double aggdiff = ((Attackable) target).getHating(creature) - target.calcStat(Stat.AGGRESSION, ((Attackable) target).getHating(creature), target, skill);
if (skill.getPower() > 0)
{
@ -263,7 +263,7 @@ public class Disablers implements ISkillHandler
attackable.setWalking();
}
}
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
{
@ -279,7 +279,7 @@ public class Disablers implements ISkillHandler
targ.setWalking();
}
}
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
}
else if (creature instanceof PlayerInstance)
{
@ -754,7 +754,7 @@ public class Disablers implements ISkillHandler
// Replace old effect with new one.
effect.exit(false);
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
}
private void negateEffect(Creature target, SkillType type, double power)

View File

@ -92,7 +92,7 @@ public class Mdam implements ISkillHandler
if (target.reflectSkill(skill))
{
creature.stopSkillEffects(skill.getId());
skill.getEffects(null, creature, false, sps, bss);
skill.applyEffects(null, creature, false, sps, bss);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skill.getId());
creature.sendPacket(sm);
@ -101,7 +101,7 @@ public class Mdam implements ISkillHandler
{
// Like L2OFF must remove the first effect only if the second effect is successful
target.stopSkillEffects(skill.getId());
skill.getEffects(creature, target, false, sps, bss);
skill.applyEffects(creature, target, false, sps, bss);
}
else
{
@ -132,7 +132,7 @@ public class Mdam implements ISkillHandler
// Replace old effect with new one.
effect.exit(false);
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
if (skill.isSuicideAttack())
{

View File

@ -151,7 +151,7 @@ public class Pdam implements ISkillHandler
{
creature.stopSkillEffects(skill.getId());
skill.getEffects(null, creature, ss, sps, bss);
skill.applyEffects(null, creature, ss, sps, bss);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skill.getId());
creature.sendPacket(sm);
@ -159,7 +159,7 @@ public class Pdam implements ISkillHandler
else if (f.calcSkillSuccess(creature, target, skill, soul, false, false)) // activate attacked effects, if any
{
// Like L2OFF must remove the first effect if the second effect lands
skill.getEffects(creature, target, ss, sps, bss);
skill.applyEffects(creature, target, ss, sps, bss);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skill.getId());
target.sendPacket(sm);
@ -316,12 +316,12 @@ public class Pdam implements ISkillHandler
else if (skill.getId() == 345) // Sonic Rage
{
final Skill dummy = SkillTable.getInstance().getSkill(8, 7); // Lv7 Sonic Focus
dummy.getEffects(creature, creature, ss, sps, bss);
dummy.applyEffects(creature, creature, ss, sps, bss);
}
else if (skill.getId() == 346) // Raging Force
{
final Skill dummy = SkillTable.getInstance().getSkill(50, 7); // Lv7 Focused Force
dummy.getEffects(creature, creature, ss, sps, bss);
dummy.applyEffects(creature, creature, ss, sps, bss);
}
}
// self Effect :]
@ -331,7 +331,7 @@ public class Pdam implements ISkillHandler
// Replace old effect with new one.
effect.exit(false);
}
skill.getEffectsSelf(creature);
skill.applySelfEffects(creature);
}
if (skill.isMagic())

View File

@ -168,7 +168,7 @@ public class Wedding implements IVoicedCommandHandler
final Skill skill = SkillTable.getInstance().getSkill(skillId, skillLevel);
if (activeChar.getFirstEffect(skill) == null)
{
skill.getEffects(activeChar, activeChar, false, false, false);
skill.applyEffects(activeChar, activeChar, false, false, false);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skillId);
activeChar.sendPacket(sm);

View File

@ -61,7 +61,7 @@ public class ForceBuff
final Skill force = SkillTable.getInstance().getSkill(_forceId, _forceLevel);
if (force != null)
{
force.getEffects(_caster, _target, false, false, false);
force.applyEffects(_caster, _target, false, false, false);
}
else
{

View File

@ -2657,12 +2657,12 @@ public abstract class Skill
return (_effectTemplates != null) && (_effectTemplates.length > 0);
}
public Effect[] getEffects(Creature effector, Creature effected)
public Effect[] applyEffects(Creature effector, Creature effected)
{
return getEffects(effector, effected, false, false, false);
return applyEffects(effector, effected, false, false, false);
}
public Effect[] getEffects(Creature effector, Creature effected, boolean ss, boolean sps, boolean bss)
public Effect[] applyEffects(Creature effector, Creature effected, boolean ss, boolean sps, boolean bss)
{
if (isPassive())
{
@ -2723,7 +2723,7 @@ public abstract class Skill
return effects.toArray(new Effect[effects.size()]);
}
public Effect[] getEffectsSelf(Creature effector)
public Effect[] applySelfEffects(Creature effector)
{
if (isPassive())
{

View File

@ -6188,7 +6188,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
abortAttack();
abortCast();
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
skill.getEffects(target, this, false, false, false);
skill.applyEffects(target, this, false, false, false);
if (this instanceof Summon)
{
final Summon src = ((Summon) this);
@ -6197,7 +6197,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
src.getOwner().abortAttack();
src.getOwner().abortCast();
src.getOwner().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
skill.getEffects(target, src.getOwner(), false, false, false);
skill.applyEffects(target, src.getOwner(), false, false, false);
}
}
}
@ -7941,7 +7941,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
abortAttack();
abortCast();
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
tempSkill.getEffects(creature, this, false, false, false);
tempSkill.applyEffects(creature, this, false, false, false);
if (this instanceof Summon)
{
final Summon src = ((Summon) this);
@ -7950,7 +7950,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
src.getOwner().abortAttack();
src.getOwner().abortCast();
src.getOwner().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
tempSkill.getEffects(creature, src.getOwner(), false, false, false);
tempSkill.applyEffects(creature, src.getOwner(), false, false, false);
}
}
}
@ -7964,7 +7964,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
final Skill tempSkill = SkillTable.getInstance().getSkill(4515, 1);
if (tempSkill != null)
{
tempSkill.getEffects(creature, this, false, false, false);
tempSkill.applyEffects(creature, this, false, false, false);
}
else
{

View File

@ -161,7 +161,7 @@ public class CabaleBufferInstance extends NpcInstance
final Skill skill = SkillTable.getInstance().getSkill(skillId, skillLevel);
if (player.getFirstEffect(skill) == null)
{
skill.getEffects(_caster, player, false, false, false);
skill.applyEffects(_caster, player, false, false, false);
broadcastPacket(new MagicSkillUse(_caster, player, skill.getId(), skillLevel, skill.getHitTime(), 0));
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(skillId);

View File

@ -212,7 +212,7 @@ public class ChestInstance extends MonsterInstance
final Skill skill = SkillTable.getInstance().getSkill(skillId, skillLevel);
if (creature.getFirstEffect(skill) == null)
{
skill.getEffects(this, creature, false, false, false);
skill.applyEffects(this, creature, false, false, false);
broadcastPacket(new MagicSkillUse(this, creature, skill.getId(), skillLevel, skill.getHitTime(), 0));
return true;
}

View File

@ -707,7 +707,7 @@ public class CubicInstance
if ((target instanceof PlayerInstance) && ((PlayerInstance) target).isInDuel() && (skill.getSkillType() == SkillType.DEBUFF) && (activeCubic.getOwner().getDuelId() == ((PlayerInstance) target).getDuelId()))
{
final DuelManager dm = DuelManager.getInstance();
for (Effect debuff : skill.getEffects(activeCubic.getOwner(), target))
for (Effect debuff : skill.applyEffects(activeCubic.getOwner(), target))
{
if (debuff != null)
{
@ -717,7 +717,7 @@ public class CubicInstance
}
else
{
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
}
}
@ -771,7 +771,7 @@ public class CubicInstance
}
if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill))
{
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
}
@ -806,7 +806,7 @@ public class CubicInstance
if ((target instanceof PlayerInstance) && ((PlayerInstance) target).isInDuel() && (skill.getSkillType() == SkillType.DEBUFF) && (activeCubic.getOwner().getDuelId() == ((PlayerInstance) target).getDuelId()))
{
final DuelManager dm = DuelManager.getInstance();
for (Effect debuff : skill.getEffects(activeCubic.getOwner(), target))
for (Effect debuff : skill.applyEffects(activeCubic.getOwner(), target))
{
if (debuff != null)
{
@ -816,7 +816,7 @@ public class CubicInstance
}
else
{
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
}
break;
@ -829,7 +829,7 @@ public class CubicInstance
if ((target instanceof PlayerInstance) && ((PlayerInstance) target).isInDuel() && (skill.getSkillType() == SkillType.DEBUFF) && (activeCubic.getOwner().getDuelId() == ((PlayerInstance) target).getDuelId()))
{
final DuelManager dm = DuelManager.getInstance();
for (Effect debuff : skill.getEffects(activeCubic.getOwner(), target))
for (Effect debuff : skill.applyEffects(activeCubic.getOwner(), target))
{
if (debuff != null)
{
@ -839,7 +839,7 @@ public class CubicInstance
}
else
{
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
}
break;
@ -875,7 +875,7 @@ public class CubicInstance
if ((target instanceof PlayerInstance) && ((PlayerInstance) target).isInDuel() && (skill.getSkillType() == SkillType.DEBUFF) && (activeCubic.getOwner().getDuelId() == ((PlayerInstance) target).getDuelId()))
{
final DuelManager dm = DuelManager.getInstance();
for (Effect debuff : skill.getEffects(activeCubic.getOwner(), target))
for (Effect debuff : skill.applyEffects(activeCubic.getOwner(), target))
{
if (debuff != null)
{
@ -885,7 +885,7 @@ public class CubicInstance
}
else
{
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
}
break;
@ -898,7 +898,7 @@ public class CubicInstance
{
target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, activeCubic.getOwner(), (int) ((150 * skill.getPower()) / (target.getLevel() + 7)));
}
skill.getEffects(activeCubic.getOwner(), target);
skill.applyEffects(activeCubic.getOwner(), target);
}
break;
}

View File

@ -1553,7 +1553,7 @@ public class NpcInstance extends Creature
}
final Skill skill = SkillTable.getInstance().getSkill(5182, 1);
broadcastPacket(new MagicSkillUse(this, player, skill.getId(), skill.getLevel(), 0, 0));
skill.getEffects(this, player);
skill.applyEffects(this, player);
}
/**
@ -2127,7 +2127,7 @@ public class NpcInstance extends Creature
if (skill != null)
{
broadcastPacket(new MagicSkillUse(this, player, skill.getId(), skill.getLevel(), 0, 0));
skill.getEffects(this, player);
skill.applyEffects(this, player);
}
player.setCurrentCp(player.getMaxCp());
@ -2206,7 +2206,7 @@ public class NpcInstance extends Creature
else
{
broadcastPacket(new MagicSkillUse(this, player, skill.getId(), skill.getLevel(), 0, 0));
skill.getEffects(this, player);
skill.applyEffects(this, player);
}
}
}

View File

@ -2944,7 +2944,7 @@ public class PlayerInstance extends Playable
{
// stop old toggle skill effect, and give new toggle skill effect back
toggleEffect.exit(false);
sk.getEffects(this, this, false, false, false);
sk.applyEffects(this, this, false, false, false);
}
}
@ -9252,7 +9252,7 @@ public class PlayerInstance extends Playable
if (activateEffects)
{
final Skill skill = SkillTable.getInstance().getSkill(skillId, skillLevel);
skill.getEffects(this, this, false, false, false);
skill.applyEffects(this, this, false, false, false);
for (Effect effect : getAllEffects())
{
if (effect.getSkill().getId() == skillId)

View File

@ -82,7 +82,7 @@ public class ProtectorInstance extends NpcInstance
if (player.getFirstEffect(skill) == null)
{
final int objId = _caster.getObjectId();
skill.getEffects(_caster, player, false, false, false);
skill.applyEffects(_caster, player, false, false, false);
broadcastPacket(new MagicSkillUse(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
broadcastPacket(new CreatureSay(objId, ChatType.GENERAL, getName(), Config.PROTECTOR_MESSAGE));
return true;
@ -103,7 +103,7 @@ public class ProtectorInstance extends NpcInstance
if (player.getFirstEffect(skill) == null)
{
final int objId = _caster.getObjectId();
skill.getEffects(_caster, player, false, false, false);
skill.applyEffects(_caster, player, false, false, false);
broadcastPacket(new MagicSkillUse(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
broadcastPacket(new CreatureSay(objId, ChatType.GENERAL, getName(), Config.PROTECTOR_MESSAGE));
return true;

View File

@ -116,7 +116,7 @@ public class SchemeBufferInstance extends FolkInstance
{
for (int skillId : SchemeBufferTable.getInstance().getScheme(player.getObjectId(), schemeName))
{
SkillTable.getInstance().getSkill(skillId, SchemeBufferTable.getInstance().getAvailableBuff(skillId).getLevel()).getEffects(this, target);
SkillTable.getInstance().getSkill(skillId, SchemeBufferTable.getInstance().getAvailableBuff(skillId).getLevel()).applyEffects(this, target);
}
}
}

View File

@ -525,7 +525,7 @@ public class SepulcherMonsterInstance extends MonsterInstance
public void run()
{
final Skill fp = SkillTable.getInstance().getSkill(4616, 1); // Invulnerable by petrification
fp.getEffects(activeChar, activeChar, false, false, false);
fp.applyEffects(activeChar, activeChar, false, false, false);
}
}

View File

@ -46,7 +46,7 @@ public class CancelSkillRestoreTask implements Runnable
{
continue;
}
skill.getEffects(_player, _player);
skill.applyEffects(_player, _player);
}
}
}

View File

@ -591,7 +591,7 @@ public abstract class Item
{
target.removeEffect(target.getFirstEffect(skill.getId()));
}
for (Effect e : skill.getEffects(caster, target, false, false, false))
for (Effect e : skill.applyEffects(caster, target, false, false, false))
{
effects.add(e);
}

View File

@ -343,7 +343,7 @@ public class Weapon extends Item
{
target.getFirstEffect(skill.getId()).exit(false);
}
for (Effect e : skill.getEffects(caster, target, false, false, false))
for (Effect e : skill.applyEffects(caster, target, false, false, false))
{
effects.add(e);
}

View File

@ -429,7 +429,7 @@ class OlympiadGame
Skill skill;
SystemMessage sm;
skill = SkillTable.getInstance().getSkill(1204, 2);
skill.getEffects(player, player);
skill.applyEffects(player, player);
player.broadcastPacket(new MagicSkillUse(player, player, skill.getId(), 2, skill.getHitTime(), 0));
sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(1204);
@ -438,7 +438,7 @@ class OlympiadGame
{
// Haste Buff to Fighters
skill = SkillTable.getInstance().getSkill(1086, 1);
skill.getEffects(player, player);
skill.applyEffects(player, player);
player.broadcastPacket(new MagicSkillUse(player, player, skill.getId(), 1, skill.getHitTime(), 0));
sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(1086);
@ -448,7 +448,7 @@ class OlympiadGame
{
// Acumen Buff to Mages
skill = SkillTable.getInstance().getSkill(1085, 1);
skill.getEffects(player, player);
skill.applyEffects(player, player);
player.broadcastPacket(new MagicSkillUse(player, player, skill.getId(), 1, skill.getHitTime(), 0));
sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(1085);

View File

@ -78,7 +78,7 @@ public class EffectForce extends Effect
final Skill newSkill = SkillTable.getInstance().getSkill(getSkill().getId(), forces);
if (newSkill != null)
{
newSkill.getEffects(getEffector(), getEffected(), false, false, false);
newSkill.applyEffects(getEffector(), getEffected(), false, false, false);
}
}

View File

@ -72,6 +72,6 @@ public class EffectFusion extends Effect
private void updateBuff()
{
exit(false);
SkillTable.getInstance().getSkill(getSkill().getId(), _effect).getEffects(getEffector(), getEffected(), false, false, false);
SkillTable.getInstance().getSkill(getSkill().getId(), _effect).applyEffects(getEffector(), getEffected(), false, false, false);
}
}

View File

@ -86,15 +86,15 @@ public class EffectSignet extends Effect
{
if ((creature instanceof PlayerInstance) && (((((PlayerInstance) creature).getClanId() > 0) && (caster.getClanId() > 0) && (((PlayerInstance) creature).getClanId() != caster.getClanId())) || ((((PlayerInstance) creature).getAllyId() > 0) && (caster.getAllyId() > 0) && (((PlayerInstance) creature).getAllyId() != caster.getAllyId())) || ((creature.getParty() != null) && (caster.getParty() != null) && !creature.getParty().equals(caster.getParty()))))
{
_skill.getEffects(_actor, creature, false, false, false);
_skill.applyEffects(_actor, creature, false, false, false);
}
}
else if (creature instanceof PlayerInstance)
{
if (((creature.getParty() != null) && (caster.getParty() != null) && creature.getParty().equals(caster.getParty())) || ((((PlayerInstance) creature).getClanId() > 0) && (caster.getClanId() > 0) && (((PlayerInstance) creature).getClanId() == caster.getClanId())) || ((((PlayerInstance) creature).getAllyId() > 0) && (caster.getAllyId() > 0) && (((PlayerInstance) creature).getAllyId() == caster.getAllyId())))
{
_skill.getEffects(_actor, creature, false, false, false);
_skill.getEffects(_actor, caster, false, false, false); // Affect caster too.
_skill.applyEffects(_actor, creature, false, false, false);
_skill.applyEffects(_actor, caster, false, false, false); // Affect caster too.
}
}
}

View File

@ -91,9 +91,9 @@ public class SkillCharge extends Skill
}
return;
}
getEffects(caster, caster, false, false, false);
applyEffects(caster, caster, false, false, false);
// cast self effect if any
getEffectsSelf(caster);
applySelfEffects(caster);
}
}

View File

@ -154,6 +154,6 @@ public class SkillChargeDmg extends Skill
seffect.exit(false);
}
// cast self effect if any
getEffectsSelf(caster);
applySelfEffects(caster);
}
}

View File

@ -88,7 +88,7 @@ public class SkillChargeEffect extends Skill
{
for (WorldObject target : targets)
{
getEffects(creature, (Creature) target, false, false, false);
applyEffects(creature, (Creature) target, false, false, false);
}
}
if (creature instanceof PlayerInstance)

View File

@ -122,7 +122,7 @@ public class SkillDrain extends Skill
if (target.reflectSkill(this))
{
creature.stopSkillEffects(getId());
getEffects(null, creature, false, sps, bss);
applyEffects(null, creature, false, sps, bss);
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU);
sm.addSkillName(getId());
creature.sendPacket(sm);
@ -133,7 +133,7 @@ public class SkillDrain extends Skill
target.stopSkillEffects(getId());
if (Formulas.getInstance().calcSkillSuccess(creature, target, this, false, sps, bss))
{
getEffects(creature, target, false, sps, bss);
applyEffects(creature, target, false, sps, bss);
}
else
{
@ -172,7 +172,7 @@ public class SkillDrain extends Skill
effect.exit(false);
}
// cast self effect if any
getEffectsSelf(creature);
applySelfEffects(creature);
}
public void useCubicSkill(CubicInstance activeCubic, List<Creature> targets)

View File

@ -122,7 +122,7 @@ public class SkillElemental extends Skill
// activate attacked effects, if any
target.stopSkillEffects(getId());
getEffects(creature, target, false, sps, bss);
applyEffects(creature, target, false, sps, bss);
}
if (bss)

View File

@ -52,7 +52,7 @@ public class SkillSeed extends Skill
final EffectSeed oldEffect = (EffectSeed) target.getFirstEffect(getId());
if (oldEffect == null)
{
getEffects(caster, target, false, false, false);
applyEffects(caster, target, false, false, false);
}
else
{

View File

@ -68,7 +68,7 @@ public class SkillSignet extends Skill
z = wordPosition.getZ();
}
}
getEffects(caster, effectPoint, false, false, false);
applyEffects(caster, effectPoint, false, false, false);
effectPoint.setInvul(true);
effectPoint.spawnMe(x, y, z);
}

View File

@ -42,6 +42,6 @@ public class SkillSignetCasttime extends Skill
return;
}
getEffectsSelf(caster);
applySelfEffects(caster);
}
}

View File

@ -62,7 +62,7 @@ public class DynamicZone extends ZoneType
((PlayerInstance) creature).sendMessage("You have entered a temporary zone!");
}
_skill.getEffects(_owner, creature, false, false, false);
_skill.applyEffects(_owner, creature, false, false, false);
}
catch (NullPointerException e)
{
@ -126,6 +126,6 @@ public class DynamicZone extends ZoneType
@Override
protected void onReviveInside(Creature creature)
{
_skill.getEffects(_owner, creature, false, false, false);
_skill.applyEffects(_owner, creature, false, false, false);
}
}

View File

@ -264,7 +264,7 @@ public class EffectZone extends ZoneType
{
if (character.getFirstEffect(e.getKey()) == null)
{
skill.getEffects(character, character);
skill.applyEffects(character, character);
}
}
}

View File

@ -164,7 +164,7 @@ public class PoisonZone extends ZoneType
}
else
{
skill.getEffects(temp, temp, false, false, false);
skill.applyEffects(temp, temp, false, false, false);
}
}
}