Unhardcoded Flip Block skills.
This commit is contained in:
		| @@ -88,6 +88,7 @@ public class EffectMasterHandler | ||||
| 		Fear.class, | ||||
| 		Fishing.class, | ||||
| 		Flag.class, | ||||
| 		FlipBlock.class, | ||||
| 		FocusEnergy.class, | ||||
| 		FocusMaxEnergy.class, | ||||
| 		FocusSouls.class, | ||||
|   | ||||
							
								
								
									
										79
									
								
								L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/handlers/effecthandlers/FlipBlock.java
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/handlers/effecthandlers/FlipBlock.java
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,79 @@ | ||||
| /* | ||||
|  * 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 org.l2jmobius.gameserver.instancemanager.HandysBlockCheckerManager; | ||||
| import org.l2jmobius.gameserver.model.ArenaParticipantsHolder; | ||||
| import org.l2jmobius.gameserver.model.StatSet; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.Block; | ||||
| import org.l2jmobius.gameserver.model.conditions.Condition; | ||||
| import org.l2jmobius.gameserver.model.effects.AbstractEffect; | ||||
| import org.l2jmobius.gameserver.model.skill.BuffInfo; | ||||
|  | ||||
| /** | ||||
|  * Flip Block effect implementation. | ||||
|  * @author Mobius | ||||
|  */ | ||||
| public class FlipBlock extends AbstractEffect | ||||
| { | ||||
| 	public FlipBlock(Condition attachCond, Condition applyCond, StatSet set, StatSet params) | ||||
| 	{ | ||||
| 		super(attachCond, applyCond, set, params); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public boolean isInstant() | ||||
| 	{ | ||||
| 		return true; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public void onStart(BuffInfo info) | ||||
| 	{ | ||||
| 		final Creature effector = info.getEffector(); | ||||
| 		final Creature effected = info.getEffected(); | ||||
| 		final Block block = effected instanceof Block ? (Block) effected : null; | ||||
| 		final Player player = effector.isPlayer() ? (Player) effector : null; | ||||
| 		if ((block == null) || (player == null)) | ||||
| 		{ | ||||
| 			return; | ||||
| 		} | ||||
| 		 | ||||
| 		final int arena = player.getBlockCheckerArena(); | ||||
| 		if (arena != -1) | ||||
| 		{ | ||||
| 			final ArenaParticipantsHolder holder = HandysBlockCheckerManager.getInstance().getHolder(arena); | ||||
| 			if (holder == null) | ||||
| 			{ | ||||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			final int team = holder.getPlayerTeam(player); | ||||
| 			final int color = block.getColorEffect(); | ||||
| 			if ((team == 0) && (color == 0x00)) | ||||
| 			{ | ||||
| 				block.changeColor(player, holder, team); | ||||
| 			} | ||||
| 			else if ((team == 1) && (color == 0x53)) | ||||
| 			{ | ||||
| 				block.changeColor(player, holder, team); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -753,25 +753,31 @@ | ||||
| 	</skill> | ||||
| 	<skill id="5852" levels="1" name="Flip Block"> | ||||
| 		<!-- Flips blocks. --> | ||||
| 		<set name="icon" val="icon.skill_transform_s_attack" /> | ||||
| 		<set name="castRange" val="40" /> | ||||
| 		<set name="effectRange" val="400" /> | ||||
| 		<set name="hitTime" val="1000" /> | ||||
| 		<set name="icon" val="icon.skill_transform_s_attack" /> | ||||
| 		<set name="magicLevel" val="80" /> | ||||
| 		<set name="operateType" val="A1" /> | ||||
| 		<set name="reuseDelay" val="2000" /> | ||||
| 		<set name="targetType" val="ONE" /> | ||||
| 		<for> | ||||
| 			<effect name="FlipBlock" /> | ||||
| 		</for> | ||||
| 	</skill> | ||||
| 	<skill id="5853" levels="1" name="Flip Block"> | ||||
| 		<!-- Flips blocks. --> | ||||
| 		<set name="icon" val="icon.skill_transform_s_attack" /> | ||||
| 		<set name="castRange" val="40" /> | ||||
| 		<set name="effectRange" val="400" /> | ||||
| 		<set name="hitTime" val="1000" /> | ||||
| 		<set name="icon" val="icon.skill_transform_s_attack" /> | ||||
| 		<set name="magicLevel" val="80" /> | ||||
| 		<set name="operateType" val="A1" /> | ||||
| 		<set name="reuseDelay" val="2000" /> | ||||
| 		<set name="targetType" val="ONE" /> | ||||
| 		<for> | ||||
| 			<effect name="FlipBlock" /> | ||||
| 		</for> | ||||
| 	</skill> | ||||
| 	<skill id="5854" levels="1" name="Decrease Speed"> | ||||
| 		<!-- Speed is decreased. --> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment