mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-23 04:37:16 +00:00
[Bug Fix] Replace uses of SPELL_UNKNOWN with IsValidSpell() (#2938)
This commit is contained in:
1 parent
4a64048744
commit
5ee2856133
14 files changed
+134
-116
No files matched your search
@@ -1917,7 +1917,7 @@ void Client::DoEnduranceUpkeep() {
|
||||
uint32 buffs_i;
|
||||
uint32 buff_count = GetMaxTotalSlots();
|
||||
for (buffs_i = 0; buffs_i < buff_count; buffs_i++) {
|
||||
if (buffs[buffs_i].spellid != SPELL_UNKNOWN) {
|
||||
if (IsValidSpell(buffs[buffs_i].spellid)) {
|
||||
int upkeep = spells[buffs[buffs_i].spellid].endurance_upkeep;
|
||||
if(upkeep > 0) {
|
||||
has_effect = true;
|
||||
@@ -1966,7 +1966,7 @@ void Client::CalcRestState()
|
||||
|
||||
uint32 buff_count = GetMaxTotalSlots();
|
||||
for (unsigned int j = 0; j < buff_count; j++) {
|
||||
if(buffs[j].spellid != SPELL_UNKNOWN) {
|
||||
if(IsValidSpell(buffs[j].spellid)) {
|
||||
if(IsDetrimentalSpell(buffs[j].spellid) && (buffs[j].ticsremaining > 0))
|
||||
if(!DetrimentalSpellAllowsRest(buffs[j].spellid))
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user