mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 13:30:27 -07:00
Explicitly set the combat style from the NPC config instead of assuming the default is melee.
Previously, TDs would just keep their previous style when switching to a state that had melee defined.
This commit is contained in:
parent
6a3d1858d3
commit
4039ce65f1
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) {
|
||||
getProperties().getCombatPulse().setStyle(style);
|
||||
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