Addition of SacrificeSummon effect.

This commit is contained in:
MobiusDev 2017-09-07 01:28:10 +00:00
parent 9baee86367
commit 6c3fae843b
15 changed files with 259 additions and 3 deletions

View File

@ -267,6 +267,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Reuse", Reuse::new);
EffectHandler.getInstance().registerHandler("RewardItemOnExit", RewardItemOnExit::new);
EffectHandler.getInstance().registerHandler("Root", Root::new);
EffectHandler.getInstance().registerHandler("SacrificeSummon", SacrificeSummon::new);
EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new);
EffectHandler.getInstance().registerHandler("SendSystemMessageToClan", SendSystemMessageToClan::new);
EffectHandler.getInstance().registerHandler("ServitorShare", ServitorShare::new);

View File

@ -0,0 +1,62 @@
/*
* 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 handlers.effecthandlers;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Summon;
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.SystemMessageId;
/**
* @author Mobius
*/
public final class SacrificeSummon extends AbstractEffect
{
public SacrificeSummon(StatsSet params)
{
}
@Override
public boolean canStart(BuffInfo info)
{
return info.getEffected().isSummon();
}
@Override
public boolean isInstant()
{
return true;
}
@Override
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
{
for (L2Summon summon : effector.getServitors().values())
{
summon.abortAttack();
summon.abortCast();
summon.stopAllEffects();
summon.doDie(summon);
}
effector.sendPacket(SystemMessageId.YOUR_SERVITOR_HAS_VANISHED_YOU_LL_NEED_TO_SUMMON_A_NEW_ONE);
}
}

View File

@ -2622,7 +2622,7 @@
<effectPoint>209</effectPoint>
<isMagic>1</isMagic>
<effects>
<effect name="Unsummon" />
<effect name="SacrificeSummon" />
</effects>
<selfEffects>
<effect name="DebuffBlock" />

View File

@ -234,6 +234,7 @@ ResurrectionSpecial: Resurrects target Player or Summon only in specified instan
Reuse: Decreases skill reuse time based on its magic type.
RewardItemOnExit: Reward an item when effect ends. (l2jmobius)
Root: Stops movement.
SacrificeSummon: Sacrifices the players summon. (l2jmobius)
SafeFallHeight: Minimum falling height for taking damage stat.
SendSystemMessageToClan: Sends the specified SystemMessageId to the clan.
ServitorShare:

View File

@ -267,6 +267,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Reuse", Reuse::new);
EffectHandler.getInstance().registerHandler("RewardItemOnExit", RewardItemOnExit::new);
EffectHandler.getInstance().registerHandler("Root", Root::new);
EffectHandler.getInstance().registerHandler("SacrificeSummon", SacrificeSummon::new);
EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new);
EffectHandler.getInstance().registerHandler("SendSystemMessageToClan", SendSystemMessageToClan::new);
EffectHandler.getInstance().registerHandler("ServitorShare", ServitorShare::new);

View File

@ -0,0 +1,62 @@
/*
* 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 handlers.effecthandlers;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Summon;
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.SystemMessageId;
/**
* @author Mobius
*/
public final class SacrificeSummon extends AbstractEffect
{
public SacrificeSummon(StatsSet params)
{
}
@Override
public boolean canStart(BuffInfo info)
{
return info.getEffected().isSummon();
}
@Override
public boolean isInstant()
{
return true;
}
@Override
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
{
for (L2Summon summon : effector.getServitors().values())
{
summon.abortAttack();
summon.abortCast();
summon.stopAllEffects();
summon.doDie(summon);
}
effector.sendPacket(SystemMessageId.YOUR_SERVITOR_HAS_VANISHED_YOU_LL_NEED_TO_SUMMON_A_NEW_ONE);
}
}

View File

@ -2822,7 +2822,7 @@
<effectPoint>209</effectPoint>
<isMagic>1</isMagic>
<effects>
<effect name="Unsummon" />
<effect name="SacrificeSummon" />
</effects>
<selfEffects>
<effect name="DebuffBlock" />

View File

@ -234,6 +234,7 @@ ResurrectionSpecial: Resurrects target Player or Summon only in specified instan
Reuse: Decreases skill reuse time based on its magic type.
RewardItemOnExit: Reward an item when effect ends. (l2jmobius)
Root: Stops movement.
SacrificeSummon: Sacrifices the players summon. (l2jmobius)
SafeFallHeight: Minimum falling height for taking damage stat.
SendSystemMessageToClan: Sends the specified SystemMessageId to the clan.
ServitorShare:

