From d4395a6f0aff866bed6f648aaa8dec97c44cc679 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 14 Nov 2018 20:37:57 -0500 Subject: [PATCH] Client doesn't check AA casting standstate Fixes an exploit and makes you stand if you're just sitting --- zone/aa.cpp | 11 +++++++++++ zone/string_ids.h | 1 + 2 files changed, 12 insertions(+) diff --git a/zone/aa.cpp b/zone/aa.cpp index 9fa76a9d4..1ec78e769 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -1208,6 +1208,17 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) { if (spells[rank->spell].targettype == ST_Pet || spells[rank->spell].targettype == ST_SummonedPet) target_id = GetPetID(); + // extra handling for cast_not_standing spells + if (!spells[rank->spell].cast_not_standing) { + if (GetAppearance() == eaSitting) // we need to stand! + SetAppearance(eaStanding, false); + + if (GetAppearance() != eaStanding) { + Message_StringID(MT_SpellFailure, STAND_TO_CAST); + return; + } + } + // 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/string_ids.h b/zone/string_ids.h index 2c223ffbd..acab3df22 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -418,6 +418,7 @@ #define NO_LONGER_HIDDEN 12337 //You are no longer hidden. #define STOP_SNEAKING 12338 //You stop sneaking #define NOT_IN_CONTROL 12368 //You do not have control of yourself right now. +#define STAND_TO_CAST 12441 //You must be standing to cast a spell. #define ALREADY_CASTING 12442 //You are already casting a spell! #define SHIMMERS_BRIEFLY 12444 //Your %1 shimmers briefly. #define SENSE_CORPSE_NOT_NAME 12446 //You don't sense any corpses of that name.