Core/PacketIO: Add new auction house packet structures (not used yet)

Port From (https://github.com/TrinityCore/TrinityCore/commit/569f1c9f2a4806948521f4c6eab36d406ba45593)
This commit is contained in:
hondacrx
2020-04-25 00:02:23 -04:00
parent 25feacd08e
commit aa7fe7a3a1
5 changed files with 959 additions and 473 deletions
@@ -0,0 +1,51 @@
/*
* Copyright (C) 2012-2020 CypherCore <http://github.com/CypherCore>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Framework.Constants;
using Game.Entities;
using System;
using System.Collections.Generic;
using Framework.Dynamic;
namespace Game.Network.Packets
{
public struct AddOnInfo
{
public string Name;
public string Version;
public bool Loaded;
public bool Enabled;
public void Read(WorldPacket data)
{
uint nameLength = data.ReadBits<uint>(10);
uint versionLength = data.ReadBits<uint>(10);
Loaded = data.HasBit();
Enabled = data.HasBit();
if (nameLength > 1)
{
Name = data.ReadString(nameLength - 1);
data.ReadUInt8(); // null terminator
}
if (versionLength > 1)
{
Version = data.ReadString(versionLength - 1);
data.ReadUInt8(); // null terminator
}
}
}
}
File diff suppressed because it is too large Load Diff