Core/Player: don't randomly change temporary spell status

- They shouldn't be saved in db
- Prevented temporary spell removal after a save

Closes #14373

(cherry picked from commit 7ffe0563664c2ed5ba90832dcc42bc15acc177c3)
This commit is contained in:
ariel-
2020-04-27 15:50:27 +02:00
committed by funjoker
parent e3eca0c264
commit cfdde556cd
+6 -5
View File
@@ -21395,13 +21395,14 @@ void Player::_SaveSpells(CharacterDatabaseTransaction& trans)
if (itr->second->state == PLAYERSPELL_REMOVED)
{
delete itr->second;
m_spells.erase(itr++);
itr = m_spells.erase(itr);
continue;
}
else
{
if (itr->second->state != PLAYERSPELL_TEMPORARY)
itr->second->state = PLAYERSPELL_UNCHANGED;
++itr;
}
++itr;
}
}