Browse Source

BETA: Continuing with [5812]/[5813].

Zoey76 12 years ago
parent
commit
4852e3d51d

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/L2Character.java

@@ -2698,7 +2698,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
 	}
 	
 	/**
-	 * @return {@code true} if the player has a pet, {@code false} otherwise
+	 * @return {@code true} if the character has a summon, {@code false} otherwise
 	 */
 	public boolean hasSummon()
 	{
@@ -6151,7 +6151,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
 				}
 				
 				// TODO: Unhardcode it!
-				if ((oldSkill instanceof L2SkillSummon) && (oldSkill.getId() == 710) && getActingPlayer().hasSummon() && (getActingPlayer().getSummon().getNpcId() == 14870))
+				if ((oldSkill instanceof L2SkillSummon) && (oldSkill.getId() == 710) && hasSummon() && (getSummon().getNpcId() == 14870))
 				{
 					getActingPlayer().getSummon().unSummon(getActingPlayer());
 				}

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/taskmanager/AttackStanceTaskManager.java

@@ -117,7 +117,7 @@ public class AttackStanceTaskManager
 						{
 							actor.broadcastPacket(new AutoAttackStop(actor.getObjectId()));
 							actor.getAI().setAutoAttacking(false);
-							if (actor.isPlayer() && actor.getActingPlayer().hasSummon())
+							if (actor.isPlayer() && actor.hasSummon())
 							{
 								actor.getSummon().broadcastPacket(new AutoAttackStop(actor.getSummon().getObjectId()));
 							}