Core/Player: Extend action button value to uint64 to be able to hold battle pet guids

Port From (https://github.com/TrinityCore/TrinityCore/commit/f67cd38312014b13624dcb5fe1d117dac4892b7d)
This commit is contained in:
hondacrx
2022-09-24 13:50:39 -04:00
parent 1bd88829f2
commit 91e844e9dc
8 changed files with 31 additions and 25 deletions
+4 -2
View File
@@ -413,8 +413,10 @@ namespace Game.Entities
uState = ActionButtonUpdateState.New;
}
public ActionButtonType GetButtonType() { return (ActionButtonType)((packedData & 0xFFFFFFFF00000000) >> 56); }
public uint GetAction() { return (uint)(packedData & 0x00000000FFFFFFFF); }
public ActionButtonType GetButtonType() { return (ActionButtonType)((packedData & 0xFF00000000000000) >> 56); }
public ulong GetAction() { return (packedData & 0x00FFFFFFFFFFFFFF); }
public void SetActionAndType(ulong action, ActionButtonType type)
{
ulong newData = action | ((ulong)type << 56);