Ver código fonte

BETA: Pets shouldn't be include in master-servitor buff sharing.

Reported by: Tavo22
Zoey76 11 anos atrás
pai
commit
30f7157610

+ 12 - 12
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/SpawnTable.java

@@ -31,6 +31,9 @@ import java.util.logging.Logger;
 import javolution.util.FastMap;
 import javolution.util.FastSet;
 
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
 import com.l2jserver.Config;
 import com.l2jserver.L2DatabaseFactory;
 import com.l2jserver.gameserver.engines.DocumentParser;
@@ -41,9 +44,6 @@ import com.l2jserver.gameserver.model.StatsSet;
 import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
 import com.l2jserver.gameserver.model.interfaces.IL2Procedure;
 
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
 /**
  * Spawn data retriever.
  * @author Zoey76
@@ -121,10 +121,10 @@ public final class SpawnTable extends DocumentParser
 						String territoryName = null;
 						
 						// Check, if spawn territory specified and exists
-						if (attrs.getNamedItem("zone") != null && ZoneManager.getInstance().getSpawnTerritory(attrs.getNamedItem("zone").getNodeValue()) != null)
+						if ((attrs.getNamedItem("zone") != null) && (ZoneManager.getInstance().getSpawnTerritory(attrs.getNamedItem("zone").getNodeValue()) != null))
 						{
 							territoryName = parseString(attrs, "zone");
-						} 
+						}
 						
 						for (Node npctag = param.getFirstChild(); npctag != null; npctag = npctag.getNextSibling())
 						{
@@ -140,13 +140,13 @@ public final class SpawnTable extends DocumentParser
 								
 								try
 								{
-									 x = parseInt(attrs, "x");
-									 y = parseInt(attrs, "y");
-									 z = parseInt(attrs, "z");
+									x = parseInt(attrs, "x");
+									y = parseInt(attrs, "y");
+									z = parseInt(attrs, "z");
 								}
 								catch (NullPointerException npe)
 								{
-									// x, y, z  can be unspecified, if this spawn is territory based, do nothing
+									// x, y, z can be unspecified, if this spawn is territory based, do nothing
 								}
 								
 								if ((x == 0) && (y == 0) && (territoryName == null)) // Both coordinates and zone are unspecified
@@ -177,7 +177,7 @@ public final class SpawnTable extends DocumentParser
 								{
 									spawnInfo.set("respawnDelay", parseInt(attrs, "respawnDelay"));
 								}
-      					
+								
 								if (attrs.getNamedItem("respawnRandom") != null)
 								{
 									spawnInfo.set("respawnRandom", parseInt(attrs, "respawnRandom"));
@@ -194,7 +194,7 @@ public final class SpawnTable extends DocumentParser
 								
 								_xmlSpawnCount += addSpawn(spawnInfo);
 							}
-						}									
+						}
 					}
 				}
 			}
@@ -216,7 +216,7 @@ public final class SpawnTable extends DocumentParser
 			while (rs.next())
 			{
 				StatsSet spawnInfo = new StatsSet();
-				int npcId = rs.getInt("npc_templateid");				
+				int npcId = rs.getInt("npc_templateid");
 				
 				// Check basic requirements first
 				if (!checkTemplate(npcId))

+ 3 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/model/L2Object.java

@@ -637,7 +637,7 @@ public abstract class L2Object implements IIdentifiable, INamable, ISpawnable, I
 	{
 		if (isCharacter())
 		{
-			this.decayMe();
+			decayMe();
 		}
 		else if (isPlayer())
 		{
@@ -667,7 +667,7 @@ public abstract class L2Object implements IIdentifiable, INamable, ISpawnable, I
 		}
 		
 		setXYZ(x, y, z);
-		this.setIsVisible(false);
+		setIsVisible(false);
 	}
 	
 	public final void setLocationInvisible(ILocational loc)
@@ -677,7 +677,7 @@ public abstract class L2Object implements IIdentifiable, INamable, ISpawnable, I
 	
 	public void updateWorldRegion()
 	{
-		if (!this.isVisible())
+		if (!isVisible())
 		{
 			return;
 		}

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/skills/L2Skill.java

@@ -1319,7 +1319,7 @@ public abstract class L2Skill implements IChanceSkillTrigger, IIdentifiable
 			effected.getEffectList().add(info);
 			
 			// Support for buff sharing feature.
-			if (addContinuousEffects && effected.isPlayer() && effected.hasSummon() && isContinuous() && !isDebuff())
+			if (addContinuousEffects && effected.isPlayer() && effected.hasServitor() && isContinuous() && !isDebuff())
 			{
 				applyEffects(effector, effected.getSummon(), false, 0);
 			}