mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-21 09:02:07 -07:00
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:
commit
dbc0fc756a
1 changed files with 4 additions and 4 deletions
|
|
@ -628,10 +628,10 @@ public class NPC extends Entity {
|
|||
}
|
||||
getProperties().setAttackStyle(new WeaponInterface.AttackStyle(WeaponInterface.STYLE_CONTROLLED, index));
|
||||
CombatStyle style = getDefinition().getConfiguration(NPCConfigParser.COMBAT_STYLE);
|
||||
if (style == CombatStyle.RANGE) {
|
||||
getProperties().getCombatPulse().setStyle(style);
|
||||
} else if (style == CombatStyle.MAGIC) {
|
||||
if (style != null) {
|
||||
getProperties().getCombatPulse().setStyle(style);
|
||||
}
|
||||
if (style == CombatStyle.MAGIC) {
|
||||
getProperties().setAutocastSpell(new DefaultCombatSpell(this));
|
||||
int spell = definition.getConfiguration("spell_id", -1);
|
||||
if (spell != -1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue