Merge pull request #357 from KayenEQ/Development

Pets can now cast group spells on self will now affect group.
This commit is contained in:
KayenEQ 2015-02-01 06:35:08 -05:00
commit 7df541ea1c

View File

@ -2025,6 +2025,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
//
// Switch #2 - execute the spell
//
switch(CastAction)
{
default:
@ -2148,6 +2149,15 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
// caster if they're not using TGB
// NOTE: this will always hit the caster, plus the target's group so
// it can affect up to 7 people if the targeted group is not our own
// Allow pets who cast group spells to affect the group.
if (spell_target->IsPetOwnerClient()){
Mob* owner = spell_target->GetOwner();
if (owner)
spell_target = owner;
}
if(spell_target->IsGrouped())
{
Group *target_group = entity_list.GetGroupByMob(spell_target);