Core/Quests: Fixed remaining issues with quest crediting (note: previous commits did not introduce issues, only revealed them)
Core/DBLayer: Fixed more compile warnings Core/Spells: Corrected code style from revision 634af79146 Closes issue #3956. --HG-- branch : trunk
This commit is contained in:
@@ -697,13 +697,13 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
case ACTION_T_KILLED_MONSTER:
|
||||
//first attempt player who tapped creature
|
||||
if (Player* pPlayer = me->GetLootRecipient())
|
||||
pPlayer->RewardPlayerAndGroupAtEvent(action.killed_monster.creatureId, me);
|
||||
pPlayer->RewardPlayerAndGroupAtEvent(action.killed_monster.creatureId, pPlayer); // pPlayer as param is a hacky solution not to use GUID
|
||||
else
|
||||
{
|
||||
//if not available, use pActionInvoker
|
||||
if (Unit* pTarget = GetTargetByType(action.killed_monster.target, pActionInvoker))
|
||||
if (Player* pPlayer2 = pTarget->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
pPlayer2->RewardPlayerAndGroupAtEvent(action.killed_monster.creatureId, me);
|
||||
pPlayer2->RewardPlayerAndGroupAtEvent(action.killed_monster.creatureId, pPlayer);
|
||||
}
|
||||
break;
|
||||
case ACTION_T_SET_INST_DATA:
|
||||
|
||||
Reference in New Issue
Block a user