Core/PacketIO: Update opcodes and packet structures to 8.2.5

Port From (https://github.com/TrinityCore/TrinityCore/commit/ee2e49429f4383732b4e0f39b493470b9c1dd10c)
This commit is contained in:
hondacrx
2019-10-28 14:33:43 -04:00
parent 1e2ce61e5c
commit c6e53b2ba7
34 changed files with 1792 additions and 1280 deletions
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -105,7 +105,8 @@ namespace Framework.Constants
CommerceObj = 45, CommerceObj = 45,
ClientSession = 46, ClientSession = 46,
Cast = 47, Cast = 47,
ClientConnection = 48 ClientConnection = 48,
ClubFinder = 49
} }
public enum NotifyFlags public enum NotifyFlags
@@ -837,8 +837,8 @@ namespace Game.BattleGrounds.Zones
{ {
base.BuildPvPLogPlayerDataPacket(out playerData); base.BuildPvPLogPlayerDataPacket(out playerData);
playerData.Stats.Add(BasesAssaulted); playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)ABObjectives.AssaultBase, BasesAssaulted));
playerData.Stats.Add(BasesDefended); playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)ABObjectives.DefendBase, BasesDefended));
} }
public override uint GetAttr1() { return BasesAssaulted; } public override uint GetAttr1() { return BasesAssaulted; }
@@ -1003,7 +1003,7 @@ namespace Game.BattleGrounds.Zones
{ {
base.BuildPvPLogPlayerDataPacket(out playerData); base.BuildPvPLogPlayerDataPacket(out playerData);
playerData.Stats.Add(FlagCaptures); playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)EotSMisc.ObjectiveCaptureFlag, FlagCaptures));
} }
public override uint GetAttr1() { return FlagCaptures; } public override uint GetAttr1() { return FlagCaptures; }
@@ -1088,6 +1088,25 @@ namespace Game.BattleGrounds.Zones
return true; return true;
} }
public override bool UpdatePlayerScore(Player player, ScoreType type, uint value, bool doAddHonor = true)
{
if (!base.UpdatePlayerScore(player, type, value, doAddHonor))
return false;
switch (type)
{
case ScoreType.DestroyedDemolisher:
player.UpdateCriteria(CriteriaTypes.BgObjectiveCapture, (uint)SAObjectives.DemolishersDestroyed);
break;
case ScoreType.DestroyedWall:
player.UpdateCriteria(CriteriaTypes.BgObjectiveCapture, (uint)SAObjectives.GatesDestroyed);
break;
default:
break;
}
return true;
}
SAGateInfo GetGate(uint entry) SAGateInfo GetGate(uint entry)
{ {
foreach (var gate in SAMiscConst.Gates) foreach (var gate in SAMiscConst.Gates)
@@ -1157,8 +1176,8 @@ namespace Game.BattleGrounds.Zones
{ {
base.BuildPvPLogPlayerDataPacket(out playerData); base.BuildPvPLogPlayerDataPacket(out playerData);
playerData.Stats.Add(DemolishersDestroyed); playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)SAObjectives.DemolishersDestroyed, DemolishersDestroyed));
playerData.Stats.Add(GatesDestroyed); playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)SAObjectives.GatesDestroyed, GatesDestroyed));
} }
public override uint GetAttr1() { return DemolishersDestroyed; } public override uint GetAttr1() { return DemolishersDestroyed; }
@@ -1643,5 +1662,11 @@ namespace Game.BattleGrounds.Zones
public const int CentralCapturableGy = 4; public const int CentralCapturableGy = 4;
public const int Max = 5; public const int Max = 5;
} }
enum SAObjectives
{
GatesDestroyed = 231,
DemolishersDestroyed = 232
}
#endregion #endregion
} }
@@ -789,10 +789,10 @@ namespace Game.BattleGrounds.Zones
switch (type) switch (type)
{ {
case ScoreType.FlagCaptures: // flags captured case ScoreType.FlagCaptures: // flags captured
player.UpdateCriteria(CriteriaTypes.BgObjectiveCapture, 42); player.UpdateCriteria(CriteriaTypes.BgObjectiveCapture, WSObjectives.CaptureFlag);
break; break;
case ScoreType.FlagReturns: // flags returned case ScoreType.FlagReturns: // flags returned
player.UpdateCriteria(CriteriaTypes.BgObjectiveCapture, 44); player.UpdateCriteria(CriteriaTypes.BgObjectiveCapture, WSObjectives.ReturnFlag);
break; break;
default: default:
break; break;
@@ -970,8 +970,8 @@ namespace Game.BattleGrounds.Zones
{ {
base.BuildPvPLogPlayerDataPacket(out playerData); base.BuildPvPLogPlayerDataPacket(out playerData);
playerData.Stats.Add(FlagCaptures); playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat(WSObjectives.CaptureFlag, FlagCaptures));
playerData.Stats.Add(FlagReturns); playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat(WSObjectives.ReturnFlag, FlagReturns));
} }
public override uint GetAttr1() { return FlagCaptures; } public override uint GetAttr1() { return FlagCaptures; }
@@ -1115,5 +1115,10 @@ namespace Game.BattleGrounds.Zones
public const uint AllianceFlagReturned = 9808; public const uint AllianceFlagReturned = 9808;
public const uint HordeFlagReturned = 9809; public const uint HordeFlagReturned = 9809;
} }
struct WSObjectives
{
public const int CaptureFlag = 42;
public const int ReturnFlag = 44;
}
#endregion #endregion
} }
+6 -2
View File
@@ -30,11 +30,12 @@ namespace Game.Chat
{ {
public class Channel public class Channel
{ {
public Channel(uint channelId, Team team = 0, AreaTableRecord zoneEntry = null) public Channel(ObjectGuid guid, uint channelId, Team team = 0, AreaTableRecord zoneEntry = null)
{ {
_channelFlags = ChannelFlags.General; _channelFlags = ChannelFlags.General;
_channelId = channelId; _channelId = channelId;
_channelTeam = team; _channelTeam = team;
_channelGuid = guid;
_zoneEntry = zoneEntry; _zoneEntry = zoneEntry;
ChatChannelsRecord channelEntry = CliDB.ChatChannelsStorage.LookupByKey(channelId); ChatChannelsRecord channelEntry = CliDB.ChatChannelsStorage.LookupByKey(channelId);
@@ -50,12 +51,13 @@ namespace Game.Chat
_channelFlags |= ChannelFlags.NotLfg; _channelFlags |= ChannelFlags.NotLfg;
} }
public Channel(string name, Team team = 0) public Channel(ObjectGuid guid, string name, Team team = 0)
{ {
_announceEnabled = true; _announceEnabled = true;
_ownershipEnabled = true; _ownershipEnabled = true;
_channelFlags = ChannelFlags.Custom; _channelFlags = ChannelFlags.Custom;
_channelTeam = team; _channelTeam = team;
_channelGuid = guid;
_channelName = name; _channelName = name;
// If storing custom channels in the db is enabled either load or save the channel // If storing custom channels in the db is enabled either load or save the channel
@@ -881,6 +883,7 @@ namespace Game.Chat
} }
public uint GetChannelId() { return _channelId; } public uint GetChannelId() { return _channelId; }
public ObjectGuid GetChannelGuid() { return _channelGuid; }
public bool IsConstant() { return _channelId != 0; } public bool IsConstant() { return _channelId != 0; }
public bool IsLFG() { return GetFlags().HasAnyFlag(ChannelFlags.Lfg); } public bool IsLFG() { return GetFlags().HasAnyFlag(ChannelFlags.Lfg); }
@@ -924,6 +927,7 @@ namespace Game.Chat
ChannelFlags _channelFlags; ChannelFlags _channelFlags;
uint _channelId; uint _channelId;
Team _channelTeam; Team _channelTeam;
ObjectGuid _channelGuid;
ObjectGuid _ownerGuid; ObjectGuid _ownerGuid;
string _channelName; string _channelName;
string _channelPassword; string _channelPassword;
@@ -71,6 +71,7 @@ namespace Game.Chat
//notify.InstanceID = 0; //notify.InstanceID = 0;
notify.ChannelFlags = _source.GetFlags(); notify.ChannelFlags = _source.GetFlags();
notify.Channel = _source.GetName(localeIdx); notify.Channel = _source.GetName(localeIdx);
notify.ChannelGUID = _source.GetChannelGuid();
return notify; return notify;
} }
+47 -26
View File
@@ -29,6 +29,7 @@ namespace Game.Chat
public ChannelManager(Team team) public ChannelManager(Team team)
{ {
_team = team; _team = team;
_guidGenerator = new ObjectGuidGenerator(HighGuid.ChatChannel);
} }
public static ChannelManager ForTeam(Team team) public static ChannelManager ForTeam(Team team)
@@ -61,18 +62,13 @@ namespace Game.Chat
{ {
if (channelId != 0) // builtin if (channelId != 0) // builtin
{ {
ChatChannelsRecord channelEntry = CliDB.ChatChannelsStorage.LookupByKey(channelId); ObjectGuid channelGuid = CreateBuiltinChannelGuid(channelId, zoneEntry);
uint zoneId = zoneEntry != null ? zoneEntry.Id : 0; var channel = _channels.LookupByKey(channelGuid);
if (channelEntry.Flags.HasAnyFlag(ChannelDBCFlags.Global | ChannelDBCFlags.CityOnly))
zoneId = 0;
Tuple<uint, uint> key = Tuple.Create(channelId, zoneId);
var channel = _channels.LookupByKey(key);
if (channel != null) if (channel != null)
return channel; return channel;
Channel newChannel = new Channel(channelId, _team, zoneEntry); Channel newChannel = new Channel(channelGuid, channelId, _team, zoneEntry);
_channels[key] = newChannel; _channels[channelGuid] = newChannel;
return newChannel; return newChannel;
} }
else // custom else // custom
@@ -81,7 +77,7 @@ namespace Game.Chat
if (channel != null) if (channel != null)
return channel; return channel;
Channel newChannel = new Channel(name, _team); Channel newChannel = new Channel(CreateCustomChannelGuid(), name, _team);
_customChannels[name.ToLower()] = newChannel; _customChannels[name.ToLower()] = newChannel;
return newChannel; return newChannel;
} }
@@ -92,13 +88,7 @@ namespace Game.Chat
Channel result = null; Channel result = null;
if (channelId != 0) // builtin if (channelId != 0) // builtin
{ {
ChatChannelsRecord channelEntry = CliDB.ChatChannelsStorage.LookupByKey(channelId); var channel = _channels.LookupByKey(CreateBuiltinChannelGuid(channelId, zoneEntry));
uint zoneId = zoneEntry != null ? zoneEntry.Id : 0;
if (channelEntry.Flags.HasAnyFlag(ChannelDBCFlags.Global | ChannelDBCFlags.CityOnly))
zoneId = 0;
Tuple<uint, uint> key = Tuple.Create(channelId, zoneId);
var channel = _channels.LookupByKey(key);
if (channel != null) if (channel != null)
result = channel; result = channel;
} }
@@ -134,18 +124,13 @@ namespace Game.Chat
public void LeftChannel(uint channelId, AreaTableRecord zoneEntry) public void LeftChannel(uint channelId, AreaTableRecord zoneEntry)
{ {
ChatChannelsRecord channelEntry = CliDB.ChatChannelsStorage.LookupByKey(channelId); var guid = CreateBuiltinChannelGuid(channelId, zoneEntry);
uint zoneId = zoneEntry != null ? zoneEntry.Id : 0; var channel = _channels.LookupByKey(guid);
if (channelEntry.Flags.HasAnyFlag(ChannelDBCFlags.Global | ChannelDBCFlags.CityOnly))
zoneId = 0;
Tuple<uint, uint> key = Tuple.Create(channelId, zoneId);
var channel = _channels.LookupByKey(key);
if (channel == null) if (channel == null)
return; return;
if (channel.GetNumPlayers() == 0) if (channel.GetNumPlayers() == 0)
_channels.Remove(key); _channels.Remove(guid);
} }
public static void SendNotOnChannelNotify(Player player, string name) public static void SendNotOnChannelNotify(Player player, string name)
@@ -156,9 +141,45 @@ namespace Game.Chat
player.SendPacket(notify); player.SendPacket(notify);
} }
ObjectGuid CreateCustomChannelGuid()
{
ulong high = 0;
high |= (ulong)HighGuid.ChatChannel << 58;
high |= (ulong)Global.WorldMgr.GetRealmId().Realm << 42;
high |= (ulong)(_team == Team.Alliance ? 3 : 5) << 4;
ObjectGuid channelGuid = new ObjectGuid();
channelGuid.SetRawValue(high, _guidGenerator.Generate());
return channelGuid;
}
ObjectGuid CreateBuiltinChannelGuid(uint channelId, AreaTableRecord zoneEntry = null)
{
ChatChannelsRecord channelEntry = CliDB.ChatChannelsStorage.LookupByKey(channelId);
uint zoneId = zoneEntry != null ? zoneEntry.Id : 0;
if (channelEntry.Flags.HasAnyFlag(ChannelDBCFlags.Global | ChannelDBCFlags.CityOnly))
zoneId = 0;
ulong high = 0;
high |= (ulong)HighGuid.ChatChannel << 58;
high |= (ulong)Global.WorldMgr.GetRealmId().Realm << 42;
high |= 1ul << 25; // built-in
if (channelEntry.Flags.HasAnyFlag(ChannelDBCFlags.CityOnly2))
high |= 1ul << 24; // trade
high |= (ulong)(zoneId) << 10;
high |= (ulong)(_team == Team.Alliance ? 3 : 5) << 4;
ObjectGuid channelGuid = new ObjectGuid();
channelGuid.SetRawValue(high, channelId);
return channelGuid;
}
Dictionary<string, Channel> _customChannels = new Dictionary<string, Channel>(); Dictionary<string, Channel> _customChannels = new Dictionary<string, Channel>();
Dictionary<Tuple<uint /*channelId*/, uint /*zoneId*/>, Channel> _channels = new Dictionary<Tuple<uint, uint>, Channel>(); Dictionary<ObjectGuid, Channel> _channels = new Dictionary<ObjectGuid, Channel>();
Team _team; Team _team;
ObjectGuidGenerator _guidGenerator;
static ChannelManager allianceChannelMgr = new ChannelManager(Team.Alliance); static ChannelManager allianceChannelMgr = new ChannelManager(Team.Alliance);
static ChannelManager hordeChannelMgr = new ChannelManager(Team.Horde); static ChannelManager hordeChannelMgr = new ChannelManager(Team.Horde);
+1
View File
@@ -434,6 +434,7 @@ namespace Game.Misc
packet.PortraitGiver = quest.QuestGiverPortrait; packet.PortraitGiver = quest.QuestGiverPortrait;
packet.PortraitGiverMount = quest.QuestGiverPortraitMount; packet.PortraitGiverMount = quest.QuestGiverPortraitMount;
packet.PortraitTurnIn = quest.QuestTurnInPortrait; packet.PortraitTurnIn = quest.QuestTurnInPortrait;
packet.QuestSessionBonus = 0; //quest.GetQuestSessionBonus(); // this is only sent while quest session is active
packet.AutoLaunched = autoLaunched; packet.AutoLaunched = autoLaunched;
packet.DisplayPopup = displayPopup; packet.DisplayPopup = displayPopup;
packet.QuestFlags[0] = (uint)(quest.Flags & (WorldConfig.GetBoolValue(WorldCfg.QuestIgnoreAutoAccept) ? ~QuestFlags.AutoAccept : ~QuestFlags.None)); packet.QuestFlags[0] = (uint)(quest.Flags & (WorldConfig.GetBoolValue(WorldCfg.QuestIgnoreAutoAccept) ? ~QuestFlags.AutoAccept : ~QuestFlags.None));
@@ -295,6 +295,7 @@ namespace Game.Entities
{ {
case HighGuid.Player: case HighGuid.Player:
case HighGuid.Item: case HighGuid.Item:
case HighGuid.ChatChannel:
case HighGuid.Transport: case HighGuid.Transport:
case HighGuid.Guild: case HighGuid.Guild:
return true; return true;
@@ -319,8 +319,10 @@ namespace Game.Entities
_changesMask = new UpdateMask(changeMask); _changesMask = new UpdateMask(changeMask);
} }
public abstract void WriteCreate(WorldPacket data, UpdateFieldFlag fieldVisibilityFlags, T owner, Player receiver); public virtual void WriteCreate(WorldPacket data, T owner, Player receiver) { }
public abstract void WriteUpdate(WorldPacket data, UpdateFieldFlag fieldVisibilityFlags, T owner, Player receiver); public virtual void WriteUpdate(WorldPacket data, T owner, Player receiver) { }
public virtual void WriteCreate(WorldPacket data, UpdateFieldFlag fieldVisibilityFlags, T owner, Player receiver) { }
public virtual void WriteUpdate(WorldPacket data, UpdateFieldFlag fieldVisibilityFlags, T owner, Player receiver) { }
public abstract void ClearChangesMask(); public abstract void ClearChangesMask();
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -3205,17 +3205,17 @@ namespace Game.Entities
Item item = GetItemByPos(InventorySlots.Bag0, i); Item item = GetItemByPos(InventorySlots.Bag0, i);
if (item != null) if (item != null)
{ {
ss.Append($"{item.GetTemplate().GetInventoryType()} {item.GetDisplayId(this)} "); ss.Append($"{(uint)item.GetTemplate().GetInventoryType()} {item.GetDisplayId(this)} ");
SpellItemEnchantmentRecord enchant = CliDB.SpellItemEnchantmentStorage.LookupByKey(item.GetVisibleEnchantmentId(this)); SpellItemEnchantmentRecord enchant = CliDB.SpellItemEnchantmentStorage.LookupByKey(item.GetVisibleEnchantmentId(this));
if (enchant != null) if (enchant != null)
ss.Append(enchant.ItemVisual); ss.Append(enchant.ItemVisual);
else else
ss.Append('0'); ss.Append('0');
ss.Append(' '); ss.Append($" {(uint)CliDB.ItemStorage.LookupByKey(item.GetVisibleEntry(this)).SubclassID} ");
} }
else else
ss.Append("0 0 0 "); ss.Append("0 0 0 0 ");
} }
stmt.AddValue(index++, ss.ToString()); stmt.AddValue(index++, ss.ToString());
@@ -3362,10 +3362,10 @@ namespace Game.Entities
else else
ss.Append('0'); ss.Append('0');
ss.Append(' '); ss.Append($" {(uint)CliDB.ItemStorage.LookupByKey(item.GetVisibleEntry(this)).SubclassID} ");
} }
else else
ss.Append("0 0 0 "); ss.Append("0 0 0 0 ");
} }
stmt.AddValue(index++, ss.ToString()); stmt.AddValue(index++, ss.ToString());
+3 -3
View File
@@ -6252,9 +6252,9 @@ namespace Game
"RewardFactionID5, RewardFactionValue5, RewardFactionOverride5, RewardFactionCapIn5, RewardFactionFlags, " + "RewardFactionID5, RewardFactionValue5, RewardFactionOverride5, RewardFactionCapIn5, RewardFactionFlags, " +
//96 97 98 99 100 101 102 103 //96 97 98 99 100 101 102 103
"RewardCurrencyID1, RewardCurrencyQty1, RewardCurrencyID2, RewardCurrencyQty2, RewardCurrencyID3, RewardCurrencyQty3, RewardCurrencyID4, RewardCurrencyQty4, " + "RewardCurrencyID1, RewardCurrencyQty1, RewardCurrencyID2, RewardCurrencyQty2, RewardCurrencyID3, RewardCurrencyQty3, RewardCurrencyID4, RewardCurrencyQty4, " +
//104 105 106 107 108 109 110 111 //104 105 106 107 108 109 110 111 112
"AcceptedSoundKitID, CompleteSoundKitID, AreaGroupID, TimeAllowed, AllowableRaces, TreasurePickerID, Expansion, ManagedWorldStateID, " + "AcceptedSoundKitID, CompleteSoundKitID, AreaGroupID, TimeAllowed, AllowableRaces, TreasurePickerID, Expansion, ManagedWorldStateID, QuestSessionBonus, " +
//112 113 114 115 116 117 118 119 120 //113 114 115 116 117 118 119 120 121
"LogTitle, LogDescription, QuestDescription, AreaDescription, PortraitGiverText, PortraitGiverName, PortraitTurnInText, PortraitTurnInName, QuestCompletionLog" + "LogTitle, LogDescription, QuestDescription, AreaDescription, PortraitGiverText, PortraitGiverName, PortraitTurnInText, PortraitTurnInName, QuestCompletionLog" +
" FROM quest_template"); " FROM quest_template");
+8 -9
View File
@@ -73,24 +73,24 @@ namespace Game
Log.outInfo(LogFilter.Network, "Loading Character {0} from account {1}.", charInfo.Guid.ToString(), GetAccountId()); Log.outInfo(LogFilter.Network, "Loading Character {0} from account {1}.", charInfo.Guid.ToString(), GetAccountId());
if (!Player.ValidateAppearance((Race)charInfo.RaceId, charInfo.ClassId, (Gender)charInfo.Sex, charInfo.HairStyle, charInfo.HairColor, charInfo.Face, charInfo.FacialHair, charInfo.Skin, charInfo.CustomDisplay)) if (!Player.ValidateAppearance((Race)charInfo.RaceId, charInfo.ClassId, (Gender)charInfo.SexId, charInfo.HairStyle, charInfo.HairColor, charInfo.FaceId, charInfo.FacialHair, charInfo.SkinId, charInfo.CustomDisplay))
{ {
Log.outError(LogFilter.Player, "Player {0} has wrong Appearance values (Hair/Skin/Color), forcing recustomize", charInfo.Guid.ToString()); Log.outError(LogFilter.Player, "Player {0} has wrong Appearance values (Hair/Skin/Color), forcing recustomize", charInfo.Guid.ToString());
// Make sure customization always works properly - send all zeroes instead // Make sure customization always works properly - send all zeroes instead
charInfo.Skin = 0; charInfo.SkinId = 0;
charInfo.Face = 0; charInfo.FaceId = 0;
charInfo.HairStyle = 0; charInfo.HairStyle = 0;
charInfo.HairColor = 0; charInfo.HairColor = 0;
charInfo.FacialHair = 0; charInfo.FacialHair = 0;
if (charInfo.CustomizationFlag != CharacterCustomizeFlags.Customize) if (charInfo.Flags2 != CharacterCustomizeFlags.Customize)
{ {
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_ADD_AT_LOGIN_FLAG); PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_ADD_AT_LOGIN_FLAG);
stmt.AddValue(0, (ushort)AtLoginFlags.Customize); stmt.AddValue(0, (ushort)AtLoginFlags.Customize);
stmt.AddValue(1, charInfo.Guid.GetCounter()); stmt.AddValue(1, charInfo.Guid.GetCounter());
DB.Characters.Execute(stmt); DB.Characters.Execute(stmt);
charInfo.CustomizationFlag = CharacterCustomizeFlags.Customize; charInfo.Flags2 = CharacterCustomizeFlags.Customize;
} }
} }
@@ -99,7 +99,7 @@ namespace Game
_legitCharacters.Add(charInfo.Guid); _legitCharacters.Add(charInfo.Guid);
if (!Global.CharacterCacheStorage.HasCharacterCacheEntry(charInfo.Guid)) // This can happen if characters are inserted into the database manually. Core hasn't loaded name data yet. if (!Global.CharacterCacheStorage.HasCharacterCacheEntry(charInfo.Guid)) // This can happen if characters are inserted into the database manually. Core hasn't loaded name data yet.
Global.CharacterCacheStorage.AddCharacterCacheEntry(charInfo.Guid, GetAccountId(), charInfo.Name, charInfo.Sex, charInfo.RaceId, (byte)charInfo.ClassId, charInfo.Level, false); Global.CharacterCacheStorage.AddCharacterCacheEntry(charInfo.Guid, GetAccountId(), charInfo.Name, charInfo.SexId, charInfo.RaceId, (byte)charInfo.ClassId, charInfo.ExperienceLevel, false);
if (charInfo.ClassId == Class.DemonHunter) if (charInfo.ClassId == Class.DemonHunter)
demonHunterCount++; demonHunterCount++;
@@ -109,7 +109,7 @@ namespace Game
else else
charResult.HasDemonHunterOnRealm = false; charResult.HasDemonHunterOnRealm = false;
charResult.MaxCharacterLevel = Math.Max(charResult.MaxCharacterLevel, charInfo.Level); charResult.MaxCharacterLevel = Math.Max(charResult.MaxCharacterLevel, charInfo.ExperienceLevel);
charResult.Characters.Add(charInfo); charResult.Characters.Add(charInfo);
} }
@@ -163,7 +163,7 @@ namespace Game
Log.outInfo(LogFilter.Network, "Loading undeleted char guid {0} from account {1}.", charInfo.Guid.ToString(), GetAccountId()); Log.outInfo(LogFilter.Network, "Loading undeleted char guid {0} from account {1}.", charInfo.Guid.ToString(), GetAccountId());
if (!Global.CharacterCacheStorage.HasCharacterCacheEntry(charInfo.Guid)) // This can happen if characters are inserted into the database manually. Core hasn't loaded name data yet. if (!Global.CharacterCacheStorage.HasCharacterCacheEntry(charInfo.Guid)) // This can happen if characters are inserted into the database manually. Core hasn't loaded name data yet.
Global.CharacterCacheStorage.AddCharacterCacheEntry(charInfo.Guid, GetAccountId(), charInfo.Name, charInfo.Sex, charInfo.RaceId, (byte)charInfo.ClassId, charInfo.Level, true); Global.CharacterCacheStorage.AddCharacterCacheEntry(charInfo.Guid, GetAccountId(), charInfo.Name, charInfo.SexId, charInfo.RaceId, (byte)charInfo.ClassId, charInfo.ExperienceLevel, true);
charEnum.Characters.Add(charInfo); charEnum.Characters.Add(charInfo);
} }
@@ -891,7 +891,6 @@ namespace Game
features.CfgRealmID = 2; features.CfgRealmID = 2;
features.CfgRealmRecID = 0; features.CfgRealmRecID = 0;
features.TokenPollTimeSeconds = 300; features.TokenPollTimeSeconds = 300;
features.TokenRedeemIndex = 0;
features.VoiceEnabled = false; features.VoiceEnabled = false;
features.BrowserEnabled = false; // Has to be false, otherwise client will crash if "Customer Support" is opened features.BrowserEnabled = false; // Has to be false, otherwise client will crash if "Customer Support" is opened
+1
View File
@@ -285,6 +285,7 @@ namespace Game
lfgUpdateStatus.Joined = join; lfgUpdateStatus.Joined = join;
lfgUpdateStatus.LfgJoined = updateData.updateType != LfgUpdateType.RemovedFromQueue; lfgUpdateStatus.LfgJoined = updateData.updateType != LfgUpdateType.RemovedFromQueue;
lfgUpdateStatus.Queued = queued; lfgUpdateStatus.Queued = queued;
lfgUpdateStatus.QueueMapID = Global.LFGMgr.GetDungeonMapId(_player.GetGUID());
SendPacket(lfgUpdateStatus); SendPacket(lfgUpdateStatus);
} }
+5 -5
View File
@@ -24,7 +24,7 @@ namespace Game
{ {
public partial class WorldSession public partial class WorldSession
{ {
[WorldPacketHandler(ClientOpcodes.GrantLevel)] //[WorldPacketHandler(ClientOpcodes.GrantLevel)]
void HandleGrantLevel(GrantLevel grantLevel) void HandleGrantLevel(GrantLevel grantLevel)
{ {
Player target = Global.ObjAccessor.GetPlayer(GetPlayer(), grantLevel.Target); Player target = Global.ObjAccessor.GetPlayer(GetPlayer(), grantLevel.Target);
@@ -60,12 +60,12 @@ namespace Game
return; return;
} }
ProposeLevelGrant proposeLevelGrant = new ProposeLevelGrant(); //ProposeLevelGrant proposeLevelGrant = new ProposeLevelGrant();
proposeLevelGrant.Sender = GetPlayer().GetGUID(); //proposeLevelGrant.Sender = GetPlayer().GetGUID();
target.SendPacket(proposeLevelGrant); //target.SendPacket(proposeLevelGrant);
} }
[WorldPacketHandler(ClientOpcodes.AcceptLevelGrant)] //[WorldPacketHandler(ClientOpcodes.AcceptLevelGrant)]
void HandleAcceptGrantLevel(AcceptLevelGrant acceptLevelGrant) void HandleAcceptGrantLevel(AcceptLevelGrant acceptLevelGrant)
{ {
Player other = Global.ObjAccessor.GetPlayer(GetPlayer(), acceptLevelGrant.Granter); Player other = Global.ObjAccessor.GetPlayer(GetPlayer(), acceptLevelGrant.Granter);
@@ -19,6 +19,7 @@ using Framework.Constants;
using Game.Entities; using Game.Entities;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Framework.Dynamic;
namespace Game.Network.Packets namespace Game.Network.Packets
{ {
@@ -302,7 +303,11 @@ namespace Game.Network.Packets
data.WriteUInt32(TimeFromStart); data.WriteUInt32(TimeFromStart);
data.WriteUInt32(TimeFromCreate); data.WriteUInt32(TimeFromCreate);
data.WriteBits(Flags, 4); data.WriteBits(Flags, 4);
data.WriteBit(RafAcceptanceID.HasValue);
data.FlushBits(); data.FlushBits();
if (RafAcceptanceID.HasValue)
data.WriteUInt64(RafAcceptanceID.Value);
} }
public uint Id; public uint Id;
@@ -312,6 +317,7 @@ namespace Game.Network.Packets
public long Date; public long Date;
public uint TimeFromStart; public uint TimeFromStart;
public uint TimeFromCreate; public uint TimeFromCreate;
public Optional<ulong> RafAcceptanceID;
} }
public struct GuildCriteriaProgress public struct GuildCriteriaProgress
@@ -135,6 +135,25 @@ namespace Game.Network.Packets
public uint ContributionPoints; public uint ContributionPoints;
} }
public struct PVPMatchPlayerPVPStat
{
public int PvpStatID;
public uint PvpStatValue;
public PVPMatchPlayerPVPStat(int pvpStatID, uint pvpStatValue)
{
PvpStatID = pvpStatID;
PvpStatValue = pvpStatValue;
}
public void Write(WorldPacket data)
{
data.WriteInt32(PvpStatID);
data.WriteUInt32(PvpStatValue);
}
}
public class PVPMatchPlayerStatistics public class PVPMatchPlayerStatistics
{ {
public void Write(WorldPacket data) public void Write(WorldPacket data)
@@ -151,8 +170,8 @@ namespace Game.Network.Packets
data.WriteInt32(CreatureID); data.WriteInt32(CreatureID);
data.WriteInt32(HonorLevel); data.WriteInt32(HonorLevel);
foreach (var id in Stats) foreach (var pvpStat in Stats)
data.WriteUInt32(id); pvpStat.Write(data);
data.WriteBit(Faction); data.WriteBit(Faction);
data.WriteBit(IsInWorld); data.WriteBit(IsInWorld);
@@ -190,7 +209,7 @@ namespace Game.Network.Packets
public Optional<int> RatingChange; public Optional<int> RatingChange;
public Optional<uint> PreMatchMMR; public Optional<uint> PreMatchMMR;
public Optional<int> MmrChange; public Optional<int> MmrChange;
public List<uint> Stats = new List<uint>(); public List<PVPMatchPlayerPVPStat> Stats = new List<PVPMatchPlayerPVPStat>();
public int PrimaryTalentTree; public int PrimaryTalentTree;
public int Sex; public int Sex;
public Race PlayerRace; public Race PlayerRace;
@@ -116,6 +116,7 @@ namespace Game.Network.Packets
_worldPacket.WriteUInt32((uint)ChannelFlags); _worldPacket.WriteUInt32((uint)ChannelFlags);
_worldPacket.WriteInt32(ChatChannelID); _worldPacket.WriteInt32(ChatChannelID);
_worldPacket.WriteUInt64((ulong)InstanceID); _worldPacket.WriteUInt64((ulong)InstanceID);
_worldPacket.WritePackedGuid(ChannelGUID);
_worldPacket.WriteString(Channel); _worldPacket.WriteString(Channel);
_worldPacket.WriteString(ChannelWelcomeMsg); _worldPacket.WriteString(ChannelWelcomeMsg);
} }
@@ -125,6 +126,7 @@ namespace Game.Network.Packets
public int InstanceID; public int InstanceID;
public ChannelFlags ChannelFlags; public ChannelFlags ChannelFlags;
public string Channel = ""; public string Channel = "";
public ObjectGuid ChannelGUID;
} }
public class ChannelNotifyLeft : ServerPacket public class ChannelNotifyLeft : ServerPacket
+35 -30
View File
@@ -97,19 +97,19 @@ namespace Game.Network.Packets
Name = fields.Read<string>(1); Name = fields.Read<string>(1);
RaceId = fields.Read<byte>(2); RaceId = fields.Read<byte>(2);
ClassId = (Class)fields.Read<byte>(3); ClassId = (Class)fields.Read<byte>(3);
Sex = fields.Read<byte>(4); SexId = fields.Read<byte>(4);
Skin = fields.Read<byte>(5); SkinId = fields.Read<byte>(5);
Face = fields.Read<byte>(6); FaceId = fields.Read<byte>(6);
HairStyle = fields.Read<byte>(7); HairStyle = fields.Read<byte>(7);
HairColor = fields.Read<byte>(8); HairColor = fields.Read<byte>(8);
FacialHair = fields.Read<byte>(9); FacialHair = fields.Read<byte>(9);
CustomDisplay[0] = fields.Read<byte>(10); CustomDisplay[0] = fields.Read<byte>(10);
CustomDisplay[1] = fields.Read<byte>(11); CustomDisplay[1] = fields.Read<byte>(11);
CustomDisplay[2] = fields.Read<byte>(12); CustomDisplay[2] = fields.Read<byte>(12);
Level = fields.Read<byte>(13); ExperienceLevel = fields.Read<byte>(13);
ZoneId = fields.Read<uint>(14); ZoneId = fields.Read<uint>(14);
MapId = fields.Read<uint>(15); MapId = fields.Read<uint>(15);
PreLoadPosition = new Vector3(fields.Read<float>(16), fields.Read<float>(17), fields.Read<float>(18)); PreloadPos = new Vector3(fields.Read<float>(16), fields.Read<float>(17), fields.Read<float>(18));
ulong guildId = fields.Read<ulong>(19); ulong guildId = fields.Read<ulong>(19);
if (guildId != 0) if (guildId != 0)
@@ -134,11 +134,11 @@ namespace Game.Network.Packets
Flags |= CharacterFlags.Declined; Flags |= CharacterFlags.Declined;
if (atLoginFlags.HasAnyFlag(AtLoginFlags.Customize)) if (atLoginFlags.HasAnyFlag(AtLoginFlags.Customize))
CustomizationFlag = CharacterCustomizeFlags.Customize; Flags2 = CharacterCustomizeFlags.Customize;
else if (atLoginFlags.HasAnyFlag(AtLoginFlags.ChangeFaction)) else if (atLoginFlags.HasAnyFlag(AtLoginFlags.ChangeFaction))
CustomizationFlag = CharacterCustomizeFlags.Faction; Flags2 = CharacterCustomizeFlags.Faction;
else if (atLoginFlags.HasAnyFlag(AtLoginFlags.ChangeRace)) else if (atLoginFlags.HasAnyFlag(AtLoginFlags.ChangeRace))
CustomizationFlag = CharacterCustomizeFlags.Race; Flags2 = CharacterCustomizeFlags.Race;
Flags3 = 0; Flags3 = 0;
Flags4 = 0; Flags4 = 0;
@@ -150,9 +150,9 @@ namespace Game.Network.Packets
CreatureTemplate creatureInfo = Global.ObjectMgr.GetCreatureTemplate(fields.Read<uint>(22)); CreatureTemplate creatureInfo = Global.ObjectMgr.GetCreatureTemplate(fields.Read<uint>(22));
if (creatureInfo != null) if (creatureInfo != null)
{ {
Pet.CreatureDisplayId = fields.Read<uint>(23); PetCreatureDisplayId = fields.Read<uint>(23);
Pet.Level = fields.Read<ushort>(24); PetExperienceLevel = fields.Read<ushort>(24);
Pet.CreatureFamily = (uint)creatureInfo.Family; PetCreatureFamilyId = (uint)creatureInfo.Family;
} }
} }
@@ -172,9 +172,10 @@ namespace Game.Network.Packets
for (byte slot = 0; slot < InventorySlots.BagEnd; ++slot) for (byte slot = 0; slot < InventorySlots.BagEnd; ++slot)
{ {
VisualItems[slot].InventoryType = (byte)equipment.NextUInt32(); VisualItems[slot].InvType = (byte)equipment.NextUInt32();
VisualItems[slot].DisplayId = equipment.NextUInt32(); VisualItems[slot].DisplayId = equipment.NextUInt32();
VisualItems[slot].DisplayEnchantId = equipment.NextUInt32(); VisualItems[slot].DisplayEnchantId = equipment.NextUInt32();
VisualItems[slot].Subclass = (byte)equipment.NextUInt32();
} }
} }
@@ -185,9 +186,9 @@ namespace Game.Network.Packets
data.WriteUInt8(ListPosition); data.WriteUInt8(ListPosition);
data.WriteUInt8(RaceId); data.WriteUInt8(RaceId);
data.WriteUInt8((byte)ClassId); data.WriteUInt8((byte)ClassId);
data.WriteUInt8(Sex); data.WriteUInt8(SexId);
data.WriteUInt8(Skin); data.WriteUInt8(SkinId);
data.WriteUInt8(Face); data.WriteUInt8(FaceId);
data.WriteUInt8(HairStyle); data.WriteUInt8(HairStyle);
data.WriteUInt8(HairColor); data.WriteUInt8(HairColor);
data.WriteUInt8(FacialHair); data.WriteUInt8(FacialHair);
@@ -195,17 +196,17 @@ namespace Game.Network.Packets
foreach (var display in CustomDisplay) foreach (var display in CustomDisplay)
data.WriteUInt8(display); data.WriteUInt8(display);
data.WriteUInt8(Level); data.WriteUInt8(ExperienceLevel);
data.WriteUInt32(ZoneId); data.WriteUInt32(ZoneId);
data.WriteUInt32(MapId); data.WriteUInt32(MapId);
data.WriteVector3(PreLoadPosition); data.WriteVector3(PreloadPos);
data.WritePackedGuid(GuildGuid); data.WritePackedGuid(GuildGuid);
data.WriteUInt32((uint)Flags); data.WriteUInt32((uint)Flags);
data.WriteUInt32((uint)CustomizationFlag); data.WriteUInt32((uint)Flags2);
data.WriteUInt32(Flags3); data.WriteUInt32(Flags3);
data.WriteUInt32(Pet.CreatureDisplayId); data.WriteUInt32(PetCreatureDisplayId);
data.WriteUInt32(Pet.Level); data.WriteUInt32(PetExperienceLevel);
data.WriteUInt32(Pet.CreatureFamily); data.WriteUInt32(PetCreatureFamilyId);
data.WriteUInt32(ProfessionIds[0]); data.WriteUInt32(ProfessionIds[0]);
data.WriteUInt32(ProfessionIds[1]); data.WriteUInt32(ProfessionIds[1]);
@@ -233,20 +234,20 @@ namespace Game.Network.Packets
public byte ListPosition; // Order of the characters in list public byte ListPosition; // Order of the characters in list
public byte RaceId; public byte RaceId;
public Class ClassId; public Class ClassId;
public byte Sex; public byte SexId;
public byte Skin; public byte SkinId;
public byte Face; public byte FaceId;
public byte HairStyle; public byte HairStyle;
public byte HairColor; public byte HairColor;
public byte FacialHair; public byte FacialHair;
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize); public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
public byte Level; public byte ExperienceLevel;
public uint ZoneId; public uint ZoneId;
public uint MapId; public uint MapId;
public Vector3 PreLoadPosition; public Vector3 PreloadPos;
public ObjectGuid GuildGuid; public ObjectGuid GuildGuid;
public CharacterFlags Flags; // Character flag @see enum CharacterFlags public CharacterFlags Flags; // Character flag @see enum CharacterFlags
public CharacterCustomizeFlags CustomizationFlag; // Character customization flags @see enum CharacterCustomizeFlags public CharacterCustomizeFlags Flags2; // Character customization flags @see enum CharacterCustomizeFlags
public uint Flags3; // Character flags 3 @todo research public uint Flags3; // Character flags 3 @todo research
public uint Flags4; public uint Flags4;
public bool FirstLogin; public bool FirstLogin;
@@ -255,7 +256,9 @@ namespace Game.Network.Packets
public ushort SpecID; public ushort SpecID;
public uint Unknown703; public uint Unknown703;
public uint LastLoginVersion; public uint LastLoginVersion;
public PetInfo Pet = new PetInfo(); public uint PetCreatureDisplayId;
public uint PetExperienceLevel;
public uint PetCreatureFamilyId;
public bool BoostInProgress; // @todo public bool BoostInProgress; // @todo
public uint[] ProfessionIds = new uint[2]; // @todo public uint[] ProfessionIds = new uint[2]; // @todo
public VisualItemInfo[] VisualItems = new VisualItemInfo[InventorySlots.BagEnd]; public VisualItemInfo[] VisualItems = new VisualItemInfo[InventorySlots.BagEnd];
@@ -266,12 +269,14 @@ namespace Game.Network.Packets
{ {
data.WriteUInt32(DisplayId); data.WriteUInt32(DisplayId);
data.WriteUInt32(DisplayEnchantId); data.WriteUInt32(DisplayEnchantId);
data.WriteUInt8(InventoryType); data.WriteUInt8(InvType);
data.WriteUInt8(Subclass);
} }
public uint DisplayId; public uint DisplayId;
public uint DisplayEnchantId; public uint DisplayEnchantId;
public byte InventoryType; public byte InvType;
public byte Subclass;
} }
public struct PetInfo public struct PetInfo
+4 -3
View File
@@ -559,7 +559,6 @@ namespace Game.Network.Packets
RankID = _worldPacket.ReadInt32(); RankID = _worldPacket.ReadInt32();
RankOrder = _worldPacket.ReadInt32(); RankOrder = _worldPacket.ReadInt32();
Flags = _worldPacket.ReadUInt32(); Flags = _worldPacket.ReadUInt32();
OldFlags = _worldPacket.ReadUInt32();
WithdrawGoldLimit = _worldPacket.ReadUInt32(); WithdrawGoldLimit = _worldPacket.ReadUInt32();
for (byte i = 0; i < GuildConst.MaxBankTabs; i++) for (byte i = 0; i < GuildConst.MaxBankTabs; i++)
@@ -572,6 +571,8 @@ namespace Game.Network.Packets
uint rankNameLen = _worldPacket.ReadBits<uint>(7); uint rankNameLen = _worldPacket.ReadBits<uint>(7);
RankName = _worldPacket.ReadString(rankNameLen); RankName = _worldPacket.ReadString(rankNameLen);
OldFlags = _worldPacket.ReadUInt32();
} }
public int RankID; public int RankID;
@@ -1445,7 +1446,7 @@ namespace Game.Network.Packets
{ {
public void Write(WorldPacket data) public void Write(WorldPacket data)
{ {
data.WriteUInt32(RankID); data.WriteUInt8(RankID);
data.WriteUInt32(RankOrder); data.WriteUInt32(RankOrder);
data.WriteUInt32(Flags); data.WriteUInt32(Flags);
data.WriteUInt32(WithdrawGoldLimit); data.WriteUInt32(WithdrawGoldLimit);
@@ -1460,7 +1461,7 @@ namespace Game.Network.Packets
data.WriteString(RankName); data.WriteString(RankName);
} }
public uint RankID; public byte RankID;
public uint RankOrder; public uint RankOrder;
public uint Flags; public uint Flags;
public uint WithdrawGoldLimit; public uint WithdrawGoldLimit;
@@ -179,6 +179,7 @@ namespace Game.Network.Packets
_worldPacket.WriteInt32(Slots.Count); _worldPacket.WriteInt32(Slots.Count);
_worldPacket.WriteUInt32(RequestedRoles); _worldPacket.WriteUInt32(RequestedRoles);
_worldPacket.WriteInt32(SuspendedPlayers.Count); _worldPacket.WriteInt32(SuspendedPlayers.Count);
_worldPacket.WriteUInt32(QueueMapID);
foreach (var slot in Slots) foreach (var slot in Slots)
_worldPacket.WriteUInt32(slot); _worldPacket.WriteUInt32(slot);
@@ -201,6 +202,7 @@ namespace Game.Network.Packets
public List<uint> Slots = new List<uint>(); public List<uint> Slots = new List<uint>();
public uint RequestedRoles; public uint RequestedRoles;
public List<ObjectGuid> SuspendedPlayers = new List<ObjectGuid>(); public List<ObjectGuid> SuspendedPlayers = new List<ObjectGuid>();
public uint QueueMapID;
public bool NotifyUI; public bool NotifyUI;
public bool IsParty; public bool IsParty;
public bool Joined; public bool Joined;
@@ -731,7 +731,6 @@ namespace Game.Network.Packets
public struct DBQueryRecord public struct DBQueryRecord
{ {
public ObjectGuid GUID;
public uint RecordID; public uint RecordID;
} }
@@ -202,6 +202,7 @@ namespace Game.Network.Packets
_worldPacket.WriteInt32(Info.TreasurePickerID); _worldPacket.WriteInt32(Info.TreasurePickerID);
_worldPacket.WriteInt32(Info.Expansion); _worldPacket.WriteInt32(Info.Expansion);
_worldPacket.WriteInt32(Info.ManagedWorldStateID); _worldPacket.WriteInt32(Info.ManagedWorldStateID);
_worldPacket.WriteInt32(Info.QuestSessionBonus);
_worldPacket.WriteBits(Info.LogTitle.GetByteCount(), 9); _worldPacket.WriteBits(Info.LogTitle.GetByteCount(), 9);
_worldPacket.WriteBits(Info.LogDescription.GetByteCount(), 12); _worldPacket.WriteBits(Info.LogDescription.GetByteCount(), 12);
@@ -428,6 +429,7 @@ namespace Game.Network.Packets
_worldPacket.WriteInt32(DescEmotes.Count); _worldPacket.WriteInt32(DescEmotes.Count);
_worldPacket.WriteInt32(Objectives.Count); _worldPacket.WriteInt32(Objectives.Count);
_worldPacket.WriteInt32(QuestStartItemID); _worldPacket.WriteInt32(QuestStartItemID);
_worldPacket.WriteInt32(QuestSessionBonus);
foreach (uint spell in LearnSpells) foreach (uint spell in LearnSpells)
_worldPacket.WriteUInt32(spell); _worldPacket.WriteUInt32(spell);
@@ -454,6 +456,7 @@ namespace Game.Network.Packets
_worldPacket.WriteBits(PortraitTurnInText.GetByteCount(), 10); _worldPacket.WriteBits(PortraitTurnInText.GetByteCount(), 10);
_worldPacket.WriteBits(PortraitTurnInName.GetByteCount(), 8); _worldPacket.WriteBits(PortraitTurnInName.GetByteCount(), 8);
_worldPacket.WriteBit(AutoLaunched); _worldPacket.WriteBit(AutoLaunched);
_worldPacket.WriteBit(false); // unused in client
_worldPacket.WriteBit(StartCheat); _worldPacket.WriteBit(StartCheat);
_worldPacket.WriteBit(DisplayPopup); _worldPacket.WriteBit(DisplayPopup);
_worldPacket.FlushBits(); _worldPacket.FlushBits();
@@ -483,6 +486,7 @@ namespace Game.Network.Packets
public uint PortraitGiver; public uint PortraitGiver;
public uint PortraitGiverMount; public uint PortraitGiverMount;
public int QuestStartItemID; public int QuestStartItemID;
public int QuestSessionBonus;
public string PortraitGiverText = ""; public string PortraitGiverText = "";
public string PortraitGiverName = ""; public string PortraitGiverName = "";
public string PortraitTurnInText = ""; public string PortraitTurnInText = "";
@@ -969,6 +973,7 @@ namespace Game.Network.Packets
public int TreasurePickerID; public int TreasurePickerID;
public int Expansion; public int Expansion;
public int ManagedWorldStateID; public int ManagedWorldStateID;
public int QuestSessionBonus;
public List<QuestObjective> Objectives = new List<QuestObjective>(); public List<QuestObjective> Objectives = new List<QuestObjective>();
public uint[] RewardItems = new uint[SharedConst.QuestRewardItemCount]; public uint[] RewardItems = new uint[SharedConst.QuestRewardItemCount];
public uint[] RewardAmount = new uint[SharedConst.QuestRewardItemCount]; public uint[] RewardAmount = new uint[SharedConst.QuestRewardItemCount];
@@ -45,7 +45,7 @@ namespace Game.Network.Packets
public ObjectGuid Target; public ObjectGuid Target;
} }
public class ProposeLevelGrant : ServerPacket /*public class ProposeLevelGrant : ServerPacket
{ {
public ProposeLevelGrant() : base(ServerOpcodes.ProposeLevelGrant) { } public ProposeLevelGrant() : base(ServerOpcodes.ProposeLevelGrant) { }
@@ -55,7 +55,7 @@ namespace Game.Network.Packets
} }
public ObjectGuid Sender; public ObjectGuid Sender;
} }*/
public class ReferAFriendFailure : ServerPacket public class ReferAFriendFailure : ServerPacket
{ {
+26 -9
View File
@@ -41,11 +41,15 @@ namespace Game.Network.Packets
_worldPacket.WriteUInt32(CfgRealmID); _worldPacket.WriteUInt32(CfgRealmID);
_worldPacket.WriteInt32(CfgRealmRecID); _worldPacket.WriteInt32(CfgRealmRecID);
_worldPacket.WriteUInt32(RAFSystem.MaxRecruits);
_worldPacket.WriteUInt32(RAFSystem.MaxRecruitMonths);
_worldPacket.WriteUInt32(RAFSystem.MaxRecruitmentUses);
_worldPacket.WriteUInt32(RAFSystem.DaysInCycle);
_worldPacket.WriteUInt32(TwitterPostThrottleLimit); _worldPacket.WriteUInt32(TwitterPostThrottleLimit);
_worldPacket.WriteUInt32(TwitterPostThrottleCooldown); _worldPacket.WriteUInt32(TwitterPostThrottleCooldown);
_worldPacket.WriteUInt32(TokenPollTimeSeconds); _worldPacket.WriteUInt32(TokenPollTimeSeconds);
_worldPacket.WriteUInt32(TokenRedeemIndex);
_worldPacket.WriteInt64(TokenBalanceAmount); _worldPacket.WriteInt64(TokenBalanceAmount);
_worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay); _worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay);
@@ -61,7 +65,8 @@ namespace Game.Network.Packets
_worldPacket.WriteBit(ItemRestorationButtonEnabled); _worldPacket.WriteBit(ItemRestorationButtonEnabled);
_worldPacket.WriteBit(BrowserEnabled); _worldPacket.WriteBit(BrowserEnabled);
_worldPacket.WriteBit(SessionAlert.HasValue); _worldPacket.WriteBit(SessionAlert.HasValue);
_worldPacket.WriteBit(RecruitAFriendSendingEnabled); _worldPacket.WriteBit(RAFSystem.Enabled);
_worldPacket.WriteBit(RAFSystem.RecruitingEnabled);
_worldPacket.WriteBit(CharUndeleteEnabled); _worldPacket.WriteBit(CharUndeleteEnabled);
_worldPacket.WriteBit(RestrictedAccount); _worldPacket.WriteBit(RestrictedAccount);
_worldPacket.WriteBit(CommerceSystemEnabled); _worldPacket.WriteBit(CommerceSystemEnabled);
@@ -81,6 +86,9 @@ namespace Game.Network.Packets
_worldPacket.WriteBit(ClubsPresenceUpdateEnabled); _worldPacket.WriteBit(ClubsPresenceUpdateEnabled);
_worldPacket.WriteBit(VoiceChatDisabledByParentalControl); _worldPacket.WriteBit(VoiceChatDisabledByParentalControl);
_worldPacket.WriteBit(VoiceChatMutedByParentalControl); _worldPacket.WriteBit(VoiceChatMutedByParentalControl);
_worldPacket.WriteBit(QuestSessionEnabled);
_worldPacket.WriteBit(Unused825);
_worldPacket.WriteBit(ClubFinderEnabled);
_worldPacket.FlushBits(); _worldPacket.FlushBits();
{ {
@@ -144,7 +152,6 @@ namespace Game.Network.Packets
public bool VoiceEnabled; public bool VoiceEnabled;
public bool BrowserEnabled; public bool BrowserEnabled;
public bool BpayStoreAvailable; public bool BpayStoreAvailable;
public bool RecruitAFriendSendingEnabled;
public bool BpayStoreEnabled; public bool BpayStoreEnabled;
public Optional<SessionAlertConfig> SessionAlert; public Optional<SessionAlertConfig> SessionAlert;
public uint ScrollOfResurrectionMaxRequestsPerDay; public uint ScrollOfResurrectionMaxRequestsPerDay;
@@ -157,7 +164,6 @@ namespace Game.Network.Packets
public uint TwitterPostThrottleLimit; public uint TwitterPostThrottleLimit;
public uint TwitterPostThrottleCooldown; public uint TwitterPostThrottleCooldown;
public uint TokenPollTimeSeconds; public uint TokenPollTimeSeconds;
public uint TokenRedeemIndex;
public long TokenBalanceAmount; public long TokenBalanceAmount;
public uint BpayStoreProductDeliveryDelay; public uint BpayStoreProductDeliveryDelay;
public uint ClubsPresenceUpdateTimer; public uint ClubsPresenceUpdateTimer;
@@ -182,10 +188,14 @@ namespace Game.Network.Packets
public bool ClubsPresenceUpdateEnabled; public bool ClubsPresenceUpdateEnabled;
public bool VoiceChatDisabledByParentalControl; public bool VoiceChatDisabledByParentalControl;
public bool VoiceChatMutedByParentalControl; public bool VoiceChatMutedByParentalControl;
public bool QuestSessionEnabled;
public bool Unused825;
public bool ClubFinderEnabled;
public Optional<List<byte>> RaceClassExpansionLevels; public Optional<List<byte>> RaceClassExpansionLevels;
public SocialQueueConfig QuickJoinConfig; public SocialQueueConfig QuickJoinConfig;
public VoiceChatProxySettings VoiceChatManagerSettings; public VoiceChatProxySettings VoiceChatManagerSettings;
public RafSystemFeatureInfo RAFSystem;
public struct SavedThrottleObjectState public struct SavedThrottleObjectState
{ {
@@ -245,6 +255,16 @@ namespace Game.Network.Packets
public ObjectGuid BnetAccountGuid; public ObjectGuid BnetAccountGuid;
public ObjectGuid GuildGuid; public ObjectGuid GuildGuid;
} }
public struct RafSystemFeatureInfo
{
public bool Enabled;
public bool RecruitingEnabled;
public uint MaxRecruits;
public uint MaxRecruitMonths;
public uint MaxRecruitmentUses;
public uint DaysInCycle;
}
} }
public class FeatureSystemStatusGlueScreen : ServerPacket public class FeatureSystemStatusGlueScreen : ServerPacket
@@ -263,7 +283,6 @@ namespace Game.Network.Packets
_worldPacket.WriteBit(IsExpansionPreorderInStore); _worldPacket.WriteBit(IsExpansionPreorderInStore);
_worldPacket.WriteBit(KioskModeEnabled); _worldPacket.WriteBit(KioskModeEnabled);
_worldPacket.WriteBit(CompetitiveModeEnabled); _worldPacket.WriteBit(CompetitiveModeEnabled);
_worldPacket.WriteBit(false); // not accessed in handler
_worldPacket.WriteBit(TrialBoostEnabled); _worldPacket.WriteBit(TrialBoostEnabled);
_worldPacket.WriteBit(TokenBalanceEnabled); _worldPacket.WriteBit(TokenBalanceEnabled);
_worldPacket.WriteBit(LiveRegionCharacterListEnabled); _worldPacket.WriteBit(LiveRegionCharacterListEnabled);
@@ -271,8 +290,7 @@ namespace Game.Network.Packets
_worldPacket.WriteBit(LiveRegionAccountCopyEnabled); _worldPacket.WriteBit(LiveRegionAccountCopyEnabled);
_worldPacket.FlushBits(); _worldPacket.FlushBits();
_worldPacket.WriteInt32(TokenPollTimeSeconds); _worldPacket.WriteUInt32(TokenPollTimeSeconds);
_worldPacket.WriteInt32(TokenRedeemIndex);
_worldPacket.WriteInt64(TokenBalanceAmount); _worldPacket.WriteInt64(TokenBalanceAmount);
_worldPacket.WriteInt32(MaxCharactersPerRealm); _worldPacket.WriteInt32(MaxCharactersPerRealm);
_worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay); _worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay);
@@ -297,8 +315,7 @@ namespace Game.Network.Packets
public bool LiveRegionCharacterListEnabled; // NYI public bool LiveRegionCharacterListEnabled; // NYI
public bool LiveRegionCharacterCopyEnabled; // NYI public bool LiveRegionCharacterCopyEnabled; // NYI
public bool LiveRegionAccountCopyEnabled; // NYI public bool LiveRegionAccountCopyEnabled; // NYI
public int TokenPollTimeSeconds; // NYI public uint TokenPollTimeSeconds; // NYI
public int TokenRedeemIndex; // NYI
public long TokenBalanceAmount; // NYI public long TokenBalanceAmount; // NYI
public int MaxCharactersPerRealm; public int MaxCharactersPerRealm;
public uint BpayStoreProductDeliveryDelay; // NYI public uint BpayStoreProductDeliveryDelay; // NYI
+127 -24
View File
@@ -149,6 +149,7 @@ namespace Game.Network.Packets
bool hasLFGListSearchResult = _worldPacket.HasBit(); bool hasLFGListSearchResult = _worldPacket.HasBit();
bool hasLFGListApplicant = _worldPacket.HasBit(); bool hasLFGListApplicant = _worldPacket.HasBit();
bool hasClubMessage = _worldPacket.HasBit(); bool hasClubMessage = _worldPacket.HasBit();
bool hasClubFinderResult = _worldPacket.HasBit();
_worldPacket.ResetBitPos(); _worldPacket.ResetBitPos();
@@ -159,14 +160,16 @@ namespace Game.Network.Packets
_worldPacket.ResetBitPos(); _worldPacket.ResetBitPos();
} }
HorusChatLog.Read(_worldPacket);
Note = _worldPacket.ReadString(noteLength);
if (hasMailInfo) if (hasMailInfo)
{ {
MailInfo.HasValue = true; MailInfo.HasValue = true;
MailInfo.Value.Read(_worldPacket); MailInfo.Value.Read(_worldPacket);
} }
Note = _worldPacket.ReadString(noteLength);
if (hasCalendarInfo) if (hasCalendarInfo)
{ {
CalenderInfo.HasValue = true; CalenderInfo.HasValue = true;
@@ -196,6 +199,12 @@ namespace Game.Network.Packets
LFGListApplicant.HasValue = true; LFGListApplicant.HasValue = true;
LFGListApplicant.Value.Read(_worldPacket); LFGListApplicant.Value.Read(_worldPacket);
} }
if (hasClubFinderResult)
{
ClubFinderResult.HasValue = true;
ClubFinderResult.Value.Read(_worldPacket);
}
} }
public SupportTicketHeader Header; public SupportTicketHeader Header;
@@ -203,6 +212,7 @@ namespace Game.Network.Packets
public ObjectGuid TargetCharacterGUID; public ObjectGuid TargetCharacterGUID;
public byte ComplaintType; public byte ComplaintType;
public string Note; public string Note;
public SupportTicketHorusChatLog HorusChatLog;
public Optional<SupportTicketMailInfo> MailInfo; public Optional<SupportTicketMailInfo> MailInfo;
public Optional<SupportTicketCalendarEventInfo> CalenderInfo; public Optional<SupportTicketCalendarEventInfo> CalenderInfo;
public Optional<SupportTicketPetInfo> PetInfo; public Optional<SupportTicketPetInfo> PetInfo;
@@ -210,6 +220,7 @@ namespace Game.Network.Packets
public Optional<SupportTicketLFGListSearchResult> LFGListSearchResult; public Optional<SupportTicketLFGListSearchResult> LFGListSearchResult;
public Optional<SupportTicketLFGListApplicant> LFGListApplicant; public Optional<SupportTicketLFGListApplicant> LFGListApplicant;
public Optional<SupportTicketCommunityMessage> CommunityMessage; public Optional<SupportTicketCommunityMessage> CommunityMessage;
public Optional<SupportTicketClubFinderResult> ClubFinderResult;
public struct SupportTicketChatLine public struct SupportTicketChatLine
{ {
@@ -254,6 +265,82 @@ namespace Game.Network.Packets
public Optional<uint> ReportLineIndex; public Optional<uint> ReportLineIndex;
} }
public struct SupportTicketHorusChatLine
{
public void Read(WorldPacket data)
{
Timestamp = data.ReadInt32();
AuthorGUID = data.ReadPackedGuid();
bool hasClubID = data.HasBit();
bool hasChannelGUID = data.HasBit();
bool hasRealmAddress = data.HasBit();
bool hasSlashCmd = data.HasBit();
uint textLength = data.ReadBits<uint>(12);
if (hasClubID)
{
ClubID.HasValue = true;
ClubID.Value = data.ReadUInt64();
}
if (hasChannelGUID)
{
ChannelGUID.HasValue = true;
ChannelGUID.Value = data.ReadPackedGuid();
}
if (hasRealmAddress)
{
RealmAddress.HasValue = true;
RealmAddress.Value.VirtualRealmAddress = data.ReadUInt32();
RealmAddress.Value.field_4 = data.ReadUInt16();
RealmAddress.Value.field_6 = data.ReadUInt8();
}
if (hasSlashCmd)
{
SlashCmd.HasValue = true;
SlashCmd.Value = data.ReadInt32();
}
Text = data.ReadString(textLength);
}
public struct SenderRealm
{
public uint VirtualRealmAddress;
public ushort field_4;
public byte field_6;
}
public int Timestamp;
public ObjectGuid AuthorGUID;
public Optional<ulong> ClubID;
public Optional<ObjectGuid> ChannelGUID;
public Optional<SenderRealm> RealmAddress;
public Optional<int> SlashCmd;
public string Text;
}
public class SupportTicketHorusChatLog
{
public List<SupportTicketHorusChatLine> Lines = new List<SupportTicketHorusChatLine>();
public void Read(WorldPacket data)
{
uint linesCount = data.ReadUInt32();
data.ResetBitPos();
for (uint i = 0; i < linesCount; i++)
{
var chatLine = new SupportTicketHorusChatLine();
chatLine.Read(data);
Lines.Add(chatLine);
}
}
}
public struct SupportTicketMailInfo public struct SupportTicketMailInfo
{ {
public void Read(WorldPacket data) public void Read(WorldPacket data)
@@ -266,9 +353,9 @@ namespace Game.Network.Packets
MailSubject = data.ReadString(subjectLength); MailSubject = data.ReadString(subjectLength);
} }
int MailID; public int MailID;
string MailSubject; public string MailSubject;
string MailBody; public string MailBody;
} }
public struct SupportTicketCalendarEventInfo public struct SupportTicketCalendarEventInfo
@@ -281,9 +368,9 @@ namespace Game.Network.Packets
EventTitle = data.ReadString(data.ReadBits<byte>(8)); EventTitle = data.ReadString(data.ReadBits<byte>(8));
} }
ulong EventID; public ulong EventID;
ulong InviteID; public ulong InviteID;
string EventTitle; public string EventTitle;
} }
public struct SupportTicketPetInfo public struct SupportTicketPetInfo
@@ -295,8 +382,8 @@ namespace Game.Network.Packets
PetName = data.ReadString(data.ReadBits<byte>(8)); PetName = data.ReadString(data.ReadBits<byte>(8));
} }
ObjectGuid PetID; public ObjectGuid PetID;
string PetName; public string PetName;
} }
public struct SupportTicketGuildInfo public struct SupportTicketGuildInfo
@@ -309,8 +396,8 @@ namespace Game.Network.Packets
GuildName = data.ReadString(nameLength); GuildName = data.ReadString(nameLength);
} }
ObjectGuid GuildID; public ObjectGuid GuildID;
string GuildName; public string GuildName;
} }
public struct SupportTicketLFGListSearchResult public struct SupportTicketLFGListSearchResult
@@ -336,16 +423,16 @@ namespace Game.Network.Packets
VoiceChat = data.ReadString(voiceChatLength); VoiceChat = data.ReadString(voiceChatLength);
} }
RideTicket RideTicket; public RideTicket RideTicket;
uint GroupFinderActivityID; public uint GroupFinderActivityID;
ObjectGuid LastTitleAuthorGuid; public ObjectGuid LastTitleAuthorGuid;
ObjectGuid LastDescriptionAuthorGuid; public ObjectGuid LastDescriptionAuthorGuid;
ObjectGuid LastVoiceChatAuthorGuid; public ObjectGuid LastVoiceChatAuthorGuid;
ObjectGuid ListingCreatorGuid; public ObjectGuid ListingCreatorGuid;
ObjectGuid Unknown735; public ObjectGuid Unknown735;
string Title; public string Title;
string Description; public string Description;
string VoiceChat; public string VoiceChat;
} }
public struct SupportTicketLFGListApplicant public struct SupportTicketLFGListApplicant
@@ -358,14 +445,30 @@ namespace Game.Network.Packets
Comment = data.ReadString(data.ReadBits<uint>(9)); Comment = data.ReadString(data.ReadBits<uint>(9));
} }
RideTicket RideTicket; public RideTicket RideTicket;
string Comment; public string Comment;
} }
public struct SupportTicketCommunityMessage public struct SupportTicketCommunityMessage
{ {
public bool IsPlayerUsingVoice; public bool IsPlayerUsingVoice;
} }
public struct SupportTicketClubFinderResult
{
public ulong ClubFinderPostingID;
public ulong ClubID;
public ObjectGuid ClubFinderGUID;
public string ClubName;
public void Read(WorldPacket data)
{
ClubFinderPostingID = data.ReadUInt64();
ClubID = data.ReadUInt64();
ClubFinderGUID = data.ReadPackedGuid();
ClubName = data.ReadString(data.ReadBits<uint>(12));
}
}
} }
class Complaint : ClientPacket class Complaint : ClientPacket
@@ -54,14 +54,19 @@ namespace Game.Network.Packets
_worldPacket.WriteBit(IsFullUpdate); _worldPacket.WriteBit(IsFullUpdate);
_worldPacket.WriteBit(IsSetFavorite); _worldPacket.WriteBit(IsSetFavorite);
_worldPacket.WriteInt32(FavoriteAppearances.Count); _worldPacket.WriteInt32(FavoriteAppearances.Count);
_worldPacket.WriteInt32(NewAppearances.Count);
foreach (uint itemModifiedAppearanceId in FavoriteAppearances) foreach (uint itemModifiedAppearanceId in FavoriteAppearances)
_worldPacket.WriteUInt32(itemModifiedAppearanceId); _worldPacket.WriteUInt32(itemModifiedAppearanceId);
foreach (var newAppearance in NewAppearances)
_worldPacket.WriteUInt32(newAppearance);
} }
public bool IsFullUpdate; public bool IsFullUpdate;
public bool IsSetFavorite; public bool IsSetFavorite;
public List<uint> FavoriteAppearances = new List<uint>(); public List<uint> FavoriteAppearances = new List<uint>();
public List<uint> NewAppearances = new List<uint>();
} }
class OpenTransmogrifier : ServerPacket class OpenTransmogrifier : ServerPacket
+1 -1
View File
@@ -37,7 +37,7 @@ namespace Game.Network
static byte[] ContinuedSessionSeed = { 0x16, 0xAD, 0x0C, 0xD4, 0x46, 0xF9, 0x4F, 0xB2, 0xEF, 0x7D, 0xEA, 0x2A, 0x17, 0x66, 0x4D, 0x2F }; static byte[] ContinuedSessionSeed = { 0x16, 0xAD, 0x0C, 0xD4, 0x46, 0xF9, 0x4F, 0xB2, 0xEF, 0x7D, 0xEA, 0x2A, 0x17, 0x66, 0x4D, 0x2F };
static byte[] EncryptionKeySeed = { 0xE9, 0x75, 0x3C, 0x50, 0x90, 0x93, 0x61, 0xDA, 0x3B, 0x07, 0xEE, 0xFA, 0xFF, 0x9D, 0x41, 0xB8 }; static byte[] EncryptionKeySeed = { 0xE9, 0x75, 0x3C, 0x50, 0x90, 0x93, 0x61, 0xDA, 0x3B, 0x07, 0xEE, 0xFA, 0xFF, 0x9D, 0x41, 0xB8 };
static byte[] ClientTypeSeed_Wn64 = { 0x79, 0x73, 0xA8, 0xD5, 0x4B, 0xDB, 0x8B, 0x79, 0x8D, 0x92, 0x97, 0xB0, 0x96, 0xE7, 0x71, 0xEF }; static byte[] ClientTypeSeed_Wn64 = { 0x21, 0xF5, 0xA6, 0xFC, 0x7A, 0xD8, 0x9F, 0xBF, 0x41, 0x1F, 0xDA, 0x8B, 0x87, 0x38, 0x18, 0x6A };
static byte[] ClientTypeSeed_Mc64 = { 0x34, 0x1C, 0xFE, 0xFE, 0x3D, 0x72, 0xAC, 0xA9, 0xA4, 0x40, 0x7D, 0xC5, 0x35, 0xDE, 0xD6, 0x6A }; static byte[] ClientTypeSeed_Mc64 = { 0x34, 0x1C, 0xFE, 0xFE, 0x3D, 0x72, 0xAC, 0xA9, 0xA4, 0x40, 0x7D, 0xC5, 0x35, 0xDE, 0xD6, 0x6A };
public WorldSocket(Socket socket) : base(socket) public WorldSocket(Socket socket) : base(socket)
+14 -10
View File
@@ -125,16 +125,17 @@ namespace Game
TreasurePickerID = fields.Read<int>(109); TreasurePickerID = fields.Read<int>(109);
Expansion = fields.Read<int>(110); Expansion = fields.Read<int>(110);
ManagedWorldStateID = fields.Read<int>(111); ManagedWorldStateID = fields.Read<int>(111);
QuestSessionBonus = fields.Read<int>(112);
LogTitle = fields.Read<string>(112); LogTitle = fields.Read<string>(113);
LogDescription = fields.Read<string>(113); LogDescription = fields.Read<string>(114);
QuestDescription = fields.Read<string>(114); QuestDescription = fields.Read<string>(115);
AreaDescription = fields.Read<string>(115); AreaDescription = fields.Read<string>(116);
PortraitGiverText = fields.Read<string>(116); PortraitGiverText = fields.Read<string>(117);
PortraitGiverName = fields.Read<string>(117); PortraitGiverName = fields.Read<string>(118);
PortraitTurnInText = fields.Read<string>(118); PortraitTurnInText = fields.Read<string>(119);
PortraitTurnInName = fields.Read<string>(119); PortraitTurnInName = fields.Read<string>(120);
QuestCompletionLog = fields.Read<string>(120); QuestCompletionLog = fields.Read<string>(121);
} }
public void LoadQuestDetails(SQLFields fields) public void LoadQuestDetails(SQLFields fields)
@@ -498,8 +499,10 @@ namespace Game
QueryData.Info.POIPriority = POIPriority; QueryData.Info.POIPriority = POIPriority;
QueryData.Info.AllowableRaces = AllowableRaces; QueryData.Info.AllowableRaces = AllowableRaces;
QueryData.Info.TreasurePickerID = (int)TreasurePickerID; QueryData.Info.TreasurePickerID = TreasurePickerID;
QueryData.Info.Expansion = Expansion; QueryData.Info.Expansion = Expansion;
QueryData.Info.ManagedWorldStateID = ManagedWorldStateID;
QueryData.Info.QuestSessionBonus = 0; //GetQuestSessionBonus(); // this is only sent while quest session is active
foreach (QuestObjective questObjective in Objectives) foreach (QuestObjective questObjective in Objectives)
QueryData.Info.Objectives.Add(questObjective); QueryData.Info.Objectives.Add(questObjective);
@@ -606,6 +609,7 @@ namespace Game
public int TreasurePickerID; public int TreasurePickerID;
public int Expansion; public int Expansion;
public int ManagedWorldStateID; public int ManagedWorldStateID;
public int QuestSessionBonus;
public List<QuestObjective> Objectives = new List<QuestObjective>(); public List<QuestObjective> Objectives = new List<QuestObjective>();
public string LogTitle = ""; public string LogTitle = "";
public string LogDescription = ""; public string LogDescription = "";
@@ -0,0 +1,25 @@
UPDATE `characters` SET `equipmentCache`=CONCAT(
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -70), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -67), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -64), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -61), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -58), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -55), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -52), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -49), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -46), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -43), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -40), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -37), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -34), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -31), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -28), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -25), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -22), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -19), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -16), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -13), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -10), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -7), ' ', 2), ' 0 0 '),
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -4), ' ', 2), ' 0 0 ')
) WHERE LENGTH(`equipmentCache`) > 0;
@@ -0,0 +1 @@
ALTER TABLE `quest_template` ADD `QuestSessionBonus` int(11) NOT NULL DEFAULT '0' AFTER `ManagedWorldStateID`;