View File

@ -267,6 +267,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Reuse", Reuse::new);
EffectHandler.getInstance().registerHandler("RewardItemOnExit", RewardItemOnExit::new);
EffectHandler.getInstance().registerHandler("Root", Root::new);
EffectHandler.getInstance().registerHandler("SacrificeSummon", SacrificeSummon::new);
EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new);
EffectHandler.getInstance().registerHandler("SendSystemMessageToClan", SendSystemMessageToClan::new);
EffectHandler.getInstance().registerHandler("ServitorShare", ServitorShare::new);

View File

@ -0,0 +1,62 @@
/*
* 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 handlers.effecthandlers;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Summon;
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.SystemMessageId;
/**
* @author Mobius
*/
public final class SacrificeSummon extends AbstractEffect
{
public SacrificeSummon(StatsSet params)
{
}
@Override
public boolean canStart(BuffInfo info)
{
return info.getEffected().isSummon() && !info.getEffected().isAlikeDead();
}
@Override
public boolean isInstant()
{
return true;
}
@Override
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
{
for (L2Summon summon : effector.getServitors().values())
{
summon.abortAttack();
summon.abortCast();
summon.stopAllEffects();
summon.doDie(summon);
}
effector.sendPacket(SystemMessageId.YOUR_SERVITOR_HAS_VANISHED_YOU_LL_NEED_TO_SUMMON_A_NEW_ONE);
}
}

View File

@ -2822,7 +2822,7 @@
<effectPoint>209</effectPoint>
<isMagic>1</isMagic>
<effects>
<effect name="Unsummon" />
<effect name="SacrificeSummon" />
</effects>
<selfEffects>
<effect name="DebuffBlock" />

View File

@ -234,6 +234,7 @@ ResurrectionSpecial: Resurrects target Player or Summon only in specified instan
Reuse: Decreases skill reuse time based on its magic type.
RewardItemOnExit: Reward an item when effect ends. (l2jmobius)
Root: Stops movement.
SacrificeSummon: Sacrifices the players summon. (l2jmobius)
SafeFallHeight: Minimum falling height for taking damage stat.
SendSystemMessageToClan: Sends the specified SystemMessageId to the clan.
ServitorShare:

View File

@ -267,6 +267,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Reuse", Reuse::new);
EffectHandler.getInstance().registerHandler("RewardItemOnExit", RewardItemOnExit::new);
EffectHandler.getInstance().registerHandler("Root", Root::new);
EffectHandler.getInstance().registerHandler("SacrificeSummon", SacrificeSummon::new);
EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new);
EffectHandler.getInstance().registerHandler("SendSystemMessageToClan", SendSystemMessageToClan::new);
EffectHandler.getInstance().registerHandler("ServitorShare", ServitorShare::new);

View File

@ -0,0 +1,62 @@
/*
* 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 handlers.effecthandlers;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Summon;
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.SystemMessageId;
/**
* @author Mobius
*/
public final class SacrificeSummon extends AbstractEffect
{
public SacrificeSummon(StatsSet params)
{
}
@Override
public boolean canStart(BuffInfo info)
{
return info.getEffected().isSummon();
}
@Override
public boolean isInstant()
{
return true;
}
@Override
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
{
for (L2Summon summon : effector.getServitors().values())
{
summon.abortAttack();
summon.abortCast();
summon.stopAllEffects();
summon.doDie(summon);
}
effector.sendPacket(SystemMessageId.YOUR_SERVITOR_HAS_VANISHED_YOU_LL_NEED_TO_SUMMON_A_NEW_ONE);
}
}

View File

@ -234,6 +234,7 @@ ResurrectionSpecial: Resurrects target Player or Summon only in specified instan
Reuse: Decreases skill reuse time based on its magic type.
RewardItemOnExit: Reward an item when effect ends. (l2jmobius)
Root: Stops movement.
SacrificeSummon: Sacrifices the players summon. (l2jmobius)
SafeFallHeight: Minimum falling height for taking damage stat.
SendSystemMessageToClan: Sends the specified SystemMessageId to the clan.
ServitorShare: