[7559] Implement function Player::RewardPlayerAndGroupAtEvent for reward (quest objective only) player and group at special kill-like events.

Use it for Spell::EffectKillCredit and some dummy code.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Ramses_II 2009-03-28 04:28:25 +03:00 committed by VladimirMangos
parent 2dd36d688f
commit 00d0718124
4 changed files with 29 additions and 3 deletions

View file

@ -1053,7 +1053,7 @@ void Spell::EffectDummy(uint32 i)
return;
pCreature->SetHealth(health);
((Player*)m_caster)->KilledMonster(16992,pCreature->GetGUID());
((Player*)m_caster)->RewardPlayerAndGroupAtEvent(16992,pCreature);
if (pCreature->AI())
pCreature->AI()->AttackStart(m_caster);
@ -6508,7 +6508,7 @@ void Spell::EffectKillCredit(uint32 i)
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
((Player*)unitTarget)->KilledMonster(m_spellInfo->EffectMiscValue[i], 0);
((Player*)unitTarget)->RewardPlayerAndGroupAtEvent(m_spellInfo->EffectMiscValue[i], unitTarget);
}
void Spell::EffectQuestFail(uint32 i)