From ea6eef5a1314f2ce395a9a7757f848f1989c9d6a Mon Sep 17 00:00:00 2001 From: sanctum32 Date: Tue, 6 Aug 2013 01:09:24 +0300 Subject: [PATCH] [12661] Implemented SMSG_PLAY_ONE_SHOT_ANIM_KIT packet --- src/game/Opcodes.cpp | 1 + src/game/Opcodes.h | 1 + src/game/Unit.cpp | 10 +++++++++- src/game/Unit.h | 2 ++ src/shared/revision_nr.h | 2 +- 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/game/Opcodes.cpp b/src/game/Opcodes.cpp index 62fd84708..7957de101 100644 --- a/src/game/Opcodes.cpp +++ b/src/game/Opcodes.cpp @@ -701,6 +701,7 @@ void InitializeOpcodes() OPCODE(MSG_QUEST_PUSH_RESULT, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleQuestPushResult ); OPCODE(SMSG_PLAY_MUSIC, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide ); OPCODE(SMSG_PLAY_OBJECT_SOUND, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide ); + OPCODE(SMSG_PLAY_ONE_SHOT_ANIM_KIT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide ); OPCODE(CMSG_REQUEST_PET_INFO, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleRequestPetInfoOpcode ); OPCODE(CMSG_FAR_SIGHT, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleFarSightOpcode ); OPCODE(SMSG_SPELLDISPELLOG, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide ); diff --git a/src/game/Opcodes.h b/src/game/Opcodes.h index 2a719c616..d8691fccf 100644 --- a/src/game/Opcodes.h +++ b/src/game/Opcodes.h @@ -686,6 +686,7 @@ enum Opcodes MSG_QUEST_PUSH_RESULT = 0x4515, // 4.3.4 15595 SMSG_PLAY_MUSIC = 0x4B06, // 4.3.4 15595 SMSG_PLAY_OBJECT_SOUND = 0x2635, // 4.3.4 15595 + SMSG_PLAY_ONE_SHOT_ANIM_KIT = 0x4A35, // 4.3.4 15595 CMSG_REQUEST_PET_INFO = 0x4924, // 4.3.4 15595 CMSG_FAR_SIGHT = 0x4835, // 4.3.4 15595 SMSG_SPELLDISPELLOG = 0x4516, // 4.3.4 15595 diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 184f2d11e..ed0dc63de 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8241,12 +8241,20 @@ MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const if (mountCapability->RequiredSpell && (GetTypeId() != TYPEID_PLAYER || !(Player*)(this)->HasSpell(mountCapability->RequiredSpell))) continue; - return mountCapability; + return mountCapability; } return NULL; } +void Unit::PlayOneShotAnimKit(uint32 id) +{ + WorldPacket data(SMSG_PLAY_ONE_SHOT_ANIM_KIT, 7+2); + data << GetPackGUID(); + data << uint16(id); + SendMessageToSet(&data, true); +} + void Unit::SetInCombatWith(Unit* enemy) { Unit* eOwner = enemy->GetCharmerOrOwnerOrSelf(); diff --git a/src/game/Unit.h b/src/game/Unit.h index 273faea01..e08ec293a 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1934,6 +1934,8 @@ class MANGOS_DLL_SPEC Unit : public WorldObject MountCapabilityEntry const* GetMountCapability(uint32 mountType) const; + void PlayOneShotAnimKit(uint32 id); + VehicleInfo* GetVehicleInfo() { return m_vehicleInfo; } bool IsVehicle() const { return m_vehicleInfo != NULL; } void SetVehicleId(uint32 entry, uint32 overwriteNpcEntry); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f99b44f8c..64c3383fd 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12660" + #define REVISION_NR "12661" #endif // __REVISION_NR_H__