diff options
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 6 | ||||
| -rwxr-xr-x | src/server/game/Entities/Player/Player.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 7ff1438fdc0..87dd1c51737 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -6651,8 +6651,8 @@ void Player::SendActionButtons(uint32 state) const WorldPacket data(SMSG_ACTION_BUTTONS, 1+(MAX_ACTION_BUTTONS*4)); /* state can be 0, 1, 2 - 0 - Looks to be sent when initial action buttons get sent, however on Trinity we use 1 since 0 had some difficulties - 1 - Used in any SMSG_ACTION_BUTTONS packet with button data on Trinity. Only used after spec swaps on retail. + 0 - Sends initial action buttons, client does not validate if we have the spell or not + 1 - Used used after spec swaps, client validates if a spell is known. 2 - Clears the action bars client sided. This is sent during spec swap before unlearning and before sending the new buttons */ if (state != 2) @@ -6666,6 +6666,8 @@ void Player::SendActionButtons(uint32 state) const data << uint32(0); } } + else + data.resize(MAX_ACTION_BUTTONS * 4); // insert crap, client doesnt even parse this for state == 2 data << uint8(state); GetSession()->SendPacket(&data); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 565a67c3631..cd6334714df 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1828,7 +1828,7 @@ class Player : public Unit, public GridObject<Player> ActionButton* addActionButton(uint8 button, uint32 action, uint8 type); void removeActionButton(uint8 button); ActionButton const* GetActionButton(uint8 button); - void SendInitialActionButtons() const { SendActionButtons(1); } + void SendInitialActionButtons() const { SendActionButtons(0); } void SendActionButtons(uint32 state) const; bool IsActionButtonDataValid(uint8 button, uint32 action, uint8 type); |
