diff --git a/Source/Framework/Constants/PlayerConst.cs b/Source/Framework/Constants/PlayerConst.cs index d59f2d5bc..3e87cb6cb 100644 --- a/Source/Framework/Constants/PlayerConst.cs +++ b/Source/Framework/Constants/PlayerConst.cs @@ -330,6 +330,7 @@ namespace Framework.Constants Dropdown = 0x30, Macro = 0x40, CMacro = C | Macro, + Companion = 0x50, Mount = 0x60, Item = 0x80 } diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index 721ebf9c6..3582a4bd3 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -1363,6 +1363,15 @@ namespace Game.Entities return false; } break; + case ActionButtonType.Companion: + { + if (GetSession().GetBattlePetMgr().GetPet(ObjectGuid.Create(HighGuid.BattlePet, action)) == null) + { + Log.outError(LogFilter.Player, $"Player::IsActionButtonDataValid: Companion action {action} not added into button {button} for player {GetName()} ({GetGUID()}): companion does not exist"); + return false; + } + break; + } case ActionButtonType.Mount: var mount = CliDB.MountStorage.LookupByKey(action); if (mount == null)