mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 08:16:08 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -70,7 +70,7 @@ KillRewarder::KillRewarder(Player* killer, Unit* victim, bool isBattleGround) :
|
||||
_isFullXP(false), _maxLevel(0), _isBattleGround(isBattleGround), _isPvP(false)
|
||||
{
|
||||
// mark the credit as pvp if victim is player
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (victim->IsPlayer())
|
||||
_isPvP = true;
|
||||
// or if its owned by player and its not a vehicle
|
||||
else if (victim->GetCharmerOrOwnerGUID().IsPlayer())
|
||||
@@ -201,7 +201,7 @@ void KillRewarder::_RewardPlayer(Player* player, bool isDungeon)
|
||||
// 4.1. Give honor (player must be alive and not on BG).
|
||||
_RewardHonor(player);
|
||||
// 4.1.1 Send player killcredit for quests with PlayerSlain
|
||||
if (_victim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (_victim->IsPlayer())
|
||||
player->KilledPlayerCredit();
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ void KillRewarder::_RewardGroup()
|
||||
{
|
||||
_RewardPlayer(member, isDungeon);
|
||||
// Xinef: only count players
|
||||
//if (_victim->GetTypeId() == TYPEID_PLAYER)
|
||||
//if (_victim->IsPlayer())
|
||||
// member->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL, 1, 0, _victim);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user