Client doesn't check AA casting standstate

Fixes an exploit and makes you stand if you're just sitting
This commit is contained in:
Michael Cook (mackal)
2018-11-14 20:37:57 -05:00
parent 4e0d85534e
commit d4395a6f0a
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -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)) {