Store mount enabled skill list on a separate class.
This commit is contained in:
		@@ -0,0 +1,37 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 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 com.l2jmobius.gameserver.model.skills;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author Mobius
 | 
			
		||||
 */
 | 
			
		||||
public class MountEnabledSkillList
 | 
			
		||||
{
 | 
			
		||||
	private final static List<Integer> ENABLED_SKILLS = new ArrayList<>(2);
 | 
			
		||||
	{
 | 
			
		||||
		ENABLED_SKILLS.add(4289); // Wyvern Breath
 | 
			
		||||
		ENABLED_SKILLS.add(325); // Strider Siege Assault
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	public static boolean contains(int skillId)
 | 
			
		||||
	{
 | 
			
		||||
		return ENABLED_SKILLS.contains(skillId);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -209,13 +209,6 @@ public final class Skill implements IIdentifiable
 | 
			
		||||
	private final SkillBuffType _buffType;
 | 
			
		||||
	private final boolean _displayInList;
 | 
			
		||||
	
 | 
			
		||||
	private final static List<Integer> MOUNT_ENABLED_SKILLS = new ArrayList<>(2);
 | 
			
		||||
	static
 | 
			
		||||
	{
 | 
			
		||||
		MOUNT_ENABLED_SKILLS.add(4289); // Wyvern Breath
 | 
			
		||||
		MOUNT_ENABLED_SKILLS.add(325); // Strider Siege Assault
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	public Skill(StatsSet set)
 | 
			
		||||
	{
 | 
			
		||||
		_id = set.getInt(".id");
 | 
			
		||||
@@ -1071,7 +1064,7 @@ public final class Skill implements IIdentifiable
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		if (activeChar.isPlayer() && activeChar.getActingPlayer().isMounted() && isBad() && !MOUNT_ENABLED_SKILLS.contains(_id))
 | 
			
		||||
		if (activeChar.isPlayer() && activeChar.getActingPlayer().isMounted() && isBad() && !MountEnabledSkillList.contains(_id))
 | 
			
		||||
		{
 | 
			
		||||
			final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
 | 
			
		||||
			sm.addSkillName(_id);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user