2
0
GodKratos 16 жил өмнө
parent
commit
aba19491c8

+ 0 - 12
L2_GameServer/java/config/NPC.properties

@@ -80,18 +80,6 @@ AllowWyvernUpgrader = False
 # Retail: 30827
 # Retail: 30827
 ListPetRentNpc = 30827
 ListPetRentNpc = 30827
 
 
-# Pet movement speed.
-# Player Speed + Pet Movement speed = New Player Speed
-# Note:
-#		Fast player speeds can cause graphic lag which can be 
-#		mistaken for server lag.
-# Retail: 100, 80
-WyvernSpeed = 100
-StriderSpeed = 80
-FenrirSpeed = 80
-SnowFenrirSpeed = 80
-GreatSnowWolfSpeed = 80
-
 #============================================================#
 #============================================================#
 #                         Boss                               #
 #                         Boss                               #
 #============================================================#
 #============================================================#

+ 0 - 15
L2_GameServer/java/net/sf/l2j/Config.java

@@ -584,11 +584,6 @@ public final class Config
     public static boolean	ALLOW_WYVERN_UPGRADER;
     public static boolean	ALLOW_WYVERN_UPGRADER;
     public static String	PET_RENT_NPC;
     public static String	PET_RENT_NPC;
     public static List<Integer> LIST_PET_RENT_NPC   = new FastList<Integer>();
     public static List<Integer> LIST_PET_RENT_NPC   = new FastList<Integer>();
-    public static int		WYVERN_SPEED;
-    public static int		STRIDER_SPEED;
-    public static int 		FENRIR_SPEED;
-    public static int 		GREAT_SNOW_WOLF_SPEED;
-    public static int 		SNOW_FENRIR_SPEED;
     public static double	RAID_HP_REGEN_MULTIPLIER;
     public static double	RAID_HP_REGEN_MULTIPLIER;
     public static double	RAID_MP_REGEN_MULTIPLIER;
     public static double	RAID_MP_REGEN_MULTIPLIER;
     public static double	RAID_PDEFENCE_MULTIPLIER;
     public static double	RAID_PDEFENCE_MULTIPLIER;
@@ -1672,11 +1667,6 @@ public final class Config
 	                                						{
 	                                						{
 	                                							LIST_PET_RENT_NPC.add(Integer.parseInt(id));
 	                                							LIST_PET_RENT_NPC.add(Integer.parseInt(id));
 	                                						}
 	                                						}
-	                WYVERN_SPEED							= Integer.parseInt(NPC.getProperty("WyvernSpeed", "100"));
-	                STRIDER_SPEED							= Integer.parseInt(NPC.getProperty("StriderSpeed", "80"));
-	                FENRIR_SPEED						= Integer.parseInt(NPC.getProperty("FenrirSpeed", "80"));
-	                SNOW_FENRIR_SPEED						= Integer.parseInt(NPC.getProperty("SnowFenrirSpeed", "80"));
-	                GREAT_SNOW_WOLF_SPEED						= Integer.parseInt(NPC.getProperty("GreatSnowWolfSpeed", "80"));
 	                RAID_HP_REGEN_MULTIPLIER				= Double.parseDouble(NPC.getProperty("RaidHpRegenMultiplier", "100")) /100;
 	                RAID_HP_REGEN_MULTIPLIER				= Double.parseDouble(NPC.getProperty("RaidHpRegenMultiplier", "100")) /100;
 	                RAID_MP_REGEN_MULTIPLIER				= Double.parseDouble(NPC.getProperty("RaidMpRegenMultiplier", "100")) /100;
 	                RAID_MP_REGEN_MULTIPLIER				= Double.parseDouble(NPC.getProperty("RaidMpRegenMultiplier", "100")) /100;
 	                RAID_PDEFENCE_MULTIPLIER				= Double.parseDouble(NPC.getProperty("RaidPDefenceMultiplier", "100")) /100;
 	                RAID_PDEFENCE_MULTIPLIER				= Double.parseDouble(NPC.getProperty("RaidPDefenceMultiplier", "100")) /100;
