Explorar o código

BETA: Minor typo in `L2Summon` preventing siege summons to attack doors and walls.

Reported by: pandragon, Konstantinos, Maui
Zoey76 %!s(int64=11) %!d(string=hai) anos
pai
achega
c9f3f470ce

+ 5 - 5
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/L2Summon.java

@@ -1016,10 +1016,10 @@ public abstract class L2Summon extends L2Playable
 	
 	
 	/**
 	/**
 	 * Verify if the summon can perform an attack.
 	 * Verify if the summon can perform an attack.
-	 * @param ctrlPressed
-	 * @return
+	 * @param ctrlPressed {@code true} if Ctrl key is pressed
+	 * @return {@code true} if the summon can attack, {@code false} otherwise
 	 */
 	 */
-	public boolean canAttack(boolean ctrlPressed)
+	public final boolean canAttack(boolean ctrlPressed)
 	{
 	{
 		if (getOwner() == null)
 		if (getOwner() == null)
 		{
 		{
@@ -1106,8 +1106,8 @@ public abstract class L2Summon extends L2Playable
 		}
 		}
 		
 		
 		// TODO: Unhardcode it.
 		// TODO: Unhardcode it.
-		// Siege golems AI doesn't support attacking other than doors at the moment.
-		if ((!target.isDoor() && (npcId == L2SiegeSummonInstance.SWOOP_CANNON_ID)) || (npcId == L2SiegeSummonInstance.SIEGE_GOLEM_ID))
+		// Siege golems AI doesn't support attacking other than doors/walls at the moment.
+		if (!target.isDoor() && ((npcId == L2SiegeSummonInstance.SWOOP_CANNON_ID) || (npcId == L2SiegeSummonInstance.SIEGE_GOLEM_ID)))
 		{
 		{
 			return false;
 			return false;
 		}
 		}

+ 0 - 11
L2J_Server_BETA/java/com/l2jserver/gameserver/model/skills/l2skills/L2SkillSummon.java

@@ -40,8 +40,6 @@ public class L2SkillSummon extends L2Skill
 	// How much time is lost per second of activity (fighting)
 	// How much time is lost per second of activity (fighting)
 	private final int _summonTimeLostActive;
 	private final int _summonTimeLostActive;
 	
 	
-	// item consume time in milliseconds
-	private final int _itemConsumeTime;
 	// item consume count over time
 	// item consume count over time
 	private final int _itemConsumeOT;
 	private final int _itemConsumeOT;
 	// item consume id over time
 	// item consume id over time
@@ -64,7 +62,6 @@ public class L2SkillSummon extends L2Skill
 		
 		
 		_itemConsumeOT = set.getInt("itemConsumeCountOT", 0);
 		_itemConsumeOT = set.getInt("itemConsumeCountOT", 0);
 		_itemConsumeIdOT = set.getInt("itemConsumeIdOT", 0);
 		_itemConsumeIdOT = set.getInt("itemConsumeIdOT", 0);
-		_itemConsumeTime = set.getInt("itemConsumeTime", 0);
 		_itemConsumeSteps = set.getInt("itemConsumeSteps", 0);
 		_itemConsumeSteps = set.getInt("itemConsumeSteps", 0);
 		
 		
 		_inheritElementals = set.getBoolean("inheritElementals", false);
 		_inheritElementals = set.getBoolean("inheritElementals", false);
@@ -164,14 +161,6 @@ public class L2SkillSummon extends L2Skill
 		return _itemConsumeSteps;
 		return _itemConsumeSteps;
 	}
 	}
 	
 	
-	/**
-	 * @return Returns the itemConsume time in milliseconds.
-	 */
-	public final int getItemConsumeTime()
-	{
-		return _itemConsumeTime;
-	}
-	
 	public final float getExpPenalty()
 	public final float getExpPenalty()
 	{
 	{
 		return _expPenalty;
 		return _expPenalty;