Browse Source

BETA: Datapack fixes:
* Fixing NPE for summon shots:
* Reported by: valdaron
* Removing double teleport for summons.
* Core already teleport the summon when teleporting the player!

Patch by: UnAfraid

Zoey76 12 years ago
parent
commit
928ff8bc95

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminInstance.java

@@ -104,13 +104,6 @@ public class AdminInstance implements IAdminCommandHandler
 					L2PcInstance player = (L2PcInstance) target;
 					player.sendMessage("Admin set your instance to:" + val);
 					player.teleToLocation(player.getX(), player.getY(), player.getZ());
-					L2Summon pet = player.getSummon();
-					if (player.hasSummon())
-					{
-						player.getSummon().setInstanceId(val);
-						player.getSummon().teleToLocation(player.getSummon().getLocation(), false);
-						player.sendMessage("Admin set " + pet.getName() + "'s instance to:" + val);
-					}
 				}
 				activeChar.sendMessage("Moved " + target.getName() + " to instance " + target.getInstanceId() + ".");
 				return true;

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/itemhandlers/BeastSoulShot.java

@@ -42,7 +42,7 @@ public class BeastSoulShot implements IItemHandler
 		}
 		
 		final L2PcInstance activeOwner = playable.getActingPlayer();
-		if (activeOwner.hasSummon())
+		if (!activeOwner.hasSummon())
 		{
 			activeOwner.sendPacket(SystemMessageId.PETS_ARE_NOT_AVAILABLE_AT_THIS_TIME);
 			return false;

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/itemhandlers/BeastSpiritShot.java

@@ -42,7 +42,7 @@ public class BeastSpiritShot implements IItemHandler
 		}
 		
 		final L2PcInstance activeOwner = playable.getActingPlayer();
-		if (activeOwner.hasSummon())
+		if (!activeOwner.hasSummon())
 		{
 			activeOwner.sendPacket(SystemMessageId.PETS_ARE_NOT_AVAILABLE_AT_THIS_TIME);
 			return false;

+ 0 - 8
L2J_DataPack_BETA/dist/game/data/scripts/instances/SecretArea/SecretArea.java

@@ -14,7 +14,6 @@
  */
 package instances.SecretArea;
 
-import com.l2jserver.gameserver.ai.CtrlIntention;
 import com.l2jserver.gameserver.instancemanager.InstanceManager;
 import com.l2jserver.gameserver.instancemanager.InstanceManager.InstanceWorld;
 import com.l2jserver.gameserver.model.Location;
@@ -52,15 +51,8 @@ public class SecretArea extends Quest
 	
 	private void teleportPlayer(L2PcInstance player, Location loc, int instanceId)
 	{
-		player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
 		player.setInstanceId(instanceId);
 		player.teleToLocation(loc, false);
-		if (player.hasSummon())
-		{
-			player.getSummon().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
-			player.getSummon().setInstanceId(instanceId);
-			player.getSummon().teleToLocation(loc, false);
-		}
 	}
 	
 	protected void enterInstance(L2PcInstance player)