Guest User

Untitled

a guest
May 12th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.98 KB | None | 0 0
  1. /*
  2.  * Copyright (C) 2004-2016 L2J DataPack
  3.  *
  4.  * This file is part of L2J DataPack.
  5.  *
  6.  * L2J DataPack is free software: you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation, either version 3 of the License, or
  9.  * (at your option) any later version.
  10.  *
  11.  * L2J DataPack is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14.  * General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18.  */
  19. package ai.npc.NpcBuffers;
  20.  
  21. import com.l2jserver.gameserver.model.StatsSet;
  22. import com.l2jserver.gameserver.model.holders.SkillHolder;
  23. import com.l2jserver.gameserver.model.skills.Skill;
  24. import com.l2jserver.gameserver.model.skills.targets.AffectObject;
  25. import com.l2jserver.gameserver.model.skills.targets.AffectScope;
  26.  
  27. /**
  28.  * @author UnAfraid
  29.  */
  30. public class NpcBufferSkillData
  31. {
  32.     private final SkillHolder _skill;
  33.     private final int _initialDelay;
  34.     private final int _delay;
  35.     private final AffectScope _affectScope;
  36.     private final AffectObject _affectObject;
  37.    
  38.     public NpcBufferSkillData(StatsSet set)
  39.     {
  40.         _skill = new SkillHolder(set.getInt("id"), set.getInt("level"));
  41.         _initialDelay = set.getInt("initialDelay", 0) * 1000;
  42.         _delay = set.getInt("delay") * 1000;
  43.         _affectScope = set.getEnum("affectScope", AffectScope.class);
  44.         _affectObject = set.getEnum("affectObject", AffectObject.class);
  45.     }
  46.    
  47.     public Skill getSkill()
  48.     {
  49.         return _skill.getSkill();
  50.     }
  51.    
  52.     public int getInitialDelay()
  53.     {
  54.         return _initialDelay;
  55.     }
  56.    
  57.     public int getDelay()
  58.     {
  59.         return _delay;
  60.     }
  61.    
  62.     public AffectScope getAffectScope()
  63.     {
  64.         return _affectScope;
  65.     }
  66.    
  67.     public AffectObject getAffectObject()
  68.     {
  69.         return _affectObject;
  70.     }
  71. }
Add Comment
Please, Sign In to add comment