소스 검색

BETA: Core-Part for [DP10186].
* Reviewed by: Adry_85, malyelfik, Nos, !UnAfraid

St3eT 11 년 전
부모
커밋
8da2ca1e6c

+ 1 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2FortSiegeGuardAI.java

@@ -37,7 +37,6 @@ import com.l2jserver.gameserver.model.actor.L2Playable;
 import com.l2jserver.gameserver.model.actor.L2Summon;
 import com.l2jserver.gameserver.model.actor.instance.L2DefenderInstance;
 import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
-import com.l2jserver.gameserver.model.actor.instance.L2FortBallistaInstance;
 import com.l2jserver.gameserver.model.actor.instance.L2FortCommanderInstance;
 import com.l2jserver.gameserver.model.actor.instance.L2NpcInstance;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -127,7 +126,7 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
 	private boolean autoAttackCondition(L2Character target)
 	{
 		// Check if the target isn't another guard, folk or a door
-		if ((target == null) || (target instanceof L2DefenderInstance) || (target instanceof L2NpcInstance) || (target instanceof L2DoorInstance) || target.isAlikeDead() || (target instanceof L2FortBallistaInstance) || (target instanceof L2FortCommanderInstance) || (target instanceof L2Playable))
+		if ((target == null) || (target instanceof L2DefenderInstance) || (target instanceof L2NpcInstance) || (target instanceof L2DoorInstance) || target.isAlikeDead() || (target instanceof L2FortCommanderInstance) || (target instanceof L2Playable))
 		{
 			L2PcInstance player = null;
 			if (target instanceof L2PcInstance)

+ 0 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/enums/InstanceType.java

@@ -81,7 +81,6 @@ public enum InstanceType
 	L2SiegeFlagInstance(L2Npc),
 	L2SiegeNpcInstance(L2Npc),
 	// Fort Siege
-	L2FortBallistaInstance(L2Npc),
 	L2FortCommanderInstance(L2DefenderInstance),
 	// Castle NPCs
 	L2CastleMagicianInstance(L2NpcInstance),

+ 1 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/FortSiegeGuardManager.java

@@ -30,7 +30,6 @@ import javolution.util.FastMap;
 import com.l2jserver.L2DatabaseFactory;
 import com.l2jserver.gameserver.datatables.NpcData;
 import com.l2jserver.gameserver.model.L2Spawn;
-import com.l2jserver.gameserver.model.actor.instance.L2FortBallistaInstance;
 import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
 import com.l2jserver.gameserver.model.entity.Fort;
 
@@ -60,7 +59,7 @@ public final class FortSiegeGuardManager
 				for (L2Spawn spawnDat : monsterList)
 				{
 					spawnDat.doSpawn();
-					if (spawnDat.getLastSpawn() instanceof L2FortBallistaInstance)
+					if (spawnDat.getRespawnDelay() == 0)
 					{
 						spawnDat.stopRespawn();
 					}

+ 0 - 107
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2FortBallistaInstance.java

@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2004-2014 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.actor.instance;
-
-import com.l2jserver.Config;
-import com.l2jserver.gameserver.ai.CtrlIntention;
-import com.l2jserver.gameserver.enums.InstanceType;
-import com.l2jserver.gameserver.model.actor.L2Character;
-import com.l2jserver.gameserver.model.actor.L2Npc;
-import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
-import com.l2jserver.gameserver.network.SystemMessageId;
-import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
-
-public class L2FortBallistaInstance extends L2Npc
-{
-	public L2FortBallistaInstance(int objectId, L2NpcTemplate template)
-	{
-		super(objectId, template);
-		setInstanceType(InstanceType.L2FortBallistaInstance);
-	}
-	
-	@Override
-	public boolean isAutoAttackable(L2Character attacker)
-	{
-		return true;
-	}
-	
-	@Override
-	public boolean doDie(L2Character killer)
-	{
-		if (!super.doDie(killer))
-		{
-			return false;
-		}
-		
-		if (getFort().getSiege().getIsInProgress())
-		{
-			if (killer instanceof L2PcInstance)
-			{
-				L2PcInstance player = ((L2PcInstance) killer);
-				if ((player.getClan() != null) && (player.getClan().getLevel() >= 5))
-				{
-					player.getClan().addReputationScore(Config.BALLISTA_POINTS, true);
-					player.sendPacket(SystemMessageId.BALLISTA_DESTROYED_CLAN_REPU_INCREASED);
-				}
-			}
-		}
-		
-		return true;
-	}
-	
-	@Override
-	public void onAction(L2PcInstance player, boolean interact)
-	{
-		if (!canTarget(player))
-		{
-			return;
-		}
-		
-		// Check if the L2PcInstance already target the L2NpcInstance
-		if (this != player.getTarget())
-		{
-			// Set the target of the L2PcInstance player
-			player.setTarget(this);
-		}
-		else if (interact)
-		{
-			if (isAutoAttackable(player) && !isAlikeDead())
-			{
-				if (Math.abs(player.getZ() - getZ()) < 600) // this max heigth difference might need some tweaking
-				{
-					player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);
-				}
-			}
-			// Calculate the distance between the L2PcInstance and the L2NpcInstance
-			if (!canInteract(player))
-			{
-				// Notify the L2PcInstance AI with AI_INTENTION_INTERACT
-				player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
-			}
-		}
-		// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
-		player.sendPacket(ActionFailed.STATIC_PACKET);
-	}
-	
-	@Override
-	public boolean hasRandomAnimation()
-	{
-		return false;
-	}
-}