mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10944] Lock action buttons before unlearning talents on spec switch.
This prevents client from automatically requesting removal of buttons that use unlearned spells.
This commit is contained in:
parent
cb1e82d663
commit
d4018322b9
3 changed files with 17 additions and 3 deletions
|
|
@ -5939,6 +5939,16 @@ void Player::SendInitialActionButtons() const
|
|||
DETAIL_LOG( "Action Buttons for '%u' spec '%u' Initialized", GetGUIDLow(), m_activeSpec );
|
||||
}
|
||||
|
||||
void Player::SendLockActionButtons() const
|
||||
{
|
||||
DETAIL_LOG( "Locking Action Buttons for '%u' spec '%u'", GetGUIDLow(), m_activeSpec);
|
||||
WorldPacket data(SMSG_ACTION_BUTTONS, 1);
|
||||
// sending 2 locks actions bars, neither user can remove buttons, nor client removes buttons at spell unlearn
|
||||
// they remain locked until server sends new action buttons
|
||||
data << uint8(2);
|
||||
GetSession()->SendPacket( &data );
|
||||
}
|
||||
|
||||
bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type, Player* player, bool msg)
|
||||
{
|
||||
if(button >= MAX_ACTION_BUTTONS)
|
||||
|
|
@ -22221,6 +22231,9 @@ void Player::ActivateSpec(uint8 specNum)
|
|||
|
||||
UnsummonPetTemporaryIfAny();
|
||||
|
||||
// prevent deletion of action buttons by client at spell unlearn or by player while spec change in progress
|
||||
SendLockActionButtons();
|
||||
|
||||
ApplyGlyphs(false);
|
||||
|
||||
// copy of new talent spec (we will use it as model for converting current tlanet state to new)
|
||||
|
|
|
|||
|
|
@ -1759,6 +1759,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
ActionButton* addActionButton(uint8 spec, uint8 button, uint32 action, uint8 type);
|
||||
void removeActionButton(uint8 spec, uint8 button);
|
||||
void SendInitialActionButtons() const;
|
||||
void SendLockActionButtons() const;
|
||||
ActionButton const* GetActionButton(uint8 button);
|
||||
|
||||
PvPInfo pvpInfo;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10943"
|
||||
#define REVISION_NR "10944"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue