Skip to content

Commit

Permalink
[Cleanup] Remove unnecessary >= 0 checks for procs in botspellsai.cpp (
Browse files Browse the repository at this point in the history
…#3242)

# Notes
- These are always `>= 0` since they're `uint16`.
  • Loading branch information
Kinglykrab committed Apr 3, 2023
1 parent 4703920 commit 6009101
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions zone/botspellsai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3175,20 +3175,14 @@ bool Bot::AI_AddBotSpells(uint32 bot_spell_id) {
}
}

if (spell_list->attack_proc >= 0) {
attack_proc_spell = spell_list->attack_proc;
proc_chance = spell_list->proc_chance;
}
attack_proc_spell = spell_list->attack_proc;
proc_chance = spell_list->proc_chance;

if (spell_list->range_proc >= 0) {
range_proc_spell = spell_list->range_proc;
rproc_chance = spell_list->rproc_chance;
}
range_proc_spell = spell_list->range_proc;
rproc_chance = spell_list->rproc_chance;

if (spell_list->defensive_proc >= 0) {
defensive_proc_spell = spell_list->defensive_proc;
dproc_chance = spell_list->dproc_chance;
}
defensive_proc_spell = spell_list->defensive_proc;
dproc_chance = spell_list->dproc_chance;

//If any casting variables are defined in the current list, ignore those in the parent list.
if (
Expand Down

0 comments on commit 6009101

Please sign in to comment.