Skip to content

Commit

Permalink
Use local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
tonihele committed Jul 17, 2024
1 parent a174965 commit b7c2293
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,9 @@ public void castKeeperSpell(short keeperSpellId, EntityId target, Point tile, Ve

// Cast the spell
Shot shot = kwdFile.getShotById(keeperSpell.getShotTypeId());
int shotData1 = researchableEntity.isUpgraded() ? keeperSpell.getBonusShotData1() : keeperSpell.getShotData1();
int shotData2 = researchableEntity.isUpgraded() ? keeperSpell.getBonusShotData2() : keeperSpell.getShotData2();
boolean spellUpgraded = researchableEntity.isUpgraded();
int shotData1 = spellUpgraded ? keeperSpell.getBonusShotData1() : keeperSpell.getShotData1();
int shotData2 = spellUpgraded ? keeperSpell.getBonusShotData2() : keeperSpell.getShotData2();
switch (shot.getProcessType()) {
case CREATE_CREATURE -> {
creaturesController.spawnCreature((short) shotData1, playerId, shotData2, position, ICreaturesController.SpawnType.CONJURE);
Expand Down

0 comments on commit b7c2293

Please sign in to comment.