From 5865948a8b9a2044def17a02e51ebb5c46615ff0 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 17 May 2017 15:20:27 -0400 Subject: [PATCH] Fix ST_Pet item/AA casts Modern clients don't require the pet to be targeted --- zone/aa.cpp | 5 +++++ zone/client_packet.cpp | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/zone/aa.cpp b/zone/aa.cpp index e002dd4f2..2451416aa 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -1202,6 +1202,11 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) { Message_StringID(MT_SpellFailure, SNEAK_RESTRICT); return; } + // + // Modern clients don't require pet targeted for AA casts that are ST_Pet + if (spells[rank->spell].targettype == ST_Pet) + target_id = GetPetID(); + // Bards can cast instant cast AAs while they are casting another song if(spells[rank->spell].cast_time == 0 && GetClass() == BARD && IsBardSong(casting_spell_id)) { if(!SpellFinished(rank->spell, entity_list.GetMob(target_id), EQEmu::CastingSlot::AltAbility, spells[rank->spell].mana, -1, spells[rank->spell].ResistDiff, false)) { diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index bbd76183d..12250bdbd 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -8606,6 +8606,10 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app) return; } + // Modern clients don't require pet targeted for item clicks that are ST_Pet + if (spells[spell_id].targettype == ST_Pet) + target_id = GetPetID(); + Log(Logs::General, Logs::None, "OP ItemVerifyRequest: spell=%i, target=%i, inv=%i", spell_id, target_id, slot_id); if (m_inv.SupportsClickCasting(slot_id) || ((item->ItemType == EQEmu::item::ItemTypePotion || item->PotionBelt) && m_inv.SupportsPotionBeltCasting(slot_id))) // sanity check