content: /**
   * This file is part of Aion-Lightning <aion-lightning.org>.
   *
   *  Aion-Lightning 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.
   *
   *  Aion-Lightning 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 Aion-Lightning.
   *  If not, see <http://www.gnu.org/licenses/>.
   */
  package com.aionemu.gameserver.model.templates.item;
  
  import java.util.ArrayList;
  import java.util.List;
  
  import javax.xml.bind.annotation.XmlAccessType;
  import javax.xml.bind.annotation.XmlAccessorType;
  import javax.xml.bind.annotation.XmlAttribute;
  import javax.xml.bind.annotation.XmlElement;
  import javax.xml.bind.annotation.XmlRootElement;
  
  /**
   * @author ATracer
   * @reworked Kill3r
   */
  @XmlAccessorType(XmlAccessType.NONE)
  @XmlRootElement(name = "Stigma")
  public class Stigma {
  
  	@XmlElement(name = "require_skill")
  	protected List<RequireSkill> requireSkill;
  	@XmlAttribute
  	protected List<String> skill;
  	@XmlAttribute
  	protected int kinah;
  
  	/**
  	 * @return list
  	 */
  	public List<StigmaSkill> getSkills() {
  		List<StigmaSkill> list = new ArrayList<StigmaSkill>();
  		for (String st : skill) {
  			String[] array = st.split(":");
  			list.add(new StigmaSkill(Integer.parseInt(array[0]), Integer.parseInt(array[1])));
  		}
  
  		return list;
  	}
  
  	public List<Integer> getSkillIdOnly() {
  		List<Integer> ids = new ArrayList<Integer>();
  		List<String> skill = this.skill;
  		if (skill.size() != 1) { // Dual Skills like Exhausting Wave
  			String[] tempArray = new String[0];
  			for (String parts : skill) { // loops each of the 1:534 and 1:4342
  				tempArray = parts.split(":");
  				ids.add(Integer.parseInt(tempArray[1]));
  			}
  			return ids;
  		}
  
  		// Single 1 Skill
  		for (String st : this.skill) {
  			String[] array = st.split(":");
  			ids.add(Integer.parseInt(array[1]));
  		}
  		return ids;
  	}
  
  	/**
  	 * @return the kinah //4.8
  	 */
  	public int getKinah() {
  		return kinah;
  	}
  
  	public List<RequireSkill> getRequireSkill() {
  		if (requireSkill == null) {
  			requireSkill = new ArrayList<RequireSkill>();
  		}
  		return this.requireSkill;
  	}
  
  	public static class StigmaSkill {
  
  		private int skillId;
  		private int skillLvl;
  
  		public StigmaSkill(int skillLvl, int skillId) {
  			this.skillId = skillId;
  			this.skillLvl = skillLvl;
  		}
  
  		public int getSkillLvl() {
  			return this.skillLvl;
  		}
  
  		public int getSkillId() {
  			return this.skillId;
  		}
  	}
  }
  