@@ -2160,11 +2150,6 @@ public final class Config
         else if (pName.equalsIgnoreCase("UseDeepBlueDropRules")) DEEPBLUE_DROP_RULES = Boolean.parseBoolean(pValue);
         else if (pName.equalsIgnoreCase("UseDeepBlueDropRules")) DEEPBLUE_DROP_RULES = Boolean.parseBoolean(pValue);
         else if (pName.equalsIgnoreCase("AllowGuards")) GUARD_ATTACK_AGGRO_MOB = Boolean.parseBoolean(pValue);
         else if (pName.equalsIgnoreCase("AllowGuards")) GUARD_ATTACK_AGGRO_MOB = Boolean.parseBoolean(pValue);
         else if (pName.equalsIgnoreCase("CancelLesserEffect")) EFFECT_CANCELING = Boolean.parseBoolean(pValue);
         else if (pName.equalsIgnoreCase("CancelLesserEffect")) EFFECT_CANCELING = Boolean.parseBoolean(pValue);
-        else if (pName.equalsIgnoreCase("WyvernSpeed")) WYVERN_SPEED = Integer.parseInt(pValue);
-        else if (pName.equalsIgnoreCase("StriderSpeed")) STRIDER_SPEED = Integer.parseInt(pValue);
-        else if (pName.equalsIgnoreCase("FenrirSpeed")) FENRIR_SPEED = Integer.parseInt(pValue);
-        else if (pName.equalsIgnoreCase("SnowFenrirSpeed")) SNOW_FENRIR_SPEED = Integer.parseInt(pValue);
-        else if (pName.equalsIgnoreCase("GreatSnowWolfSpeed")) GREAT_SNOW_WOLF_SPEED = Integer.parseInt(pValue);
 
 
         else if (pName.equalsIgnoreCase("MaximumSlotsForNoDwarf")) INVENTORY_MAXIMUM_NO_DWARF = Integer.parseInt(pValue);
         else if (pName.equalsIgnoreCase("MaximumSlotsForNoDwarf")) INVENTORY_MAXIMUM_NO_DWARF = Integer.parseInt(pValue);
         else if (pName.equalsIgnoreCase("MaximumSlotsForDwarf")) INVENTORY_MAXIMUM_DWARF = Integer.parseInt(pValue);
         else if (pName.equalsIgnoreCase("MaximumSlotsForDwarf")) INVENTORY_MAXIMUM_DWARF = Integer.parseInt(pValue);

+ 38 - 20
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java

@@ -413,6 +413,7 @@ public final class L2PcInstance extends L2PlayableInstance
 
 
 	private int _mountType;
 	private int _mountType;
     private int _mountNpcId;
     private int _mountNpcId;
+    private int _mountLevel;
     /** Store object used to summon the strider you are mounting **/
     /** Store object used to summon the strider you are mounting **/
 	private int _mountObjectID = 0;
 	private int _mountObjectID = 0;
 
 
@@ -689,9 +690,11 @@ public final class L2PcInstance extends L2PlayableInstance
 	private double _mpUpdateDecCheck = .0;
 	private double _mpUpdateDecCheck = .0;
 	private double _mpUpdateInterval = .0;
 	private double _mpUpdateInterval = .0;
 	
 	
+	/* not used any more
 	private boolean _isRidingFenrirWolf	= false;
 	private boolean _isRidingFenrirWolf	= false;
 	private boolean _isRidingWFenrirWolf = false;
 	private boolean _isRidingWFenrirWolf = false;
 	private boolean _isRidingGreatSnowWolf = false;
 	private boolean _isRidingGreatSnowWolf = false;
+	*/
 	private boolean _isRidingStrider = false;
 	private boolean _isRidingStrider = false;
 	private boolean _isFlyingWyvern = false;
 	private boolean _isFlyingWyvern = false;
 
 
@@ -6150,12 +6153,12 @@ public final class L2PcInstance extends L2PlayableInstance
         	return false;
         	return false;
         
         
         Ride mount = new Ride(this, true, pet.getTemplate().npcId);
         Ride mount = new Ride(this, true, pet.getTemplate().npcId);
-        this.setMount(pet.getTemplate().npcId, mount.getMountType());
-        this.setMountObjectID(pet.getControlItemId());
-        this.broadcastPacket(mount);
+        setMount(pet.getNpcId(), pet.getLevel(), mount.getMountType());
+        setMountObjectID(pet.getControlItemId());
+        broadcastPacket(mount);
         
         
         // Notify self and others about speed change
         // Notify self and others about speed change
-        this.broadcastUserInfo();
+        broadcastUserInfo();
         
         
         pet.unSummon(this);
         pet.unSummon(this);
         
         
@@ -6170,7 +6173,7 @@ public final class L2PcInstance extends L2PlayableInstance
         	return false;
         	return false;
         
         
         Ride mount = new Ride(this, true, npcId);
         Ride mount = new Ride(this, true, npcId);
