Skip to content
Snippets Groups Projects
Commit 4066f791 authored by Rumen Nikiforov's avatar Rumen Nikiforov
Browse files

BETA: Implementing Servitor Share skill (The sharing part).

	* Reported by: Nair, Tavo22, Vulcan
	
	* Note: H5 feature.
parent a98d5cd8
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,7 @@ import handlers.effecthandlers.Relax;
import handlers.effecthandlers.RemoveTarget;
import handlers.effecthandlers.RestorationRandom;
import handlers.effecthandlers.Root;
import handlers.effecthandlers.ServitorShare;
import handlers.effecthandlers.Signet;
import handlers.effecthandlers.SignetAntiSummon;
import handlers.effecthandlers.SignetMDam;
......@@ -166,6 +167,7 @@ public final class EffectMasterHandler
RemoveTarget.class,
RestorationRandom.class,
Root.class,
ServitorShare.class,
Signet.class,
SignetAntiSummon.class,
SignetMDam.class,
......
/*
* 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.l2jserver.gameserver.model.CharEffectList;
import com.l2jserver.gameserver.model.actor.L2Summon;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.effects.EffectTemplate;
import com.l2jserver.gameserver.model.effects.L2Effect;
import com.l2jserver.gameserver.model.effects.L2EffectType;
import com.l2jserver.gameserver.model.stats.Env;
/**
* @author UnAfraid
*/
public class ServitorShare extends L2Effect
{
public ServitorShare(Env env, EffectTemplate template)
{
super(env, template);
}
@Override
public L2EffectType getEffectType()
{
return L2EffectType.BUFF;
}
@Override
public void onExit()
{
// Synchronizing effects on player and pet if one of them get's removed for some reason the same will happen to another.
L2Effect[] effects = null;
if (getEffected().isPlayer())
{
L2Summon summon = getEffector().getPet();
effects = summon.getAllEffects();
}
else if (getEffected().isSummon())
{
L2PcInstance owner = getEffected().getActingPlayer();
effects = owner.getAllEffects();
}
if (effects != null)
{
for (L2Effect eff : effects)
{
if (eff.getSkill().getId() == getSkill().getId())
{
eff.exit();
break;
}
}
}
super.onExit();
}
@Override
public boolean onActionTime()
{
return false;
}
@Override
public boolean canBeStolen()
{
return false;
}
@Override
public int getEffectFlags()
{
return CharEffectList.EFFECT_FLAG_SERVITOR_SHARE;
}
}
......@@ -1492,16 +1492,18 @@
<set name="skillType" val="BUFF" />
<set name="target" val="TARGET_PET" />
<for>
<effect name="Buff" abnormalTime="1200" val="0">
<mul order="0x30" stat="pAtk" val="1.5" />
<mul order="0x30" stat="pDef" val="1.5" />
<mul order="0x30" stat="mAtk" val="1.25" />
<mul order="0x30" stat="mDef" val="1.25" />
<mul order="0x30" stat="maxHp" val="1.1" />
<mul order="0x30" stat="maxMp" val="1.1" />
<basemul order="0x30" stat="rCrit" val="0.2" />
<mul order="0x30" stat="pAtkSpd" val="1.1" />
<mul order="0x30" stat="mAtkSpd" val="1.03" />
<!-- Note: 0.5 means 50% of owner's patk! -->
<effect self="1" name="ServitorShare" abnormalTime="1200" val="0" /> <!-- This effect is used to cancel pet's effect when player's have been canceled. -->
<effect name="ServitorShare" abnormalTime="1200" noicon="1" val="0">
<share order="0x40" stat="pAtk" val="0.5" />
<share order="0x40" stat="pDef" val="0.5" />
<share order="0x40" stat="mAtk" val="0.25" />
<share order="0x40" stat="mDef" val="0.25" />
<share order="0x40" stat="maxHp" val="0.1" />
<share order="0x40" stat="maxMp" val="0.1" />
<share order="0x40" stat="rCrit" val="0.2" />
<share order="0x40" stat="pAtkSpd" val="0.1" />
<share order="0x40" stat="mAtkSpd" val="0.03" />
</effect>
</for>
</skill>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment