mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 20:52:22 -04:00
Core/Packets: fixed structure of SpellCastVisual
This commit is contained in:
@@ -86,10 +86,10 @@ class TC_GAME_API AreaTrigger final : public WorldObject, public GridObject<Area
|
||||
void RelocateStationaryPosition(Position const& pos) { _stationaryPosition.Relocate(pos); }
|
||||
|
||||
private:
|
||||
bool Create(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Map* map, Position const& pos, int32 duration, AreaTriggerSpawn const* spawnData = nullptr, Unit* caster = nullptr, Unit* target = nullptr, SpellCastVisual spellVisual = { 0, 0 }, SpellInfo const* spellInfo = nullptr, Spell* spell = nullptr, AuraEffect const* aurEff = nullptr);
|
||||
bool Create(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Map* map, Position const& pos, int32 duration, AreaTriggerSpawn const* spawnData = nullptr, Unit* caster = nullptr, Unit* target = nullptr, SpellCastVisual spellVisual = { 0 }, SpellInfo const* spellInfo = nullptr, Spell* spell = nullptr, AuraEffect const* aurEff = nullptr);
|
||||
|
||||
public:
|
||||
static AreaTrigger* CreateAreaTrigger(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Position const& pos, int32 duration, Unit* caster, Unit* target, SpellCastVisual spellVisual = { 0, 0 }, SpellInfo const* spellInfo = nullptr, Spell* spell = nullptr, AuraEffect const* aurEff = nullptr);
|
||||
static AreaTrigger* CreateAreaTrigger(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Position const& pos, int32 duration, Unit* caster, Unit* target, SpellCastVisual spellVisual = { 0 }, SpellInfo const* spellInfo = nullptr, Spell* spell = nullptr, AuraEffect const* aurEff = nullptr);
|
||||
static ObjectGuid CreateNewMovementForceId(Map* map, uint32 areaTriggerId);
|
||||
bool LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap, bool allowDuplicate);
|
||||
|
||||
|
||||
@@ -164,7 +164,6 @@ ByteBuffer& operator<<(ByteBuffer& data, ContentTuningParams const& contentTunin
|
||||
ByteBuffer& operator>>(ByteBuffer& data, SpellCastVisual& visual)
|
||||
{
|
||||
data >> visual.SpellXSpellVisualID;
|
||||
data >> visual.ScriptVisualID;
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -172,7 +171,6 @@ ByteBuffer& operator>>(ByteBuffer& data, SpellCastVisual& visual)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, SpellCastVisual const& visual)
|
||||
{
|
||||
data << int32(visual.SpellXSpellVisualID);
|
||||
data << int32(visual.ScriptVisualID);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,6 @@ namespace WorldPackets
|
||||
struct SpellCastVisual
|
||||
{
|
||||
int32 SpellXSpellVisualID = 0;
|
||||
int32 ScriptVisualID = 0;
|
||||
};
|
||||
|
||||
struct SpellSupportInfo
|
||||
|
||||
@@ -455,7 +455,7 @@ Aura* Aura::Create(AuraCreateInfo& createInfo)
|
||||
Aura::Aura(AuraCreateInfo const& createInfo) :
|
||||
m_spellInfo(createInfo._spellInfo), m_castDifficulty(createInfo._castDifficulty), m_castId(createInfo._castId), m_casterGuid(createInfo.CasterGUID),
|
||||
m_castItemGuid(createInfo.CastItemGUID), m_castItemId(createInfo.CastItemId),
|
||||
m_castItemLevel(createInfo.CastItemLevel), m_spellVisual({ createInfo.Caster ? createInfo.Caster->GetCastSpellXSpellVisualId(createInfo._spellInfo) : createInfo._spellInfo->GetSpellXSpellVisualId(), 0 }),
|
||||
m_castItemLevel(createInfo.CastItemLevel), m_spellVisual({ createInfo.Caster ? createInfo.Caster->GetCastSpellXSpellVisualId(createInfo._spellInfo) : createInfo._spellInfo->GetSpellXSpellVisualId() }),
|
||||
m_applyTime(GameTime::GetGameTime()), m_owner(createInfo._owner), m_timeCla(0), m_updateTargetMapInterval(0),
|
||||
m_casterLevel(createInfo.Caster ? createInfo.Caster->GetLevel() : m_spellInfo->SpellLevel), m_procCharges(0), m_stackAmount(1),
|
||||
m_isRemoved(false), m_isSingleTarget(false), m_isUsingCharges(false), m_dropEvent(nullptr),
|
||||
|
||||
@@ -8101,7 +8101,7 @@ bool Spell::IsPositive() const
|
||||
|
||||
bool Spell::IsNeedSendToClient() const
|
||||
{
|
||||
return m_SpellVisual.SpellXSpellVisualID || m_SpellVisual.ScriptVisualID || m_spellInfo->IsChanneled() ||
|
||||
return m_SpellVisual.SpellXSpellVisualID || m_spellInfo->IsChanneled() ||
|
||||
(m_spellInfo->HasAttribute(SPELL_ATTR8_AURA_POINTS_ON_CLIENT)) || m_spellInfo->HasHitDelay() || (!m_triggeredByAuraSpell && !IsTriggered()) ||
|
||||
m_spellInfo->HasAttribute(SPELL_ATTR7_ALWAYS_CAST_LOG);
|
||||
}
|
||||
@@ -9330,5 +9330,5 @@ CastSpellExtraArgs& CastSpellExtraArgs::SetTriggeringAura(AuraEffect const* trig
|
||||
|
||||
SpellCastVisual::operator WorldPackets::Spells::SpellCastVisual() const
|
||||
{
|
||||
return { int32(SpellXSpellVisualID), int32(ScriptVisualID) };
|
||||
return { int32(SpellXSpellVisualID) };
|
||||
}
|
||||
|
||||
@@ -502,7 +502,6 @@ struct TC_GAME_API CastSpellExtraArgs
|
||||
struct SpellCastVisual
|
||||
{
|
||||
uint32 SpellXSpellVisualID = 0;
|
||||
uint32 ScriptVisualID = 0;
|
||||
|
||||
operator UF::SpellCastVisual() const;
|
||||
operator WorldPackets::Spells::SpellCastVisual() const;
|
||||
|
||||
@@ -312,7 +312,7 @@ class spell_dk_dancing_rune_weapon : public AuraScript
|
||||
return;
|
||||
|
||||
int32 amount = static_cast<int32>(damageInfo->GetDamage()) / 2;
|
||||
SpellNonMeleeDamage log(drw, drw->GetVictim(), spellInfo, { spellInfo->GetSpellXSpellVisualId(drw), 0 }, spellInfo->GetSchoolMask());
|
||||
SpellNonMeleeDamage log(drw, drw->GetVictim(), spellInfo, { spellInfo->GetSpellXSpellVisualId(drw) }, spellInfo->GetSchoolMask());
|
||||
log.damage = amount;
|
||||
Unit::DealDamage(drw, drw->GetVictim(), amount, nullptr, SPELL_DIRECT_DAMAGE, spellInfo->GetSchoolMask(), spellInfo, true);
|
||||
drw->SendSpellNonMeleeDamageLog(&log);
|
||||
|
||||
Reference in New Issue
Block a user