-        if (setMount(npcId, mount.getMountType()))
+        if (setMount(npcId, Experience.MAX_LEVEL, mount.getMountType()))
         {
         {
         	setMountObjectID(controlItemObjId);
         	setMountObjectID(controlItemObjId);
         	broadcastPacket(mount);
         	broadcastPacket(mount);
@@ -6184,9 +6187,11 @@ public final class L2PcInstance extends L2PlayableInstance
 	
 	
 	public boolean dismount()
 	public boolean dismount()
 	{
 	{
-	    if (setMount(0, 0))
+		boolean wasFlying = isFlying();
+		
+	    if (setMount(0, 0, 0))
 	    {
 	    {
-	        if (isFlying()) 
+	        if (wasFlying) 
 	            removeSkill(SkillTable.getInstance().getInfo(4289, 1));
 	            removeSkill(SkillTable.getInstance().getInfo(4289, 1));
 	        Ride dismount = new Ride(this, false, 0);
 	        Ride dismount = new Ride(this, false, 0);
 	        broadcastPacket(dismount);
 	        broadcastPacket(dismount);
@@ -8585,7 +8590,7 @@ public final class L2PcInstance extends L2PlayableInstance
 	}
 	}
 
 
 	// returns false if the change of mount type fails.
 	// returns false if the change of mount type fails.
-	public boolean setMount(int npcId, int mountType)
+	public boolean setMount(int npcId, int npcLevel, int mountType)
 	{
 	{
 		if (checkLandingState() && mountType == 0 && isFlying())
 		if (checkLandingState() && mountType == 0 && isFlying())
 			return false;
 			return false;
@@ -8594,9 +8599,10 @@ public final class L2PcInstance extends L2PlayableInstance
 		{
 		{
 			case 0:
 			case 0:
                 setIsFlying(false);
                 setIsFlying(false);
+                /* not used any more
 				setIsRidingFenrirWolf(false);
 				setIsRidingFenrirWolf(false);
 				setIsRidingWFenrirWolf(false);
 				setIsRidingWFenrirWolf(false);
-				setIsRidingGreatSnowWolf(false);
+				setIsRidingGreatSnowWolf(false);*/
 				setIsRidingStrider(false);
 				setIsRidingStrider(false);
                 break; //Dismounted
                 break; //Dismounted
 			case 1:
 			case 1:
@@ -8611,6 +8617,7 @@ public final class L2PcInstance extends L2PlayableInstance
                 setIsFlying(true);
                 setIsFlying(true);
                 break; //Flying Wyvern
                 break; //Flying Wyvern
 			case 3:
 			case 3:
+				/* not used any more
 				switch (npcId)
 				switch (npcId)
 				{
 				{
 					case 16041:
 					case 16041:
@@ -8622,12 +8629,13 @@ public final class L2PcInstance extends L2PlayableInstance
 					case 16037:
 					case 16037:
 						setIsRidingGreatSnowWolf(true);
 						setIsRidingGreatSnowWolf(true);
 						break;
 						break;
-				}
+				}*/
 				break;
 				break;
 		}
 		}
 
 
 		_mountType = mountType;
 		_mountType = mountType;
         _mountNpcId = npcId;
         _mountNpcId = npcId;
+        _mountLevel = npcLevel;
 
 
 		return true;
 		return true;
 	}
 	}
@@ -11032,6 +11040,14 @@ public final class L2PcInstance extends L2PlayableInstance
     {
     {
         return _mountNpcId;
         return _mountNpcId;
     }
     }
+    
+    /**
+     * @return Returns the mountLevel.
+     */
+    public int getMountLevel()
+    {
+    	return _mountLevel;
+    }
 
 
     public void setMountObjectID(int newID)
     public void setMountObjectID(int newID)
 	{
 	{
@@ -11383,6 +11399,16 @@ public final class L2PcInstance extends L2PlayableInstance
 		sendPacket(new EtcStatusUpdate(this));
 		sendPacket(new EtcStatusUpdate(this));
 	}
 	}
 	
 	
+	public final void setIsRidingStrider(boolean mode)
+	{
+		_isRidingStrider = mode;
+	}
+	public final void setIsFlying(boolean mode)
+	{ 
+		_isFlyingWyvern = mode;
+	}
+	
+	/* not used anymore
 	public final void setIsRidingFenrirWolf(boolean mode)
 	public final void setIsRidingFenrirWolf(boolean mode)
 	{
 	{
 		_isRidingFenrirWolf = mode;
 		_isRidingFenrirWolf = mode;
@@ -11395,15 +11421,6 @@ public final class L2PcInstance extends L2PlayableInstance
 	{
 	{
 		_isRidingGreatSnowWolf = mode;
 		_isRidingGreatSnowWolf = mode;
 	}
 	}
-	public final void setIsRidingStrider(boolean mode)
-	{
-		_isRidingStrider = mode;
-	}
-	public final void setIsFlying(boolean mode)
-	{ 
-		_isFlyingWyvern = mode;
-	}
-	
 	public final boolean isRidingFenrirWolf()
 	public final boolean isRidingFenrirWolf()
 	{ 
 	{ 
 		return _isRidingFenrirWolf;
 		return _isRidingFenrirWolf;
@@ -11415,7 +11432,8 @@ public final class L2PcInstance extends L2PlayableInstance
 	public final boolean isRidingGreatSnowWolf()
 	public final boolean isRidingGreatSnowWolf()
 	{ 
 	{ 
 		return _isRidingGreatSnowWolf;
 		return _isRidingGreatSnowWolf;
-	}
+	}*/
+	
 	public final boolean isRidingStrider()
 	public final boolean isRidingStrider()
 	{ 
 	{ 
 		return _isRidingStrider;
 		return _isRidingStrider;

+ 9 - 1
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java

@@ -16,6 +16,7 @@ package net.sf.l2j.gameserver.model.actor.stat;
 
 
 import net.sf.l2j.Config;
 import net.sf.l2j.Config;
 import net.sf.l2j.gameserver.model.L2Character;
 import net.sf.l2j.gameserver.model.L2Character;
+import net.sf.l2j.gameserver.model.L2PetDataTable;
 import net.sf.l2j.gameserver.model.L2Skill;
 import net.sf.l2j.gameserver.model.L2Skill;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.skills.Calculator;
 import net.sf.l2j.gameserver.skills.Calculator;
@@ -624,7 +625,14 @@ public class CharStat
 		
 		
 		// err we should be adding TO the persons run speed
 		// err we should be adding TO the persons run speed
 		// not making it a constant
 		// not making it a constant
-		int val = (int) calcStat(Stats.RUN_SPEED, _activeChar.getTemplate().baseRunSpd, null, null) + Config.RUN_SPD_BOOST;
+		double baseRunSpd = _activeChar.getTemplate().baseRunSpd;
+		if (_activeChar instanceof L2PcInstance)
+		{
+			L2PcInstance player = (L2PcInstance)_activeChar;
+			if (player.isMounted())
+				baseRunSpd = L2PetDataTable.getInstance().getPetData(player.getMountNpcId(), player.getMountLevel()).getPetSpeed();
+		}
+		int val = (int) calcStat(Stats.RUN_SPEED, baseRunSpd, null, null) + Config.RUN_SPD_BOOST;
 		
 		
 		val /= _activeChar.getArmourExpertisePenalty();
 		val /= _activeChar.getArmourExpertisePenalty();
 		
 		

+ 0 - 26
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java

@@ -324,32 +324,6 @@ public class PcStat extends PlayableStat
     {
     {
     	int val = super.getRunSpeed();
     	int val = super.getRunSpeed();
     	
     	
-    	if (getActiveChar().isFlying())
-		{
-			val += Config.WYVERN_SPEED;
-			return val;
-		}
-    	else if (getActiveChar().isRidingStrider())
-		{
-			val += Config.STRIDER_SPEED;
-			return val;
-		}
-    	else if (getActiveChar().isRidingFenrirWolf())
-		{
-			val += Config.FENRIR_SPEED;
-			return val;
-		}
-    	else if (getActiveChar().isRidingWFenrirWolf())
-		{
-			val += Config.SNOW_FENRIR_SPEED;
-			return val;
-		}
-    	else if (getActiveChar().isRidingGreatSnowWolf())
-		{
-			val += Config.GREAT_SNOW_WOLF_SPEED;
-			return val;
-		}
-    	
     	// Apply max run speed cap.
     	// Apply max run speed cap.
 		if (val > Config.MAX_RUN_SPEED && !getActiveChar().isGM())
 		if (val > Config.MAX_RUN_SPEED && !getActiveChar().isGM())
 			return Config.MAX_RUN_SPEED;
 			return Config.MAX_RUN_SPEED;