Fix action buttons sent to client when swapping between talent specs. Storage related parts by Hunuza (MaNGOS), big thanks.

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-04-28 16:08:31 +02:00
parent 311d108529
commit ab013e42c9
5 changed files with 172 additions and 101 deletions

View File

@@ -1020,12 +1020,13 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
uint32 action = ACTION_BUTTON_ACTION(packetData);
uint8 type = ACTION_BUTTON_TYPE(packetData);
uint8 spec = GetPlayer()->GetActiveSpec();
sLog.outDetail("BUTTON: %u ACTION: %u TYPE: %u", button, action, type);
if (!packetData)
{
sLog.outDetail("MISC: Remove action from button %u", button);
GetPlayer()->removeActionButton(button);
GetPlayer()->removeActionButton(spec, button);
}
else
{
@@ -1048,7 +1049,7 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
sLog.outError("MISC: Unknown action button type %u for action %u into button %u", type, action, button);
return;
}
GetPlayer()->addActionButton(button,action,type);
GetPlayer()->addActionButton(spec, button, action, type);
}
}