Weapon baseAttackAngle is relative to character position in degrees.
This commit is contained in:
parent
4c592c1707
commit
872dfa30a7
@ -396,7 +396,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
return 120;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,16 +77,16 @@ public final class L2Weapon extends L2Item
|
||||
_spiritShotCount = set.getInt("spiritshots", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damgeRange.length > 1) && Util.isDigit(damgeRange[2]) && Util.isDigit(damgeRange[3]))
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackRadius = Integer.parseInt(damgeRange[2]);
|
||||
_baseAttackAngle = Integer.parseInt(damgeRange[3]);
|
||||
_baseAttackRadius = Integer.parseInt(damageRange[2]);
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackRadius = 40;
|
||||
_baseAttackAngle = 120;
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
|
@ -396,7 +396,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
return 120;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,16 +77,16 @@ public final class L2Weapon extends L2Item
|
||||
_spiritShotCount = set.getInt("spiritshots", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damgeRange.length > 1) && Util.isDigit(damgeRange[2]) && Util.isDigit(damgeRange[3]))
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackRadius = Integer.parseInt(damgeRange[2]);
|
||||
_baseAttackAngle = Integer.parseInt(damgeRange[3]);
|
||||
_baseAttackRadius = Integer.parseInt(damageRange[2]);
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackRadius = 40;
|
||||
_baseAttackAngle = 120;
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
|
@ -396,7 +396,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
return 120;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,16 +77,16 @@ public final class L2Weapon extends L2Item
|
||||
_spiritShotCount = set.getInt("spiritshots", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damgeRange.length > 1) && Util.isDigit(damgeRange[2]) && Util.isDigit(damgeRange[3]))
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackRadius = Integer.parseInt(damgeRange[2]);
|
||||
_baseAttackAngle = Integer.parseInt(damgeRange[3]);
|
||||
_baseAttackRadius = Integer.parseInt(damageRange[2]);
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackRadius = 40;
|
||||
_baseAttackAngle = 120;
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
|
@ -396,7 +396,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
return 120;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,16 +77,16 @@ public final class L2Weapon extends L2Item
|
||||
_spiritShotCount = set.getInt("spiritshots", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damgeRange.length > 1) && Util.isDigit(damgeRange[2]) && Util.isDigit(damgeRange[3]))
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackRadius = Integer.parseInt(damgeRange[2]);
|
||||
_baseAttackAngle = Integer.parseInt(damgeRange[3]);
|
||||
_baseAttackRadius = Integer.parseInt(damageRange[2]);
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackRadius = 40;
|
||||
_baseAttackAngle = 120;
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
|
@ -396,7 +396,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
return 120;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,16 +77,16 @@ public final class L2Weapon extends L2Item
|
||||
_spiritShotCount = set.getInt("spiritshots", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damgeRange.length > 1) && Util.isDigit(damgeRange[2]) && Util.isDigit(damgeRange[3]))
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackRadius = Integer.parseInt(damgeRange[2]);
|
||||
_baseAttackAngle = Integer.parseInt(damgeRange[3]);
|
||||
_baseAttackRadius = Integer.parseInt(damageRange[2]);
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackRadius = 40;
|
||||
_baseAttackAngle = 120;
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
|
@ -396,7 +396,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
return 120;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,16 +77,16 @@ public final class L2Weapon extends L2Item
|
||||
_spiritShotCount = set.getInt("spiritshots", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damgeRange.length > 1) && Util.isDigit(damgeRange[2]) && Util.isDigit(damgeRange[3]))
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackRadius = Integer.parseInt(damgeRange[2]);
|
||||
_baseAttackAngle = Integer.parseInt(damgeRange[3]);
|
||||
_baseAttackRadius = Integer.parseInt(damageRange[2]);
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackRadius = 40;
|
||||
_baseAttackAngle = 120;
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
|
@ -569,17 +569,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
final L2Weapon weapon = _activeChar.getActiveWeaponItem();
|
||||
final int baseAttackAngle;
|
||||
if (weapon != null)
|
||||
{
|
||||
baseAttackAngle = weapon.getBaseAttackAngle();
|
||||
}
|
||||
else
|
||||
{
|
||||
baseAttackAngle = 120;
|
||||
}
|
||||
return baseAttackAngle;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,6 +28,7 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.playable.OnPlayableExpChanged;
|
||||
import com.l2jmobius.gameserver.model.events.returns.TerminateReturn;
|
||||
import com.l2jmobius.gameserver.model.items.L2Weapon;
|
||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2SwampZone;
|
||||
|
||||
@ -251,4 +252,11 @@ public class PlayableStat extends CharStat
|
||||
{
|
||||
return ExperienceData.getInstance().getMaxLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
final L2Weapon weapon = getActiveChar().getActiveWeaponItem();
|
||||
return weapon != null ? weapon.getBaseAttackAngle() : super.getPhysicalAttackAngle();
|
||||
}
|
||||
}
|
||||
|
@ -89,8 +89,15 @@ public final class L2Weapon extends L2Item
|
||||
_rndDam = set.getInt("random_damage", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
_baseAttackAngle = (damgeRange.length > 1) && Util.isDigit(damgeRange[3]) ? Integer.parseInt(damgeRange[3]) : 120;
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
_reducedSoulshotChance = (reduced_soulshots.length == 2) ? Integer.parseInt(reduced_soulshots[0]) : 0;
|
||||
|
@ -386,7 +386,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
return 120;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,16 +77,16 @@ public final class L2Weapon extends L2Item
|
||||
_spiritShotCount = set.getInt("spiritshots", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damgeRange.length > 1) && Util.isDigit(damgeRange[2]) && Util.isDigit(damgeRange[3]))
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackRadius = Integer.parseInt(damgeRange[2]);
|
||||
_baseAttackAngle = Integer.parseInt(damgeRange[3]);
|
||||
_baseAttackRadius = Integer.parseInt(damageRange[2]);
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackRadius = 40;
|
||||
_baseAttackAngle = 120;
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
|
@ -386,7 +386,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
return 120;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,16 +77,16 @@ public final class L2Weapon extends L2Item
|
||||
_spiritShotCount = set.getInt("spiritshots", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damgeRange.length > 1) && Util.isDigit(damgeRange[2]) && Util.isDigit(damgeRange[3]))
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackRadius = Integer.parseInt(damgeRange[2]);
|
||||
_baseAttackAngle = Integer.parseInt(damgeRange[3]);
|
||||
_baseAttackRadius = Integer.parseInt(damageRange[2]);
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackRadius = 40;
|
||||
_baseAttackAngle = 120;
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
|
@ -386,7 +386,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
return 120;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,16 +77,16 @@ public final class L2Weapon extends L2Item
|
||||
_spiritShotCount = set.getInt("spiritshots", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damgeRange.length > 1) && Util.isDigit(damgeRange[2]) && Util.isDigit(damgeRange[3]))
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackRadius = Integer.parseInt(damgeRange[2]);
|
||||
_baseAttackAngle = Integer.parseInt(damgeRange[3]);
|
||||
_baseAttackRadius = Integer.parseInt(damageRange[2]);
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackRadius = 40;
|
||||
_baseAttackAngle = 120;
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
|
@ -386,7 +386,7 @@ public class CharStat
|
||||
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
return 120;
|
||||
return 240; // 360 - 120
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,16 +77,16 @@ public final class L2Weapon extends L2Item
|
||||
_spiritShotCount = set.getInt("spiritshots", 0);
|
||||
_mpConsume = set.getInt("mp_consume", 0);
|
||||
_baseAttackRange = set.getInt("attack_range", 40);
|
||||
final String[] damgeRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damgeRange.length > 1) && Util.isDigit(damgeRange[2]) && Util.isDigit(damgeRange[3]))
|
||||
final String[] damageRange = set.getString("damage_range", "").split(";"); // 0?;0?;fan sector;base attack angle
|
||||
if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3]))
|
||||
{
|
||||
_baseAttackRadius = Integer.parseInt(damgeRange[2]);
|
||||
_baseAttackAngle = Integer.parseInt(damgeRange[3]);
|
||||
_baseAttackRadius = Integer.parseInt(damageRange[2]);
|
||||
_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_baseAttackRadius = 40;
|
||||
_baseAttackAngle = 120;
|
||||
_baseAttackAngle = 240; // 360 - 120
|
||||
}
|
||||
|
||||
final String[] reduced_soulshots = set.getString("reduced_soulshot", "").split(",");
|
||||
|
Loading…
Reference in New Issue
Block a user