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 7ffe056366)
This commit is contained in:
ariel-
2017-04-22 06:33:05 -03:00
committed by funjoker
parent e3eca0c264
commit cfdde556cd

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;
}
}