*Add function Gobject::sendcustomanim

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-30 12:01:08 -05:00
parent f477476012
commit 0e3453e6d4
2 changed files with 10 additions and 4 deletions
+9 -4
View File
@@ -218,10 +218,7 @@ void GameObject::Update(uint32 /*p_time*/)
udata.BuildPacket(&packet); udata.BuildPacket(&packet);
((Player*)caster)->GetSession()->SendPacket(&packet); ((Player*)caster)->GetSession()->SendPacket(&packet);
WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM,8+4); SendCustomAnim();
data << GetGUID();
data << (uint32)(0);
((Player*)caster)->SendMessageToSet(&data,true);
} }
m_lootState = GO_READY; // can be successfully open with some chance m_lootState = GO_READY; // can be successfully open with some chance
@@ -1385,6 +1382,14 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
//trigger->RemoveCorpse(); //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 // overwrite WorldObject function for proper name localization
const char* GameObject::GetNameForLocaleIdx(int32 loc_idx) const const char* GameObject::GetNameForLocaleIdx(int32 loc_idx) const
{ {
+1
View File
@@ -613,6 +613,7 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject
GridReference<GameObject> &GetGridRef() { return m_gridRef; } GridReference<GameObject> &GetGridRef() { return m_gridRef; }
void CastSpell(Unit *target, uint32 spell); void CastSpell(Unit *target, uint32 spell);
void SendCustomAnim();
protected: protected:
uint32 m_charges; // Spell charges for GAMEOBJECT_TYPE_SPELLCASTER (22) uint32 m_charges; // Spell charges for GAMEOBJECT_TYPE_SPELLCASTER (22)
uint32 m_spellId; uint32 m_spellId;