A Project for Chronicle 4 based on L2JServer.


    Retail operative types in skills

    Share

    micr0

    Posts : 72
    Join date : 2013-01-23
    Age : 23
    Location : Bulgaria

    Retail operative types in skills

    Post  micr0 on 29th March 2013, 18:42

    hi guys and girl Razz next Rework Razz

    old operative types its work need me more time to create full retail Operative Types for all skills Smile

    • A1 = Active Skill with "Instant Effect" (for example damage skills heal/pdam/mdam/cpdam skills).
    • A2 = Active Skill with "Continuous effect + Instant effect" (for example buff/debuff or damage/heal over time skills)
    • A3 = Active Skill with "Instant effect + Continuous effect"
    • P = Passive Skill
    • T = Toggle Skill


    Code:
    ### Eclipse Workspace Patch 1.0
    #P Lisvus_GameServer
    Index: java/net/sf/l2j/gameserver/model/L2Skill.java
    ===================================================================
    --- java/net/sf/l2j/gameserver/model/L2Skill.java   (revision 358)
    +++ java/net/sf/l2j/gameserver/model/L2Skill.java   (working copy)
    @@ -42,6 +42,7 @@
     import net.sf.l2j.gameserver.skills.BaseStats;
     import net.sf.l2j.gameserver.skills.Env;
     import net.sf.l2j.gameserver.skills.Formulas;
    +import net.sf.l2j.gameserver.skills.L2SkillOpType;
     import net.sf.l2j.gameserver.skills.Stats;
     import net.sf.l2j.gameserver.skills.conditions.Condition;
     import net.sf.l2j.gameserver.skills.effects.EffectTemplate;
    @@ -81,11 +82,6 @@
        public static final int SKILL_FAKE_DEX = 9005;
        public static final int SKILL_FAKE_STR = 9006;
     
    -    public static enum SkillOpType
    -    {
    -        OP_PASSIVE, OP_ACTIVE, OP_TOGGLE
    -    }
    -
        /** Target types of skills : SELF, PARTY, CLAN, PET... */
        public static enum SkillTargetType
        {
    @@ -342,7 +338,7 @@
     
        // not needed, just for easier debug
        private final String _name;
    -    private final SkillOpType _operateType;
    +   private final L2SkillOpType _operateType;
        private final boolean _magic;
        private final int _mpConsume;
        private final int _mpInitialConsume;
    @@ -437,7 +433,7 @@
     
            _displayId = set.getInteger("displayId", _id);
            _name = set.getString("name");
    -        _operateType = set.getEnum("operateType", SkillOpType.class);
    +      _operateType = set.getEnum("operateType", L2SkillOpType.class);
            _magic = set.getBool("isMagic", false);
            _ispotion = set.getBool("isPotion", false);
            _mpConsume = set.getInteger("mpConsume", 0);
    @@ -901,21 +897,21 @@
            return _skillRadius;
        }
     
    -    public final boolean isActive()
    -    {
    -        return _operateType == SkillOpType.OP_ACTIVE;
    -    }
    +   public final boolean isActive()
    +   {
    +      return (_operateType != null) && _operateType.isActive();
    +   }
    +   
    +   public final boolean isPassive()
    +   {
    +      return (_operateType != null) && _operateType.isPassive();
    +   }
    +   
    +   public final boolean isToggle()
    +   {
    +      return (_operateType != null) && _operateType.isToggle();
    +   }
     
    -    public final boolean isPassive()
    -    {
    -        return _operateType == SkillOpType.OP_PASSIVE;
    -    }
    -
    -    public final boolean isToggle()
    -    {
    -        return _operateType == SkillOpType.OP_TOGGLE;
    -    }
    -
        public final int getNextDanceMpCost()
        {
            return _nextDanceCost;
    Index: java/net/sf/l2j/gameserver/skills/L2SkillOpType.java
    ===================================================================
    --- java/net/sf/l2j/gameserver/skills/L2SkillOpType.java   (revision 0)
    +++ java/net/sf/l2j/gameserver/skills/L2SkillOpType.java   (revision 0)
    @@ -0,0 +1,73 @@
    +/*
    + * 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 net.sf.l2j.gameserver.skills;
    +
    +/**
    + * Documentation:<br>
    + * This enum class holds the skill operative types:
    + * <ul>
    + * <li>A1 = Active Skill with "Instant Effect" (for example damage skills heal/pdam/mdam/cpdam skills).</li>
    + * <li>A2 = Active Skill with "Continuous effect + Instant effect" (for example buff/debuff or damage/heal over time skills).</li>
    + * <li>A3 = Active Skill with "Instant effect + Continuous effect"</li>
    + * <li>P = Passive Skill</li>
    + * <li>T = Toggle Skill</li>
    + * </ul>
    + * TODO: Remove old types, keeping them for backward compatibility.
    + * @author Zoey76
    + */
    +public enum L2SkillOpType
    +{
    +   A1,
    +   A2,
    +   A3,
    +   P,
    +   T,
    +   OP_ACTIVE,
    +   OP_PASSIVE,
    +   OP_TOGGLE;
    +   
    +   /**
    +    * @return {@code true} if the operative skill type is active, {@code false} otherwise.
    +    */
    +   public boolean isActive()
    +   {
    +      switch (this)
    +      {
    +         case A1:
    +         case A2:
    +         case A3:
    +         case OP_ACTIVE:
    +            return true;
    +         default:
    +            return false;
    +      }
    +   }
    +   
    +   /**
    +    * @return {@code true} if the operative skill type is passive, {@code false} otherwise.
    +    */
    +   public boolean isPassive()
    +   {
    +      return (this == P) || (this == OP_PASSIVE);
    +   }
    +   
    +   /**
    +    * @return {@code true} if the operative skill type is toggle, {@code false} otherwise.
    +    */
    +   public boolean isToggle()
    +   {
    +      return (this == T) || (this == OP_TOGGLE);
    +   }
    +}
    \ No newline at end of file

    for now all Active Skill its A1 Active Skill and all Passive its P
    will add in this topic all new change for more retail in skills Razz

    http://www.2shared.com/file/ZzPQcHlq/patch2.html

      Current date/time is 24th September 2017, 11:36