Core/Spells: Send OriginalCastId in SMSG_SPELL_START and SMSG_SPELL_GO for triggered spells in 'game' project
Port From (https://github.com/TrinityCore/TrinityCore/commit/555b2d40ecc22eb0ea4bf913b534ffa7197fa6fe)
This commit is contained in:
@@ -642,7 +642,8 @@ namespace Game.Entities
|
||||
switch (action.ActionType)
|
||||
{
|
||||
case AreaTriggerActionTypes.Cast:
|
||||
caster.CastSpell(unit, action.Param, true);
|
||||
caster.CastSpell(unit, action.Param, new CastSpellExtraArgs(TriggerCastFlags.FullMask)
|
||||
.SetOriginalCastId(m_areaTriggerData.CreatingEffectGUID._value.IsCast() ? m_areaTriggerData.CreatingEffectGUID : ObjectGuid.Empty));
|
||||
break;
|
||||
case AreaTriggerActionTypes.AddAura:
|
||||
caster.AddAura(action.Param, unit);
|
||||
|
||||
@@ -160,9 +160,9 @@ namespace Game.Entities
|
||||
public bool IsAnyTypeGameObject() { return IsGameObject() || IsMOTransport(); }
|
||||
public bool IsParty() { return GetHigh() == HighGuid.Party; }
|
||||
public bool IsGuild() { return GetHigh() == HighGuid.Guild; }
|
||||
bool IsSceneObject() { return GetHigh() == HighGuid.SceneObject; }
|
||||
bool IsConversation() { return GetHigh() == HighGuid.Conversation; }
|
||||
bool IsCast() { return GetHigh() == HighGuid.Cast; }
|
||||
public bool IsSceneObject() { return GetHigh() == HighGuid.SceneObject; }
|
||||
public bool IsConversation() { return GetHigh() == HighGuid.Conversation; }
|
||||
public bool IsCast() { return GetHigh() == HighGuid.Cast; }
|
||||
|
||||
public TypeId GetTypeId() { return GetTypeId(GetHigh()); }
|
||||
bool HasEntry() { return HasEntry(GetHigh()); }
|
||||
|
||||
@@ -2248,7 +2248,7 @@ namespace Game.Entities
|
||||
return;
|
||||
}
|
||||
|
||||
Spell spell = new Spell(this, info, args.TriggerFlags, args.OriginalCaster);
|
||||
Spell spell = new Spell(this, info, args.TriggerFlags, args.OriginalCaster, args.OriginalCastId);
|
||||
foreach (var pair in args.SpellValueOverrides)
|
||||
spell.SetSpellValue(pair.Key, pair.Value);
|
||||
|
||||
|
||||
@@ -706,9 +706,7 @@ namespace Game.Entities
|
||||
break;
|
||||
}
|
||||
|
||||
CastSpellExtraArgs args = new(TriggerCastFlags.FullMask);
|
||||
args.TriggeringAura = effect;
|
||||
CastSpell(this, triggerSpell, args);
|
||||
CastSpell(this, triggerSpell, new CastSpellExtraArgs(effect));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,9 +570,7 @@ namespace Game.Entities
|
||||
}
|
||||
else
|
||||
{
|
||||
CastSpellExtraArgs args = new(TriggerCastFlags.FullMask);
|
||||
args.TriggeringAura = meleeAttackAuraEffect;
|
||||
CastSpell(victim, meleeAttackSpellId, args);
|
||||
CastSpell(victim, meleeAttackSpellId, new CastSpellExtraArgs(meleeAttackAuraEffect));
|
||||
|
||||
HitInfo hitInfo = HitInfo.AffectsVictim | HitInfo.NoAnimation;
|
||||
if (attType == WeaponAttackType.OffAttack)
|
||||
|
||||
@@ -2920,7 +2920,7 @@ namespace Game.Entities
|
||||
if (aura.IsSingleTarget())
|
||||
aura.UnregisterSingleTarget();
|
||||
|
||||
AuraCreateInfo createInfo = new(aura.GetCastGUID(), aura.GetSpellInfo(), aura.GetCastDifficulty(), effMask, stealer);
|
||||
AuraCreateInfo createInfo = new(aura.GetCastId(), aura.GetSpellInfo(), aura.GetCastDifficulty(), effMask, stealer);
|
||||
createInfo.SetCasterGUID(aura.GetCasterGUID());
|
||||
createInfo.SetBaseAmount(baseDamage);
|
||||
|
||||
@@ -3903,7 +3903,7 @@ namespace Game.Entities
|
||||
{
|
||||
Unit caster = aura.GetCaster();
|
||||
if (caster && caster.IsTypeId(TypeId.Player))
|
||||
Spell.SendCastResult(caster.ToPlayer(), aura.GetSpellInfo(), aura.GetSpellVisual(), aura.GetCastGUID(), SpellCastResult.AuraBounced);
|
||||
Spell.SendCastResult(caster.ToPlayer(), aura.GetSpellInfo(), aura.GetSpellVisual(), aura.GetCastId(), SpellCastResult.AuraBounced);
|
||||
}
|
||||
|
||||
aura.Remove();
|
||||
|
||||
@@ -3401,7 +3401,7 @@ namespace Game.Entities
|
||||
uint split_absorb = 0;
|
||||
DealDamageMods(damageInfo.GetAttacker(), caster, ref splitDamage, ref split_absorb);
|
||||
|
||||
SpellNonMeleeDamage log = new(damageInfo.GetAttacker(), caster, itr.GetSpellInfo(), itr.GetBase().GetSpellVisual(), damageInfo.GetSchoolMask(), itr.GetBase().GetCastGUID());
|
||||
SpellNonMeleeDamage log = new(damageInfo.GetAttacker(), caster, itr.GetSpellInfo(), itr.GetBase().GetSpellVisual(), damageInfo.GetSchoolMask(), itr.GetBase().GetCastId());
|
||||
CleanDamage cleanDamage = new(splitDamage, 0, WeaponAttackType.BaseAttack, MeleeHitOutcome.Normal);
|
||||
DealDamage(damageInfo.GetAttacker(), caster, splitDamage, cleanDamage, DamageEffectType.Direct, damageInfo.GetSchoolMask(), itr.GetSpellInfo(), false);
|
||||
log.damage = splitDamage;
|
||||
|
||||
Reference in New Issue
Block a user