Support for knockback chain skills.
This commit is contained in:
@@ -168,6 +168,7 @@ public final class Config
|
||||
public static boolean SUBCLASS_STORE_SKILL_COOLTIME;
|
||||
public static boolean SUMMON_STORE_SKILL_COOLTIME;
|
||||
public static long EFFECT_TICK_RATIO;
|
||||
public static boolean ENABLE_ALTER_SKILLS;
|
||||
public static boolean LIFE_CRYSTAL_NEEDED;
|
||||
public static boolean ES_SP_BOOK_NEEDED;
|
||||
public static boolean DIVINE_SP_BOOK_NEEDED;
|
||||
@@ -1460,6 +1461,7 @@ public final class Config
|
||||
SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false);
|
||||
SUMMON_STORE_SKILL_COOLTIME = Character.getBoolean("SummonStoreSkillCooltime", true);
|
||||
EFFECT_TICK_RATIO = Character.getLong("EffectTickRatio", 666);
|
||||
ENABLE_ALTER_SKILLS = Character.getBoolean("EnableAlterSkills", true);
|
||||
LIFE_CRYSTAL_NEEDED = Character.getBoolean("LifeCrystalNeeded", true);
|
||||
ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true);
|
||||
DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true);
|
||||
|
@@ -269,6 +269,7 @@ import com.l2jmobius.gameserver.network.serverpackets.ConfirmDlg;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExAbnormalStatusUpdateFromTarget;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExAdenaInvenCount;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExAutoSoulShot;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExDuelUpdateUserInfo;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExGetBookMarkInfoPacket;
|
||||
@@ -751,6 +752,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
/** Skills queued because a skill is already in progress */
|
||||
private SkillUseHolder _queuedSkill;
|
||||
private boolean _alterSkillActive = false;
|
||||
|
||||
private int _cursedWeaponEquippedId = 0;
|
||||
private boolean _combatFlagEquippedId = false;
|
||||
@@ -8304,6 +8306,13 @@ public final class L2PcInstance extends L2Playable
|
||||
skill = attachedSkill;
|
||||
}
|
||||
|
||||
// Alter skills
|
||||
if (_alterSkillActive)
|
||||
{
|
||||
sendPacket(new ExAlterSkillRequest(null, -1, -1, -1));
|
||||
_alterSkillActive = false;
|
||||
}
|
||||
|
||||
// ************************************* Check Player State *******************************************
|
||||
|
||||
// Abnormal effects(ex : Stun, Sleep...) are checked in L2Character useMagic()
|
||||
@@ -11243,6 +11252,16 @@ public final class L2PcInstance extends L2Playable
|
||||
_queuedSkill = new SkillUseHolder(queuedSkill, item, ctrlPressed, shiftPressed);
|
||||
}
|
||||
|
||||
public boolean isAlterSkillActive()
|
||||
{
|
||||
return _alterSkillActive;
|
||||
}
|
||||
|
||||
public void setAlterSkillActive(boolean alterSkillActive)
|
||||
{
|
||||
_alterSkillActive = alterSkillActive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if player is jailed, {@code false} otherwise.
|
||||
*/
|
||||
|
@@ -16,20 +16,25 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.network.PacketWriter;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
* @author UnAfraid, Mobius
|
||||
*/
|
||||
public class ExAlterSkillRequest implements IClientOutgoingPacket
|
||||
{
|
||||
private final int _currentSkillId;
|
||||
private final int _nextSkillId;
|
||||
private final int _alterTime;
|
||||
private final L2PcInstance _player;
|
||||
|
||||
public ExAlterSkillRequest(int currentSkill, int nextSkill, int alterTime)
|
||||
public ExAlterSkillRequest(L2PcInstance player, int currentSkill, int nextSkill, int alterTime)
|
||||
{
|
||||
_player = player;
|
||||
_currentSkillId = currentSkill;
|
||||
_nextSkillId = nextSkill;
|
||||
_alterTime = alterTime;
|
||||
@@ -38,10 +43,26 @@ public class ExAlterSkillRequest implements IClientOutgoingPacket
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
if (!Config.ENABLE_ALTER_SKILLS)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
OutgoingPackets.EX_ALTER_SKILL_REQUEST.writeId(packet);
|
||||
packet.writeD(_nextSkillId);
|
||||
packet.writeD(_currentSkillId);
|
||||
packet.writeD(_alterTime);
|
||||
|
||||
if (_alterTime > 0)
|
||||
{
|
||||
_player.setAlterSkillActive(true);
|
||||
ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
_player.sendPacket(new ExAlterSkillRequest(null, -1, -1, -1));
|
||||
_player.setAlterSkillActive(false);
|
||||
}, _alterTime * 1000);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user