Make use of onAttack with Skill parameter for some scripts.
Thanks to petryxa.
This commit is contained in:
		| @@ -33,6 +33,7 @@ import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.item.type.WeaponType; | ||||
| import org.l2jmobius.gameserver.model.siege.Castle; | ||||
| import org.l2jmobius.gameserver.model.siege.Fort; | ||||
| import org.l2jmobius.gameserver.model.skill.Skill; | ||||
|  | ||||
| import ai.AbstractNpcAI; | ||||
|  | ||||
| @@ -210,14 +211,14 @@ public class SiegeGuards extends AbstractNpcAI | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon) | ||||
| 	public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) | ||||
| 	{ | ||||
| 		if ((attacker.getSiegeState() == 2) && !attacker.isRegisteredOnThisSiegeField(npc.getScriptValue())) | ||||
| 		{ | ||||
| 			((Attackable) npc).stopHating(attacker); | ||||
| 			return null; | ||||
| 		} | ||||
| 		return super.onAttack(npc, attacker, damage, isSummon); | ||||
| 		return super.onAttack(npc, attacker, damage, isSummon, skill); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment