Update opcodes to 7.3.2
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1879,6 +1879,7 @@ namespace Game.Entities
|
||||
// send transfer packets
|
||||
TransferPending transferPending = new TransferPending();
|
||||
transferPending.MapID = (int)mapid;
|
||||
transferPending.OldMapPosition = GetPosition();
|
||||
|
||||
transport = GetTransport();
|
||||
if (transport)
|
||||
|
||||
@@ -117,9 +117,15 @@ namespace Game.Entities
|
||||
public void AppendTaximaskTo(ShowTaxiNodes data, bool all)
|
||||
{
|
||||
if (all)
|
||||
data.Nodes = CliDB.TaxiNodesMask; // all existed nodes
|
||||
{
|
||||
data.CanLandNodes = CliDB.TaxiNodesMask; // all existed nodes
|
||||
data.CanUseNodes = CliDB.TaxiNodesMask;
|
||||
}
|
||||
else
|
||||
data.Nodes = m_taximask; // known nodes
|
||||
{
|
||||
data.CanLandNodes = m_taximask; // known nodes
|
||||
data.CanUseNodes = m_taximask;
|
||||
}
|
||||
}
|
||||
|
||||
public bool LoadTaxiDestinationsFromString(string values, Team team)
|
||||
|
||||
@@ -57,17 +57,17 @@ namespace Game
|
||||
}
|
||||
}
|
||||
|
||||
void SendHotfixList(int version)
|
||||
void SendAvailableHotfixes(int version)
|
||||
{
|
||||
SendPacket(new HotfixList(version, Global.DB2Mgr.GetHotfixData()));
|
||||
SendPacket(new AvailableHotfixes(version, Global.DB2Mgr.GetHotfixData()));
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.HotfixQuery, Status = SessionStatus.Authed)]
|
||||
void HandleHotfixQuery(HotfixQuery hotfixQuery)
|
||||
[WorldPacketHandler(ClientOpcodes.HotfixRequest, Status = SessionStatus.Authed)]
|
||||
void HandleHotfixRequest(HotfixRequest hotfixQuery)
|
||||
{
|
||||
Dictionary<ulong, int> hotfixes = Global.DB2Mgr.GetHotfixData();
|
||||
|
||||
HotfixQueryResponse hotfixQueryResponse = new HotfixQueryResponse();
|
||||
HotfixResponse hotfixQueryResponse = new HotfixResponse();
|
||||
foreach (ulong hotfixId in hotfixQuery.Hotfixes)
|
||||
{
|
||||
int hotfix = hotfixes.LookupByKey(hotfixId);
|
||||
@@ -75,7 +75,7 @@ namespace Game
|
||||
{
|
||||
var storage = Global.DB2Mgr.GetStorage(MathFunctions.Pair64_HiPart(hotfixId));
|
||||
|
||||
HotfixQueryResponse.HotfixData hotfixData = new HotfixQueryResponse.HotfixData();
|
||||
HotfixResponse.HotfixData hotfixData = new HotfixResponse.HotfixData();
|
||||
hotfixData.ID = hotfixId;
|
||||
hotfixData.RecordID = hotfix;
|
||||
if (storage.HasRecord((uint)hotfixData.RecordID))
|
||||
|
||||
@@ -55,11 +55,12 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.UseToy)]
|
||||
void HandleUseToy(UseToy packet)
|
||||
{
|
||||
ItemTemplate item = Global.ObjectMgr.GetItemTemplate(packet.ItemID);
|
||||
uint itemId = packet.Cast.Misc[0];
|
||||
ItemTemplate item = Global.ObjectMgr.GetItemTemplate(itemId);
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
if (!_collectionMgr.HasToy(packet.ItemID))
|
||||
if (!_collectionMgr.HasToy(itemId))
|
||||
return;
|
||||
|
||||
var effect = item.Effects.Find(eff => { return packet.Cast.SpellID == eff.SpellID; });
|
||||
@@ -69,7 +70,7 @@ namespace Game
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(packet.Cast.SpellID);
|
||||
if (spellInfo == null)
|
||||
{
|
||||
Log.outError(LogFilter.Network, "HandleUseToy: unknown spell id: {0} used by Toy Item entry {1}", packet.Cast.SpellID, packet.ItemID);
|
||||
Log.outError(LogFilter.Network, "HandleUseToy: unknown spell id: {0} used by Toy Item entry {1}", packet.Cast.SpellID, itemId);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -86,7 +87,7 @@ namespace Game
|
||||
SendPacket(spellPrepare);
|
||||
|
||||
spell.m_fromClient = true;
|
||||
spell.m_castItemEntry = packet.ItemID;
|
||||
spell.m_castItemEntry = itemId;
|
||||
spell.m_misc.Data0 = packet.Cast.Misc[0];
|
||||
spell.m_misc.Data1 = packet.Cast.Misc[1];
|
||||
spell.m_castFlagsEx |= SpellCastFlagsEx.UseToySpell;
|
||||
|
||||
@@ -76,9 +76,9 @@ namespace Game.Network.Packets
|
||||
public ByteBuffer Data = new ByteBuffer();
|
||||
}
|
||||
|
||||
class HotfixList : ServerPacket
|
||||
class AvailableHotfixes : ServerPacket
|
||||
{
|
||||
public HotfixList(int hotfixCacheVersion, Dictionary<ulong, int> hotfixes) : base(ServerOpcodes.HotfixList)
|
||||
public AvailableHotfixes(int hotfixCacheVersion, Dictionary<ulong, int> hotfixes) : base(ServerOpcodes.AvailableHotfixes)
|
||||
{
|
||||
HotfixCacheVersion = hotfixCacheVersion;
|
||||
Hotfixes = hotfixes;
|
||||
@@ -97,9 +97,9 @@ namespace Game.Network.Packets
|
||||
public Dictionary<ulong, int> Hotfixes = new Dictionary<ulong, int>();
|
||||
}
|
||||
|
||||
class HotfixQuery : ClientPacket
|
||||
class HotfixRequest : ClientPacket
|
||||
{
|
||||
public HotfixQuery(WorldPacket packet) : base(packet) { }
|
||||
public HotfixRequest(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
@@ -114,9 +114,9 @@ namespace Game.Network.Packets
|
||||
public List<ulong> Hotfixes = new List<ulong>();
|
||||
}
|
||||
|
||||
class HotfixQueryResponse : ServerPacket
|
||||
class HotfixResponse : ServerPacket
|
||||
{
|
||||
public HotfixQueryResponse() : base(ServerOpcodes.HotfixQueryResponse) { }
|
||||
public HotfixResponse() : base(ServerOpcodes.HotfixResponse) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
|
||||
@@ -359,6 +359,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(Slot);
|
||||
_worldPacket.WriteUInt8(State);
|
||||
_worldPacket.WriteUInt32(CompletedMask);
|
||||
_worldPacket.WriteUInt32(EncounterMask);
|
||||
_worldPacket.WriteUInt32(Players.Count);
|
||||
_worldPacket.WriteUInt8(Unused);
|
||||
_worldPacket.WriteBit(ValidCompletedMask);
|
||||
@@ -376,6 +377,7 @@ namespace Game.Network.Packets
|
||||
public uint Slot;
|
||||
public byte State;
|
||||
public uint CompletedMask;
|
||||
public uint EncounterMask;
|
||||
public byte Unused;
|
||||
public bool ValidCompletedMask;
|
||||
public bool ProposalSilent;
|
||||
|
||||
@@ -477,6 +477,7 @@ namespace Game.Network.Packets
|
||||
}
|
||||
|
||||
public int MapID = -1;
|
||||
public Position OldMapPosition;
|
||||
public Optional<ShipTransferPending> Ship;
|
||||
public Optional<int> TransferSpellID;
|
||||
|
||||
|
||||
@@ -1605,7 +1605,7 @@ namespace Game.Network.Packets
|
||||
Immunities.Write(data);
|
||||
Predict.Write(data);
|
||||
|
||||
data.WriteBits(CastFlagsEx, 22);
|
||||
data.WriteBits(CastFlagsEx, 23);
|
||||
data.WriteBits(HitTargets.Count, 16);
|
||||
data.WriteBits(MissTargets.Count, 16);
|
||||
data.WriteBits(MissStatus.Count, 16);
|
||||
|
||||
@@ -46,6 +46,8 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(TokenRedeemIndex);
|
||||
_worldPacket.WriteInt64(TokenBalanceAmount);
|
||||
|
||||
_worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay);
|
||||
|
||||
_worldPacket.WriteBit(VoiceEnabled);
|
||||
_worldPacket.WriteBit(EuropaTicketSystemStatus.HasValue);
|
||||
_worldPacket.WriteBit(ScrollOfResurrectionEnabled);
|
||||
@@ -141,6 +143,7 @@ namespace Game.Network.Packets
|
||||
public uint TokenPollTimeSeconds;
|
||||
public uint TokenRedeemIndex;
|
||||
public long TokenBalanceAmount;
|
||||
public uint BpayStoreProductDeliveryDelay;
|
||||
public bool ItemRestorationButtonEnabled;
|
||||
public bool CharUndeleteEnabled; // Implemented
|
||||
public bool BpayStoreDisabledByParentalControls;
|
||||
@@ -231,11 +234,15 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBit(false); // not accessed in handler
|
||||
_worldPacket.WriteBit(TrialBoostEnabled);
|
||||
_worldPacket.WriteBit(TokenBalanceEnabled);
|
||||
_worldPacket.WriteBit(LiveRegionCharacterListEnabled);
|
||||
_worldPacket.WriteBit(LiveRegionCharacterCopyEnabled);
|
||||
_worldPacket.WriteBit(LiveRegionAccountCopyEnabled);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteInt32(TokenPollTimeSeconds);
|
||||
_worldPacket.WriteInt32(TokenRedeemIndex);
|
||||
_worldPacket.WriteInt64(TokenBalanceAmount);
|
||||
_worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay);
|
||||
}
|
||||
|
||||
public bool BpayStoreAvailable; // NYI
|
||||
@@ -250,9 +257,13 @@ namespace Game.Network.Packets
|
||||
public bool CompetitiveModeEnabled; // NYI
|
||||
public bool TrialBoostEnabled; // NYI
|
||||
public bool TokenBalanceEnabled; // NYI
|
||||
public bool LiveRegionCharacterListEnabled; // NYI
|
||||
public bool LiveRegionCharacterCopyEnabled; // NYI
|
||||
public bool LiveRegionAccountCopyEnabled; // NYI
|
||||
public int TokenPollTimeSeconds; // NYI
|
||||
public int TokenRedeemIndex; // NYI
|
||||
public long TokenBalanceAmount; // NYI
|
||||
public uint BpayStoreProductDeliveryDelay; // NYI
|
||||
}
|
||||
|
||||
public class MOTD : ServerPacket
|
||||
|
||||
@@ -57,7 +57,8 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBit(WindowInfo.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteInt32(Nodes.Length);
|
||||
_worldPacket.WriteUInt32(CanLandNodes.Length);
|
||||
_worldPacket.WriteUInt32(CanUseNodes.Length);
|
||||
|
||||
if (WindowInfo.HasValue)
|
||||
{
|
||||
@@ -65,12 +66,16 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(WindowInfo.Value.CurrentNode);
|
||||
}
|
||||
|
||||
foreach (var node in Nodes)
|
||||
foreach (var node in CanLandNodes)
|
||||
_worldPacket.WriteUInt8(node);
|
||||
|
||||
foreach (var node in CanUseNodes)
|
||||
_worldPacket.WriteUInt8(node);
|
||||
}
|
||||
|
||||
public Optional<ShowTaxiNodesWindowInfo> WindowInfo;
|
||||
public byte[] Nodes = null;
|
||||
public byte[] CanLandNodes = null; // Nodes known by player
|
||||
public byte[] CanUseNodes = null; // Nodes available for use - this can temporarily disable a known node
|
||||
}
|
||||
|
||||
class EnableTaxiNode : ClientPacket
|
||||
|
||||
@@ -39,12 +39,10 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
ItemID = _worldPacket.ReadUInt32();
|
||||
Cast.Read(_worldPacket);
|
||||
}
|
||||
|
||||
public SpellCastRequest Cast = new SpellCastRequest();
|
||||
public uint ItemID;
|
||||
}
|
||||
|
||||
class AccountToysUpdate : ServerPacket
|
||||
|
||||
@@ -36,6 +36,10 @@ namespace Game.Network
|
||||
static byte[] SessionKeySeed = { 0x58, 0xCB, 0xCF, 0x40, 0xFE, 0x2E, 0xCE, 0xA6, 0x5A, 0x90, 0xB8, 0x01, 0x68, 0x6C, 0x28, 0x0B };
|
||||
static byte[] ContinuedSessionSeed = { 0x16, 0xAD, 0x0C, 0xD4, 0x46, 0xF9, 0x4F, 0xB2, 0xEF, 0x7D, 0xEA, 0x2A, 0x17, 0x66, 0x4D, 0x2F };
|
||||
|
||||
static uint[] ClientTypeSeed_Win = { 0x15E29B46, 0xD030E52E, 0x8BB823BD, 0x2EE440F4 };
|
||||
static uint[] ClientTypeSeed_Wn64 = { 0xA4DEB5FC, 0x2F09587E, 0x86C96622, 0x98162415 };
|
||||
static uint[] ClientTypeSeed_Mc64 = { 0xA69C3979, 0x92260A02, 0x75F80969, 0xBA56132D };
|
||||
|
||||
public WorldSocket(Socket socket) : base(socket)
|
||||
{
|
||||
_connectType = ConnectionType.Realm;
|
||||
@@ -379,7 +383,19 @@ namespace Game.Network
|
||||
// For hook purposes, we get Remoteaddress at this point.
|
||||
string address = GetRemoteIpAddress().ToString();
|
||||
|
||||
HmacSha256 hmac = new HmacSha256(account.game.SessionKey);
|
||||
Sha256 digestKeyHash = new Sha256();
|
||||
digestKeyHash.Process(account.game.SessionKey, account.game.SessionKey.Length);
|
||||
|
||||
uint[] clientSeed = ClientTypeSeed_Win;
|
||||
if (account.game.OS == "Wn64")
|
||||
clientSeed = ClientTypeSeed_Wn64;
|
||||
else if (account.game.OS == "Mc64")
|
||||
clientSeed = ClientTypeSeed_Mc64;
|
||||
|
||||
byte[] byteArray = new byte[clientSeed.Length * 4];
|
||||
Buffer.BlockCopy(clientSeed, 0, byteArray, 0, clientSeed.Length * 4);
|
||||
|
||||
HmacSha256 hmac = new HmacSha256(digestKeyHash.Digest);
|
||||
hmac.Process(authSession.LocalChallenge, authSession.LocalChallenge.Count);
|
||||
hmac.Process(_serverChallenge, 16);
|
||||
hmac.Finish(AuthCheckSeed, 16);
|
||||
@@ -392,7 +408,10 @@ namespace Game.Network
|
||||
return;
|
||||
}
|
||||
|
||||
HmacSha256 sessionKeyHmac = new HmacSha256(account.game.SessionKey);
|
||||
Sha256 keyData = new Sha256();
|
||||
keyData.Finish(account.game.SessionKey, account.game.SessionKey.Length);
|
||||
|
||||
HmacSha256 sessionKeyHmac = new HmacSha256(keyData.Digest);
|
||||
sessionKeyHmac.Process(_serverChallenge, 16);
|
||||
sessionKeyHmac.Process(authSession.LocalChallenge, authSession.LocalChallenge.Count);
|
||||
sessionKeyHmac.Finish(SessionKeySeed, 16);
|
||||
|
||||
@@ -712,7 +712,7 @@ namespace Game
|
||||
SendSetTimeZoneInformation();
|
||||
SendFeatureSystemStatusGlueScreen();
|
||||
SendClientCacheVersion(WorldConfig.GetUIntValue(WorldCfg.ClientCacheVersion));
|
||||
SendHotfixList(WorldConfig.GetIntValue(WorldCfg.HotfixCacheVersion));
|
||||
SendAvailableHotfixes(WorldConfig.GetIntValue(WorldCfg.HotfixCacheVersion));
|
||||
SendTutorialsData();
|
||||
|
||||
SQLResult result = holder.GetResult(AccountInfoQueryLoad.GlobalRealmCharacterCounts);
|
||||
|
||||
Reference in New Issue
Block a user