Ver Fonte

BETA: Minor cleanup and reducing object creation.

Zoey76 há 11 anos atrás
pai
commit
30c8b92f60

+ 1 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/tasks/character/FlyToLocationTask.java

@@ -46,9 +46,7 @@ public final class FlyToLocationTask implements Runnable
 	{
 		if (_character != null)
 		{
-			final FlyType flyType;
-			flyType = FlyType.valueOf(_skill.getFlyType());
-			_character.broadcastPacket(new FlyToLocation(_character, _target, flyType));
+			_character.broadcastPacket(new FlyToLocation(_character, _target, FlyType.valueOf(_skill.getFlyType())));
 			_character.setXYZ(_target.getX(), _target.getY(), _target.getZ());
 		}
 	}

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

@@ -672,7 +672,8 @@ public abstract class L2Skill implements IChanceSkillTrigger, IIdentifiable
 	}
 	
 	/**
-	 * @return Returns the boolean _isDebuff.
+	 * Verify if this skill is a debuff.
+	 * @return {@code true} if this skill is a debuff, {@code false} otherwise
 	 */
 	public final boolean isDebuff()
 	{

+ 1 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/ValidateLocation.java

@@ -29,14 +29,13 @@ public class ValidateLocation extends L2GameServerPacket
 	public ValidateLocation(L2Object obj)
 	{
 		_charObjId = obj.getObjectId();
-		_loc = new Location(obj);
+		_loc = obj.getLocation();
 	}
 	
 	@Override
 	protected final void writeImpl()
 	{
 		writeC(0x79);
-		
 		writeD(_charObjId);
 		writeLoc(_loc);
 		writeD(_loc.getHeading());