mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Bug Fix] Replace uses of SPELL_UNKNOWN with IsValidSpell() (#2938)
This commit is contained in:
+2
-2
@@ -574,7 +574,7 @@ void NPC::GetPetState(SpellBuff_Struct *pet_buffs, uint32 *items, char *name) {
|
||||
|
||||
//save their buffs.
|
||||
for (int i=EQ::invslot::EQUIPMENT_BEGIN; i < GetPetMaxTotalSlots(); i++) {
|
||||
if (buffs[i].spellid != SPELL_UNKNOWN) {
|
||||
if (IsValidSpell(buffs[i].spellid)) {
|
||||
pet_buffs[i].spellid = buffs[i].spellid;
|
||||
pet_buffs[i].effect_type = i+1;
|
||||
pet_buffs[i].duration = buffs[i].ticsremaining;
|
||||
@@ -600,7 +600,7 @@ void NPC::SetPetState(SpellBuff_Struct *pet_buffs, uint32 *items) {
|
||||
for (i = 0; i < GetPetMaxTotalSlots(); i++) {
|
||||
for(int z = 0; z < GetPetMaxTotalSlots(); z++) {
|
||||
// check for duplicates
|
||||
if(buffs[z].spellid != SPELL_UNKNOWN && buffs[z].spellid == pet_buffs[i].spellid) {
|
||||
if(IsValidSpell(buffs[z].spellid) && buffs[z].spellid == pet_buffs[i].spellid) {
|
||||
buffs[z].spellid = SPELL_UNKNOWN;
|
||||
pet_buffs[i].spellid = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user