Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 21st, 2010 | Syntax: None | Size: 0.88 KB | Hits: 61 | Expires: Never
Copy text to clipboard
  1.     if(bRewardIsAllowed && pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->GetLootRecipient())
  2.         player = ((Creature*)pVictim)->GetLootRecipient();
  3.     // Reward player, his pets, and group/raid members
  4.     // call kill spell proc event (before real die and combat stop to triggering auras removed at death/combat stop)
  5.     if(bRewardIsAllowed && player && player!=pVictim)
  6.     {
  7.         if(GetTypeId() == TYPEID_PLAYER && (IsInPartyWith(player) || IsInRaidWith(player)))
  8.         {
  9.             if(RewardPlayerAndGroupAtKill(pVictim))            
  10.                 ProcDamageAndSpell(pVictim, PROC_FLAG_KILL_AND_GET_XP, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
  11.             else
  12.                 ProcDamageAndSpell(pVictim, PROC_FLAG_NONE, PROC_FLAG_KILLED,PROC_EX_NONE, 0);
  13.         }
  14.         else
  15.             player->RewardPlayerAndGroupAtKill(pVictim))            
  16.     }