void JustDied(Unit* pKiller) { if (m_pInstance) { // Set data to special when each paladin dies m_pInstance->SetData(TYPE_TRUE_MASTERS, SPECIAL); // For the last one which dies, give the quest credit if (m_pInstance->GetData(TYPE_TRUE_MASTERS) == DONE) { if (pKiller->GetTypeId() == TYPEID_PLAYER) { if (Creature* pCredit = m_pInstance->GetSingleCreatureFromStorage(NPC_PALADIN_QUEST_CREDIT)) ((Player*)pKiller)->KilledMonsterCredit(NPC_PALADIN_QUEST_CREDIT, pCredit->GetObjectGuid()); } } } }
void JustDied(Unit* pKiller) override { if (m_pInstance) { // Set data to special when each paladin dies m_pInstance->SetData(TYPE_TRUE_MASTERS, SPECIAL); // For the last one which dies, give the quest credit if (m_pInstance->GetData(TYPE_TRUE_MASTERS) == DONE) { if (pKiller->GetTypeId() == TYPEID_PLAYER) { if (Creature* pCredit = m_pInstance->GetSingleCreatureFromStorage(NPC_PALADIN_QUEST_CREDIT)) ((Player*)pKiller)->RewardPlayerAndGroupAtEvent(pCredit->GetEntry(), pCredit); } } } }