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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user