*Add function Gobject::sendcustomanim
--HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user