Untitled
By: a guest | Mar 21st, 2010 | Syntax:
None | Size: 0.88 KB | Hits: 61 | Expires: Never
if(bRewardIsAllowed && pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->GetLootRecipient())
player = ((Creature*)pVictim)->GetLootRecipient();
// Reward player, his pets, and group/raid members
// call kill spell proc event (before real die and combat stop to triggering auras removed at death/combat stop)
if(bRewardIsAllowed && player && player!=pVictim)
{
if(GetTypeId() == TYPEID_PLAYER && (IsInPartyWith(player) || IsInRaidWith(player)))
{
if(RewardPlayerAndGroupAtKill(pVictim))
ProcDamageAndSpell(pVictim, PROC_FLAG_KILL_AND_GET_XP, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
else
ProcDamageAndSpell(pVictim, PROC_FLAG_NONE, PROC_FLAG_KILLED,PROC_EX_NONE, 0);
}
else
player->RewardPlayerAndGroupAtKill(pVictim))
}