Added cClientHandle::SendPluginMessage().
It is not yet exported in the API, though.
This commit is contained in:
parent
bd17662412
commit
fe978f0d1e
@ -1978,6 +1978,15 @@ void cClientHandle::SendPlayerSpawn(const cPlayer & a_Player)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cClientHandle::SendPluginMessage(const AString & a_Channel, const AString & a_Message)
|
||||||
|
{
|
||||||
|
m_Protocol->SendPluginMessage(a_Channel, a_Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cClientHandle::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
|
void cClientHandle::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
|
||||||
{
|
{
|
||||||
m_Protocol->SendRemoveEntityEffect(a_Entity, a_EffectID);
|
m_Protocol->SendRemoveEntityEffect(a_Entity, a_EffectID);
|
||||||
|
@ -120,6 +120,7 @@ public:
|
|||||||
void SendPlayerMoveLook (void);
|
void SendPlayerMoveLook (void);
|
||||||
void SendPlayerPosition (void);
|
void SendPlayerPosition (void);
|
||||||
void SendPlayerSpawn (const cPlayer & a_Player);
|
void SendPlayerSpawn (const cPlayer & a_Player);
|
||||||
|
void SendPluginMessage (const AString & a_Channel, const AString & a_Message); // Exported in ManualBindings.cpp
|
||||||
void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID);
|
void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID);
|
||||||
void SendRespawn (void);
|
void SendRespawn (void);
|
||||||
void SendExperience (void);
|
void SendExperience (void);
|
||||||
|
@ -87,6 +87,7 @@ public:
|
|||||||
virtual void SendPlayerMoveLook (void) = 0;
|
virtual void SendPlayerMoveLook (void) = 0;
|
||||||
virtual void SendPlayerPosition (void) = 0;
|
virtual void SendPlayerPosition (void) = 0;
|
||||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) = 0;
|
virtual void SendPlayerSpawn (const cPlayer & a_Player) = 0;
|
||||||
|
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) = 0;
|
||||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) = 0;
|
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) = 0;
|
||||||
virtual void SendRespawn (void) = 0;
|
virtual void SendRespawn (void) = 0;
|
||||||
virtual void SendExperience (void) = 0;
|
virtual void SendExperience (void) = 0;
|
||||||
|
@ -704,6 +704,20 @@ void cProtocol125::SendPlayerSpawn(const cPlayer & a_Player)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol125::SendPluginMessage(const AString & a_Channel, const AString & a_Message)
|
||||||
|
{
|
||||||
|
cCSLock Lock(m_CSPacket);
|
||||||
|
WriteByte(PACKET_PLUGIN_MESSAGE);
|
||||||
|
WriteString(a_Channel);
|
||||||
|
WriteShort((short)a_Message.size());
|
||||||
|
SendData(a_Message.data(), a_Message.size());
|
||||||
|
Flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cProtocol125::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
|
void cProtocol125::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
|
||||||
{
|
{
|
||||||
cCSLock Lock(m_CSPacket);
|
cCSLock Lock(m_CSPacket);
|
||||||
|
@ -63,6 +63,7 @@ public:
|
|||||||
virtual void SendPlayerMoveLook (void) override;
|
virtual void SendPlayerMoveLook (void) override;
|
||||||
virtual void SendPlayerPosition (void) override;
|
virtual void SendPlayerPosition (void) override;
|
||||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
||||||
|
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
||||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
||||||
virtual void SendRespawn (void) override;
|
virtual void SendRespawn (void) override;
|
||||||
virtual void SendExperience (void) override;
|
virtual void SendExperience (void) override;
|
||||||
|
@ -628,6 +628,18 @@ void cProtocol172::SendPlayerSpawn(const cPlayer & a_Player)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocol172::SendPluginMessage(const AString & a_Channel, const AString & a_Message)
|
||||||
|
{
|
||||||
|
cPacketizer Pkt(*this, 0x17);
|
||||||
|
Pkt.WriteString(a_Channel);
|
||||||
|
Pkt.WriteShort((short)a_Message.size());
|
||||||
|
Pkt.WriteBuf(a_Message.data(), a_Message.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cProtocol172::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
|
void cProtocol172::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
|
||||||
{
|
{
|
||||||
cPacketizer Pkt(*this, 0x1E);
|
cPacketizer Pkt(*this, 0x1E);
|
||||||
|
@ -86,6 +86,7 @@ public:
|
|||||||
virtual void SendPlayerMoveLook (void) override;
|
virtual void SendPlayerMoveLook (void) override;
|
||||||
virtual void SendPlayerPosition (void) override;
|
virtual void SendPlayerPosition (void) override;
|
||||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
||||||
|
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
||||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
||||||
virtual void SendRespawn (void) override;
|
virtual void SendRespawn (void) override;
|
||||||
virtual void SendSoundEffect (const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch) override; // a_Src coords are Block * 8
|
virtual void SendSoundEffect (const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch) override; // a_Src coords are Block * 8
|
||||||
|
@ -476,6 +476,16 @@ void cProtocolRecognizer::SendPlayerSpawn(const cPlayer & a_Player)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cProtocolRecognizer::SendPluginMessage(const AString & a_Channel, const AString & a_Message)
|
||||||
|
{
|
||||||
|
ASSERT(m_Protocol != NULL);
|
||||||
|
m_Protocol->SendPluginMessage(a_Channel, a_Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cProtocolRecognizer::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
|
void cProtocolRecognizer::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID)
|
||||||
{
|
{
|
||||||
ASSERT(m_Protocol != NULL);
|
ASSERT(m_Protocol != NULL);
|
||||||
|
@ -98,6 +98,7 @@ public:
|
|||||||
virtual void SendPlayerMoveLook (void) override;
|
virtual void SendPlayerMoveLook (void) override;
|
||||||
virtual void SendPlayerPosition (void) override;
|
virtual void SendPlayerPosition (void) override;
|
||||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
||||||
|
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
||||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
||||||
virtual void SendRespawn (void) override;
|
virtual void SendRespawn (void) override;
|
||||||
virtual void SendExperience (void) override;
|
virtual void SendExperience (void) override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user