Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2025-05-16 19:42:56 +08:00
19 changed files with 310 additions and 44 deletions

View File

@@ -7826,7 +7826,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Judgement of Light
case 20185:
{
if (!victim || !victim->IsAlive() || victim->HasSpellCooldown(20267))
if (!victim || !victim->IsAlive())
return false;
auto* caster = triggeredByAura->GetBase()->GetCaster();
@@ -7836,13 +7836,12 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// 2% of base health
basepoints0 = int32(victim->CountPctFromMaxHealth(2));
victim->CastCustomSpell(victim, 20267, &basepoints0, 0, 0, true, 0, triggeredByAura);
victim->AddSpellCooldown(20267, 0, 4 * IN_MILLISECONDS);
return true;
}
// Judgement of Wisdom
case 20186:
{
if (!victim || !victim->IsAlive() || !victim->HasActivePowerType(POWER_MANA) || victim->HasSpellCooldown(20268))
if (!victim || !victim->IsAlive() || !victim->HasActivePowerType(POWER_MANA))
return false;
auto* caster = triggeredByAura->GetBase()->GetCaster();
@@ -7852,7 +7851,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// 2% of base mana
basepoints0 = int32(CalculatePct(victim->GetCreateMana(), 2));
victim->CastCustomSpell(victim, 20268, &basepoints0, nullptr, nullptr, true, 0, triggeredByAura);
victim->AddSpellCooldown(20268, 0, 4 * IN_MILLISECONDS);
return true;
}
// Holy Power (Redemption Armor set)
@@ -16251,10 +16249,6 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
continue;
}
// Triggered spells not triggering additional spells
//bool triggered = !spellProto->HasAttribute(SPELL_ATTR3_CAN_PROC_FROM_PROCS) ?
// (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) : false;
bool hasTriggeredProc = false;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
@@ -17499,11 +17493,11 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, WeaponAttackTyp
return false;
// Additional checks for triggered spells (ignore trap casts)
//if (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION))
//{
// if (!spellProto->HasAttribute(SPELL_ATTR3_CAN_PROC_TRIGGERED))
// return false;
//}
if (eventInfo.GetHitMask() & PROC_EX_INTERNAL_TRIGGERED && !(EventProcFlag & PROC_FLAG_DONE_TRAP_ACTIVATION))
{
if (!spellProto->HasAttribute(SPELL_ATTR3_CAN_PROC_FROM_PROCS))
return false;
}
// Xinef: additional check for player auras - only player spells can trigger player proc auras
// Xinef: skip victim auras

View File

@@ -4903,12 +4903,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx7 |= SPELL_ATTR7_TREAT_AS_NPC_AOE;
});
// Heal (Crystal Spire of Karabor)
ApplySpellFix({ 40972 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx3 |= SPELL_ATTR3_SUPPRESS_CASTER_PROCS;
});
// Torch (Death Knights near the Chapel)
ApplySpellFix({ 52953 }, [](SpellInfo* spellInfo)
{

View File

@@ -1756,7 +1756,6 @@ void World::SetInitialWorldSettings()
LOG_INFO("server.loading", "Loading WorldStates..."); // must be loaded before battleground, outdoor PvP and conditions
sWorldState->LoadWorldStates();
sWorldState->Load();
LOG_INFO("server.loading", "Loading Conditions...");
sConditionMgr->LoadConditions();
@@ -1881,6 +1880,9 @@ void World::SetInitialWorldSettings()
uint32 nextGameEvent = sGameEventMgr->StartSystem();
_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event
LOG_INFO("server.loading", "Loading WorldState...");
sWorldState->Load(); // must be called after loading game events
// Delete all characters which have been deleted X days before
Player::DeleteOldCharacters();