Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2023-03-29 06:29:03 -06:00
committed by GitHub
17 changed files with 572 additions and 138 deletions

View File

@@ -12568,15 +12568,18 @@ bool Player::isHonorOrXPTarget(Unit* victim) const
// Victim level less gray level
if (v_level <= k_grey)
{
return false;
}
if (victim->GetTypeId() == TYPEID_UNIT)
{
if (victim->IsTotem() ||
victim->IsPet() ||
victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP)
if (victim->IsTotem() || victim->IsCritter() || victim->IsPet() || (victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP))
{
return false;
}
}
return true;
}

View File

@@ -8318,6 +8318,12 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (procEx & PROC_EX_CRITICAL_HIT)
damage /= 2;
// do not proc off from itself
if (procSpell->Id == 45297 || procSpell->Id == 45284)
{
return false;
}
do
{
uint32 spell = 0;
@@ -17997,8 +18003,10 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
sScriptMgr->OnCreatureKilledByPet( killer->GetCharmerOrOwnerPlayerOrPlayerItself(), victim->ToCreature());
}
if (killer != victim && !victim->IsCritter())
if (killer != victim)
{
Unit::ProcDamageAndSpell(killer, victim, killer ? PROC_FLAG_KILL : 0, PROC_FLAG_KILLED, PROC_EX_NONE, 0, attackType, spellProto, nullptr, -1, spell);
}
// Proc auras on death - must be before aura/combat remove
Unit::ProcDamageAndSpell(victim, nullptr, PROC_FLAG_DEATH, PROC_FLAG_NONE, PROC_EX_NONE, 0, attackType, spellProto, nullptr, -1, spell);

View File

@@ -4501,6 +4501,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx |= SPELL_ATTR1_NO_REFLECTION;
});
// Turn the Tables
ApplySpellFix({ 51627, 51628, 51629 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx3 |= SPELL_ATTR3_DOT_STACKING_RULE;
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];