mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-27 10:47:56 +00:00
[Spells] Support for bards using Disciplines while casting or /melody. (#1936)
* 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'
This commit is contained in:
+33
-12
@@ -727,6 +727,9 @@ 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 (IsAmnesiad()) {
|
||||
MessageString(Chat::Red, MELEE_SILENCE);
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -745,6 +748,10 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
if (DivineAura() && !spells[spell_id].cast_not_standing) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//can we use the spell?
|
||||
const SPDat_Spell_Struct &spell = spells[spell_id];
|
||||
uint8 level_to_use = spell.classes[GetClass() - 1];
|
||||
@@ -789,8 +796,9 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(spell.recast_time > 0)
|
||||
{
|
||||
bool instant_recast = true;
|
||||
|
||||
if(spell.recast_time > 0) {
|
||||
uint32 reduced_recast = spell.recast_time / 1000;
|
||||
auto focus = GetFocusEffect(focusReduceRecastTime, spell_id);
|
||||
// do stupid stuff because custom servers.
|
||||
@@ -805,18 +813,31 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
reduced_recast -= focus;
|
||||
}
|
||||
|
||||
if (reduced_recast > 0)
|
||||
CastSpell(spell_id, target, EQ::spells::CastingSlot::Discipline, -1, -1, 0, -1, (uint32)DiscTimer, reduced_recast);
|
||||
else{
|
||||
CastSpell(spell_id, target, EQ::spells::CastingSlot::Discipline);
|
||||
return true;
|
||||
if (reduced_recast > 0){
|
||||
instant_recast = false;
|
||||
|
||||
if (GetClass() == BARD && IsCasting() && spells[spell_id].cast_time == 0) {
|
||||
if (DoCastingChecks(spell_id, target)) {
|
||||
SpellFinished(spell_id, entity_list.GetMob(target), EQ::spells::CastingSlot::Discipline, 0, -1, spells[spell_id].resist_difficulty, false, -1, (uint32)DiscTimer, reduced_recast);
|
||||
}
|
||||
}
|
||||
else {
|
||||
CastSpell(spell_id, target, EQ::spells::CastingSlot::Discipline, -1, -1, 0, -1, (uint32)DiscTimer, reduced_recast);
|
||||
}
|
||||
|
||||
SendDisciplineTimer(spells[spell_id].timer_id, reduced_recast);
|
||||
}
|
||||
|
||||
SendDisciplineTimer(spells[spell_id].timer_id, reduced_recast);
|
||||
}
|
||||
else
|
||||
{
|
||||
CastSpell(spell_id, target, EQ::spells::CastingSlot::Discipline);
|
||||
|
||||
if (instant_recast) {
|
||||
if (GetClass() == BARD && IsCasting() && spells[spell_id].cast_time == 0) {
|
||||
if (DoCastingChecks(spell_id, target)) {
|
||||
SpellFinished(spell_id, entity_list.GetMob(target), EQ::spells::CastingSlot::Discipline);
|
||||
}
|
||||
}
|
||||
else {
|
||||
CastSpell(spell_id, target, EQ::spells::CastingSlot::Discipline);
|
||||
}
|
||||
}
|
||||
return(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user