Forráskód Böngészése

Mounted speed multiplier update

GodKratos 16 éve
szülő
commit
557f89ae4d

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

@@ -6233,12 +6233,12 @@ public final class L2PcInstance extends L2PlayableInstance
         Ride mount = new Ride(this, true, npcId);
         if (setMount(npcId, getLevel(), mount.getMountType()))
         {
+        	clearPetData();
         	setMountObjectID(controlItemObjId);
         	broadcastPacket(mount);
         
         	// Notify self and others about speed change
         	broadcastUserInfo();
-        	clearPetData();
         	if (useFood)
         		startFeed(npcId);
         	return true;

+ 4 - 0
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java

@@ -438,6 +438,10 @@ public class CharStat
 	{
     	if (_activeChar == null)
     		return 1;
+    	
+    	if (_activeChar instanceof L2PcInstance && ((L2PcInstance)_activeChar).isMounted())
+    		return getRunSpeed() * 1f / L2PetDataTable.getInstance().getPetData(
+    				((L2PcInstance)_activeChar).getMountNpcId(), ((L2PcInstance)_activeChar).getMountLevel()).getPetSpeed();
 
 		return getRunSpeed() * 1f / _activeChar.getTemplate().baseRunSpd;
 	}

+ 0 - 1
L2_GameServer/java/net/sf/l2j/gameserver/skills/effects/EffectConfusion.java

@@ -18,7 +18,6 @@ import java.util.Collection;
 import java.util.List;
 
 import javolution.util.FastList;
-import net.sf.l2j.Config;
 import net.sf.l2j.gameserver.ai.CtrlIntention;
 import net.sf.l2j.gameserver.model.L2Character;
 import net.sf.l2j.gameserver.model.L2Effect;