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:
Shauren
2010-09-12 19:17:58 +02:00
parent 976cc3f8c4
commit e0ffae436c
9 changed files with 33 additions and 28 deletions
@@ -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: