[Bug Fix] Bard update fixes 1 (#1982)

* fix for bard item charge consumables

* [Bug Fix] Bards not consuming item click charges on instant cast items.

* [Bug Fix] Bard update fixes 1

bards not respecting deity/race/class restrictions on instant cast items
This commit is contained in:
KayenEQ
2022-02-09 15:07:38 -05:00
committed by GitHub
parent f65a6d2761
commit 1f560529da
3 changed files with 163 additions and 132 deletions
+32 -30
View File
@@ -8792,39 +8792,41 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
spell_id = item->Click.Effect;
bool is_casting_bard_song = false;
if
(
spell_id > 0 &&
(
!IsValidSpell(spell_id) ||
casting_spell_id ||
delaytimer ||
spellend_timer.Enabled() ||
IsStunned() ||
IsFeared() ||
IsMezzed() ||
DivineAura() ||
(spells[spell_id].target_type == ST_Ring) ||
(IsSilenced() && !IsDiscipline(spell_id)) ||
(IsAmnesiad() && IsDiscipline(spell_id)) ||
(IsDetrimentalSpell(spell_id) && !zone->CanDoCombat()) ||
(inst->IsScaling() && inst->GetExp() <= 0) // charms don't have spells when less than 0
)
)
{
/*
Bards on live can click items while casting spell gems, it stops that song cast and replaces it with item click cast.
Can not click while casting other items.
*/
if (GetClass() == BARD && IsCasting() && casting_spell_slot < CastingSlot::MaxGems)
{
is_casting_bard_song = true;
}
else
{
if (spell_id > 0) {
if (!IsValidSpell(spell_id) ||
IsStunned() ||
IsFeared() ||
IsMezzed() ||
DivineAura() ||
(spells[spell_id].target_type == ST_Ring) ||
(IsSilenced() && !IsDiscipline(spell_id)) ||
(IsAmnesiad() && IsDiscipline(spell_id)) ||
(IsDetrimentalSpell(spell_id) && !zone->CanDoCombat()) ||
(inst->IsScaling() && inst->GetExp() <= 0)) { // charms don't have spells when less than 0
SendSpellBarEnable(spell_id);
return;
}
if (casting_spell_id ||
delaytimer ||
spellend_timer.Enabled()) {
/*
Bards on live can click items while casting spell gems, it stops that song cast and replaces it with item click cast.
Can not click while casting other items.
*/
if (GetClass() == BARD && IsCasting() && casting_spell_slot < CastingSlot::MaxGems)
{
is_casting_bard_song = true;
}
else
{
SendSpellBarEnable(spell_id);
return;
}
}
}
// Modern clients don't require pet targeted for item clicks that are ST_Pet
if (spell_id > 0 && (spells[spell_id].target_type == ST_Pet || spells[spell_id].target_type == ST_SummonedPet))