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
@@ -3392,11 +3392,6 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
if(spelltar->IsClient() && spelltar->CastToClient()->IsHoveringForRespawn())
return false;
if (spells[spell_id].sneak && IsClient() && !CastToClient()->sneaking){
Message_StringID(13, SNEAK_RESTRICT);
return false;//Fail Safe, this can cause a zone crash certain situations if you try to apply sneak effects when not sneaking.
}
if(IsDetrimentalSpell(spell_id) && !IsAttackAllowed(spelltar) && !IsResurrectionEffects(spell_id)) {
if(!IsClient() || !CastToClient()->GetGM()) {
Message_StringID(MT_SpellFailure, SPELL_NO_HOLD);