aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/GameObject.cpp13
-rw-r--r--src/game/GameObject.h1
2 files changed, 10 insertions, 4 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index b7043de99f1..61e742735fb 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -218,10 +218,7 @@ void GameObject::Update(uint32 /*p_time*/)
udata.BuildPacket(&packet);
((Player*)caster)->GetSession()->SendPacket(&packet);
- WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM,8+4);
- data << GetGUID();
- data << (uint32)(0);
- ((Player*)caster)->SendMessageToSet(&data,true);
+ SendCustomAnim();
}
m_lootState = GO_READY; // can be successfully open with some chance
@@ -1385,6 +1382,14 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
//trigger->RemoveCorpse();
}
+void GameObject::SendCustomAnim()
+{
+ WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM,8+4);
+ data << GetGUID();
+ data << (uint32)0;
+ SendMessageToSet(&data, true);
+}
+
// overwrite WorldObject function for proper name localization
const char* GameObject::GetNameForLocaleIdx(int32 loc_idx) const
{
diff --git a/src/game/GameObject.h b/src/game/GameObject.h
index ec6c491d550..37ccf1c6b8f 100644
--- a/src/game/GameObject.h
+++ b/src/game/GameObject.h
@@ -613,6 +613,7 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject
GridReference<GameObject> &GetGridRef() { return m_gridRef; }
void CastSpell(Unit *target, uint32 spell);
+ void SendCustomAnim();
protected:
uint32 m_charges; // Spell charges for GAMEOBJECT_TYPE_SPELLCASTER (22)
uint32 m_spellId;