2
0
Эх сурвалжийг харах

Moving spoil functions from L2Npc to L2Attackable

_DS_ 15 жил өмнө
parent
commit
3e5719785d

+ 31 - 0
L2_GameServer/java/com/l2jserver/gameserver/model/actor/L2Attackable.java

@@ -270,6 +270,11 @@ public class L2Attackable extends L2Npc
 
 	private boolean _mustGiveExpSp;
 
+	/** True if a Dwarf has used Spoil on this L2NpcInstance */
+	private boolean _isSpoil = false;
+
+	private int _isSpoiledBy = 0;
+
 	/**
 	 * Constructor of L2Attackable (use L2Character and L2NpcInstance constructor).
 	 *
@@ -2363,6 +2368,32 @@ public class L2Attackable extends L2Npc
 		}
 	}
 
+	/**
+	 * Return True if this L2NpcInstance has drops that can be sweeped.<BR><BR>
+	 */
+	public boolean isSpoil()
+	{
+		return _isSpoil;
+	}
+
+	/**
+	 * Set the spoil state of this L2NpcInstance.<BR><BR>
+	 */
+	public void setSpoil(boolean isSpoil)
+	{
+		_isSpoil = isSpoil;
+	}
+
+	public final int getIsSpoiledBy()
+	{
+		return _isSpoiledBy;
+	}
+
+	public final void setIsSpoiledBy(int value)
+	{
+		_isSpoiledBy = value;
+	}
+
 	/**
 	 * Sets state of the mob to seeded. Paramets needed to be set before.
 	 */

+ 0 - 31
L2_GameServer/java/com/l2jserver/gameserver/model/actor/L2Npc.java

@@ -136,9 +136,6 @@ public class L2Npc extends L2Character
 	/** True if endDecayTask has already been called */
 	volatile boolean _isDecayed = false;
 
-	/** True if a Dwarf has used Spoil on this L2NpcInstance */
-	private boolean _isSpoil = false;
-
 	/** The castle index in the array of L2Castle this L2NpcInstance belongs to */
 	private int _castleIndex = -2;
 
@@ -148,8 +145,6 @@ public class L2Npc extends L2Character
 	public boolean isEventMob = false;
 	private boolean _isInTown = false;
 
-	private int _isSpoiledBy = 0;
-
 	/** Time of last social packet broadcast*/
 	private long _lastSocialBroadcast = 0;
 
@@ -890,32 +885,6 @@ public class L2Npc extends L2Character
 		return _currentEnchant;
 	}
 
-	/**
-	 * Return True if this L2NpcInstance has drops that can be sweeped.<BR><BR>
-	 */
-	public boolean isSpoil()
-	{
-		return _isSpoil;
-	}
-
-	/**
-	 * Set the spoil state of this L2NpcInstance.<BR><BR>
-	 */
-	public void setSpoil(boolean isSpoil)
-	{
-		_isSpoil = isSpoil;
-	}
-
-	public final int getIsSpoiledBy()
-	{
-		return _isSpoiledBy;
-	}
-
-	public final void setIsSpoiledBy(int value)
-	{
-		_isSpoiledBy = value;
-	}
-
 	/**
 	 * Return the busy status of this L2NpcInstance.<BR><BR>
 	 */