Selaa lähdekoodia

Fix #4753 #4754.
Remove old suppresses.

JIV 15 vuotta sitten
vanhempi
sitoutus
538668178c

+ 2 - 2
L2_GameServer/.settings/org.eclipse.jdt.core.prefs

@@ -1,4 +1,4 @@
-#Fri Jul 02 18:24:51 CEST 2010
+#Fri Jul 02 18:34:10 CEST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.codeComplete.argumentPrefixes=
 org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0

+ 0 - 1
L2_GameServer/java/com/l2jserver/Base64.java

@@ -872,7 +872,6 @@ public class Base64
 	 * @return The decoded and deserialized object
 	 * @since 1.5
 	 */
-	@SuppressWarnings("null")
 	public static Object decodeToObject(String encodedObject)
 	{
 		// Decode and gunzip if necessary

+ 1 - 1
L2_GameServer/java/com/l2jserver/gameserver/Item.java

@@ -33,7 +33,7 @@ public class Item
 {
 	public int id;
 	
-	@SuppressWarnings({ "unchecked", "rawtypes" })
+	@SuppressWarnings({ "rawtypes" })
     public Enum type;
 	
 	public String name;

+ 1 - 1
L2_GameServer/java/com/l2jserver/gameserver/cache/FastMRUCache.java

@@ -25,7 +25,7 @@ import javolution.util.FastMap;
  * @author Layane
  *
  */
-@SuppressWarnings({ "unchecked", "rawtypes" })
+@SuppressWarnings({ "rawtypes" })
 public class FastMRUCache<K, V> extends FastCollection implements Reusable
 {
 	/**

+ 1 - 1
L2_GameServer/java/com/l2jserver/gameserver/model/L2ItemInstance.java

@@ -518,7 +518,7 @@ public final class L2ItemInstance extends L2Object
 	 * Returns the type of item
 	 * @return Enum
 	 */
-	@SuppressWarnings({ "unchecked", "rawtypes" })
+	@SuppressWarnings({ "rawtypes" })
     public Enum getItemType()
 	{
 		return _item.getItemType();

+ 3 - 3
L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

@@ -10044,6 +10044,9 @@ public final class L2PcInstance extends L2Playable
     {
 		if (_olympiadGameId == -1)
 			return;
+		_olympiadGameId = -1;
+		_observerMode = false;
+        Olympiad.removeSpectator(_olympiadGameId, this);
 		setTarget(null);
 		sendPacket(new ExOlympiadMode(0));
         teleToLocation(_obsX, _obsY, _obsZ, true);
@@ -10054,9 +10057,6 @@ public final class L2PcInstance extends L2Playable
 			setIsInvul(false);
 		if (getAI() != null)
             getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
-        Olympiad.removeSpectator(_olympiadGameId, this);
-        _olympiadGameId = -1;
-        _observerMode = false;
         setObserverCords(0, 0, 0);
 		broadcastUserInfo();
     }

+ 3 - 1
L2_GameServer/java/com/l2jserver/gameserver/model/actor/stat/PetStat.java

@@ -108,10 +108,12 @@ public class PetStat extends SummonStat
     @Override
 	public void setLevel(byte value)
     {
+    	getActiveChar().setPetData(PetDataTable.getInstance().getPetData(getActiveChar().getTemplate().npcId, value));
+    	if (getActiveChar().getPetData() == null)
+    		throw new IllegalArgumentException("No pet data for npc: "+getActiveChar().getTemplate().npcId+" level: "+value);
         getActiveChar().stopFeed();
         super.setLevel(value);
 
-        getActiveChar().setPetData(PetDataTable.getInstance().getPetData(getActiveChar().getTemplate().npcId, getLevel()));
         getActiveChar().startFeed();
 
         if (getActiveChar().getControlItem() != null)

+ 2 - 2
L2_GameServer/java/com/l2jserver/gameserver/templates/item/L2Item.java

@@ -167,7 +167,7 @@ public abstract class L2Item
 
 	private final boolean _pvpItem;
 
-	@SuppressWarnings({ "unchecked", "rawtypes" })
+	@SuppressWarnings({ "rawtypes" })
 	protected final Enum _type;
 	
 	protected Elementals _elementals = null;
@@ -232,7 +232,7 @@ public abstract class L2Item
 	 * Returns the itemType.
 	 * @return Enum
 	 */
-	@SuppressWarnings({ "unchecked", "rawtypes" })
+	@SuppressWarnings({ "rawtypes" })
 	public Enum getItemType()
 	{
 		return _type;

+ 1 - 1
L2_GameServer/java/com/l2jserver/gameserver/templates/item/L2WarehouseItem.java

@@ -130,7 +130,7 @@ public class L2WarehouseItem
 	 * Returns the second type
 	 * @return int
 	 */
-	@SuppressWarnings({ "unchecked", "rawtypes" })
+	@SuppressWarnings({ "rawtypes" })
 	public final Enum getItemType()
 	{
 		return _item.getItemType();