mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[10054] Fix crash when not saved action buttons are removed during spec switch
This commit is contained in:
parent
b4b45333d8
commit
10634ac5be
2 changed files with 11 additions and 2 deletions
|
|
@ -21906,11 +21906,20 @@ void Player::ActivateSpec(uint8 specNum)
|
|||
|
||||
// recheck action buttons (not checked at loading/spec copy)
|
||||
ActionButtonList const& currentActionButtonList = m_actionButtons[m_activeSpec];
|
||||
for(ActionButtonList::const_iterator itr = currentActionButtonList.begin(); itr != currentActionButtonList.end(); ++itr)
|
||||
for(ActionButtonList::const_iterator itr = currentActionButtonList.begin(); itr != currentActionButtonList.end(); )
|
||||
{
|
||||
if (itr->second.uState != ACTIONBUTTON_DELETED)
|
||||
{
|
||||
// remove broken without any output (it can be not correct because talents not copied at spec creating)
|
||||
if (!IsActionButtonDataValid(itr->first,itr->second.GetAction(),itr->second.GetType(), this, false))
|
||||
{
|
||||
removeActionButton(m_activeSpec,itr->first);
|
||||
itr = currentActionButtonList.begin();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
++itr;
|
||||
}
|
||||
|
||||
ResummonPetTemporaryUnSummonedIfAny();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue