mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Spell field defined that determines if must be sneaking to use this ability.
This is handled by client under normal conditions, however if you force cast this effect in situations like 'procs' you can cause zone crashes, therefore a failsafe check is added in 'SpellOnTarget'
This commit is contained in:
+6
-1
@@ -3262,6 +3262,11 @@ 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);
|
||||
@@ -4711,7 +4716,7 @@ void NPC::Stun(int duration) {
|
||||
|
||||
void NPC::UnStun() {
|
||||
Mob::UnStun();
|
||||
SetRunAnimSpeed(this->GetRunspeed());
|
||||
SetRunAnimSpeed(static_cast<int8>(GetRunspeed()));
|
||||
SendPosition();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user