Core/Packet: SMSG_LEVELUP_INFO (#10884)

This commit is contained in:
IntelligentQuantum
2022-03-21 01:13:45 +03:30
committed by GitHub
parent 204043ccd2
commit 86e438a1e7
3 changed files with 43 additions and 16 deletions

View File

@@ -31,6 +31,20 @@ WorldPacket const* WorldPackets::Misc::Weather::Write()
return &_worldPacket;
}
WorldPacket const* WorldPackets::Misc::LevelUpInfo::Write()
{
_worldPacket << uint32(Level);
_worldPacket << uint32(HealthDelta);
for (uint32 power : PowerDelta)
_worldPacket << power;
for (uint32 stat : StatDelta)
_worldPacket << stat;
return &_worldPacket;
}
WorldPacket const* WorldPackets::Misc::PlayMusic::Write()
{
_worldPacket << SoundKitID;

View File

@@ -41,6 +41,19 @@ namespace WorldPackets
WeatherState WeatherID = WeatherState(0);
};
class LevelUpInfo final : public ServerPacket
{
public:
LevelUpInfo() : ServerPacket(SMSG_LEVELUP_INFO, 56) { }
WorldPacket const* Write() override;
uint32 Level = 0;
uint32 HealthDelta = 0;
std::array<uint32, MAX_POWERS> PowerDelta = { };
std::array<uint32, MAX_STATS> StatDelta = { };
};
class AC_GAME_API PlayMusic final : public ServerPacket
{
public: