Fixed movement multiplier float value not increasing.
This commit is contained in:
parent
b1fc8d2454
commit
b9178def59
@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.actor.stat;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Calculator;
|
||||
import org.l2jmobius.gameserver.model.skills.Env;
|
||||
import org.l2jmobius.gameserver.model.skills.Stat;
|
||||
@ -465,7 +464,7 @@ public class CreatureStat
|
||||
|
||||
double val = calcStat(Stat.MAGIC_ATTACK_SPEED, _creature.getTemplate().getBaseMAtkSpd() * bonusSpdAtk, null, null);
|
||||
val /= _creature.getArmourExpertisePenalty();
|
||||
if ((val > Config.MAX_MATK_SPEED) && (_creature instanceof PlayerInstance))
|
||||
if ((val > Config.MAX_MATK_SPEED) && _creature.isPlayer())
|
||||
{
|
||||
val = Config.MAX_MATK_SPEED;
|
||||
}
|
||||
@ -547,7 +546,7 @@ public class CreatureStat
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return Math.max(1, getRunSpeed() / _creature.getTemplate().getBaseRunSpd());
|
||||
return (float) getRunSpeed() / _creature.getTemplate().getBaseRunSpd();
|
||||
}
|
||||
|
||||
public void setGmSpeedMultiplier(float multipier)
|
||||
@ -702,7 +701,7 @@ public class CreatureStat
|
||||
|
||||
double val = calcStat(Stat.POWER_ATTACK_SPEED, _creature.getTemplate().getBasePAtkSpd() * bonusAtk, null, null);
|
||||
val /= _creature.getArmourExpertisePenalty();
|
||||
if ((val > Config.MAX_PATK_SPEED) && (_creature instanceof PlayerInstance))
|
||||
if ((val > Config.MAX_PATK_SPEED) && _creature.isPlayer())
|
||||
{
|
||||
val = Config.MAX_PATK_SPEED;
|
||||
}
|
||||
@ -869,7 +868,7 @@ public class CreatureStat
|
||||
}
|
||||
|
||||
val /= _creature.getArmourExpertisePenalty();
|
||||
if ((val > Config.MAX_RUN_SPEED) && !(_creature.isPlayer() && !_creature.getActingPlayer().isGM()))
|
||||
if ((val > Config.MAX_RUN_SPEED) && _creature.isPlayer() && !_creature.getActingPlayer().isGM())
|
||||
{
|
||||
val = Config.MAX_RUN_SPEED;
|
||||
}
|
||||
@ -928,10 +927,11 @@ public class CreatureStat
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (_creature instanceof PlayerInstance)
|
||||
if (_creature.isPlayer())
|
||||
{
|
||||
return (getRunSpeed() * 70) / 100;
|
||||
}
|
||||
|
||||
return (int) calcStat(Stat.WALK_SPEED, _creature.getTemplate().getBaseWalkSpd(), null, null);
|
||||
}
|
||||
|
||||
|
@ -39,15 +39,10 @@ public class CharInfo extends GameServerPacket
|
||||
private final int _pAtkSpd;
|
||||
private final int _runSpd;
|
||||
private final int _walkSpd;
|
||||
private final int _swimRunSpd;
|
||||
private final int _swimWalkSpd;
|
||||
private int _flRunSpd;
|
||||
private int _flWalkSpd;
|
||||
private int _flyRunSpd;
|
||||
private int _flyWalkSpd;
|
||||
private final int _flyRunSpd;
|
||||
private final int _flyWalkSpd;
|
||||
private final float _moveMultiplier;
|
||||
private final float _attackSpeedMultiplier;
|
||||
private final int _maxCp;
|
||||
|
||||
public CharInfo(PlayerInstance player)
|
||||
{
|
||||
@ -61,11 +56,10 @@ public class CharInfo extends GameServerPacket
|
||||
_pAtkSpd = _player.getPAtkSpd();
|
||||
_moveMultiplier = _player.getMovementSpeedMultiplier();
|
||||
_attackSpeedMultiplier = _player.getAttackSpeedMultiplier();
|
||||
_runSpd = (int) (_player.getRunSpeed() / _moveMultiplier);
|
||||
_walkSpd = (int) (_player.getWalkSpeed() / _moveMultiplier);
|
||||
_swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
|
||||
_swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
|
||||
_maxCp = _player.getMaxCp();
|
||||
_runSpd = Math.round(player.getRunSpeed() / _moveMultiplier);
|
||||
_walkSpd = Math.round(player.getWalkSpeed() / _moveMultiplier);
|
||||
_flyRunSpd = player.isFlying() ? _runSpd : 0;
|
||||
_flyWalkSpd = player.isFlying() ? _walkSpd : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -100,12 +94,12 @@ public class CharInfo extends GameServerPacket
|
||||
writeD(0x00);
|
||||
writeD(_mAtkSpd);
|
||||
writeD(_pAtkSpd);
|
||||
writeD(_runSpd);
|
||||
writeD(_walkSpd);
|
||||
writeD(_swimRunSpd/* 0x32 */); // swimspeed
|
||||
writeD(_swimWalkSpd/* 0x32 */); // swimspeed
|
||||
writeD(_flRunSpd);
|
||||
writeD(_flWalkSpd);
|
||||
writeD(_runSpd); // base run speed
|
||||
writeD(_walkSpd); // base walk speed
|
||||
writeD(_runSpd); // swim run speed (calculated by getter)
|
||||
writeD(_walkSpd); // swim walk speed (calculated by getter)
|
||||
writeD(_flyRunSpd); // fly run speed ?
|
||||
writeD(_flyWalkSpd); // fly walk speed ?
|
||||
writeD(_flyRunSpd);
|
||||
writeD(_flyWalkSpd);
|
||||
writeF(_moveMultiplier);
|
||||
@ -205,16 +199,16 @@ public class CharInfo extends GameServerPacket
|
||||
writeD(_player.getPvpFlag());
|
||||
writeD(_player.getKarma());
|
||||
|
||||
writeD(_runSpd);
|
||||
writeD(_walkSpd);
|
||||
writeD(_swimRunSpd/* 0x32 */); // swimspeed
|
||||
writeD(_swimWalkSpd/* 0x32 */); // swimspeed
|
||||
writeD(_flRunSpd);
|
||||
writeD(_flWalkSpd);
|
||||
writeD(_runSpd); // base run speed
|
||||
writeD(_walkSpd); // base walk speed
|
||||
writeD(_runSpd); // swim run speed (calculated by getter)
|
||||
writeD(_walkSpd); // swim walk speed (calculated by getter)
|
||||
writeD(_flyRunSpd); // fly run speed ?
|
||||
writeD(_flyWalkSpd); // fly walk speed ?
|
||||
writeD(_flyRunSpd);
|
||||
writeD(_flyWalkSpd);
|
||||
writeF(_player.getMovementSpeedMultiplier()); // _activeChar.getProperMultiplier()
|
||||
writeF(_player.getAttackSpeedMultiplier()); // _activeChar.getAttackSpeedMultiplier()
|
||||
writeF(_moveMultiplier);
|
||||
writeF(_attackSpeedMultiplier);
|
||||
writeF(_player.getBaseTemplate().getCollisionRadius());
|
||||
writeF(_player.getBaseTemplate().getCollisionHeight());
|
||||
|
||||
@ -276,7 +270,7 @@ public class CharInfo extends GameServerPacket
|
||||
writeH(_player.getRecomHave()); // Blue value for name (0 = white, 255 = pure blue)
|
||||
writeD(_player.getClassId().getId());
|
||||
|
||||
writeD(_maxCp);
|
||||
writeD(_player.getMaxCp());
|
||||
writeD((int) _player.getCurrentCp());
|
||||
writeC(_player.isMounted() ? 0 : _player.getEnchantEffect());
|
||||
|
||||
|
@ -27,25 +27,21 @@ import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
public class UserInfo extends GameServerPacket
|
||||
{
|
||||
private final PlayerInstance _player;
|
||||
private final float _moveMultiplier;
|
||||
private final int _runSpd;
|
||||
private final int _walkSpd;
|
||||
private final int _swimRunSpd;
|
||||
private final int _swimWalkSpd;
|
||||
private int _flRunSpd;
|
||||
private int _flWalkSpd;
|
||||
private int _flyRunSpd;
|
||||
private int _flyWalkSpd;
|
||||
private final int _flyRunSpd;
|
||||
private final int _flyWalkSpd;
|
||||
private int _relation;
|
||||
private final float _moveMultiplier;
|
||||
|
||||
public UserInfo(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
_moveMultiplier = _player.getMovementSpeedMultiplier();
|
||||
_runSpd = (int) (_player.getRunSpeed() / _moveMultiplier);
|
||||
_walkSpd = (int) (_player.getWalkSpeed() / _moveMultiplier);
|
||||
_swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
|
||||
_swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
|
||||
_moveMultiplier = player.getMovementSpeedMultiplier();
|
||||
_runSpd = Math.round(player.getRunSpeed() / _moveMultiplier);
|
||||
_walkSpd = Math.round(player.getWalkSpeed() / _moveMultiplier);
|
||||
_flyRunSpd = player.isFlying() ? _runSpd : 0;
|
||||
_flyWalkSpd = player.isFlying() ? _walkSpd : 0;
|
||||
_relation = _player.isClanLeader() ? 0x40 : 0;
|
||||
if (_player.getSiegeState() == 1)
|
||||
{
|
||||
@ -151,13 +147,13 @@ public class UserInfo extends GameServerPacket
|
||||
|
||||
writeD(_runSpd); // base run speed
|
||||
writeD(_walkSpd); // base walk speed
|
||||
writeD(_swimRunSpd); // swim run speed
|
||||
writeD(_swimWalkSpd); // swim walk speed
|
||||
writeD(_flRunSpd);
|
||||
writeD(_flWalkSpd);
|
||||
writeD(_flyRunSpd); // fly run speed
|
||||
writeD(_flyWalkSpd); // fly walk speed
|
||||
writeF(_moveMultiplier); // run speed multiplier
|
||||
writeD(_runSpd); // swim run speed (calculated by getter)
|
||||
writeD(_walkSpd); // swim walk speed (calculated by getter)
|
||||
writeD(0);
|
||||
writeD(0);
|
||||
writeD(_flyRunSpd);
|
||||
writeD(_flyWalkSpd);
|
||||
writeF(_player.getMovementSpeedMultiplier()); // run speed multiplier
|
||||
writeF(_player.getAttackSpeedMultiplier()); // attack speed multiplier
|
||||
|
||||
final Summon pet = _player.getPet();
|
||||
|
@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.actor.stat;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Calculator;
|
||||
import org.l2jmobius.gameserver.model.skills.Env;
|
||||
import org.l2jmobius.gameserver.model.skills.Stat;
|
||||
@ -465,7 +464,7 @@ public class CreatureStat
|
||||
|
||||
double val = calcStat(Stat.MAGIC_ATTACK_SPEED, _creature.getTemplate().getBaseMAtkSpd() * bonusSpdAtk, null, null);
|
||||
val /= _creature.getArmourExpertisePenalty();
|
||||
if ((val > Config.MAX_MATK_SPEED) && (_creature instanceof PlayerInstance))
|
||||
if ((val > Config.MAX_MATK_SPEED) && _creature.isPlayer())
|
||||
{
|
||||
val = Config.MAX_MATK_SPEED;
|
||||
}
|
||||
@ -547,7 +546,7 @@ public class CreatureStat
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return Math.max(1, getRunSpeed() / _creature.getTemplate().getBaseRunSpd());
|
||||
return (float) getRunSpeed() / _creature.getTemplate().getBaseRunSpd();
|
||||
}
|
||||
|
||||
public void setGmSpeedMultiplier(float multipier)
|
||||
@ -702,7 +701,7 @@ public class CreatureStat
|
||||
|
||||
double val = calcStat(Stat.POWER_ATTACK_SPEED, _creature.getTemplate().getBasePAtkSpd() * bonusAtk, null, null);
|
||||
val /= _creature.getArmourExpertisePenalty();
|
||||
if ((val > Config.MAX_PATK_SPEED) && (_creature instanceof PlayerInstance))
|
||||
if ((val > Config.MAX_PATK_SPEED) && _creature.isPlayer())
|
||||
{
|
||||
val = Config.MAX_PATK_SPEED;
|
||||
}
|
||||
@ -869,7 +868,7 @@ public class CreatureStat
|
||||
}
|
||||
|
||||
val /= _creature.getArmourExpertisePenalty();
|
||||
if ((val > Config.MAX_RUN_SPEED) && !(_creature.isPlayer() && !_creature.getActingPlayer().isGM()))
|
||||
if ((val > Config.MAX_RUN_SPEED) && _creature.isPlayer() && !_creature.getActingPlayer().isGM())
|
||||
{
|
||||
val = Config.MAX_RUN_SPEED;
|
||||
}
|
||||
@ -928,10 +927,11 @@ public class CreatureStat
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (_creature instanceof PlayerInstance)
|
||||
if (_creature.isPlayer())
|
||||
{
|
||||
return (getRunSpeed() * 70) / 100;
|
||||
}
|
||||
|
||||
return (int) calcStat(Stat.WALK_SPEED, _creature.getTemplate().getBaseWalkSpd(), null, null);
|
||||
}
|
||||
|
||||
|
@ -40,15 +40,10 @@ public class CharInfo extends GameServerPacket
|
||||
private final int _pAtkSpd;
|
||||
private final int _runSpd;
|
||||
private final int _walkSpd;
|
||||
private final int _swimRunSpd;
|
||||
private final int _swimWalkSpd;
|
||||
private int _flRunSpd;
|
||||
private int _flWalkSpd;
|
||||
private int _flyRunSpd;
|
||||
private int _flyWalkSpd;
|
||||
private final int _flyRunSpd;
|
||||
private final int _flyWalkSpd;
|
||||
private final float _moveMultiplier;
|
||||
private final float _attackSpeedMultiplier;
|
||||
private final int _maxCp;
|
||||
|
||||
public CharInfo(PlayerInstance player)
|
||||
{
|
||||
@ -62,11 +57,10 @@ public class CharInfo extends GameServerPacket
|
||||
_pAtkSpd = _player.getPAtkSpd();
|
||||
_moveMultiplier = _player.getMovementSpeedMultiplier();
|
||||
_attackSpeedMultiplier = _player.getAttackSpeedMultiplier();
|
||||
_runSpd = (int) (_player.getRunSpeed() / _moveMultiplier);
|
||||
_walkSpd = (int) (_player.getWalkSpeed() / _moveMultiplier);
|
||||
_swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
|
||||
_swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
|
||||
_maxCp = _player.getMaxCp();
|
||||
_runSpd = Math.round(player.getRunSpeed() / _moveMultiplier);
|
||||
_walkSpd = Math.round(player.getWalkSpeed() / _moveMultiplier);
|
||||
_flyRunSpd = player.isFlying() ? _runSpd : 0;
|
||||
_flyWalkSpd = player.isFlying() ? _walkSpd : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -101,12 +95,12 @@ public class CharInfo extends GameServerPacket
|
||||
writeD(0x00);
|
||||
writeD(_mAtkSpd);
|
||||
writeD(_pAtkSpd);
|
||||
writeD(_runSpd);
|
||||
writeD(_walkSpd);
|
||||
writeD(_swimRunSpd/* 0x32 */); // swimspeed
|
||||
writeD(_swimWalkSpd/* 0x32 */); // swimspeed
|
||||
writeD(_flRunSpd);
|
||||
writeD(_flWalkSpd);
|
||||
writeD(_runSpd); // base run speed
|
||||
writeD(_walkSpd); // base walk speed
|
||||
writeD(_runSpd); // swim run speed (calculated by getter)
|
||||
writeD(_walkSpd); // swim walk speed (calculated by getter)
|
||||
writeD(_flyRunSpd); // fly run speed ?
|
||||
writeD(_flyWalkSpd); // fly walk speed ?
|
||||
writeD(_flyRunSpd);
|
||||
writeD(_flyWalkSpd);
|
||||
writeF(_moveMultiplier);
|
||||
@ -231,16 +225,16 @@ public class CharInfo extends GameServerPacket
|
||||
writeD(_player.getPvpFlag());
|
||||
writeD(_player.getKarma());
|
||||
|
||||
writeD(_runSpd);
|
||||
writeD(_walkSpd);
|
||||
writeD(_swimRunSpd/* 0x32 */); // swimspeed
|
||||
writeD(_swimWalkSpd/* 0x32 */); // swimspeed
|
||||
writeD(_flRunSpd);
|
||||
writeD(_flWalkSpd);
|
||||
writeD(_runSpd); // base run speed
|
||||
writeD(_walkSpd); // base walk speed
|
||||
writeD(_runSpd); // swim run speed (calculated by getter)
|
||||
writeD(_walkSpd); // swim walk speed (calculated by getter)
|
||||
writeD(_flyRunSpd); // fly run speed ?
|
||||
writeD(_flyWalkSpd); // fly walk speed ?
|
||||
writeD(_flyRunSpd);
|
||||
writeD(_flyWalkSpd);
|
||||
writeF(_player.getMovementSpeedMultiplier()); // _activeChar.getProperMultiplier()
|
||||
writeF(_player.getAttackSpeedMultiplier()); // _activeChar.getAttackSpeedMultiplier()
|
||||
writeF(_moveMultiplier);
|
||||
writeF(_attackSpeedMultiplier);
|
||||
writeF(_player.getBaseTemplate().getCollisionRadius());
|
||||
writeF(_player.getBaseTemplate().getCollisionHeight());
|
||||
|
||||
@ -302,7 +296,7 @@ public class CharInfo extends GameServerPacket
|
||||
writeH(_player.getRecomHave()); // Blue value for name (0 = white, 255 = pure blue)
|
||||
writeD(_player.getClassId().getId());
|
||||
|
||||
writeD(_maxCp);
|
||||
writeD(_player.getMaxCp());
|
||||
writeD((int) _player.getCurrentCp());
|
||||
writeC(_player.isMounted() ? 0 : _player.getEnchantEffect());
|
||||
|
||||
|
@ -28,25 +28,21 @@ import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
public class UserInfo extends GameServerPacket
|
||||
{
|
||||
private final PlayerInstance _player;
|
||||
private final float _moveMultiplier;
|
||||
private final int _runSpd;
|
||||
private final int _walkSpd;
|
||||
private final int _swimRunSpd;
|
||||
private final int _swimWalkSpd;
|
||||
private int _flRunSpd;
|
||||
private int _flWalkSpd;
|
||||
private int _flyRunSpd;
|
||||
private int _flyWalkSpd;
|
||||
private final int _flyRunSpd;
|
||||
private final int _flyWalkSpd;
|
||||
private int _relation;
|
||||
private final float _moveMultiplier;
|
||||
|
||||
public UserInfo(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
_moveMultiplier = _player.getMovementSpeedMultiplier();
|
||||
_runSpd = (int) (_player.getRunSpeed() / _moveMultiplier);
|
||||
_walkSpd = (int) (_player.getWalkSpeed() / _moveMultiplier);
|
||||
_swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
|
||||
_swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
|
||||
_moveMultiplier = player.getMovementSpeedMultiplier();
|
||||
_runSpd = Math.round(player.getRunSpeed() / _moveMultiplier);
|
||||
_walkSpd = Math.round(player.getWalkSpeed() / _moveMultiplier);
|
||||
_flyRunSpd = player.isFlying() ? _runSpd : 0;
|
||||
_flyWalkSpd = player.isFlying() ? _walkSpd : 0;
|
||||
_relation = _player.isClanLeader() ? 0x40 : 0;
|
||||
if (_player.getSiegeState() == 1)
|
||||
{
|
||||
@ -188,13 +184,13 @@ public class UserInfo extends GameServerPacket
|
||||
|
||||
writeD(_runSpd); // base run speed
|
||||
writeD(_walkSpd); // base walk speed
|
||||
writeD(_swimRunSpd); // swim run speed
|
||||
writeD(_swimWalkSpd); // swim walk speed
|
||||
writeD(_flRunSpd);
|
||||
writeD(_flWalkSpd);
|
||||
writeD(_flyRunSpd); // fly run speed
|
||||
writeD(_flyWalkSpd); // fly walk speed
|
||||
writeF(_moveMultiplier); // run speed multiplier
|
||||
writeD(_runSpd); // swim run speed (calculated by getter)
|
||||
writeD(_walkSpd); // swim walk speed (calculated by getter)
|
||||
writeD(0);
|
||||
writeD(0);
|
||||
writeD(_flyRunSpd);
|
||||
writeD(_flyWalkSpd);
|
||||
writeF(_player.getMovementSpeedMultiplier()); // run speed multiplier
|
||||
writeF(_player.getAttackSpeedMultiplier()); // attack speed multiplier
|
||||
|
||||
final Summon pet = _player.getPet();
|
||||
|
Loading…
Reference in New Issue
Block a user