Angle of attack rework.
Contributed by kamikadzz.
This commit is contained in:
		| @@ -413,7 +413,7 @@ public class CreatureStat | ||||
| 	 | ||||
| 	public int getPhysicalAttackAngle() | ||||
| 	{ | ||||
| 		return 240; // 360 - 120 | ||||
| 		return 0; | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
|   | ||||
| @@ -36,4 +36,10 @@ public class NpcStat extends CreatureStat | ||||
| 	{ | ||||
| 		return (Npc) super.getActiveChar(); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public int getPhysicalAttackAngle() | ||||
| 	{ | ||||
| 		return getActiveChar().getTemplate().getBaseAttackAngle(); | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -104,6 +104,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable | ||||
| 	private int _maxSkillChance; | ||||
| 	private double _hitTimeFactor; | ||||
| 	private double _hitTimeFactorSkill; | ||||
| 	private int _baseAttackAngle; | ||||
| 	private Map<Integer, Skill> _skills; | ||||
| 	private Map<AISkillScope, List<Skill>> _aiSkillLists; | ||||
| 	private Set<Integer> _clans; | ||||
| @@ -194,6 +195,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable | ||||
| 		_maxSkillChance = set.getInt("maxSkillChance", 15); | ||||
| 		_hitTimeFactor = set.getInt("hitTime", 100) / 100d; | ||||
| 		_hitTimeFactorSkill = set.getInt("hitTimeSkill", 100) / 100d; | ||||
| 		_baseAttackAngle = set.getInt("width", 120); | ||||
| 		_collisionRadiusGrown = set.getFloat("collisionRadiusGrown", 0); | ||||
| 		_collisionHeightGrown = set.getFloat("collisionHeightGrown", 0); | ||||
| 		_mpRewardValue = set.getInt("mpRewardValue", 0); | ||||
| @@ -518,6 +520,11 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable | ||||
| 		return _hitTimeFactorSkill; | ||||
| 	} | ||||
| 	 | ||||
| 	public int getBaseAttackAngle() | ||||
| 	{ | ||||
| 		return _baseAttackAngle; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public Map<Integer, Skill> getSkills() | ||||
| 	{ | ||||
|   | ||||
| @@ -84,12 +84,12 @@ public class Weapon extends ItemTemplate | ||||
| 		if ((damageRange.length > 1) && Util.isDigit(damageRange[2]) && Util.isDigit(damageRange[3])) | ||||
| 		{ | ||||
| 			_baseAttackRadius = Integer.parseInt(damageRange[2]); | ||||
| 			_baseAttackAngle = 360 - Integer.parseInt(damageRange[3]); | ||||
| 			_baseAttackAngle = Integer.parseInt(damageRange[3]); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			_baseAttackRadius = 40; | ||||
| 			_baseAttackAngle = 240; // 360 - 120 | ||||
| 			_baseAttackAngle = 0; | ||||
| 		} | ||||
| 		 | ||||
| 		final String[] reducedSoulshots = set.getString("reduced_soulshot", "").split(","); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment