Enforce 4 sec Sneak Attack rule fixes #569

Spells flagged with SNEAK_ATTACK requires you to be hidden for
about 4 seconds before you can cast them
This commit is contained in:
Michael Cook (mackal)
2016-10-25 23:19:20 -04:00
parent 60406ebcc1
commit b9fefc95e8
6 changed files with 26 additions and 17 deletions
+5
View File
@@ -1181,6 +1181,11 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
if (!IsCastWhileInvis(rank->spell))
CommonBreakInvisible();
if (spells[rank->spell].sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
Message_StringID(13, SNEAK_RESTRICT);
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)) {