Core/Misc: Refactor SendPlaySpellVisual and SendPlaySpellImpact and move them to Unit (from Spell)
This commit is contained in:
@@ -2035,7 +2035,7 @@ void Unit::BuildHeartBeatMsg(WorldPacket *data) const
|
||||
BuildMovementPacket(data);
|
||||
}
|
||||
|
||||
void WorldObject::SendMessageToSetInRange(WorldPacket *data, float dist, bool /*bToSelf*/)
|
||||
void WorldObject::SendMessageToSetInRange(WorldPacket *data, float dist, bool /*self*/)
|
||||
{
|
||||
Trinity::MessageDistDeliverer notifier(this, data, dist);
|
||||
VisitNearbyWorldObject(dist, notifier);
|
||||
|
||||
@@ -16282,6 +16282,22 @@ void Unit::SetAuraStack(uint32 spellId, Unit* target, uint32 stack)
|
||||
aura->SetStackAmount(stack);
|
||||
}
|
||||
|
||||
void Unit::SendPlaySpellVisual(uint32 id)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 8 + 4);
|
||||
data << uint64(GetGUID());
|
||||
data << uint32(id); // SpellVisualKit.dbc index
|
||||
SendMessageToSet(&data, false);
|
||||
}
|
||||
|
||||
void Unit::SendPlaySpellImpact(uint64 guid, uint32 id)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_SPELL_IMPACT, 8 + 4);
|
||||
data << uint64(guid); // target
|
||||
data << uint32(id); // SpellVisualKit.dbc index
|
||||
SendMessageToSet(&data, false);
|
||||
}
|
||||
|
||||
void Unit::ApplyResilience(Unit const* victim, float* crit, int32* damage, bool isCrit, CombatRating type) const
|
||||
{
|
||||
// player mounted on multi-passenger mount is also classified as vehicle
|
||||
|
||||
@@ -1485,6 +1485,8 @@ class Unit : public WorldObject
|
||||
Aura * AddAura(uint32 spellId, Unit* target);
|
||||
Aura * AddAura(SpellEntry const *spellInfo, uint8 effMask, Unit* target);
|
||||
void SetAuraStack(uint32 spellId, Unit* target, uint32 stack);
|
||||
void SendPlaySpellVisual(uint32 id);
|
||||
void SendPlaySpellImpact(uint64 guid, uint32 id);
|
||||
|
||||
bool IsDamageToThreatSpell(SpellEntry const* spellInfo) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user