Core/PacketIO: Use hotfix status enum instead of magic numbers in SMSG_DB_REPLY

Port From (https://github.com/TrinityCore/TrinityCore/commit/68bdf1c8309c612257679d63c97e8dc62467dbb5)
This commit is contained in:
hondacrx
2021-03-04 14:16:07 -05:00
parent f05dc39449
commit 80d12a5d58
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ namespace Game
if (store != null && store.HasRecord(record.RecordID)) if (store != null && store.HasRecord(record.RecordID))
{ {
dbReply.Status = 1; dbReply.Status = HotfixRecord.Status.Valid;
dbReply.Timestamp = (uint)GameTime.GetGameTime(); dbReply.Timestamp = (uint)GameTime.GetGameTime();
store.WriteRecord(record.RecordID, GetSessionDbcLocale(), dbReply.Data); store.WriteRecord(record.RecordID, GetSessionDbcLocale(), dbReply.Data);
@@ -63,7 +63,7 @@ namespace Game.Networking.Packets
_worldPacket.WriteUInt32(TableHash); _worldPacket.WriteUInt32(TableHash);
_worldPacket.WriteUInt32(RecordID); _worldPacket.WriteUInt32(RecordID);
_worldPacket.WriteUInt32(Timestamp); _worldPacket.WriteUInt32(Timestamp);
_worldPacket.WriteBits(Status, 2); _worldPacket.WriteBits((byte)Status, 2);
_worldPacket.WriteUInt32(Data.GetSize()); _worldPacket.WriteUInt32(Data.GetSize());
_worldPacket.WriteBytes(Data.GetData()); _worldPacket.WriteBytes(Data.GetData());
} }
@@ -71,7 +71,7 @@ namespace Game.Networking.Packets
public uint TableHash; public uint TableHash;
public uint Timestamp; public uint Timestamp;
public uint RecordID; public uint RecordID;
public byte Status = 3; public HotfixRecord.Status Status = HotfixRecord.Status.Invalid;
public ByteBuffer Data = new ByteBuffer(); public ByteBuffer Data = new ByteBuffer();
} }