mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16: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)
|
// recheck action buttons (not checked at loading/spec copy)
|
||||||
ActionButtonList const& currentActionButtonList = m_actionButtons[m_activeSpec];
|
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)
|
if (itr->second.uState != ACTIONBUTTON_DELETED)
|
||||||
|
{
|
||||||
// remove broken without any output (it can be not correct because talents not copied at spec creating)
|
// 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))
|
if (!IsActionButtonDataValid(itr->first,itr->second.GetAction(),itr->second.GetType(), this, false))
|
||||||
|
{
|
||||||
removeActionButton(m_activeSpec,itr->first);
|
removeActionButton(m_activeSpec,itr->first);
|
||||||
|
itr = currentActionButtonList.begin();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
++itr;
|
||||||
|
}
|
||||||
|
|
||||||
ResummonPetTemporaryUnSummonedIfAny();
|
ResummonPetTemporaryUnSummonedIfAny();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10053"
|
#define REVISION_NR "10054"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue