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:
@@ -38,7 +38,7 @@ namespace Game
|
||||
|
||||
if (store != null && store.HasRecord(record.RecordID))
|
||||
{
|
||||
dbReply.Status = 1;
|
||||
dbReply.Status = HotfixRecord.Status.Valid;
|
||||
dbReply.Timestamp = (uint)GameTime.GetGameTime();
|
||||
store.WriteRecord(record.RecordID, GetSessionDbcLocale(), dbReply.Data);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(TableHash);
|
||||
_worldPacket.WriteUInt32(RecordID);
|
||||
_worldPacket.WriteUInt32(Timestamp);
|
||||
_worldPacket.WriteBits(Status, 2);
|
||||
_worldPacket.WriteBits((byte)Status, 2);
|
||||
_worldPacket.WriteUInt32(Data.GetSize());
|
||||
_worldPacket.WriteBytes(Data.GetData());
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace Game.Networking.Packets
|
||||
public uint TableHash;
|
||||
public uint Timestamp;
|
||||
public uint RecordID;
|
||||
public byte Status = 3;
|
||||
public HotfixRecord.Status Status = HotfixRecord.Status.Invalid;
|
||||
|
||||
public ByteBuffer Data = new ByteBuffer();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user