Merge branch 'fix-tds-melee' into 'master'
Explicitly set the combat style from the NPC config instead of assuming the default is melee. See merge request 2009scape/2009scape!259
This commit is contained in:
@@ -628,10 +628,10 @@ public class NPC extends Entity {
|
|||||||
}
|
}
|
||||||
getProperties().setAttackStyle(new WeaponInterface.AttackStyle(WeaponInterface.STYLE_CONTROLLED, index));
|
getProperties().setAttackStyle(new WeaponInterface.AttackStyle(WeaponInterface.STYLE_CONTROLLED, index));
|
||||||
CombatStyle style = getDefinition().getConfiguration(NPCConfigParser.COMBAT_STYLE);
|
CombatStyle style = getDefinition().getConfiguration(NPCConfigParser.COMBAT_STYLE);
|
||||||
if (style == CombatStyle.RANGE) {
|
if (style != null) {
|
||||||
getProperties().getCombatPulse().setStyle(style);
|
|
||||||
} else if (style == CombatStyle.MAGIC) {
|
|
||||||
getProperties().getCombatPulse().setStyle(style);
|
getProperties().getCombatPulse().setStyle(style);
|
||||||
|
}
|
||||||
|
if (style == CombatStyle.MAGIC) {
|
||||||
getProperties().setAutocastSpell(new DefaultCombatSpell(this));
|
getProperties().setAutocastSpell(new DefaultCombatSpell(this));
|
||||||
int spell = definition.getConfiguration("spell_id", -1);
|
int spell = definition.getConfiguration("spell_id", -1);
|
||||||
if (spell != -1) {
|
if (spell != -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user