Core/Packet: WorldState (#9435)

* Core/Packet: WorldState

* Test

* WRONG

Co-authored-by: acidmanifesto <joshua.lee.betts@gmail.com>
This commit is contained in:
IntelligentQuantum
2022-01-03 20:20:56 +03:30
committed by GitHub
parent 7209f65896
commit e57582accb
15 changed files with 148 additions and 51 deletions

View File

@@ -35,6 +35,7 @@
#include "UpdateFieldFlags.h"
#include "Vehicle.h"
#include "WeatherMgr.h"
#include "WorldStatePackets.h"
// TODO: this import is not necessary for compilation and marked as unused by the IDE
// however, for some reasons removing it would cause a damn linking issue
@@ -2262,12 +2263,12 @@ void Player::UpdateSpecCount(uint8 count)
SendTalentsInfoData(false);
}
void Player::SendUpdateWorldState(uint32 Field, uint32 Value)
void Player::SendUpdateWorldState(uint32 variable, uint32 value) const
{
WorldPacket data(SMSG_UPDATE_WORLD_STATE, 8);
data << Field;
data << Value;
GetSession()->SendPacket(&data);
WorldPackets::WorldState::UpdateWorldState worldstate;
worldstate.VariableID = variable;
worldstate.Value = value;
SendDirectMessage(worldstate.Write());
}
void Player::ProcessTerrainStatusUpdate()