Index: game/Player.cpp =================================================================== --- game/Player.cpp (revision 5515) +++ game/Player.cpp (working copy) @@ -14679,6 +14679,102 @@ data << uint32(0x8e8b) << uint64(0); // if count = 3 GetSession()->SendPacket(&data); + + + // Check for Master's dummy spells + Unit::AuraList const& dummyList = GetAurasByType(SPELL_AURA_DUMMY); + for(Unit::AuraList::const_iterator itr = dummyList.begin();itr!=dummyList.end();++itr) + { + uint32 MD = 0; + + switch((*itr)->GetSpellProto()->Id) + { + // Spirit Bond + case 19578: + pet->CastSpell(pet, 19579, true); + break; + case 20895: + pet->CastSpell(pet, 24529, true); + break; + // Stalker's Ally + case 28757: + pet->CastSpell(pet, 28758, true); + break; + // Master Demonologist + case 23785: + { + switch(pet->GetEntry()) + { + case 416: MD = 23759; break; // imp + case 1860: MD = 23760; break; // voidwalker + case 1863: MD = 23761; break; // succubus + case 417: MD = 23762; break; // felhunter + case 17252: MD = 35702; break; // felguard + default: break; + } + if(MD) pet->CastSpell(pet, MD, true); + break; + } + case 23822: + { + switch(pet->GetEntry()) + { + case 416: MD = 23826; break; // imp + case 1860: MD = 23841; break; // voidwalker + case 1863: MD = 23833; break; // succubus + case 417: MD = 23837; break; // felhunter + case 17252: MD = 35703; break; // felguard + default: break; + } + if(MD) pet->CastSpell(pet, MD, true); + break; + } + case 23823: + { + switch(pet->GetEntry()) + { + case 416: MD = 23827; break; // imp + case 1860: MD = 23842; break; // voidwalker + case 1863: MD = 23834; break; // succubus + case 417: MD = 23838; break; // felhunter + case 17252: MD = 35704; break; // felguard + default: break; + } + if(MD) pet->CastSpell(pet, MD, true); + break; + } + case 23824: + { + switch(pet->GetEntry()) + { + case 416: MD = 23828; break; // imp + case 1860: MD = 23842; break; // voidwalker + case 1863: MD = 23835; break; // succubus + case 417: MD = 23839; break; // felhunter + case 17252: MD = 35705; break; // felguard + default: break; + } + if(MD) pet->CastSpell(pet, MD, true); + break; + } + case 23825: + { + switch(pet->GetEntry()) + { + case 416: MD = 23829; break; // imp + case 1860: MD = 23844; break; // voidwalker + case 1863: MD = 23836; break; // succubus + case 417: MD = 23840; break; // felhunter + case 17252: MD = 35706; break; // felguard + default: break; + } + if(MD) pet->CastSpell(pet, MD, true); + break; + } + default: break; + } + } + // done } } Index: game/SpellAuras.cpp =================================================================== --- game/SpellAuras.cpp (revision 5515) +++ game/SpellAuras.cpp (working copy) @@ -305,7 +305,8 @@ m_procCharges(0), m_spellmod(NULL), m_spellId(spellproto->Id), m_effIndex(eff), m_caster_guid(0), m_target(target), m_timeCla(1000), m_castItemGuid(castItem?castItem->GetGUID():0), m_auraSlot(MAX_AURAS), m_positive(false), m_permanent(false), m_isPeriodic(false), m_isTrigger(false), m_isAreaAura(false), m_isPersistent(false), -m_periodicTimer(0), m_PeriodicEventId(0), m_updated(false), m_removeOnDeath(false),m_fearMoveAngle(0), m_isRemovedOnShapeLost(true) +m_periodicTimer(0), m_PeriodicEventId(0), m_updated(false), m_removeOnDeath(false),m_fearMoveAngle(0), m_isRemovedOnShapeLost(true), +m_PetLink(false) { assert(target); @@ -413,6 +414,9 @@ m_radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(GetSpellProto()->EffectRadiusIndex[m_effIndex])); if(Player* modOwner = caster_ptr->GetSpellModOwner()) modOwner->ApplySpellMod(GetSpellProto()->Id, SPELLMOD_RADIUS, m_radius); + + if ( spellproto->Effect[eff] == 143 || spellproto->Effect[eff] == 119 ) + m_PetLink = true; } AreaAura::~AreaAura() @@ -603,7 +607,7 @@ pGroup = ((Player*)owner)->GetGroup(); } - if(pGroup) + if(pGroup && !m_PetLink) { for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Index: game/SpellAuras.h =================================================================== --- game/SpellAuras.h (revision 5515) +++ game/SpellAuras.h (working copy) @@ -252,6 +252,7 @@ bool IsPersistent() const { return m_isPersistent; } bool IsDeathPersistent() const { return m_isDeathPersist; } bool IsRemovedOnShapeLost() const { return m_isRemovedOnShapeLost; } + bool IsPetLink() const { return m_PetLink; } virtual void Update(uint32 diff); void ApplyModifier(bool apply, bool Real = false); @@ -305,6 +306,7 @@ uint32 m_PeriodicEventId; bool m_updated; bool m_removeOnDeath; + bool m_PetLink; private: void UpdateSlotCounterAndDuration(bool add); void CleanupTriggeredSpells(); Index: game/SpellEffects.cpp =================================================================== --- game/SpellEffects.cpp (revision 5515) +++ game/SpellEffects.cpp (working copy) @@ -201,7 +201,7 @@ &Spell::EffectNULL, //140 SPELL_EFFECT_140 &Spell::EffectNULL, //141 SPELL_EFFECT_141 &Spell::EffectTriggerSpellWithValue, //142 SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE - &Spell::EffectNULL, //143 SPELL_EFFECT_143 probably apply aura again :) + &Spell::EffectApplyPetAura, //143 SPELL_EFFECT_143 probably apply aura again :) &Spell::EffectNULL, //144 SPELL_EFFECT_144 &Spell::EffectNULL, //145 SPELL_EFFECT_145 &Spell::EffectNULL, //146 SPELL_EFFECT_146 @@ -884,6 +884,16 @@ m_caster->CastSpell(m_caster,spell_id,true,NULL); return; } + case 19028: // Soul Link + { + if (!unitTarget) + return; + + // Pet will cast aura + unitTarget->CastSpell(unitTarget,25228,true,NULL); + return; + } + } //All IconID Check in there @@ -4855,17 +4865,17 @@ void Spell::EffectApplyPetAura(uint32 i) { - //spell aura for both pet and owner, think the pet has the aura and applies it to owner - EffectApplyAura(i); + if(!unitTarget) + return; + if(!unitTarget->isAlive()) + return; - Unit* owner = unitTarget->GetCharmerOrOwner(); - if(owner) - { - unitTarget = owner; - EffectApplyAura(i); - } + // use area aura + AreaAura* Aur = new AreaAura(m_spellInfo, i, &m_currentBasePoints[i], unitTarget, m_caster); + unitTarget->AddAura(Aur); } + void Spell::EffectSummonDemon(uint32 i) { float px = m_targets.m_destX; Index: game/Unit.cpp =================================================================== --- game/Unit.cpp (revision 5515) +++ game/Unit.cpp (working copy) @@ -4025,7 +4025,7 @@ } //float radius = GetRadius(sSpellRadiusStore.LookupEntry((*i).second->GetSpellProto()->EffectRadiusIndex[(*i).second->GetEffIndex()])); - if(pGroup && pGroupOf) + if(pGroup && pGroupOf && !(*i).second->IsPetLink()) { for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) {