mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Player: Allow companion action buttons to be saved
This commit is contained in:
@@ -6054,6 +6054,16 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type) co
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case ACTION_BUTTON_COMPANION:
|
||||
{
|
||||
if (!GetSession()->GetBattlePetMgr()->GetPet(ObjectGuid::Create<HighGuid::BattlePet>(action)))
|
||||
{
|
||||
TC_LOG_ERROR("entities.player", "Player::IsActionButtonDataValid: Companion action %u not added into button %u for player %s (%s): companion does not exist",
|
||||
action, button, GetName().c_str(), GetGUID().ToString().c_str());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ACTION_BUTTON_MOUNT:
|
||||
{
|
||||
auto mount = sDB2Manager.GetMountById(action);
|
||||
|
||||
@@ -312,6 +312,7 @@ enum ActionButtonType
|
||||
ACTION_BUTTON_DROPDOWN = 0x30,
|
||||
ACTION_BUTTON_MACRO = 0x40,
|
||||
ACTION_BUTTON_CMACRO = ACTION_BUTTON_C | ACTION_BUTTON_MACRO,
|
||||
ACTION_BUTTON_COMPANION = 0x50,
|
||||
ACTION_BUTTON_MOUNT = 0x60,
|
||||
ACTION_BUTTON_ITEM = 0x80
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user