aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp3
-rw-r--r--src/server/game/Battlegrounds/Battleground.h1
-rw-r--r--src/server/game/Entities/Unit/Unit.h4
-rw-r--r--src/server/game/Spells/Spell.cpp9
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp2
5 files changed, 13 insertions, 6 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 7adccabdc77..c4898668c4e 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -1679,7 +1679,8 @@ bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float
/// @todo Fix display here
// creature->SetVisibleAura(0, SPELL_SPIRIT_HEAL_CHANNEL);
// casting visual effect
- creature->SetUInt32Value(UNIT_CHANNEL_SPELL, SPELL_SPIRIT_HEAL_CHANNEL);
+ creature->SetChannelSpellId(SPELL_SPIRIT_HEAL_CHANNEL);
+ creature->SetChannelSpellXSpellVisualId(VISUAL_SPIRIT_HEAL_CHANNEL);
// correct cast speed
creature->SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f);
creature->SetFloatValue(UNIT_MOD_CAST_HASTE, 1.0f);
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index e11d0326eb1..69e747e461b 100644
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -115,6 +115,7 @@ enum BattlegroundSpells
{
SPELL_WAITING_FOR_RESURRECT = 2584, // Waiting to Resurrect
SPELL_SPIRIT_HEAL_CHANNEL = 22011, // Spirit Heal Channel
+ VISUAL_SPIRIT_HEAL_CHANNEL = 3060,
SPELL_SPIRIT_HEAL = 22012, // Spirit Heal
SPELL_RESURRECTION_VISUAL = 24171, // Resurrection Impact Visual
SPELL_ARENA_PREPARATION = 32727, // use this one, 32728 not correct
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 72646e28651..59abbf19a92 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1527,6 +1527,10 @@ class TC_GAME_API Unit : public WorldObject
float GetNegStat(Stats stat) const { return GetFloatValue(UNIT_FIELD_NEGSTAT+stat); }
float GetCreateStat(Stats stat) const { return m_createStats[stat]; }
+ uint32 GetChannelSpellId() const { return GetUInt32Value(UNIT_CHANNEL_SPELL); }
+ void SetChannelSpellId(uint32 channelSpellId) { SetUInt32Value(UNIT_CHANNEL_SPELL, channelSpellId); }
+ uint32 GetChannelSpellXSpellVisualId() const { return GetUInt32Value(UNIT_CHANNEL_SPELL_X_SPELL_VISUAL); }
+ void SetChannelSpellXSpellVisualId(uint32 channelSpellXSpellVisualId) { SetUInt32Value(UNIT_CHANNEL_SPELL_X_SPELL_VISUAL, channelSpellXSpellVisualId); }
DynamicFieldStructuredView<ObjectGuid> GetChannelObjects() const { return GetDynamicStructuredValues<ObjectGuid>(UNIT_DYNAMIC_FIELD_CHANNEL_OBJECTS); }
void AddChannelObject(ObjectGuid guid) { AddDynamicStructuredValue(UNIT_DYNAMIC_FIELD_CHANNEL_OBJECTS, &guid); }
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index afd48087c7b..f9a6e45e7e7 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4482,7 +4482,8 @@ void Spell::SendChannelUpdate(uint32 time)
if (time == 0)
{
m_caster->ClearDynamicValue(UNIT_DYNAMIC_FIELD_CHANNEL_OBJECTS);
- m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, 0);
+ m_caster->SetChannelSpellId(0);
+ m_caster->SetChannelSpellXSpellVisualId(0);
}
WorldPackets::Spells::SpellChannelUpdate spellChannelUpdate;
@@ -4517,8 +4518,8 @@ void Spell::SendChannelStart(uint32 duration)
for (GOTargetInfo const& target : m_UniqueGOTargetInfo)
m_caster->AddChannelObject(target.targetGUID);
- m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, m_spellInfo->Id);
- m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL_X_SPELL_VISUAL, m_SpellVisual);
+ m_caster->SetChannelSpellId(m_spellInfo->Id);
+ m_caster->SetChannelSpellXSpellVisualId(m_SpellVisual);
}
void Spell::SendResurrectRequest(Player* target)
@@ -6953,7 +6954,7 @@ bool Spell::IsProcDisabled() const
bool Spell::IsChannelActive() const
{
- return m_caster->GetUInt32Value(UNIT_CHANNEL_SPELL) != 0;
+ return m_caster->GetChannelSpellId() != 0;
}
bool Spell::IsAutoActionResetSpell() const
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
index f0bbe51c31d..f7771d1eaa8 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
@@ -245,7 +245,7 @@ public:
if (me->IsWithinDistInMap(mekgineer, MAX_REPAIR_RANGE))
{
//are we already channeling? Doesn't work very well, find better check?
- if (!me->GetUInt32Value(UNIT_CHANNEL_SPELL))
+ if (!me->GetChannelSpellId())
{
//me->GetMotionMaster()->MovementExpired();
//me->GetMotionMaster()->MoveIdle();