mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
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:
@@ -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