mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: rework part 5: GameObject casting
Closes #21330
Closes #18885
Ref #18752
(cherry picked from commit 45c5e1b9d6)
This commit is contained in:
@@ -226,6 +226,12 @@ void DynamicObject::RemoveCasterViewpoint()
|
||||
}
|
||||
}
|
||||
|
||||
uint32 DynamicObject::GetFaction() const
|
||||
{
|
||||
ASSERT(_caster);
|
||||
return _caster->GetFaction();
|
||||
}
|
||||
|
||||
void DynamicObject::BindToCaster()
|
||||
{
|
||||
ASSERT(!_caster);
|
||||
|
||||
@@ -61,11 +61,13 @@ class TC_GAME_API DynamicObject : public WorldObject, public GridObject<DynamicO
|
||||
void SetCasterViewpoint();
|
||||
void RemoveCasterViewpoint();
|
||||
Unit* GetCaster() const { return _caster; }
|
||||
uint32 GetFaction() const override;
|
||||
void BindToCaster();
|
||||
void UnbindFromCaster();
|
||||
uint32 GetSpellId() const { return m_dynamicObjectData->SpellID; }
|
||||
SpellInfo const* GetSpellInfo() const;
|
||||
ObjectGuid GetCasterGUID() const { return m_dynamicObjectData->Caster; }
|
||||
ObjectGuid GetOwnerGUID() const override { return GetCasterGUID(); }
|
||||
float GetRadius() const { return m_dynamicObjectData->Radius; }
|
||||
|
||||
UF::UpdateField<UF::DynamicObjectData, 0, TYPEID_DYNAMICOBJECT> m_dynamicObjectData;
|
||||
|
||||
Reference in New Issue
Block a user