@@ -125,28 +125,28 @@ public HomingMissileSpell(MagicConfig config, String spellName) {
125
125
public void initialize () {
126
126
super .initialize ();
127
127
128
- Subspell s = new Subspell (hitSpellName );
129
- if (!s .process () && ! hitSpellName . isEmpty ()) {
130
- spell = s ;
128
+ spell = new Subspell (hitSpellName );
129
+ if (!spell .process ()) {
130
+ spell = null ;
131
131
MagicSpells .error ("HomingMissileSpell " + internalName + " has an invalid spell defined!" );
132
132
}
133
133
134
- Subspell s2 = new Subspell (groundSpellName );
135
- if (!s2 .process () && ! groundSpellName . isEmpty ()) {
136
- groundSpell = s2 ;
137
- MagicSpells .error ("HomingMissileSpell " + internalName + " has an invalid spell-on-hit-ground defined!" );
134
+ groundSpell = new Subspell (groundSpellName );
135
+ if (!groundSpell .process ()) {
136
+ groundSpell = null ;
137
+ if (! groundSpellName . isEmpty ()) MagicSpells .error ("HomingMissileSpell " + internalName + " has an invalid spell-on-hit-ground defined!" );
138
138
}
139
139
140
- Subspell s3 = new Subspell (airSpellName );
141
- if (!s3 .process () && ! airSpellName . isEmpty ()) {
142
- airSpell = s3 ;
143
- MagicSpells .error ("HomingMissileSpell " + internalName + " has an invalid spell-on-hit-air defined!" );
140
+ airSpell = new Subspell (airSpellName );
141
+ if (!airSpell .process ()) {
142
+ airSpell = null ;
143
+ if (! airSpellName . isEmpty ()) MagicSpells .error ("HomingMissileSpell " + internalName + " has an invalid spell-on-hit-air defined!" );
144
144
}
145
145
146
- Subspell s4 = new Subspell (durationSpellName );
147
- if (!s4 .process () && ! durationSpellName . isEmpty ()) {
148
- durationSpell = s4 ;
149
- MagicSpells .error ("HomingMissileSpell " + internalName + " has an invalid spell-after-duration defined!" );
146
+ durationSpell = new Subspell (durationSpellName );
147
+ if (!durationSpell .process ()) {
148
+ durationSpell = null ;
149
+ if (! durationSpellName . isEmpty ()) MagicSpells .error ("HomingMissileSpell " + internalName + " has an invalid spell-after-duration defined!" );
150
150
}
151
151
}
152
152
0 commit comments