From 8224a9e7762c77396ba11bc750ec0713fd377f91 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 6 May 2015 23:40:01 -0400 Subject: [PATCH] Fix bards not playing their instruments This is a rather naive implementation, we should really save the PlayerState server side so we can have newly zoned in clients after the equip happened to see the animation. But until we find all the places the PlayerState is sent, this is fine. --- zone/client_packet.cpp | 24 ++++++++++++++++++++++++ zone/client_packet.h | 2 ++ 2 files changed, 26 insertions(+) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index e2c63c232..4424d1f47 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -381,6 +381,8 @@ void MapOpcodes() ConnectedOpcodes[OP_VetClaimRequest] = &Client::Handle_OP_VetClaimRequest; ConnectedOpcodes[OP_VoiceMacroIn] = &Client::Handle_OP_VoiceMacroIn; ConnectedOpcodes[OP_WearChange] = &Client::Handle_OP_WearChange; + ConnectedOpcodes[OP_WeaponEquip2] = &Client::Handle_OP_WeaponEquip2; + ConnectedOpcodes[OP_WeaponUnequip2] = &Client::Handle_OP_WeaponUnequip2; ConnectedOpcodes[OP_WhoAllRequest] = &Client::Handle_OP_WhoAllRequest; ConnectedOpcodes[OP_WorldUnknown001] = &Client::Handle_OP_Ignore; ConnectedOpcodes[OP_XTargetAutoAddHaters] = &Client::Handle_OP_XTargetAutoAddHaters; @@ -13889,6 +13891,28 @@ void Client::Handle_OP_WearChange(const EQApplicationPacket *app) return; } +void Client::Handle_OP_WeaponEquip2(const EQApplicationPacket *app) +{ + if (app->size != 8) { + std::cout << "Wrong size: OP_WeaponEquip2, size=" << app->size << ", expected " << 8 << std::endl; + return; + } + + // We should probably save it server side, but for now this works + entity_list.QueueClients(this, app, false); +} + +void Client::Handle_OP_WeaponUnequip2(const EQApplicationPacket *app) +{ + if (app->size != 8) { + std::cout << "Wrong size: OP_WeaponUnequip2, size=" << app->size << ", expected " << 8 << std::endl; + return; + } + + // We should probably save it server side, but for now this works + entity_list.QueueClients(this, app, false); +} + void Client::Handle_OP_WhoAllRequest(const EQApplicationPacket *app) { if (app->size != sizeof(Who_All_Struct)) { diff --git a/zone/client_packet.h b/zone/client_packet.h index 51b6713b7..0f09cf574 100644 --- a/zone/client_packet.h +++ b/zone/client_packet.h @@ -288,6 +288,8 @@ void Handle_OP_VetClaimRequest(const EQApplicationPacket *app); void Handle_OP_VoiceMacroIn(const EQApplicationPacket *app); void Handle_OP_WearChange(const EQApplicationPacket *app); + void Handle_OP_WeaponEquip2(const EQApplicationPacket *app); + void Handle_OP_WeaponUnequip2(const EQApplicationPacket *app); void Handle_OP_WhoAllRequest(const EQApplicationPacket *app); void Handle_OP_XTargetAutoAddHaters(const EQApplicationPacket *app); void Handle_OP_XTargetRequest(const EQApplicationPacket *app);