Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cleanup] Remove unnecessary >= 0 checks for procs in botspellsai.cpp #3242

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 6 additions & 12 deletions zone/botspellsai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3185,20 +3185,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