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:
@@ -73,24 +73,24 @@ namespace Game
|
||||
|
||||
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());
|
||||
|
||||
// Make sure customization always works properly - send all zeroes instead
|
||||
charInfo.Skin = 0;
|
||||
charInfo.Face = 0;
|
||||
charInfo.SkinId = 0;
|
||||
charInfo.FaceId = 0;
|
||||
charInfo.HairStyle = 0;
|
||||
charInfo.HairColor = 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);
|
||||
stmt.AddValue(0, (ushort)AtLoginFlags.Customize);
|
||||
stmt.AddValue(1, charInfo.Guid.GetCounter());
|
||||
DB.Characters.Execute(stmt);
|
||||
charInfo.CustomizationFlag = CharacterCustomizeFlags.Customize;
|
||||
charInfo.Flags2 = CharacterCustomizeFlags.Customize;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace Game
|
||||
_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.
|
||||
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)
|
||||
demonHunterCount++;
|
||||
@@ -109,7 +109,7 @@ namespace Game
|
||||
else
|
||||
charResult.HasDemonHunterOnRealm = false;
|
||||
|
||||
charResult.MaxCharacterLevel = Math.Max(charResult.MaxCharacterLevel, charInfo.Level);
|
||||
charResult.MaxCharacterLevel = Math.Max(charResult.MaxCharacterLevel, charInfo.ExperienceLevel);
|
||||
|
||||
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());
|
||||
|
||||
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);
|
||||
}
|
||||
@@ -891,7 +891,6 @@ namespace Game
|
||||
features.CfgRealmID = 2;
|
||||
features.CfgRealmRecID = 0;
|
||||
features.TokenPollTimeSeconds = 300;
|
||||
features.TokenRedeemIndex = 0;
|
||||
features.VoiceEnabled = false;
|
||||
features.BrowserEnabled = false; // Has to be false, otherwise client will crash if "Customer Support" is opened
|
||||
|
||||
|
||||
@@ -285,6 +285,7 @@ namespace Game
|
||||
lfgUpdateStatus.Joined = join;
|
||||
lfgUpdateStatus.LfgJoined = updateData.updateType != LfgUpdateType.RemovedFromQueue;
|
||||
lfgUpdateStatus.Queued = queued;
|
||||
lfgUpdateStatus.QueueMapID = Global.LFGMgr.GetDungeonMapId(_player.GetGUID());
|
||||
|
||||
SendPacket(lfgUpdateStatus);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Game
|
||||
{
|
||||
public partial class WorldSession
|
||||
{
|
||||
[WorldPacketHandler(ClientOpcodes.GrantLevel)]
|
||||
//[WorldPacketHandler(ClientOpcodes.GrantLevel)]
|
||||
void HandleGrantLevel(GrantLevel grantLevel)
|
||||
{
|
||||
Player target = Global.ObjAccessor.GetPlayer(GetPlayer(), grantLevel.Target);
|
||||
@@ -60,12 +60,12 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
ProposeLevelGrant proposeLevelGrant = new ProposeLevelGrant();
|
||||
proposeLevelGrant.Sender = GetPlayer().GetGUID();
|
||||
target.SendPacket(proposeLevelGrant);
|
||||
//ProposeLevelGrant proposeLevelGrant = new ProposeLevelGrant();
|
||||
//proposeLevelGrant.Sender = GetPlayer().GetGUID();
|
||||
//target.SendPacket(proposeLevelGrant);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.AcceptLevelGrant)]
|
||||
//[WorldPacketHandler(ClientOpcodes.AcceptLevelGrant)]
|
||||
void HandleAcceptGrantLevel(AcceptLevelGrant acceptLevelGrant)
|
||||
{
|
||||
Player other = Global.ObjAccessor.GetPlayer(GetPlayer(), acceptLevelGrant.Granter);
|
||||
|
||||
Reference in New Issue
Block a user