mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +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();
|
||||
}
|
||||
|
||||
|
||||
@@ -338,6 +338,7 @@
|
||||
#define STRIKETHROUGH_STRING 9078 //You strike through your opponent's defenses!
|
||||
#define SPELL_REFLECT 9082 //%1's spell has been reflected by %2.
|
||||
#define NEW_SPELLS_AVAIL 9149 //You have new spells available to you. Check the merchants near your guild master.
|
||||
#define SNEAK_RESTRICT 9240 //You can not use this ability because you have not been hidden for long enough.
|
||||
#define PET_NOW_FOCUSING 9254 //Focusing on one target, Master.
|
||||
#define PET_NOT_FOCUSING 9263 //No longer focusing on one target, Master.
|
||||
#define PET_NOT_CASTING 9264 //Not casting spells, Master.
|
||||
|
||||
Reference in New Issue
Block a user