mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Auras: Fixed crash happening when a periodic aura tick triggers SPELL_AURA_SPLIT_DAMAGE_PCT
Closes #29450
(cherry picked from commit 3a50bc50a2)
This commit is contained in:
@@ -5284,7 +5284,7 @@ void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const* log)
|
||||
{
|
||||
WorldPackets::CombatLog::SpellNonMeleeDamageLog packet;
|
||||
packet.Me = log->target->GetGUID();
|
||||
packet.CasterGUID = log->attacker->GetGUID();
|
||||
packet.CasterGUID = log->attacker ? log->attacker->GetGUID() : ObjectGuid::Empty;
|
||||
packet.CastID = log->castId;
|
||||
packet.SpellID = log->Spell ? log->Spell->Id : 0;
|
||||
packet.Visual = log->SpellVisual;
|
||||
|
||||
@@ -117,8 +117,8 @@ bool ContentTuningParams::GenerateDataForUnits<Creature, Creature>(Creature* att
|
||||
template<>
|
||||
bool ContentTuningParams::GenerateDataForUnits<Unit, Unit>(Unit* attacker, Unit* target)
|
||||
{
|
||||
if (Player* playerAttacker = attacker->ToPlayer())
|
||||
if (Player* playerTarget = target->ToPlayer())
|
||||
if (Player* playerAttacker = Object::ToPlayer(attacker))
|
||||
if (Player* playerTarget = Object::ToPlayer(target))
|
||||
return GenerateDataForUnits(playerAttacker, playerTarget);
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user