ソースを参照

BETA: Core-part for ​[DP9765].
Reviewed by: Zoey76

Adry_85 12 年 前
コミット
291a971234

+ 2 - 6
L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2CharacterAI.java

@@ -825,11 +825,7 @@ public class L2CharacterAI extends AbstractAI
 		{
 			setTarget(null);
 			
-			if (getIntention() == AI_INTENTION_INTERACT)
-			{
-				setIntention(AI_INTENTION_ACTIVE);
-			}
-			else if (getIntention() == AI_INTENTION_PICK_UP)
+			if ((getIntention() == AI_INTENTION_INTERACT) || (getIntention() == AI_INTENTION_PICK_UP))
 			{
 				setIntention(AI_INTENTION_ACTIVE);
 			}
@@ -1339,7 +1335,7 @@ public class L2CharacterAI extends AbstractAI
 						{
 							rootSkills.add(sk);
 						}
-						else if (sk.hasEffectType(L2EffectType.CONFUSION, L2EffectType.FEAR))
+						else if (sk.hasEffectType(L2EffectType.FEAR))
 						{
 							debuffSkills.add(sk);
 						}

+ 5 - 0
L2J_Server_BETA/java/com/l2jserver/gameserver/engines/DocumentBase.java

@@ -100,6 +100,7 @@ import com.l2jserver.gameserver.model.conditions.ConditionTargetClassIdRestricti
 import com.l2jserver.gameserver.model.conditions.ConditionTargetInvSize;
 import com.l2jserver.gameserver.model.conditions.ConditionTargetLevel;
 import com.l2jserver.gameserver.model.conditions.ConditionTargetLevelRange;
+import com.l2jserver.gameserver.model.conditions.ConditionTargetMyPartyExceptMe;
 import com.l2jserver.gameserver.model.conditions.ConditionTargetNpcId;
 import com.l2jserver.gameserver.model.conditions.ConditionTargetNpcType;
 import com.l2jserver.gameserver.model.conditions.ConditionTargetPlayable;
@@ -825,6 +826,10 @@ public abstract class DocumentBase
 					cond = joinAnd(cond, new ConditionTargetLevelRange(lvlRange));
 				}
 			}
+			else if ("myPartyExceptMe".equalsIgnoreCase(a.getNodeName()))
+			{
+				cond = joinAnd(cond, new ConditionTargetMyPartyExceptMe(Boolean.parseBoolean(a.getNodeValue())));
+			}
 			else if ("playable".equalsIgnoreCase(a.getNodeName()))
 			{
 				cond = joinAnd(cond, new ConditionTargetPlayable());

+ 2 - 7
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

@@ -9351,7 +9351,7 @@ public final class L2PcInstance extends L2Playable
 			}
 		}
 		
-		if (skill.getSkillType() == L2SkillType.INSTANT_JUMP)
+		if (skill.hasEffectType(L2EffectType.TELEPORT_TO_TARGET))
 		{
 			// You cannot jump while rooted right ;)
 			if (isMovementDisabled())
@@ -9360,10 +9360,8 @@ public final class L2PcInstance extends L2Playable
 				SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED);
 				sm.addSkillName(skill.getId());
 				sendPacket(sm);
-				
 				// Send a Server->Client packet ActionFailed to the L2PcInstance
 				sendPacket(ActionFailed.STATIC_PACKET);
-				
 				return false;
 			}
 			// And this skill cannot be used in peace zone, not even on NPCs!
@@ -9371,13 +9369,10 @@ public final class L2PcInstance extends L2Playable
 			{
 				// Sends a sys msg to client
 				sendPacket(SystemMessageId.TARGET_IN_PEACEZONE);
-				
 				// Send a Server->Client packet ActionFailed to the L2PcInstance
 				sendPacket(ActionFailed.STATIC_PACKET);
-				
 				return false;
 			}
-			
 		}
 		// Check if the skill is defensive
 		if (!skill.isOffensive() && target.isMonster() && !forceUse)
@@ -9642,7 +9637,7 @@ public final class L2PcInstance extends L2Playable
 	}
 	
 	/**
-	 * Set the type of Pet mounted (0 : none, 1 : Stridder, 2 : Wyvern) and send a Server->Client packet InventoryUpdate to the L2PcInstance.
+	 * Set the type of Pet mounted (0 : none, 1 : Strider, 2 : Wyvern) and send a Server->Client packet InventoryUpdate to the L2PcInstance.
 	 * @return
 	 */
 	public boolean checkLandingState()

+ 64 - 0
L2J_Server_BETA/java/com/l2jserver/gameserver/model/conditions/ConditionTargetMyPartyExceptMe.java

@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2004-2013 L2J Server
+ *
+ * This file is part of L2J Server.
+ *
+ * L2J Server 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.
+ *
+ * L2J Server 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 com.l2jserver.gameserver.model.conditions;
+
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.stats.Env;
+import com.l2jserver.gameserver.network.SystemMessageId;
+import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
+
+/**
+ * Target My Party Except Me condition implementation.
+ * @author Adry_85
+ */
+public class ConditionTargetMyPartyExceptMe extends Condition
+{
+	private final boolean _val;
+	
+	public ConditionTargetMyPartyExceptMe(boolean val)
+	{
+		_val = val;
+	}
+	
+	@Override
+	public boolean testImpl(Env env)
+	{
+		boolean isPartyMember = true;
+		final L2PcInstance player = env.getPlayer();
+		final L2Character target = env.getTarget();
+		if ((player == null) || (target == null) || !target.isPlayer())
+		{
+			isPartyMember = false;
+		}
+		else if (player == target)
+		{
+			player.sendPacket(SystemMessageId.CANNOT_USE_ON_YOURSELF);
+			isPartyMember = false;
+		}
+		else if ((target.getParty() == null) || (player.isInParty() && target.isInParty() && (player.getParty().getLeaderObjectId() != target.getParty().getLeaderObjectId())))
+		{
+			final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED);
+			sm.addSkillName(env.getSkill());
+			player.sendPacket(sm);
+			isPartyMember = false;
+		}
+		return (_val == isPartyMember);
+	}
+}

+ 1 - 5
L2J_Server_BETA/java/com/l2jserver/gameserver/model/effects/L2EffectType.java

@@ -29,7 +29,6 @@ public enum L2EffectType
 	CHARM_OF_LUCK,
 	CHARMOFCOURAGE,
 	CLAN_GATE,
-	CONFUSION,
 	CPDAMPERCENT,
 	CPHEAL,
 	CPHEAL_OVER_TIME,
@@ -37,7 +36,6 @@ public enum L2EffectType
 	CUBIC_MASTERY,
 	DAMAGE_TRANSFER,
 	DEBUFF,
-	DISARM,
 	DISPEL,
 	DMG_OVER_TIME,
 	DMG_OVER_TIME_PERCENT,
@@ -76,7 +74,6 @@ public enum L2EffectType
 	PROTECTION_BLESSING,
 	REBALANCE_HP,
 	RELAXING,
-	REMOVE_TARGET,
 	ROOT,
 	SIGNET_EFFECT,
 	SIGNET_GROUND,
@@ -86,7 +83,6 @@ public enum L2EffectType
 	SUMMON_PET,
 	TARGET_ME,
 	TELEPORT,
-	THROW_UP,
+	TELEPORT_TO_TARGET,
 	TRANSFORMATION,
-	WARP
 }

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

@@ -64,7 +64,6 @@ public enum L2SkillType
 	DELUXE_KEY_UNLOCK,
 	SOW,
 	GET_PLAYER,
-	INSTANT_JUMP,
 	DETECTION,
 	DUMMY,
 	// Summons