Pārlūkot izejas kodu

BETA: Charge skills shouldn't be able to be cast while movement is disabled (it was broken in [L5501] ). Thanks Tavo22 for reporting.

nik 12 gadi atpakaļ
vecāks
revīzija
998aef6fcb

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/EnemyCharge.java

@@ -47,6 +47,9 @@ public class EnemyCharge extends L2Effect
 	@Override
 	public boolean onStart()
 	{
+		if (getEffected().isMovementDisabled())
+			return false;
+		
 		// Get current position of the L2Character
 		final int curX = getEffector().getX();
 		final int curY = getEffector().getY();

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/Pdam.java

@@ -48,6 +48,14 @@ public class Pdam implements ISkillHandler
 		if (activeChar.isAlikeDead())
 			return;
 		
+		if ((skill.getFlyRadius() > 0 || skill.getFlyType() != null) && activeChar.isMovementDisabled())
+		{
+			SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED);
+			sm.addSkillName(skill);
+			activeChar.sendPacket(sm);
+			return;
+		}
+		
 		int damage = 0;
 		
 		if (Config.DEBUG)