mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
refactor(Core/Packet): use WorldPackets::WorldState::InitWorldStates definition (#20475)
Co-authored-by: ccrs <ccrs@users.noreply.github.com>
This commit is contained in:
@@ -19,10 +19,11 @@
|
||||
#include "InstanceMapScript.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Player.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include "ruby_sanctum.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
@@ -217,11 +218,12 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
data << uint32(WORLDSTATE_CORPOREALITY_MATERIAL) << uint32(50);
|
||||
data << uint32(WORLDSTATE_CORPOREALITY_TWILIGHT) << uint32(50);
|
||||
data << uint32(WORLDSTATE_CORPOREALITY_TOGGLE) << uint32(0);
|
||||
packet.Worldstates.reserve(3);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_CORPOREALITY_MATERIAL, 50);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_CORPOREALITY_TWILIGHT, 50);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_CORPOREALITY_TOGGLE, 0);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Group.h"
|
||||
#include "InstanceMapScript.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "MapMgr.h"
|
||||
#include "Transport.h"
|
||||
#include "halls_of_reflection.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Group.h"
|
||||
|
||||
class UtherBatteredHiltEvent : public BasicEvent
|
||||
{
|
||||
|
||||
@@ -230,16 +230,14 @@ public:
|
||||
IsSindragosaIntroDone = false;
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
if (instance->IsHeroic())
|
||||
{
|
||||
data << uint32(WORLDSTATE_SHOW_TIMER) << uint32(BloodQuickeningState == IN_PROGRESS);
|
||||
data << uint32(WORLDSTATE_EXECUTION_TIME) << uint32(BloodQuickeningMinutes);
|
||||
data << uint32(WORLDSTATE_SHOW_ATTEMPTS) << uint32(1);
|
||||
data << uint32(WORLDSTATE_ATTEMPTS_REMAINING) << uint32(HeroicAttempts);
|
||||
data << uint32(WORLDSTATE_ATTEMPTS_MAX) << uint32(MaxHeroicAttempts);
|
||||
}
|
||||
packet.Worldstates.reserve(5);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_SHOW_TIMER, BloodQuickeningState == IN_PROGRESS ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_EXECUTION_TIME, BloodQuickeningMinutes);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_SHOW_ATTEMPTS, 1); // instance->IsHeroic() ? 1 : 0
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_ATTEMPTS_REMAINING, HeroicAttempts);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_ATTEMPTS_MAX, MaxHeroicAttempts);
|
||||
}
|
||||
|
||||
void OnPlayerAreaUpdate(Player* player, uint32 /*oldArea*/, uint32 newArea) override
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "LFGMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include "oculus.h"
|
||||
|
||||
class instance_oculus : public InstanceMapScript
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Transport.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include "ulduar.h"
|
||||
|
||||
class instance_ulduar : public InstanceMapScript
|
||||
@@ -169,10 +170,11 @@ public:
|
||||
m_mimironTramUsed = false;
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& packet) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
packet << uint32(WORLD_STATE_ALGALON_TIMER_ENABLED) << uint32(m_algalonTimer && m_algalonTimer <= 60);
|
||||
packet << uint32(WORLD_STATE_ALGALON_DESPAWN_TIMER) << uint32(std::min<uint32>(m_algalonTimer, 60));
|
||||
packet.Worldstates.reserve(2);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_ALGALON_TIMER_ENABLED, (m_algalonTimer && m_algalonTimer <= 60) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_ALGALON_DESPAWN_TIMER, std::min<int32>(m_algalonTimer, 60));
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
|
||||
Reference in New Issue
Block a user