mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
feat(Core/Creature): Implement HasFlagsExtra() helper to creature (#21362)
This commit is contained in:
@@ -12710,17 +12710,11 @@ bool Player::isHonorOrXPTarget(Unit* victim) const
|
||||
|
||||
// Victim level less gray level
|
||||
if (v_level <= k_grey)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (victim->IsCreature())
|
||||
{
|
||||
if (victim->IsTotem() || victim->IsCritter() || victim->IsPet() || (victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP))
|
||||
{
|
||||
if (victim->IsTotem() || victim->IsCritter() || victim->IsPet() || victim->ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_XP))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -979,9 +979,7 @@ void Player::UpdateWeaponSkill(Unit* victim, WeaponAttackType attType, Item* ite
|
||||
if (GetShapeshiftForm() == FORM_TREE)
|
||||
return; // use weapon but not skill up
|
||||
|
||||
if (victim->IsCreature() &&
|
||||
(victim->ToCreature()->GetCreatureTemplate()->flags_extra &
|
||||
CREATURE_FLAG_EXTRA_NO_SKILL_GAINS))
|
||||
if (victim->IsCreature() && victim->ToCreature()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_SKILL_GAINS))
|
||||
return;
|
||||
|
||||
uint32 weapon_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_WEAPON);
|
||||
|
||||
Reference in New Issue
Block a user