All pastes #47019 Raw Edit

Keep next skill

public java v1 · immutable
#47019 ·published 2006-03-26 11:02 UTC
rendered paste body
Index: C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/L2Character.java===================================================================--- C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/L2Character.java	(revision 1670)+++ C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/L2Character.java	(working copy)@@ -4105,6 +4105,18 @@ 			 			// Notify the AI of the L2Character with EVT_FINISH_CASTING 			getAI().notifyEvent(CtrlEvent.EVT_FINISH_CASTING);+			if (this instanceof L2PcInstance)  +			{  +				L2PcInstance player = ((L2PcInstance)this);  +				L2Skill nextskill = player.GetNextSkill();  +				if (nextskill != null)  +				{  +					boolean fu = player.GetNextSkillFU();  +					boolean dm = player.GetNextSkillDM();  +					player.useMagic(nextskill,fu,dm);  +					player.SetNextSkill(null);  +				}  +			}   		} 	} 	Index: C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java===================================================================--- C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 1670)+++ C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)@@ -497,6 +497,12 @@ 	private boolean _inCrystallize; 	private boolean _inCraftMode; 	+	//Keep next skill+	private L2Skill _nextSkill = null;  +	private boolean _fu;  +	private boolean _dm;  ++	 	/** 	 * Create a new L2PcInstance and add it in the characters table of the database.<BR><BR> 	 *@@ -5067,7 +5073,13 @@ 				return; 			} 		}-		+		if (isCastingNow())//add skill to the Quen +		{ +			_nextSkill = skill; +			_fu = forceUse; +			_dm = dontMove; +		}  + 		L2Object target = null; 		switch(skill.getTargetType()) 		{@@ -6880,7 +6892,23 @@ 	{ 		InBoatPosition = pt; 	}-	+	public L2Skill GetNextSkill() +	{ +		return _nextSkill; +	} +	public void SetNextSkill(L2Skill s) +	{ +		_nextSkill = s; +	} +	public boolean GetNextSkillFU() +	{ +		return _fu; +	} +	public boolean GetNextSkillDM() +	{ +		return _dm; +	} + 	/** 	 * Manage the delete task of a L2PcInstance (Leave Party, Unsummon pet, Save its inventory in the database, Remove it from the world...).<BR><BR> 	 *