mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 15:16:24 +00:00
fix(Core/Pets): Mob "soloed" by pet should not grant exp/loot to its … (#11969)
* fix(Core/Pets): Mob "soloed" by pet should not grant exp/loot to its master. Fixes #11528
This commit is contained in:
@@ -124,9 +124,9 @@ uint32 Acore::XP::Gain(Player* player, Unit* unit, bool isBattleGround /*= false
|
||||
}
|
||||
|
||||
// if players dealt less than 50% of the damage and were credited anyway (due to CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ), scale XP gained appropriately (linear scaling)
|
||||
if (creature && creature->m_PlayerDamageReq)
|
||||
if (creature && creature->GetPlayerDamageReq())
|
||||
{
|
||||
xpMod *= 1.0f - 2.0f * creature->m_PlayerDamageReq / creature->GetMaxHealth();
|
||||
xpMod *= 1.0f - 2.0f * creature->GetPlayerDamageReq() / creature->GetMaxHealth();
|
||||
}
|
||||
|
||||
gain = uint32(gain * xpMod);
|
||||
|
||||
Reference in New Issue
Block a user