瀏覽代碼

BETA: Reworking Fishing skills from skill handlers to effects.
* Reviewed by: Nos, Adry_85

Rumen Nikiforov 11 年之前
父節點
當前提交
00d415bc3d

+ 1 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

@@ -237,7 +237,6 @@ import com.l2jserver.gameserver.model.quest.State;
 import com.l2jserver.gameserver.model.skills.AbnormalType;
 import com.l2jserver.gameserver.model.skills.BuffInfo;
 import com.l2jserver.gameserver.model.skills.L2Skill;
-import com.l2jserver.gameserver.model.skills.L2SkillType;
 import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
 import com.l2jserver.gameserver.model.stats.Formulas;
 import com.l2jserver.gameserver.model.stats.Stats;
@@ -8721,8 +8720,6 @@ public final class L2PcInstance extends L2Playable
 	
 	private boolean checkUseMagicConditions(L2Skill skill, boolean forceUse, boolean dontMove)
 	{
-		L2SkillType sklType = skill.getSkillType();
-		
 		// ************************************* Check Player State *******************************************
 		
 		// Abnormal effects(ex : Stun, Sleep...) are checked in L2Character useMagic()
@@ -8740,7 +8737,7 @@ public final class L2PcInstance extends L2Playable
 			return false;
 		}
 		
-		if (isFishing() && ((sklType != L2SkillType.PUMPING) && (sklType != L2SkillType.REELING) && (sklType != L2SkillType.FISHING)))
+		if (isFishing() && !skill.hasEffectType(L2EffectType.FISHING, L2EffectType.FISHING_START))
 		{
 			// Only fishing skills are available
 			sendPacket(SystemMessageId.ONLY_FISHING_SKILLS_NOW);

+ 2 - 0
L2J_Server_BETA/java/com/l2jserver/gameserver/model/effects/L2EffectType.java

@@ -47,6 +47,8 @@ public enum L2EffectType
 	FAKE_DEATH,
 	FATAL_BLOW,
 	FEAR,
+	FISHING,
+	FISHING_START,
 	HATE,
 	HEAL,
 	HEAL_OVER_TIME,

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/skills/L2Skill.java

@@ -904,7 +904,7 @@ public class L2Skill implements IChanceSkillTrigger, IIdentifiable
 	
 	public final boolean useFishShot()
 	{
-		return ((getSkillType() == L2SkillType.PUMPING) || (getSkillType() == L2SkillType.REELING));
+		return hasEffectType(L2EffectType.FISHING);
 	}
 	
 	public int getMinPledgeClass()

+ 0 - 5
L2J_Server_BETA/java/com/l2jserver/gameserver/model/skills/L2SkillType.java

@@ -18,17 +18,12 @@
  */
 package com.l2jserver.gameserver.model.skills;
 
-
 /**
  * Skill type enumerated.
  * @author nBd
  */
 public enum L2SkillType
 {
-	// Fishing
-	FISHING,
-	PUMPING,
-	REELING,
 	// Misc
 	UNLOCK,
 	UNLOCK_SPECIAL,

+ 4 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/stats/Stats.java

@@ -186,7 +186,10 @@ public enum Stats
 	VITALITY_CONSUME_RATE("vitalityConsumeRate"),
 	
 	// Souls
-	MAX_SOULS("maxSouls");
+	MAX_SOULS("maxSouls"),
+	
+	// Fishing
+	FISHING_EXPERTISE("fishingExpertise");
 	
 	public static final int NUM_STATS = values().length;