feat(collections): handle CMSG_MOUNT_CLEAR_FANFARE
This commit is contained in:
@@ -1164,3 +1164,14 @@ void CollectionMgr::SendWarbandSceneCollectionData() const
|
||||
|
||||
_owner->SendPacket(accountItemCollection.Write());
|
||||
}
|
||||
|
||||
void CollectionMgr::MountClearFanfare(uint32 spellId)
|
||||
{
|
||||
auto itr = _mounts.find(spellId);
|
||||
if (itr == _mounts.end())
|
||||
return;
|
||||
|
||||
// Drop the "new mount" fanfare flag so the client stops replaying the acquisition flourish.
|
||||
// Mirrors ToyClearFanfare: the flag change is persisted by SaveAccountMounts, no packet echo needed.
|
||||
itr->second = MountStatusFlags(itr->second & ~MOUNT_NEEDS_FANFARE);
|
||||
}
|
||||
|
||||
@@ -158,6 +158,10 @@ public:
|
||||
void SendSingleMountUpdate(std::pair<uint32, MountStatusFlags> mount);
|
||||
MountContainer const& GetAccountMounts() const { return _mounts; }
|
||||
|
||||
//WowCommunity
|
||||
void MountClearFanfare(uint32 spellId);
|
||||
//WowCommunity
|
||||
|
||||
// Appearances
|
||||
void LoadItemAppearances();
|
||||
void LoadAccountItemAppearances(PreparedQueryResult knownAppearances, PreparedQueryResult favoriteAppearances);
|
||||
|
||||
@@ -1515,3 +1515,8 @@ void WorldSession::HandleToggleDifficulty(WorldPackets::Misc::ToggleDifficulty&
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: CMSG_TOGGLE_DIFFICULTY");
|
||||
}
|
||||
|
||||
void WorldSession::HandleMountClearFanfare(WorldPackets::Misc::MountClearFanfare& mountClearFanfare)
|
||||
{
|
||||
_collectionMgr->MountClearFanfare(mountClearFanfare.MountSpellID);
|
||||
}
|
||||
|
||||
@@ -976,4 +976,10 @@ void MythicPlusRequestMapStats::Read()
|
||||
_worldPacket >> NpcGUID;
|
||||
_worldPacket >> UnkInt64;
|
||||
}
|
||||
|
||||
void MountClearFanfare::Read()
|
||||
{
|
||||
_worldPacket >> MountSpellID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1286,6 +1286,16 @@ namespace WorldPackets
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
|
||||
class MountClearFanfare final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
explicit MountClearFanfare(WorldPacket&& packet) : ClientPacket(CMSG_MOUNT_CLEAR_FANFARE, std::move(packet)) {}
|
||||
|
||||
void Read() override;
|
||||
|
||||
uint32 MountSpellID = 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -691,7 +691,7 @@ void OpcodeTable::InitializeClientOpcodes()
|
||||
DEFINE_HANDLER(CMSG_MESSAGE_WHISPER, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleChatMessageWhisperOpcode);
|
||||
DEFINE_HANDLER(CMSG_MINIMAP_PING, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleMinimapPingOpcode);
|
||||
DEFINE_HANDLER(CMSG_MISSILE_TRAJECTORY_COLLISION, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleMissileTrajectoryCollision);
|
||||
DEFINE_HANDLER(CMSG_MOUNT_CLEAR_FANFARE, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL);
|
||||
DEFINE_HANDLER(CMSG_MOUNT_CLEAR_FANFARE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleMountClearFanfare);
|
||||
DEFINE_HANDLER(CMSG_MOUNT_SET_FAVORITE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleMountSetFavorite);
|
||||
DEFINE_HANDLER(CMSG_MOUNT_SPECIAL_ANIM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleMountSpecialAnimOpcode);
|
||||
DEFINE_HANDLER(CMSG_MOVE_ADD_IMPULSE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, &WorldSession::Handle_NULL);
|
||||
|
||||
@@ -818,6 +818,7 @@ namespace WorldPackets
|
||||
class MountSpecial;
|
||||
class SetTaxiBenchmarkMode;
|
||||
class MountSetFavorite;
|
||||
class MountClearFanfare;
|
||||
class CloseInteraction;
|
||||
class ConversationLineStarted;
|
||||
class RequestLatestSplashScreen;
|
||||
@@ -2425,6 +2426,7 @@ public:
|
||||
void HandleToyClearFanfare(WorldPackets::Toy::ToyClearFanfare& toyClearFanfare);
|
||||
|
||||
void HandleMountSetFavorite(WorldPackets::Misc::MountSetFavorite& mountSetFavorite);
|
||||
void HandleMountClearFanfare(WorldPackets::Misc::MountClearFanfare& mountClearFanfare);
|
||||
|
||||
// Scenes
|
||||
void HandleSceneTriggerEvent(WorldPackets::Scenes::SceneTriggerEvent& sceneTriggerEvent);
|
||||
|
||||
Reference in New Issue
Block a user