Core/Player: Allow companion action buttons to be saved
Port From (https://github.com/TrinityCore/TrinityCore/commit/e15898bf560fc8159777a2a29a29d6a91ffdb590)
This commit is contained in:
@@ -330,6 +330,7 @@ namespace Framework.Constants
|
|||||||
Dropdown = 0x30,
|
Dropdown = 0x30,
|
||||||
Macro = 0x40,
|
Macro = 0x40,
|
||||||
CMacro = C | Macro,
|
CMacro = C | Macro,
|
||||||
|
Companion = 0x50,
|
||||||
Mount = 0x60,
|
Mount = 0x60,
|
||||||
Item = 0x80
|
Item = 0x80
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1363,6 +1363,15 @@ namespace Game.Entities
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
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:
|
case ActionButtonType.Mount:
|
||||||
var mount = CliDB.MountStorage.LookupByKey(action);
|
var mount = CliDB.MountStorage.LookupByKey(action);
|
||||||
if (mount == null)
|
if (mount == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user