mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Bots] Add rule to toggle DT hitting owner (#3757)
**Bots, CazicTouchBotsOwner** is a rule that will toggle whether or not DT will hit the targeted bot or the owner. Similar to how **Spells, CazicTouchTargetsPetOwner** functions except for bots.
This commit is contained in:
+9
-2
@@ -2301,14 +2301,21 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
|
||||
return false;
|
||||
|
||||
//Death Touch targets the pet owner instead of the pet when said pet is tanking.
|
||||
if ((RuleB(Spells, CazicTouchTargetsPetOwner) && spell_target && spell_target->HasOwner()) && (spell_id == SPELL_CAZIC_TOUCH || spell_id == SPELL_TOUCH_OF_VINITRAS)) {
|
||||
Mob* owner = spell_target->GetOwner();
|
||||
if ((RuleB(Spells, CazicTouchTargetsPetOwner) && spell_target && spell_target->HasOwner()) && !spell_target->IsBot() && (spell_id == SPELL_CAZIC_TOUCH || spell_id == SPELL_TOUCH_OF_VINITRAS)) {
|
||||
Mob* owner = spell_target->GetOwner();
|
||||
|
||||
if (owner) {
|
||||
spell_target = owner;
|
||||
}
|
||||
}
|
||||
|
||||
if ((RuleB(Bots, CazicTouchBotsOwner) && spell_target && spell_target->IsBot()) && spell_id == (SPELL_CAZIC_TOUCH || spell_id == SPELL_TOUCH_OF_VINITRAS)) {
|
||||
auto bot_owner = spell_target->GetOwner();
|
||||
if (bot_owner) {
|
||||
spell_target = bot_owner;
|
||||
}
|
||||
}
|
||||
|
||||
//Guard Assist Code
|
||||
if (RuleB(Character, PVPEnableGuardFactionAssist) && spell_target && IsDetrimentalSpell(spell_id) && spell_target != this) {
|
||||
if (IsClient() && spell_target->IsClient()|| (HasOwner() && GetOwner()->IsClient() && spell_target->IsClient())) {
|
||||
|
||||
Reference in New Issue
Block a user