Core/Achievements: Implemented ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE
This commit is contained in:
1 parent
c9c12b9867
commit
05e72b4906
8 files changed
+95
-39
No files matched your search
@@ -539,8 +539,11 @@ inline void KillRewarder::_RewardKillCredit(Player* player)
|
||||
{
|
||||
// 4.4. Give kill credit (player must not be in group, or he must be alive or without corpse).
|
||||
if (!_group || player->IsAlive() || !player->GetCorpse())
|
||||
if (_victim->GetTypeId() == TYPEID_UNIT)
|
||||
player->KilledMonster(_victim->ToCreature()->GetCreatureTemplate(), _victim->GetGUID());
|
||||
if (Creature* target = _victim->ToCreature())
|
||||
{
|
||||
player->KilledMonster(target->GetCreatureTemplate(), target->GetGUID());
|
||||
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE, target->GetCreatureType(), 1, target);
|
||||
}
|
||||
}
|
||||
|
||||
void KillRewarder::_RewardPlayer(Player* player, bool isDungeon)
|
||||
|
||||
Reference in new issue
Block a user