From ceb0fe22f1f9528f3b42bd01bb60a112b836af59 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 21 Jul 2017 16:25:13 -0400 Subject: [PATCH] Fix OP_UpdateAura handling --- zone/client_packet.cpp | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index af6ac0649..8a2c266f1 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -14328,24 +14328,18 @@ void Client::Handle_OP_VoiceMacroIn(const EQApplicationPacket *app) void Client::Handle_OP_UpdateAura(const EQApplicationPacket *app) { - if (app->size != 4) { - Log(Logs::General, Logs::None, "Size mismatch in OP_UpdateAura"); + if (app->size != sizeof(AuraDestory_Struct)) { + Log(Logs::General, Logs::None, "Size mismatch in OP_UpdateAura expected %i got %i", + sizeof(AuraDestory_Struct), app->size); return; } - auto action = app->ReadUInt32(0); // action tells us the size - switch (action) { - case 2: // client doesn't send this, but this is what it does - RemoveAllAuras(); - break; - case 1: { - auto ads = (AuraDestory_Struct *)app->pBuffer; - RemoveAura(ads->entity_id); - break; - } - case 0: // client doesn't send this - break; - } + // client only sends this for removing + auto aura = (AuraDestory_Struct *)app->pBuffer; + if (aura->action != 1) + return; // could log I guess, but should only ever get this action + + RemoveAura(aura->entity_id); return; }