mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Spells] Updates to spell field 'cast not stands' to ignore casting restrictions (#1938)
* test * complete * Update effects.cpp * Update spells.cpp * Update effects.cpp * [Spells] Support for bards using Disciplines while casting or /melody. Support for spell field 'cast not standing' not allow casting from divine aura * [Spells] Support for bards using Disciplines while casting or /melody. DA bypass logic for spells with field 'cast_not_standing' * updates * stun and mez bypass * Update spdat.cpp * Update spdat.cpp * Update spells.cpp
This commit is contained in:
+1
-1
@@ -1297,7 +1297,7 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
|
||||
target_id = GetPetID();
|
||||
|
||||
// extra handling for cast_not_standing spells
|
||||
if (!spells[rank->spell].cast_not_standing) {
|
||||
if (!IgnoreCastingRestriction(rank->spell)) {
|
||||
if (GetAppearance() == eaSitting) // we need to stand!
|
||||
SetAppearance(eaStanding, false);
|
||||
|
||||
|
||||
+6
-2
@@ -725,7 +725,11 @@ void Client::SendDisciplineUpdate() {
|
||||
|
||||
bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
// Dont let client waste a reuse timer if they can't use the disc
|
||||
if (IsStunned() || IsFeared() || IsMezzed() || IsAmnesiad() || IsPet())
|
||||
if ((IsStunned() && !IgnoreCastingRestriction(spell_id))||
|
||||
IsFeared() ||
|
||||
(IsMezzed() && !IgnoreCastingRestriction(spell_id)) ||
|
||||
IsAmnesiad() ||
|
||||
IsPet())
|
||||
{
|
||||
if (IsAmnesiad()) {
|
||||
MessageString(Chat::Red, MELEE_SILENCE);
|
||||
@@ -748,7 +752,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
if (DivineAura() && !spells[spell_id].cast_not_standing) {
|
||||
if (DivineAura() && !IgnoreCastingRestriction(spell_id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -3911,7 +3911,7 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
|
||||
case SE_InterruptCasting: {
|
||||
if (IsCasting()) {
|
||||
const auto &spell = spells[casting_spell_id];
|
||||
if (!spell.cast_not_standing && zone->random.Roll(spells[buff.spellid].base_value[i])) {
|
||||
if (!IgnoreCastingRestriction(spell.id) && zone->random.Roll(spells[buff.spellid].base_value[i])) {
|
||||
InterruptSpell();
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -168,9 +168,9 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
casting_spell_id ||
|
||||
delaytimer ||
|
||||
spellend_timer.Enabled() ||
|
||||
IsStunned() ||
|
||||
(IsStunned() && !IgnoreCastingRestriction(spell_id)) ||
|
||||
IsFeared() ||
|
||||
IsMezzed() ||
|
||||
(IsMezzed() && !IgnoreCastingRestriction(spell_id)) ||
|
||||
(IsSilenced() && !IsDiscipline(spell_id)) ||
|
||||
(IsAmnesiad() && IsDiscipline(spell_id))
|
||||
)
|
||||
@@ -217,7 +217,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
}
|
||||
|
||||
//cannot cast under divine aura, unless spell has 'cast_not_standing' flag.
|
||||
if(DivineAura() && !spells[spell_id].cast_not_standing) {
|
||||
if(DivineAura() && !IgnoreCastingRestriction(spell_id)) {
|
||||
LogSpells("Spell casting canceled: cannot cast while Divine Aura is in effect");
|
||||
InterruptSpell(173, 0x121, false);
|
||||
if(IsClient()) {
|
||||
@@ -3792,7 +3792,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, int reflect_effectivenes
|
||||
// invuln mobs can't be affected by any spells, good or bad, except if caster is casting a spell with 'cast_not_standing' on self.
|
||||
if ((spelltar->GetInvul() && !spelltar->DivineAura()) ||
|
||||
(spelltar != this && spelltar->DivineAura()) ||
|
||||
(spelltar == this && spelltar->DivineAura() && !spells[spell_id].cast_not_standing)) {
|
||||
(spelltar == this && spelltar->DivineAura() && !IgnoreCastingRestriction(spell_id))) {
|
||||
LogSpells("Casting spell [{}] on [{}] aborted: they are invulnerable", spell_id, spelltar->GetName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user