mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10028] Reward group for shareable quests at cast event to creature/go.
This commit is contained in:
parent
ff3fb9b727
commit
6ebbcd8dbb
5 changed files with 85 additions and 56 deletions
|
|
@ -1083,7 +1083,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
|||
// ignore pets or autorepeat/melee casts for speed (not exist quest for spells (hm... )
|
||||
if (real_caster && !((Creature*)unit)->isPet() && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive())
|
||||
if (Player* p = real_caster->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
p->CastedCreatureOrGO(unit->GetEntry(), unit->GetObjectGuid(), m_spellInfo->Id);
|
||||
p->RewardPlayerAndGroupAtCast(unit, m_spellInfo->Id);
|
||||
|
||||
if(((Creature*)unit)->AI())
|
||||
((Creature*)unit)->AI()->SpellHit(m_caster, m_spellInfo);
|
||||
|
|
@ -1249,7 +1249,7 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo *target)
|
|||
if( !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive() )
|
||||
{
|
||||
if ( Player* p = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself() )
|
||||
p->CastedCreatureOrGO(go->GetEntry(), go->GetObjectGuid(), m_spellInfo->Id);
|
||||
p->RewardPlayerAndGroupAtCast(go, m_spellInfo->Id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3147,7 +3147,7 @@ void Spell::update(uint32 difftime)
|
|||
if (unit == NULL)
|
||||
continue;
|
||||
|
||||
p->CastedCreatureOrGO(unit->GetEntry(), unit->GetObjectGuid(), m_spellInfo->Id);
|
||||
p->RewardPlayerAndGroupAtCast(unit, m_spellInfo->Id);
|
||||
}
|
||||
|
||||
for(std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
|
||||
|
|
@ -3158,7 +3158,7 @@ void Spell::update(uint32 difftime)
|
|||
if(!go)
|
||||
continue;
|
||||
|
||||
p->CastedCreatureOrGO(go->GetEntry(), go->GetObjectGuid(), m_spellInfo->Id);
|
||||
p->RewardPlayerAndGroupAtCast(go, m_spellInfo->Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue