[Spells] Added a pet check to Cazic Touch (#1365)

* Added a pet check to Cazic Touch

* Added a pet check to Cazic Touch

* Added rule option to Cazic pet Check

* Removed Magic Numbers

* Bracket fix

* Revert "Bracket fix"

This reverts commit 3deb3e0cad.

* Bracket fix

* Update spells.cpp

* Fixed constants

* Revert "Fixed constants"

This reverts commit 68502effd3.

* Update eq_constants.h

* Update eq_constants.h

Co-authored-by: ProducerZekServer <go@away.com>
Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
RoTPvP
2021-06-11 14:10:30 -07:00
committed by GitHub
parent b87c5484b1
commit 6e61f6d0ba
3 changed files with 16 additions and 7 deletions
+12 -3
View File
@@ -2046,7 +2046,16 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
if(!IsValidSpell(spell_id))
return false;
//Guard Assist Code
//Death Touch targets the pet owner instead of the pet when said pet is tanking.
if ((RuleB(Spells, CazicTouchTargetsPetOwner) && spell_target->HasOwner()) && spell_id == DB_SPELL_CAZIC_TOUCH || spell_id == DB_SPELL_TOUCH_OF_VINITRAS) {
Mob* owner = spell_target->GetOwner();
if (owner) {
spell_target = owner;
}
}
//Guard Assist Code
if (RuleB(Character, PVPEnableGuardFactionAssist) && IsDetrimentalSpell(spell_id) && spell_target != this) {
if (IsClient() || (HasOwner() && GetOwner()->IsClient())) {
auto& mob_list = entity_list.GetCloseMobList(spell_target);
@@ -2062,8 +2071,8 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
}
}
}
}
}
}
}
if( spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor()){
if(IsClient()){