Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/com/l2jserver/gameserver/model/L2Skill.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/L2Skill.java (revision 171)
- +++ java/com/l2jserver/gameserver/model/L2Skill.java (working copy)
- @@ -96,6 +96,8 @@
- TARGET_PET,
- TARGET_SUMMON,
- TARGET_AREA,
- + TARGET_AREA_FAN,
- + TARGET_AREA_SQUARE,
- TARGET_FRONT_AREA,
- TARGET_BEHIND_AREA,
- TARGET_AURA,
- @@ -216,6 +218,7 @@
- /** Target type of the skill : SELF, PARTY, CLAN, PET... */
- private final SkillTargetType _targetType;
- + private final int[] _areaParams;
- private final int _feed;
- // base success chance
- private final double _power;
- @@ -487,6 +490,26 @@
- _skillRadius = set.getInteger("skillRadius", 80);
- _targetType = set.getEnum("target", SkillTargetType.class);
- + String areaParams = set.getString("areaParams", null);
- + if (areaParams != null)
- + {
- + try
- + {
- + String [] valuesSplit = areaParams.split(",");
- + if (valuesSplit.length != 4)
- + throw new IllegalArgumentException("SkillId: "+_id+" invalid areaParams value: "+areaParams+", \"directionV(90: top, 0: front, -90: bottom), directionH(0: front, 90: right, 180: back, 270: left), distance, radius \" required");
- +
- + _areaParams = new int[4];
- + for (int i = 0; i < 4; i++)
- + _areaParams[i] = Integer.parseInt(valuesSplit[i]);
- + }
- + catch (Exception e)
- + {
- + throw new IllegalArgumentException("SkillId: "+_id+" invalid areaParams value: "+areaParams+", \"directionV(90: top, 0: front, -90: bottom), directionH(0: front, 90: right, 180: back, 270: left), distance, radius \" required");
- + }
- + }
- + else
- + _areaParams = new int[]{0,0,0,0};
- _power = set.getFloat("power", 0.f);
- _pvpPower = set.getFloat("pvpPower", (float)getPower());
- _pvePower = set.getFloat("pvePower", (float)getPower());
- @@ -645,6 +668,19 @@
- return _targetType;
- }
- + /**
- + * Return the area parameters of the skill used for specific target area types. <br>
- + * 0: directionV
- + * 1: directionH
- + * 2: distance
- + * 3: radius
- + * @return
- + */
- + public final int[] getAreaParams()
- + {
- + return _areaParams;
- + }
- +
- public final int getCondition()
- {
- return _condition;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement