Update opcodes to 7.3.2
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user