Skip to content

Commit

Permalink
[9180] Add function to send custom animation for GameObject
Browse files Browse the repository at this point in the history
Replace in code where packet used explicit.

Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Jan 15, 2010
1 parent ab7811a commit a70dac6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/game/GameObject.cpp
Expand Up @@ -202,10 +202,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);
SendGameObjectCustomAnim(GetGUID());
}

m_lootState = GO_READY; // can be successfully open with some chance
Expand Down
8 changes: 8 additions & 0 deletions src/game/Object.cpp
Expand Up @@ -1649,6 +1649,14 @@ void WorldObject::SendObjectDeSpawnAnim(uint64 guid)
SendMessageToSet(&data, true);
}

void WorldObject::SendGameObjectCustomAnim(uint64 guid)
{
WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM, 8+4);
data << uint64(guid);
data << uint32(0); // not known what this is
SendMessageToSet(&data, true);
}

void WorldObject::SetMap(Map * map)
{
ASSERT(map);
Expand Down
1 change: 1 addition & 0 deletions src/game/Object.h
Expand Up @@ -482,6 +482,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object
void PlayDirectSound(uint32 sound_id, Player* target = NULL);

void SendObjectDeSpawnAnim(uint64 guid);
void SendGameObjectCustomAnim(uint64 guid);

virtual void SaveRespawnTime() {}
void AddObjectToRemoveList();
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9179"
#define REVISION_NR "9180"
#endif // __REVISION_NR_H__

0 comments on commit a70dac6

Please sign in to comment.