Exported player list states to extra functions.
parent
be6d4a5912
commit
43ed690520
|
@ -127,7 +127,7 @@ cClientHandle::~cClientHandle()
|
||||||
if (!m_Username.empty() && (World != NULL))
|
if (!m_Username.empty() && (World != NULL))
|
||||||
{
|
{
|
||||||
// Send the Offline PlayerList packet:
|
// Send the Offline PlayerList packet:
|
||||||
World->BroadcastPlayerListItem(*m_Player, 4, this);
|
World->BroadcastPlayerListRemovePlayer(*m_Player, this);
|
||||||
}
|
}
|
||||||
if (World != NULL)
|
if (World != NULL)
|
||||||
{
|
{
|
||||||
|
@ -364,10 +364,10 @@ void cClientHandle::Authenticate(const AString & a_Name, const AString & a_UUID,
|
||||||
m_Player->SendExperience();
|
m_Player->SendExperience();
|
||||||
|
|
||||||
// Send player list items
|
// Send player list items
|
||||||
SendPlayerListItem(*m_Player, 0);
|
SendPlayerListAddPlayer(*m_Player);
|
||||||
World->BroadcastPlayerListItem(*m_Player, 0);
|
World->BroadcastPlayerListAddPlayer(*m_Player);
|
||||||
World->SendPlayerList(m_Player);
|
World->SendPlayerList(m_Player);
|
||||||
|
|
||||||
m_Player->Initialize(*World);
|
m_Player->Initialize(*World);
|
||||||
m_State = csAuthenticated;
|
m_State = csAuthenticated;
|
||||||
|
|
||||||
|
@ -2408,9 +2408,45 @@ void cClientHandle::SendPlayerAbilities()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cClientHandle::SendPlayerListItem(const cPlayer & a_Player, char a_Action)
|
void cClientHandle::SendPlayerListAddPlayer(const cPlayer & a_Player)
|
||||||
{
|
{
|
||||||
m_Protocol->SendPlayerListItem(a_Player, a_Action);
|
m_Protocol->SendPlayerListAddPlayer(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cClientHandle::SendPlayerListRemovePlayer(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
m_Protocol->SendPlayerListRemovePlayer(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cClientHandle::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
m_Protocol->SendPlayerListUpdateGameMode(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cClientHandle::SendPlayerListUpdatePing(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
m_Protocol->SendPlayerListUpdatePing(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cClientHandle::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName)
|
||||||
|
{
|
||||||
|
m_Protocol->SendPlayerListUpdateDisplayName(a_Player, a_OldListName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -122,73 +122,77 @@ public:
|
||||||
|
|
||||||
// The following functions send the various packets:
|
// The following functions send the various packets:
|
||||||
// (Please keep these alpha-sorted)
|
// (Please keep these alpha-sorted)
|
||||||
void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle);
|
void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle);
|
||||||
void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType);
|
void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType);
|
||||||
void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage);
|
void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage);
|
||||||
void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); // tolua_export
|
void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); // tolua_export
|
||||||
void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes);
|
void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes);
|
||||||
void SendChat (const AString & a_Message, eMessageType a_ChatPrefix, const AString & a_AdditionalData = "");
|
void SendChat (const AString & a_Message, eMessageType a_ChatPrefix, const AString & a_AdditionalData = "");
|
||||||
void SendChat (const cCompositeChat & a_Message);
|
void SendChat (const cCompositeChat & a_Message);
|
||||||
void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer);
|
void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer);
|
||||||
void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player);
|
void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player);
|
||||||
void SendDestroyEntity (const cEntity & a_Entity);
|
void SendDestroyEntity (const cEntity & a_Entity);
|
||||||
void SendDisconnect (const AString & a_Reason);
|
void SendDisconnect (const AString & a_Reason);
|
||||||
void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ);
|
void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ);
|
||||||
void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration);
|
void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration);
|
||||||
void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item);
|
void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item);
|
||||||
void SendEntityHeadLook (const cEntity & a_Entity);
|
void SendEntityHeadLook (const cEntity & a_Entity);
|
||||||
void SendEntityLook (const cEntity & a_Entity);
|
void SendEntityLook (const cEntity & a_Entity);
|
||||||
void SendEntityMetadata (const cEntity & a_Entity);
|
void SendEntityMetadata (const cEntity & a_Entity);
|
||||||
void SendEntityProperties (const cEntity & a_Entity);
|
void SendEntityProperties (const cEntity & a_Entity);
|
||||||
void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ);
|
void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ);
|
||||||
void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ);
|
void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ);
|
||||||
void SendEntityStatus (const cEntity & a_Entity, char a_Status);
|
void SendEntityStatus (const cEntity & a_Entity, char a_Status);
|
||||||
void SendEntityVelocity (const cEntity & a_Entity);
|
void SendEntityVelocity (const cEntity & a_Entity);
|
||||||
void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion);
|
void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion);
|
||||||
void SendGameMode (eGameMode a_GameMode);
|
void SendGameMode (eGameMode a_GameMode);
|
||||||
void SendHealth (void);
|
void SendHealth (void);
|
||||||
void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item);
|
void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item);
|
||||||
void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale);
|
void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale);
|
||||||
void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale);
|
void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale);
|
||||||
void SendMapInfo (int a_ID, unsigned int a_Scale);
|
void SendMapInfo (int a_ID, unsigned int a_Scale);
|
||||||
void SendPaintingSpawn (const cPainting & a_Painting);
|
void SendPaintingSpawn (const cPainting & a_Painting);
|
||||||
void SendPickupSpawn (const cPickup & a_Pickup);
|
void SendPickupSpawn (const cPickup & a_Pickup);
|
||||||
void SendEntityAnimation (const cEntity & a_Entity, char a_Animation); // tolua_export
|
void SendEntityAnimation (const cEntity & a_Entity, char a_Animation); // tolua_export
|
||||||
void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount);
|
void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount);
|
||||||
void SendPlayerAbilities (void);
|
void SendPlayerAbilities (void);
|
||||||
void SendPlayerListItem (const cPlayer & a_Player, char a_Action);
|
void SendPlayerListAddPlayer (const cPlayer & a_Player);
|
||||||
void SendPlayerMaxSpeed (void); ///< Informs the client of the maximum player speed (1.6.1+)
|
void SendPlayerListRemovePlayer (const cPlayer & a_Player);
|
||||||
void SendPlayerMoveLook (void);
|
void SendPlayerListUpdateGameMode (const cPlayer & a_Player);
|
||||||
void SendPlayerPosition (void);
|
void SendPlayerListUpdatePing (const cPlayer & a_Player);
|
||||||
void SendPlayerSpawn (const cPlayer & a_Player);
|
void SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName);
|
||||||
void SendPluginMessage (const AString & a_Channel, const AString & a_Message); // Exported in ManualBindings.cpp
|
void SendPlayerMaxSpeed (void); ///< Informs the client of the maximum player speed (1.6.1+)
|
||||||
void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID);
|
void SendPlayerMoveLook (void);
|
||||||
void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks = false);
|
void SendPlayerPosition (void);
|
||||||
void SendExperience (void);
|
void SendPlayerSpawn (const cPlayer & a_Player);
|
||||||
void SendExperienceOrb (const cExpOrb & a_ExpOrb);
|
void SendPluginMessage (const AString & a_Channel, const AString & a_Message); // Exported in ManualBindings.cpp
|
||||||
void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode);
|
void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID);
|
||||||
void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode);
|
void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks = false);
|
||||||
void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display);
|
void SendExperience (void);
|
||||||
void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch); // tolua_export
|
void SendExperienceOrb (const cExpOrb & a_ExpOrb);
|
||||||
void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data);
|
void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode);
|
||||||
void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock);
|
void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode);
|
||||||
void SendSpawnMob (const cMonster & a_Mob);
|
void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display);
|
||||||
void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch);
|
void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch); // tolua_export
|
||||||
void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType = 0);
|
void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data);
|
||||||
void SendStatistics (const cStatManager & a_Manager);
|
void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock);
|
||||||
void SendTabCompletionResults(const AStringVector & a_Results);
|
void SendSpawnMob (const cMonster & a_Mob);
|
||||||
void SendTeleportEntity (const cEntity & a_Entity);
|
void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch);
|
||||||
void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ);
|
void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType = 0);
|
||||||
void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle); // tolua_export
|
void SendStatistics (const cStatManager & a_Manager);
|
||||||
void SendUnloadChunk (int a_ChunkX, int a_ChunkZ);
|
void SendTabCompletionResults (const AStringVector & a_Results);
|
||||||
void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity);
|
void SendTeleportEntity (const cEntity & a_Entity);
|
||||||
void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4);
|
void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ);
|
||||||
void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ);
|
void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle); // tolua_export
|
||||||
void SendWeather (eWeather a_Weather);
|
void SendUnloadChunk (int a_ChunkX, int a_ChunkZ);
|
||||||
void SendWholeInventory (const cWindow & a_Window);
|
void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity);
|
||||||
void SendWindowClose (const cWindow & a_Window);
|
void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4);
|
||||||
void SendWindowOpen (const cWindow & a_Window);
|
void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ);
|
||||||
void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value);
|
void SendWeather (eWeather a_Weather);
|
||||||
|
void SendWholeInventory (const cWindow & a_Window);
|
||||||
|
void SendWindowClose (const cWindow & a_Window);
|
||||||
|
void SendWindowOpen (const cWindow & a_Window);
|
||||||
|
void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value);
|
||||||
|
|
||||||
// tolua_begin
|
// tolua_begin
|
||||||
const AString & GetUsername(void) const;
|
const AString & GetUsername(void) const;
|
||||||
|
|
|
@ -266,7 +266,7 @@ void cPlayer::Tick(float a_Dt, cChunk & a_Chunk)
|
||||||
cTimer t1;
|
cTimer t1;
|
||||||
if (m_LastPlayerListTime + PLAYER_LIST_TIME_MS <= t1.GetNowTime())
|
if (m_LastPlayerListTime + PLAYER_LIST_TIME_MS <= t1.GetNowTime())
|
||||||
{
|
{
|
||||||
m_World->BroadcastPlayerListItem(*this, 2);
|
// m_World->BroadcastPlayerListUpdatePing(*this);
|
||||||
m_LastPlayerListTime = t1.GetNowTime();
|
m_LastPlayerListTime = t1.GetNowTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1164,7 +1164,7 @@ void cPlayer::SetGameMode(eGameMode a_GameMode)
|
||||||
SetCanFly(false);
|
SetCanFly(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_World->BroadcastPlayerListItem(*this, 1);
|
m_World->BroadcastPlayerListUpdateGameMode(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,76 +57,80 @@ public:
|
||||||
virtual void DataReceived(const char * a_Data, size_t a_Size) = 0;
|
virtual void DataReceived(const char * a_Data, size_t a_Size) = 0;
|
||||||
|
|
||||||
// Sending stuff to clients (alphabetically sorted):
|
// Sending stuff to clients (alphabetically sorted):
|
||||||
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) = 0;
|
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) = 0;
|
||||||
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) = 0;
|
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) = 0;
|
||||||
virtual void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) = 0;
|
virtual void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) = 0;
|
||||||
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
|
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
|
||||||
virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) = 0;
|
virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) = 0;
|
||||||
virtual void SendChat (const AString & a_Message) = 0;
|
virtual void SendChat (const AString & a_Message) = 0;
|
||||||
virtual void SendChat (const cCompositeChat & a_Message) = 0;
|
virtual void SendChat (const cCompositeChat & a_Message) = 0;
|
||||||
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) = 0;
|
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) = 0;
|
||||||
virtual void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player) = 0;
|
virtual void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player) = 0;
|
||||||
virtual void SendDestroyEntity (const cEntity & a_Entity) = 0;
|
virtual void SendDestroyEntity (const cEntity & a_Entity) = 0;
|
||||||
virtual void SendDisconnect (const AString & a_Reason) = 0;
|
virtual void SendDisconnect (const AString & a_Reason) = 0;
|
||||||
virtual void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ) = 0; ///< Request the client to open up the sign editor for the sign (1.6+)
|
virtual void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ) = 0; ///< Request the client to open up the sign editor for the sign (1.6+)
|
||||||
virtual void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) = 0;
|
virtual void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) = 0;
|
||||||
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) = 0;
|
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) = 0;
|
||||||
virtual void SendEntityHeadLook (const cEntity & a_Entity) = 0;
|
virtual void SendEntityHeadLook (const cEntity & a_Entity) = 0;
|
||||||
virtual void SendEntityLook (const cEntity & a_Entity) = 0;
|
virtual void SendEntityLook (const cEntity & a_Entity) = 0;
|
||||||
virtual void SendEntityMetadata (const cEntity & a_Entity) = 0;
|
virtual void SendEntityMetadata (const cEntity & a_Entity) = 0;
|
||||||
virtual void SendEntityProperties (const cEntity & a_Entity) = 0;
|
virtual void SendEntityProperties (const cEntity & a_Entity) = 0;
|
||||||
virtual void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) = 0;
|
virtual void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) = 0;
|
||||||
virtual void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) = 0;
|
virtual void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) = 0;
|
||||||
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) = 0;
|
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) = 0;
|
||||||
virtual void SendEntityVelocity (const cEntity & a_Entity) = 0;
|
virtual void SendEntityVelocity (const cEntity & a_Entity) = 0;
|
||||||
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) = 0;
|
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) = 0;
|
||||||
virtual void SendGameMode (eGameMode a_GameMode) = 0;
|
virtual void SendGameMode (eGameMode a_GameMode) = 0;
|
||||||
virtual void SendHealth (void) = 0;
|
virtual void SendHealth (void) = 0;
|
||||||
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) = 0;
|
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) = 0;
|
||||||
virtual void SendKeepAlive (int a_PingID) = 0;
|
virtual void SendKeepAlive (int a_PingID) = 0;
|
||||||
virtual void SendLogin (const cPlayer & a_Player, const cWorld & a_World) = 0;
|
virtual void SendLogin (const cPlayer & a_Player, const cWorld & a_World) = 0;
|
||||||
virtual void SendLoginSuccess (void) = 0;
|
virtual void SendLoginSuccess (void) = 0;
|
||||||
virtual void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale) = 0;
|
virtual void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale) = 0;
|
||||||
virtual void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale) = 0;
|
virtual void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale) = 0;
|
||||||
virtual void SendMapInfo (int a_ID, unsigned int a_Scale) = 0;
|
virtual void SendMapInfo (int a_ID, unsigned int a_Scale) = 0;
|
||||||
virtual void SendPaintingSpawn (const cPainting & a_Painting) = 0;
|
virtual void SendPaintingSpawn (const cPainting & a_Painting) = 0;
|
||||||
virtual void SendPickupSpawn (const cPickup & a_Pickup) = 0;
|
virtual void SendPickupSpawn (const cPickup & a_Pickup) = 0;
|
||||||
virtual void SendPlayerAbilities (void) = 0;
|
virtual void SendPlayerAbilities (void) = 0;
|
||||||
virtual void SendEntityAnimation (const cEntity & a_Entity, char a_Animation) = 0;
|
virtual void SendEntityAnimation (const cEntity & a_Entity, char a_Animation) = 0;
|
||||||
virtual void SendParticleEffect (const AString & a_SoundName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) = 0;
|
virtual void SendParticleEffect (const AString & a_SoundName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) = 0;
|
||||||
virtual void SendPlayerListItem (const cPlayer & a_Player, char a_Action) = 0;
|
virtual void SendPlayerListAddPlayer (const cPlayer & a_Player) = 0;
|
||||||
virtual void SendPlayerMaxSpeed (void) = 0; ///< Informs the client of the maximum player speed (1.6.1+)
|
virtual void SendPlayerListRemovePlayer (const cPlayer & a_Player) = 0;
|
||||||
virtual void SendPlayerMoveLook (void) = 0;
|
virtual void SendPlayerListUpdateGameMode (const cPlayer & a_Player) = 0;
|
||||||
virtual void SendPlayerPosition (void) = 0;
|
virtual void SendPlayerListUpdatePing (const cPlayer & a_Player) = 0;
|
||||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) = 0;
|
virtual void SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName) = 0;
|
||||||
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) = 0;
|
virtual void SendPlayerMaxSpeed (void) = 0; ///< Informs the client of the maximum player speed (1.6.1+)
|
||||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) = 0;
|
virtual void SendPlayerMoveLook (void) = 0;
|
||||||
virtual void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks) = 0;
|
virtual void SendPlayerPosition (void) = 0;
|
||||||
virtual void SendExperience (void) = 0;
|
virtual void SendPlayerSpawn (const cPlayer & a_Player) = 0;
|
||||||
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) = 0;
|
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) = 0;
|
||||||
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) = 0;
|
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) = 0;
|
||||||
virtual void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) = 0;
|
virtual void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks) = 0;
|
||||||
virtual void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) = 0;
|
virtual void SendExperience (void) = 0;
|
||||||
virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) = 0;
|
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) = 0;
|
||||||
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) = 0;
|
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) = 0;
|
||||||
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) = 0;
|
virtual void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) = 0;
|
||||||
virtual void SendSpawnMob (const cMonster & a_Mob) = 0;
|
virtual void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) = 0;
|
||||||
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) = 0;
|
virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) = 0;
|
||||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) = 0;
|
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) = 0;
|
||||||
virtual void SendStatistics (const cStatManager & a_Manager) = 0;
|
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) = 0;
|
||||||
virtual void SendTabCompletionResults(const AStringVector & a_Results) = 0;
|
virtual void SendSpawnMob (const cMonster & a_Mob) = 0;
|
||||||
virtual void SendTeleportEntity (const cEntity & a_Entity) = 0;
|
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) = 0;
|
||||||
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) = 0;
|
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) = 0;
|
||||||
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) = 0;
|
virtual void SendStatistics (const cStatManager & a_Manager) = 0;
|
||||||
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) = 0;
|
virtual void SendTabCompletionResults (const AStringVector & a_Results) = 0;
|
||||||
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) = 0;
|
virtual void SendTeleportEntity (const cEntity & a_Entity) = 0;
|
||||||
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) = 0;
|
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) = 0;
|
||||||
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) = 0;
|
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) = 0;
|
||||||
virtual void SendWeather (eWeather a_Weather) = 0;
|
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) = 0;
|
||||||
virtual void SendWholeInventory (const cWindow & a_Window) = 0;
|
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) = 0;
|
||||||
virtual void SendWindowClose (const cWindow & a_Window) = 0;
|
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) = 0;
|
||||||
virtual void SendWindowOpen (const cWindow & a_Window) = 0;
|
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) = 0;
|
||||||
virtual void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value) = 0;
|
virtual void SendWeather (eWeather a_Weather) = 0;
|
||||||
|
virtual void SendWholeInventory (const cWindow & a_Window) = 0;
|
||||||
|
virtual void SendWindowClose (const cWindow & a_Window) = 0;
|
||||||
|
virtual void SendWindowOpen (const cWindow & a_Window) = 0;
|
||||||
|
virtual void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value) = 0;
|
||||||
|
|
||||||
/// Returns the ServerID used for authentication through session.minecraft.net
|
/// Returns the ServerID used for authentication through session.minecraft.net
|
||||||
virtual AString GetAuthServerID(void) = 0;
|
virtual AString GetAuthServerID(void) = 0;
|
||||||
|
|
|
@ -719,28 +719,73 @@ void cProtocol125::SendPaintingSpawn(const cPainting & a_Painting)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cProtocol125::SendPlayerListItem(const cPlayer & a_Player, char a_Action)
|
void cProtocol125::SendPlayerListAddPlayer(const cPlayer & a_Player)
|
||||||
{
|
{
|
||||||
cCSLock Lock(m_CSPacket);
|
cCSLock Lock(m_CSPacket);
|
||||||
if (a_Action == 1)
|
WriteByte (PACKET_PLAYER_LIST_ITEM);
|
||||||
|
WriteString(a_Player.GetName());
|
||||||
|
WriteBool (true);
|
||||||
|
WriteShort (a_Player.GetClientHandle()->GetPing());
|
||||||
|
Flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol125::SendPlayerListRemovePlayer(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
cCSLock Lock(m_CSPacket);
|
||||||
|
WriteByte (PACKET_PLAYER_LIST_ITEM);
|
||||||
|
WriteString(a_Player.GetName());
|
||||||
|
WriteBool (false);
|
||||||
|
WriteShort (0);
|
||||||
|
Flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol125::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
// Not implemented in this protocol version
|
||||||
|
UNUSED(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol125::SendPlayerListUpdatePing(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
// It is a simple add player packet in this protocol.
|
||||||
|
SendPlayerListAddPlayer(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol125::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName)
|
||||||
|
{
|
||||||
|
if (a_OldListName == a_Player.GetName())
|
||||||
{
|
{
|
||||||
// Ignore gamemode update
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AString PlayerName(a_Player.GetColor());
|
cCSLock Lock(m_CSPacket);
|
||||||
PlayerName.append(a_Player.GetName());
|
|
||||||
if (PlayerName.length() > 14)
|
|
||||||
{
|
|
||||||
PlayerName.erase(14);
|
|
||||||
}
|
|
||||||
PlayerName += cChatColor::White;
|
|
||||||
|
|
||||||
WriteByte ((unsigned char)PACKET_PLAYER_LIST_ITEM);
|
// Remove the old name from the tablist:
|
||||||
WriteString(PlayerName);
|
{
|
||||||
WriteBool (a_Action != 4);
|
WriteByte (PACKET_PLAYER_LIST_ITEM);
|
||||||
WriteShort ((a_Action == 4) ? 0 : a_Player.GetClientHandle()->GetPing());
|
WriteString(a_OldListName);
|
||||||
Flush();
|
WriteBool (false);
|
||||||
|
WriteShort (0);
|
||||||
|
Flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
SendPlayerListAddPlayer(a_Player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,76 +28,80 @@ public:
|
||||||
virtual void DataReceived(const char * a_Data, size_t a_Size) override;
|
virtual void DataReceived(const char * a_Data, size_t a_Size) override;
|
||||||
|
|
||||||
/// Sending stuff to clients (alphabetically sorted):
|
/// Sending stuff to clients (alphabetically sorted):
|
||||||
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) override;
|
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) override;
|
||||||
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) override;
|
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) override;
|
||||||
virtual void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) override;
|
virtual void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) override;
|
||||||
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override;
|
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override;
|
||||||
virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) override;
|
virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) override;
|
||||||
virtual void SendChat (const AString & a_Message) override;
|
virtual void SendChat (const AString & a_Message) override;
|
||||||
virtual void SendChat (const cCompositeChat & a_Message) override;
|
virtual void SendChat (const cCompositeChat & a_Message) override;
|
||||||
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) override;
|
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) override;
|
||||||
virtual void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player) override;
|
virtual void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player) override;
|
||||||
virtual void SendDestroyEntity (const cEntity & a_Entity) override;
|
virtual void SendDestroyEntity (const cEntity & a_Entity) override;
|
||||||
virtual void SendDisconnect (const AString & a_Reason) override;
|
virtual void SendDisconnect (const AString & a_Reason) override;
|
||||||
virtual void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ) override; ///< Request the client to open up the sign editor for the sign (1.6+)
|
virtual void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ) override; ///< Request the client to open up the sign editor for the sign (1.6+)
|
||||||
virtual void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) override;
|
virtual void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) override;
|
||||||
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) override;
|
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) override;
|
||||||
virtual void SendEntityHeadLook (const cEntity & a_Entity) override;
|
virtual void SendEntityHeadLook (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityLook (const cEntity & a_Entity) override;
|
virtual void SendEntityLook (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityMetadata (const cEntity & a_Entity) override;
|
virtual void SendEntityMetadata (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityProperties (const cEntity & a_Entity) override;
|
virtual void SendEntityProperties (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
virtual void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
||||||
virtual void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
virtual void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
||||||
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) override;
|
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) override;
|
||||||
virtual void SendEntityVelocity (const cEntity & a_Entity) override;
|
virtual void SendEntityVelocity (const cEntity & a_Entity) override;
|
||||||
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) override;
|
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) override;
|
||||||
virtual void SendGameMode (eGameMode a_GameMode) override;
|
virtual void SendGameMode (eGameMode a_GameMode) override;
|
||||||
virtual void SendHealth (void) override;
|
virtual void SendHealth (void) override;
|
||||||
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) override;
|
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) override;
|
||||||
virtual void SendKeepAlive (int a_PingID) override;
|
virtual void SendKeepAlive (int a_PingID) override;
|
||||||
virtual void SendLogin (const cPlayer & a_Player, const cWorld & a_World) override;
|
virtual void SendLogin (const cPlayer & a_Player, const cWorld & a_World) override;
|
||||||
virtual void SendLoginSuccess (void) override;
|
virtual void SendLoginSuccess (void) override;
|
||||||
virtual void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale) override;
|
virtual void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale) override;
|
||||||
virtual void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale) override;
|
virtual void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale) override;
|
||||||
virtual void SendMapInfo (int a_ID, unsigned int a_Scale) override;
|
virtual void SendMapInfo (int a_ID, unsigned int a_Scale) override;
|
||||||
virtual void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) override;
|
virtual void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) override;
|
||||||
virtual void SendPaintingSpawn (const cPainting & a_Painting) override;
|
virtual void SendPaintingSpawn (const cPainting & a_Painting) override;
|
||||||
virtual void SendPickupSpawn (const cPickup & a_Pickup) override;
|
virtual void SendPickupSpawn (const cPickup & a_Pickup) override;
|
||||||
virtual void SendPlayerAbilities (void) override {} // This protocol doesn't support such message
|
virtual void SendPlayerAbilities (void) override {} // This protocol doesn't support such message
|
||||||
virtual void SendEntityAnimation (const cEntity & a_Entity, char a_Animation) override;
|
virtual void SendEntityAnimation (const cEntity & a_Entity, char a_Animation) override;
|
||||||
virtual void SendPlayerListItem (const cPlayer & a_Player, char a_Action) override;
|
virtual void SendPlayerListAddPlayer (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerMaxSpeed (void) override;
|
virtual void SendPlayerListRemovePlayer (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerMoveLook (void) override;
|
virtual void SendPlayerListUpdateGameMode (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerPosition (void) override;
|
virtual void SendPlayerListUpdatePing (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
virtual void SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName) override;
|
||||||
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
virtual void SendPlayerMaxSpeed (void) override;
|
||||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
virtual void SendPlayerMoveLook (void) override;
|
||||||
virtual void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks) override;
|
virtual void SendPlayerPosition (void) override;
|
||||||
virtual void SendExperience (void) override;
|
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
||||||
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
||||||
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
|
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
||||||
virtual void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) override {} // This protocol doesn't support such message
|
virtual void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks) override;
|
||||||
virtual void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) override {} // This protocol doesn't support such message
|
virtual void SendExperience (void) override;
|
||||||
virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) override;
|
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
||||||
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
|
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
|
||||||
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
|
virtual void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) override {} // This protocol doesn't support such message
|
||||||
virtual void SendSpawnMob (const cMonster & a_Mob) override;
|
virtual void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) override {} // This protocol doesn't support such message
|
||||||
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) override;
|
||||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
|
||||||
virtual void SendStatistics (const cStatManager & a_Manager) override;
|
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
|
||||||
virtual void SendTabCompletionResults(const AStringVector & a_Results) override;
|
virtual void SendSpawnMob (const cMonster & a_Mob) override;
|
||||||
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
|
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
||||||
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
||||||
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) override;
|
virtual void SendStatistics (const cStatManager & a_Manager) override;
|
||||||
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) override;
|
virtual void SendTabCompletionResults (const AStringVector & a_Results) override;
|
||||||
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) override {}
|
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
|
||||||
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
|
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||||
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) override;
|
||||||
virtual void SendWeather (eWeather a_Weather) override;
|
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) override;
|
||||||
virtual void SendWholeInventory (const cWindow & a_Window) override;
|
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) override {}
|
||||||
virtual void SendWindowClose (const cWindow & a_Window) override;
|
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
|
||||||
virtual void SendWindowOpen (const cWindow & a_Window) override;
|
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||||
virtual void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value) override;
|
virtual void SendWeather (eWeather a_Weather) override;
|
||||||
|
virtual void SendWholeInventory (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowClose (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowOpen (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value) override;
|
||||||
|
|
||||||
virtual AString GetAuthServerID(void) override;
|
virtual AString GetAuthServerID(void) override;
|
||||||
|
|
||||||
|
|
|
@ -777,19 +777,71 @@ void cProtocol172::SendParticleEffect(const AString & a_ParticleName, float a_Sr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cProtocol172::SendPlayerListItem(const cPlayer & a_Player, char a_Action)
|
void cProtocol172::SendPlayerListAddPlayer(const cPlayer & a_Player)
|
||||||
{
|
{
|
||||||
ASSERT(m_State == 3); // In game mode?
|
ASSERT(m_State == 3); // In game mode?
|
||||||
if (a_Action == 1)
|
|
||||||
{
|
|
||||||
// Ignore gamemode update
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
cPacketizer Pkt(*this, 0x38); // Playerlist Item packet
|
cPacketizer Pkt(*this, 0x38); // Playerlist Item packet
|
||||||
Pkt.WriteString(a_Player.GetName());
|
Pkt.WriteString(a_Player.GetName());
|
||||||
Pkt.WriteBool(a_Action != 4);
|
Pkt.WriteBool(true);
|
||||||
Pkt.WriteShort((a_Action == 4) ? 0 : a_Player.GetClientHandle()->GetPing());
|
Pkt.WriteShort(a_Player.GetClientHandle()->GetPing());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol172::SendPlayerListRemovePlayer(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
ASSERT(m_State == 3); // In game mode?
|
||||||
|
|
||||||
|
cPacketizer Pkt(*this, 0x38);
|
||||||
|
Pkt.WriteString(a_Player.GetName());
|
||||||
|
Pkt.WriteBool(false);
|
||||||
|
Pkt.WriteShort(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol172::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
// Not implemented in this protocol version
|
||||||
|
UNUSED(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol172::SendPlayerListUpdatePing(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
// It is a simple add player packet in this protocol.
|
||||||
|
SendPlayerListAddPlayer(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol172::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName)
|
||||||
|
{
|
||||||
|
ASSERT(m_State == 3); // In game mode?
|
||||||
|
if (a_OldListName == a_Player.GetName())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove the old name from the tablist:
|
||||||
|
{
|
||||||
|
cPacketizer Pkt(*this, 0x38);
|
||||||
|
Pkt.WriteString(a_OldListName);
|
||||||
|
Pkt.WriteBool(false);
|
||||||
|
Pkt.WriteShort(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
SendPlayerListAddPlayer(a_Player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,76 +61,80 @@ public:
|
||||||
virtual void DataReceived(const char * a_Data, size_t a_Size) override;
|
virtual void DataReceived(const char * a_Data, size_t a_Size) override;
|
||||||
|
|
||||||
/** Sending stuff to clients (alphabetically sorted): */
|
/** Sending stuff to clients (alphabetically sorted): */
|
||||||
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) override;
|
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) override;
|
||||||
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) override;
|
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) override;
|
||||||
virtual void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) override;
|
virtual void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) override;
|
||||||
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override;
|
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override;
|
||||||
virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) override;
|
virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) override;
|
||||||
virtual void SendChat (const AString & a_Message) override;
|
virtual void SendChat (const AString & a_Message) override;
|
||||||
virtual void SendChat (const cCompositeChat & a_Message) override;
|
virtual void SendChat (const cCompositeChat & a_Message) override;
|
||||||
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) override;
|
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) override;
|
||||||
virtual void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player) override;
|
virtual void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player) override;
|
||||||
virtual void SendDestroyEntity (const cEntity & a_Entity) override;
|
virtual void SendDestroyEntity (const cEntity & a_Entity) override;
|
||||||
virtual void SendDisconnect (const AString & a_Reason) override;
|
virtual void SendDisconnect (const AString & a_Reason) override;
|
||||||
virtual void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) override;
|
virtual void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) override;
|
||||||
virtual void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ) override; ///< Request the client to open up the sign editor for the sign (1.6+)
|
virtual void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ) override; ///< Request the client to open up the sign editor for the sign (1.6+)
|
||||||
virtual void SendEntityAnimation (const cEntity & a_Entity, char a_Animation) override;
|
virtual void SendEntityAnimation (const cEntity & a_Entity, char a_Animation) override;
|
||||||
virtual void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) override;
|
virtual void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) override;
|
||||||
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) override;
|
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) override;
|
||||||
virtual void SendEntityHeadLook (const cEntity & a_Entity) override;
|
virtual void SendEntityHeadLook (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityLook (const cEntity & a_Entity) override;
|
virtual void SendEntityLook (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityMetadata (const cEntity & a_Entity) override;
|
virtual void SendEntityMetadata (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityProperties (const cEntity & a_Entity) override;
|
virtual void SendEntityProperties (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
virtual void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
||||||
virtual void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
virtual void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
||||||
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) override;
|
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) override;
|
||||||
virtual void SendEntityVelocity (const cEntity & a_Entity) override;
|
virtual void SendEntityVelocity (const cEntity & a_Entity) override;
|
||||||
virtual void SendExperience (void) override;
|
virtual void SendExperience (void) override;
|
||||||
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
||||||
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) override;
|
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) override;
|
||||||
virtual void SendGameMode (eGameMode a_GameMode) override;
|
virtual void SendGameMode (eGameMode a_GameMode) override;
|
||||||
virtual void SendHealth (void) override;
|
virtual void SendHealth (void) override;
|
||||||
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) override;
|
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) override;
|
||||||
virtual void SendKeepAlive (int a_PingID) override;
|
virtual void SendKeepAlive (int a_PingID) override;
|
||||||
virtual void SendLogin (const cPlayer & a_Player, const cWorld & a_World) override;
|
virtual void SendLogin (const cPlayer & a_Player, const cWorld & a_World) override;
|
||||||
virtual void SendLoginSuccess (void) override;
|
virtual void SendLoginSuccess (void) override;
|
||||||
virtual void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale) override;
|
virtual void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale) override;
|
||||||
virtual void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale) override;
|
virtual void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale) override;
|
||||||
virtual void SendMapInfo (int a_ID, unsigned int a_Scale) override;
|
virtual void SendMapInfo (int a_ID, unsigned int a_Scale) override;
|
||||||
virtual void SendPaintingSpawn (const cPainting & a_Painting) override;
|
virtual void SendPaintingSpawn (const cPainting & a_Painting) override;
|
||||||
virtual void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) override;
|
virtual void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) override;
|
||||||
virtual void SendPickupSpawn (const cPickup & a_Pickup) override;
|
virtual void SendPickupSpawn (const cPickup & a_Pickup) override;
|
||||||
virtual void SendPlayerAbilities (void) override;
|
virtual void SendPlayerAbilities (void) override;
|
||||||
virtual void SendPlayerListItem (const cPlayer & a_Player, char a_Action) override;
|
virtual void SendPlayerListAddPlayer (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerMaxSpeed (void) override;
|
virtual void SendPlayerListRemovePlayer (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerMoveLook (void) override;
|
virtual void SendPlayerListUpdateGameMode (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerPosition (void) override;
|
virtual void SendPlayerListUpdatePing (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
virtual void SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName) override;
|
||||||
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
virtual void SendPlayerMaxSpeed (void) override;
|
||||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
virtual void SendPlayerMoveLook (void) override;
|
||||||
virtual void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks) override;
|
virtual void SendPlayerPosition (void) override;
|
||||||
virtual void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) override;
|
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
||||||
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
|
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
||||||
virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) override;
|
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
||||||
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
|
virtual void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks) override;
|
||||||
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
|
virtual void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) override;
|
||||||
virtual void SendSpawnMob (const cMonster & a_Mob) override;
|
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
|
||||||
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) override;
|
||||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
|
||||||
virtual void SendStatistics (const cStatManager & a_Manager) override;
|
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
|
||||||
virtual void SendTabCompletionResults(const AStringVector & a_Results) override;
|
virtual void SendSpawnMob (const cMonster & a_Mob) override;
|
||||||
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
|
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
||||||
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
||||||
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) override;
|
virtual void SendStatistics (const cStatManager & a_Manager) override;
|
||||||
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) override;
|
virtual void SendTabCompletionResults (const AStringVector & a_Results) override;
|
||||||
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) override;
|
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
|
||||||
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
|
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||||
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) override;
|
||||||
virtual void SendWeather (eWeather a_Weather) override;
|
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) override;
|
||||||
virtual void SendWholeInventory (const cWindow & a_Window) override;
|
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) override;
|
||||||
virtual void SendWindowClose (const cWindow & a_Window) override;
|
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
|
||||||
virtual void SendWindowOpen (const cWindow & a_Window) override;
|
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||||
virtual void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value) override;
|
virtual void SendWeather (eWeather a_Weather) override;
|
||||||
|
virtual void SendWholeInventory (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowClose (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowOpen (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value) override;
|
||||||
|
|
||||||
virtual AString GetAuthServerID(void) override { return m_AuthServerID; }
|
virtual AString GetAuthServerID(void) override { return m_AuthServerID; }
|
||||||
|
|
||||||
|
|
|
@ -793,73 +793,106 @@ void cProtocol180::SendParticleEffect(const AString & a_ParticleName, float a_Sr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cProtocol180::SendPlayerListItem(const cPlayer & a_Player, char a_Action)
|
void cProtocol180::SendPlayerListAddPlayer(const cPlayer & a_Player)
|
||||||
{
|
{
|
||||||
ASSERT(m_State == 3); // In game mode?
|
ASSERT(m_State == 3); // In game mode?
|
||||||
|
|
||||||
cPacketizer Pkt(*this, 0x38); // Playerlist Item packet
|
cPacketizer Pkt(*this, 0x38); // Playerlist Item packet
|
||||||
Pkt.WriteVarInt(a_Action);
|
Pkt.WriteVarInt(0);
|
||||||
|
Pkt.WriteVarInt(1);
|
||||||
|
Pkt.WriteUUID(a_Player.GetUUID());
|
||||||
|
Pkt.WriteString(a_Player.GetName());
|
||||||
|
|
||||||
|
const Json::Value & Properties = a_Player.GetClientHandle()->GetProperties();
|
||||||
|
Pkt.WriteVarInt(Properties.size());
|
||||||
|
for (Json::Value::iterator itr = Properties.begin(), end = Properties.end(); itr != end; ++itr)
|
||||||
|
{
|
||||||
|
Pkt.WriteString(((Json::Value)*itr).get("name", "").asString());
|
||||||
|
Pkt.WriteString(((Json::Value)*itr).get("value", "").asString());
|
||||||
|
AString Signature = ((Json::Value)*itr).get("signature", "").asString();
|
||||||
|
if (Signature.empty())
|
||||||
|
{
|
||||||
|
Pkt.WriteBool(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Pkt.WriteBool(true);
|
||||||
|
Pkt.WriteString(Signature);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pkt.WriteVarInt((UInt32)a_Player.GetGameMode());
|
||||||
|
Pkt.WriteVarInt((UInt32)a_Player.GetClientHandle()->GetPing());
|
||||||
|
Pkt.WriteBool(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol180::SendPlayerListRemovePlayer(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
ASSERT(m_State == 3); // In game mode?
|
||||||
|
|
||||||
|
cPacketizer Pkt(*this, 0x38); // Playerlist Item packet
|
||||||
|
Pkt.WriteVarInt(4);
|
||||||
|
Pkt.WriteVarInt(1);
|
||||||
|
Pkt.WriteUUID(a_Player.GetUUID());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol180::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
ASSERT(m_State == 3); // In game mode?
|
||||||
|
|
||||||
|
cPacketizer Pkt(*this, 0x38); // Playerlist Item packet
|
||||||
|
Pkt.WriteVarInt(1);
|
||||||
|
Pkt.WriteVarInt(1);
|
||||||
|
Pkt.WriteUUID(a_Player.GetUUID());
|
||||||
|
Pkt.WriteVarInt((UInt32)a_Player.GetGameMode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol180::SendPlayerListUpdatePing(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
ASSERT(m_State == 3); // In game mode?
|
||||||
|
|
||||||
|
cPacketizer Pkt(*this, 0x38); // Playerlist Item packet
|
||||||
|
Pkt.WriteVarInt(2);
|
||||||
|
Pkt.WriteVarInt(1);
|
||||||
|
Pkt.WriteUUID(a_Player.GetUUID());
|
||||||
|
Pkt.WriteVarInt((UInt32)a_Player.GetClientHandle()->GetPing());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol180::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName)
|
||||||
|
{
|
||||||
|
UNUSED(a_OldListName);
|
||||||
|
ASSERT(m_State == 3); // In game mode?
|
||||||
|
|
||||||
|
cPacketizer Pkt(*this, 0x38); // Playerlist Item packet
|
||||||
|
Pkt.WriteVarInt(3);
|
||||||
Pkt.WriteVarInt(1);
|
Pkt.WriteVarInt(1);
|
||||||
Pkt.WriteUUID(a_Player.GetUUID());
|
Pkt.WriteUUID(a_Player.GetUUID());
|
||||||
|
|
||||||
switch (a_Action)
|
// TODO: Replace this with GetPlayerListName() (It's already done in other pull request)
|
||||||
|
if (a_Player.GetName().empty())
|
||||||
{
|
{
|
||||||
case 0:
|
Pkt.WriteBool(false);
|
||||||
{
|
}
|
||||||
// Add Player
|
else
|
||||||
Pkt.WriteString(a_Player.GetName());
|
{
|
||||||
|
Pkt.WriteBool(true);
|
||||||
const Json::Value & Properties = a_Player.GetClientHandle()->GetProperties();
|
Pkt.WriteString(Printf("{\"text\":\"%s\"}", a_Player.GetName().c_str()));
|
||||||
Pkt.WriteVarInt(Properties.size());
|
|
||||||
for (Json::Value::iterator itr = Properties.begin(), end = Properties.end(); itr != end; ++itr)
|
|
||||||
{
|
|
||||||
Pkt.WriteString(((Json::Value)*itr).get("name", "").asString());
|
|
||||||
Pkt.WriteString(((Json::Value)*itr).get("value", "").asString());
|
|
||||||
AString Signature = ((Json::Value)*itr).get("signature", "").asString();
|
|
||||||
if (Signature.empty())
|
|
||||||
{
|
|
||||||
Pkt.WriteBool(false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Pkt.WriteBool(true);
|
|
||||||
Pkt.WriteString(Signature);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Pkt.WriteVarInt((UInt32)a_Player.GetGameMode());
|
|
||||||
Pkt.WriteVarInt((UInt32)a_Player.GetClientHandle()->GetPing());
|
|
||||||
Pkt.WriteBool(false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
// Update GameMode
|
|
||||||
Pkt.WriteVarInt((UInt32)a_Player.GetGameMode());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
{
|
|
||||||
// Update Ping
|
|
||||||
Pkt.WriteVarInt((UInt32)a_Player.GetClientHandle()->GetPing());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
{
|
|
||||||
// Update DisplayName
|
|
||||||
Pkt.WriteBool(false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 4:
|
|
||||||
{
|
|
||||||
// Remove player
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
ASSERT(!"Unhandled player list item action!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,76 +60,80 @@ public:
|
||||||
virtual void DataReceived(const char * a_Data, size_t a_Size) override;
|
virtual void DataReceived(const char * a_Data, size_t a_Size) override;
|
||||||
|
|
||||||
/** Sending stuff to clients (alphabetically sorted): */
|
/** Sending stuff to clients (alphabetically sorted): */
|
||||||
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) override;
|
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) override;
|
||||||
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) override;
|
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) override;
|
||||||
virtual void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) override;
|
virtual void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) override;
|
||||||
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override;
|
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override;
|
||||||
virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) override;
|
virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) override;
|
||||||
virtual void SendChat (const AString & a_Message) override;
|
virtual void SendChat (const AString & a_Message) override;
|
||||||
virtual void SendChat (const cCompositeChat & a_Message) override;
|
virtual void SendChat (const cCompositeChat & a_Message) override;
|
||||||
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) override;
|
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) override;
|
||||||
virtual void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player) override;
|
virtual void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player) override;
|
||||||
virtual void SendDestroyEntity (const cEntity & a_Entity) override;
|
virtual void SendDestroyEntity (const cEntity & a_Entity) override;
|
||||||
virtual void SendDisconnect (const AString & a_Reason) override;
|
virtual void SendDisconnect (const AString & a_Reason) override;
|
||||||
virtual void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ) override; ///< Request the client to open up the sign editor for the sign (1.6+)
|
virtual void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ) override; ///< Request the client to open up the sign editor for the sign (1.6+)
|
||||||
virtual void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) override;
|
virtual void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) override;
|
||||||
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) override;
|
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) override;
|
||||||
virtual void SendEntityHeadLook (const cEntity & a_Entity) override;
|
virtual void SendEntityHeadLook (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityLook (const cEntity & a_Entity) override;
|
virtual void SendEntityLook (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityMetadata (const cEntity & a_Entity) override;
|
virtual void SendEntityMetadata (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityProperties (const cEntity & a_Entity) override;
|
virtual void SendEntityProperties (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
virtual void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
||||||
virtual void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
virtual void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
||||||
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) override;
|
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) override;
|
||||||
virtual void SendEntityVelocity (const cEntity & a_Entity) override;
|
virtual void SendEntityVelocity (const cEntity & a_Entity) override;
|
||||||
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) override;
|
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) override;
|
||||||
virtual void SendGameMode (eGameMode a_GameMode) override;
|
virtual void SendGameMode (eGameMode a_GameMode) override;
|
||||||
virtual void SendHealth (void) override;
|
virtual void SendHealth (void) override;
|
||||||
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) override;
|
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) override;
|
||||||
virtual void SendKeepAlive (int a_PingID) override;
|
virtual void SendKeepAlive (int a_PingID) override;
|
||||||
virtual void SendLogin (const cPlayer & a_Player, const cWorld & a_World) override;
|
virtual void SendLogin (const cPlayer & a_Player, const cWorld & a_World) override;
|
||||||
virtual void SendLoginSuccess (void) override;
|
virtual void SendLoginSuccess (void) override;
|
||||||
virtual void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale) override;
|
virtual void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale) override;
|
||||||
virtual void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale) override;
|
virtual void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale) override;
|
||||||
virtual void SendMapInfo (int a_ID, unsigned int a_Scale) override;
|
virtual void SendMapInfo (int a_ID, unsigned int a_Scale) override;
|
||||||
virtual void SendPaintingSpawn (const cPainting & a_Painting) override;
|
virtual void SendPaintingSpawn (const cPainting & a_Painting) override;
|
||||||
virtual void SendPickupSpawn (const cPickup & a_Pickup) override;
|
virtual void SendPickupSpawn (const cPickup & a_Pickup) override;
|
||||||
virtual void SendPlayerAbilities (void) override;
|
virtual void SendPlayerAbilities (void) override;
|
||||||
virtual void SendEntityAnimation (const cEntity & a_Entity, char a_Animation) override;
|
virtual void SendEntityAnimation (const cEntity & a_Entity, char a_Animation) override;
|
||||||
virtual void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) override;
|
virtual void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) override;
|
||||||
virtual void SendPlayerListItem (const cPlayer & a_Player, char a_Action) override;
|
virtual void SendPlayerListAddPlayer (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerMaxSpeed (void) override;
|
virtual void SendPlayerListRemovePlayer (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerMoveLook (void) override;
|
virtual void SendPlayerListUpdateGameMode (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerPosition (void) override;
|
virtual void SendPlayerListUpdatePing (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
virtual void SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName) override;
|
||||||
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
virtual void SendPlayerMaxSpeed (void) override;
|
||||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
virtual void SendPlayerMoveLook (void) override;
|
||||||
virtual void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks) override;
|
virtual void SendPlayerPosition (void) override;
|
||||||
virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) override;
|
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
||||||
virtual void SendExperience (void) override;
|
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
||||||
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
||||||
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
|
virtual void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks) override;
|
||||||
virtual void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) override;
|
virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) override;
|
||||||
virtual void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) override;
|
virtual void SendExperience (void) override;
|
||||||
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
|
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
||||||
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
|
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
|
||||||
virtual void SendSpawnMob (const cMonster & a_Mob) override;
|
virtual void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) override;
|
||||||
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
virtual void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) override;
|
||||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
|
||||||
virtual void SendStatistics (const cStatManager & a_Manager) override;
|
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
|
||||||
virtual void SendTabCompletionResults(const AStringVector & a_Results) override;
|
virtual void SendSpawnMob (const cMonster & a_Mob) override;
|
||||||
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
|
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
||||||
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
||||||
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) override;
|
virtual void SendStatistics (const cStatManager & a_Manager) override;
|
||||||
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) override;
|
virtual void SendTabCompletionResults (const AStringVector & a_Results) override;
|
||||||
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) override;
|
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
|
||||||
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
|
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||||
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) override;
|
||||||
virtual void SendWeather (eWeather a_Weather) override;
|
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) override;
|
||||||
virtual void SendWholeInventory (const cWindow & a_Window) override;
|
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) override;
|
||||||
virtual void SendWindowClose (const cWindow & a_Window) override;
|
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
|
||||||
virtual void SendWindowOpen (const cWindow & a_Window) override;
|
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||||
virtual void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value) override;
|
virtual void SendWeather (eWeather a_Weather) override;
|
||||||
|
virtual void SendWholeInventory (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowClose (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowOpen (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value) override;
|
||||||
|
|
||||||
virtual AString GetAuthServerID(void) override { return m_AuthServerID; }
|
virtual AString GetAuthServerID(void) override { return m_AuthServerID; }
|
||||||
|
|
||||||
|
|
|
@ -489,10 +489,50 @@ void cProtocolRecognizer::SendEntityAnimation(const cEntity & a_Entity, char a_A
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cProtocolRecognizer::SendPlayerListItem(const cPlayer & a_Player, char a_Action)
|
void cProtocolRecognizer::SendPlayerListAddPlayer(const cPlayer & a_Player)
|
||||||
{
|
{
|
||||||
ASSERT(m_Protocol != NULL);
|
ASSERT(m_Protocol != NULL);
|
||||||
m_Protocol->SendPlayerListItem(a_Player, a_Action);
|
m_Protocol->SendPlayerListAddPlayer(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocolRecognizer::SendPlayerListRemovePlayer(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
ASSERT(m_Protocol != NULL);
|
||||||
|
m_Protocol->SendPlayerListRemovePlayer(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocolRecognizer::SendPlayerListUpdateGameMode(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
ASSERT(m_Protocol != NULL);
|
||||||
|
m_Protocol->SendPlayerListUpdateGameMode(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocolRecognizer::SendPlayerListUpdatePing(const cPlayer & a_Player)
|
||||||
|
{
|
||||||
|
ASSERT(m_Protocol != NULL);
|
||||||
|
m_Protocol->SendPlayerListUpdatePing(a_Player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocolRecognizer::SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName)
|
||||||
|
{
|
||||||
|
ASSERT(m_Protocol != NULL);
|
||||||
|
m_Protocol->SendPlayerListUpdateDisplayName(a_Player, a_OldListName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -64,76 +64,80 @@ public:
|
||||||
virtual void DataReceived(const char * a_Data, size_t a_Size) override;
|
virtual void DataReceived(const char * a_Data, size_t a_Size) override;
|
||||||
|
|
||||||
/// Sending stuff to clients (alphabetically sorted):
|
/// Sending stuff to clients (alphabetically sorted):
|
||||||
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) override;
|
virtual void SendAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle) override;
|
||||||
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) override;
|
virtual void SendBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType) override;
|
||||||
virtual void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) override;
|
virtual void SendBlockBreakAnim (int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage) override;
|
||||||
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override;
|
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override;
|
||||||
virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) override;
|
virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) override;
|
||||||
virtual void SendChat (const AString & a_Message) override;
|
virtual void SendChat (const AString & a_Message) override;
|
||||||
virtual void SendChat (const cCompositeChat & a_Message) override;
|
virtual void SendChat (const cCompositeChat & a_Message) override;
|
||||||
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) override;
|
virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) override;
|
||||||
virtual void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player) override;
|
virtual void SendCollectEntity (const cEntity & a_Entity, const cPlayer & a_Player) override;
|
||||||
virtual void SendDestroyEntity (const cEntity & a_Entity) override;
|
virtual void SendDestroyEntity (const cEntity & a_Entity) override;
|
||||||
virtual void SendDisconnect (const AString & a_Reason) override;
|
virtual void SendDisconnect (const AString & a_Reason) override;
|
||||||
virtual void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ) override; ///< Request the client to open up the sign editor for the sign (1.6+)
|
virtual void SendEditSign (int a_BlockX, int a_BlockY, int a_BlockZ) override; ///< Request the client to open up the sign editor for the sign (1.6+)
|
||||||
virtual void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) override;
|
virtual void SendEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration) override;
|
||||||
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) override;
|
virtual void SendEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) override;
|
||||||
virtual void SendEntityHeadLook (const cEntity & a_Entity) override;
|
virtual void SendEntityHeadLook (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityLook (const cEntity & a_Entity) override;
|
virtual void SendEntityLook (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityMetadata (const cEntity & a_Entity) override;
|
virtual void SendEntityMetadata (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityProperties (const cEntity & a_Entity) override;
|
virtual void SendEntityProperties (const cEntity & a_Entity) override;
|
||||||
virtual void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
virtual void SendEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
||||||
virtual void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
virtual void SendEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
|
||||||
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) override;
|
virtual void SendEntityStatus (const cEntity & a_Entity, char a_Status) override;
|
||||||
virtual void SendEntityVelocity (const cEntity & a_Entity) override;
|
virtual void SendEntityVelocity (const cEntity & a_Entity) override;
|
||||||
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) override;
|
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) override;
|
||||||
virtual void SendGameMode (eGameMode a_GameMode) override;
|
virtual void SendGameMode (eGameMode a_GameMode) override;
|
||||||
virtual void SendHealth (void) override;
|
virtual void SendHealth (void) override;
|
||||||
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) override;
|
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) override;
|
||||||
virtual void SendKeepAlive (int a_PingID) override;
|
virtual void SendKeepAlive (int a_PingID) override;
|
||||||
virtual void SendLogin (const cPlayer & a_Player, const cWorld & a_World) override;
|
virtual void SendLogin (const cPlayer & a_Player, const cWorld & a_World) override;
|
||||||
virtual void SendLoginSuccess (void) override;
|
virtual void SendLoginSuccess (void) override;
|
||||||
virtual void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale) override;
|
virtual void SendMapColumn (int a_ID, int a_X, int a_Y, const Byte * a_Colors, unsigned int a_Length, unsigned int m_Scale) override;
|
||||||
virtual void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale) override;
|
virtual void SendMapDecorators (int a_ID, const cMapDecoratorList & a_Decorators, unsigned int m_Scale) override;
|
||||||
virtual void SendMapInfo (int a_ID, unsigned int a_Scale) override;
|
virtual void SendMapInfo (int a_ID, unsigned int a_Scale) override;
|
||||||
virtual void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) override;
|
virtual void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) override;
|
||||||
virtual void SendPaintingSpawn (const cPainting & a_Painting) override;
|
virtual void SendPaintingSpawn (const cPainting & a_Painting) override;
|
||||||
virtual void SendPickupSpawn (const cPickup & a_Pickup) override;
|
virtual void SendPickupSpawn (const cPickup & a_Pickup) override;
|
||||||
virtual void SendPlayerAbilities (void) override;
|
virtual void SendPlayerAbilities (void) override;
|
||||||
virtual void SendEntityAnimation (const cEntity & a_Entity, char a_Animation) override;
|
virtual void SendEntityAnimation (const cEntity & a_Entity, char a_Animation) override;
|
||||||
virtual void SendPlayerListItem (const cPlayer & a_Player, char a_Action) override;
|
virtual void SendPlayerListAddPlayer (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerMaxSpeed (void) override;
|
virtual void SendPlayerListRemovePlayer (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerMoveLook (void) override;
|
virtual void SendPlayerListUpdateGameMode (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerPosition (void) override;
|
virtual void SendPlayerListUpdatePing (const cPlayer & a_Player) override;
|
||||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
virtual void SendPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName) override;
|
||||||
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
virtual void SendPlayerMaxSpeed (void) override;
|
||||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
virtual void SendPlayerMoveLook (void) override;
|
||||||
virtual void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks) override;
|
virtual void SendPlayerPosition (void) override;
|
||||||
virtual void SendExperience (void) override;
|
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
||||||
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
||||||
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
|
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
||||||
virtual void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) override;
|
virtual void SendRespawn (eDimension a_Dimension, bool a_ShouldIgnoreDimensionChecks) override;
|
||||||
virtual void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) override;
|
virtual void SendExperience (void) override;
|
||||||
virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) override;
|
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
||||||
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
|
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
|
||||||
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
|
virtual void SendScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode) override;
|
||||||
virtual void SendSpawnMob (const cMonster & a_Mob) override;
|
virtual void SendDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display) override;
|
||||||
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) override;
|
||||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
virtual void SendSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data) override;
|
||||||
virtual void SendStatistics (const cStatManager & a_Manager) override;
|
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
|
||||||
virtual void SendTabCompletionResults(const AStringVector & a_Results) override;
|
virtual void SendSpawnMob (const cMonster & a_Mob) override;
|
||||||
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
|
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
||||||
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
||||||
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) override;
|
virtual void SendStatistics (const cStatManager & a_Manager) override;
|
||||||
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) override;
|
virtual void SendTabCompletionResults (const AStringVector & a_Results) override;
|
||||||
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) override;
|
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
|
||||||
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
|
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||||
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay, bool a_DoDaylightCycle) override;
|
||||||
virtual void SendWeather (eWeather a_Weather) override;
|
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) override;
|
||||||
virtual void SendWholeInventory (const cWindow & a_Window) override;
|
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) override;
|
||||||
virtual void SendWindowClose (const cWindow & a_Window) override;
|
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
|
||||||
virtual void SendWindowOpen (const cWindow & a_Window) override;
|
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||||
virtual void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value) override;
|
virtual void SendWeather (eWeather a_Weather) override;
|
||||||
|
virtual void SendWholeInventory (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowClose (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowOpen (const cWindow & a_Window) override;
|
||||||
|
virtual void SendWindowProperty (const cWindow & a_Window, int a_Property, int a_Value) override;
|
||||||
|
|
||||||
virtual AString GetAuthServerID(void) override;
|
virtual AString GetAuthServerID(void) override;
|
||||||
|
|
||||||
|
|
|
@ -2153,7 +2153,7 @@ void cWorld::BroadcastParticleEffect(const AString & a_ParticleName, float a_Src
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cWorld::BroadcastPlayerListItem(const cPlayer & a_Player, char a_Action, const cClientHandle * a_Exclude)
|
void cWorld::BroadcastPlayerListAddPlayer(const cPlayer & a_Player, const cClientHandle * a_Exclude)
|
||||||
{
|
{
|
||||||
cCSLock Lock(m_CSPlayers);
|
cCSLock Lock(m_CSPlayers);
|
||||||
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||||
|
@ -2163,7 +2163,79 @@ void cWorld::BroadcastPlayerListItem(const cPlayer & a_Player, char a_Action, co
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ch->SendPlayerListItem(a_Player, a_Action);
|
ch->SendPlayerListAddPlayer(a_Player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cWorld::BroadcastPlayerListRemovePlayer(const cPlayer & a_Player, const cClientHandle * a_Exclude)
|
||||||
|
{
|
||||||
|
cCSLock Lock(m_CSPlayers);
|
||||||
|
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||||
|
{
|
||||||
|
cClientHandle * ch = (*itr)->GetClientHandle();
|
||||||
|
if ((ch == a_Exclude) || (ch == NULL) || !ch->IsLoggedIn() || ch->IsDestroyed())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ch->SendPlayerListRemovePlayer(a_Player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cWorld::BroadcastPlayerListUpdateGameMode(const cPlayer & a_Player, const cClientHandle * a_Exclude)
|
||||||
|
{
|
||||||
|
cCSLock Lock(m_CSPlayers);
|
||||||
|
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||||
|
{
|
||||||
|
cClientHandle * ch = (*itr)->GetClientHandle();
|
||||||
|
if ((ch == a_Exclude) || (ch == NULL) || !ch->IsLoggedIn() || ch->IsDestroyed())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ch->SendPlayerListUpdateGameMode(a_Player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cWorld::BroadcastPlayerListUpdatePing(const cPlayer & a_Player, const cClientHandle * a_Exclude)
|
||||||
|
{
|
||||||
|
cCSLock Lock(m_CSPlayers);
|
||||||
|
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||||
|
{
|
||||||
|
cClientHandle * ch = (*itr)->GetClientHandle();
|
||||||
|
if ((ch == a_Exclude) || (ch == NULL) || !ch->IsLoggedIn() || ch->IsDestroyed())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ch->SendPlayerListUpdatePing(a_Player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cWorld::BroadcastPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName, const cClientHandle * a_Exclude)
|
||||||
|
{
|
||||||
|
cCSLock Lock(m_CSPlayers);
|
||||||
|
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||||
|
{
|
||||||
|
cClientHandle * ch = (*itr)->GetClientHandle();
|
||||||
|
if ((ch == a_Exclude) || (ch == NULL) || !ch->IsLoggedIn() || ch->IsDestroyed())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ch->SendPlayerListUpdateDisplayName(a_Player, a_OldListName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2686,7 +2758,7 @@ void cWorld::SendPlayerList(cPlayer * a_DestPlayer)
|
||||||
cClientHandle * ch = (*itr)->GetClientHandle();
|
cClientHandle * ch = (*itr)->GetClientHandle();
|
||||||
if ((ch != NULL) && !ch->IsDestroyed())
|
if ((ch != NULL) && !ch->IsDestroyed())
|
||||||
{
|
{
|
||||||
a_DestPlayer->GetClientHandle()->SendPlayerListItem(*(*itr), 0);
|
a_DestPlayer->GetClientHandle()->SendPlayerListAddPlayer(*(*itr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
58
src/World.h
58
src/World.h
|
@ -223,33 +223,37 @@ public:
|
||||||
void BroadcastChat (const cCompositeChat & a_Message, const cClientHandle * a_Exclude = NULL);
|
void BroadcastChat (const cCompositeChat & a_Message, const cClientHandle * a_Exclude = NULL);
|
||||||
// tolua_end
|
// tolua_end
|
||||||
|
|
||||||
void BroadcastChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer, const cClientHandle * a_Exclude = NULL);
|
void BroadcastChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastCollectEntity (const cEntity & a_Pickup, const cPlayer & a_Player, const cClientHandle * a_Exclude = NULL);
|
void BroadcastCollectEntity (const cEntity & a_Pickup, const cPlayer & a_Player, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastDestroyEntity (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
void BroadcastDestroyEntity (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration, const cClientHandle * a_Exclude = NULL);
|
void BroadcastEntityEffect (const cEntity & a_Entity, int a_EffectID, int a_Amplifier, short a_Duration, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item, const cClientHandle * a_Exclude = NULL);
|
void BroadcastEntityEquipment (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastEntityHeadLook (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
void BroadcastEntityHeadLook (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastEntityLook (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
void BroadcastEntityLook (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastEntityMetadata (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
void BroadcastEntityMetadata (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, const cClientHandle * a_Exclude = NULL);
|
void BroadcastEntityRelMove (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, const cClientHandle * a_Exclude = NULL);
|
void BroadcastEntityRelMoveLook (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastEntityStatus (const cEntity & a_Entity, char a_Status, const cClientHandle * a_Exclude = NULL);
|
void BroadcastEntityStatus (const cEntity & a_Entity, char a_Status, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastEntityVelocity (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
void BroadcastEntityVelocity (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
||||||
virtual void BroadcastEntityAnimation(const cEntity & a_Entity, char a_Animation, const cClientHandle * a_Exclude = NULL) override; // tolua_export
|
virtual void BroadcastEntityAnimation (const cEntity & a_Entity, char a_Animation, const cClientHandle * a_Exclude = NULL) override; // tolua_export
|
||||||
void BroadcastParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount, cClientHandle * a_Exclude = NULL); // tolua_export
|
void BroadcastParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount, cClientHandle * a_Exclude = NULL); // tolua_export
|
||||||
void BroadcastPlayerListItem (const cPlayer & a_Player, char a_Action, const cClientHandle * a_Exclude = NULL);
|
void BroadcastPlayerListAddPlayer (const cPlayer & a_Player, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID, const cClientHandle * a_Exclude = NULL);
|
void BroadcastPlayerListRemovePlayer (const cPlayer & a_Player, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode);
|
void BroadcastPlayerListUpdateGameMode (const cPlayer & a_Player, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode);
|
void BroadcastPlayerListUpdatePing (const cPlayer & a_Player, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display);
|
void BroadcastPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_OldListName, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude = NULL); // tolua_export
|
void BroadcastRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data, const cClientHandle * a_Exclude = NULL); // tolua_export
|
void BroadcastScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode);
|
||||||
void BroadcastSpawnEntity (cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
void BroadcastScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode);
|
||||||
void BroadcastTeleportEntity (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
void BroadcastDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display);
|
||||||
void BroadcastThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ, const cClientHandle * a_Exclude = NULL);
|
void BroadcastSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude = NULL); // tolua_export
|
||||||
void BroadcastTimeUpdate (const cClientHandle * a_Exclude = NULL);
|
void BroadcastSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data, const cClientHandle * a_Exclude = NULL); // tolua_export
|
||||||
virtual void BroadcastUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
void BroadcastSpawnEntity (cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
||||||
void BroadcastWeather (eWeather a_Weather, const cClientHandle * a_Exclude = NULL);
|
void BroadcastTeleportEntity (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
|
||||||
|
void BroadcastThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ, const cClientHandle * a_Exclude = NULL);
|
||||||
|
void BroadcastTimeUpdate (const cClientHandle * a_Exclude = NULL);
|
||||||
|
virtual void BroadcastUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||||
|
void BroadcastWeather (eWeather a_Weather, const cClientHandle * a_Exclude = NULL);
|
||||||
|
|
||||||
virtual cBroadcastInterface & GetBroadcastManager(void) override
|
virtual cBroadcastInterface & GetBroadcastManager(void) override
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue