Manual merge (Fixed conflicts)
This commit is contained in:
@@ -32,6 +32,8 @@ Documentation:
|
||||
|
||||
#include "../Mobs/IncludeAllMonsters.h"
|
||||
|
||||
#include "../CompositeChat.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -234,6 +236,42 @@ void cProtocol125::SendChat(const AString & a_Message)
|
||||
|
||||
|
||||
|
||||
void cProtocol125::SendChat(const cCompositeChat & a_Message)
|
||||
{
|
||||
// This version doesn't support composite messages, just extract each part's text and use it:
|
||||
AString Msg;
|
||||
const cCompositeChat::cParts & Parts = a_Message.GetParts();
|
||||
for (cCompositeChat::cParts::const_iterator itr = Parts.begin(), end = Parts.end(); itr != end; ++itr)
|
||||
{
|
||||
switch ((*itr)->m_PartType)
|
||||
{
|
||||
case cCompositeChat::ptText:
|
||||
case cCompositeChat::ptClientTranslated:
|
||||
case cCompositeChat::ptRunCommand:
|
||||
case cCompositeChat::ptSuggestCommand:
|
||||
{
|
||||
Msg.append((*itr)->m_Text);
|
||||
break;
|
||||
}
|
||||
case cCompositeChat::ptUrl:
|
||||
{
|
||||
Msg.append(((cCompositeChat::cUrlPart *)(*itr))->m_Url);
|
||||
break;
|
||||
}
|
||||
} // switch (PartType)
|
||||
} // for itr - Parts[]
|
||||
|
||||
// Send the message:
|
||||
cCSLock Lock(m_CSPacket);
|
||||
WriteByte (PACKET_CHAT);
|
||||
WriteString(Msg);
|
||||
Flush();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cProtocol125::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer)
|
||||
{
|
||||
cCSLock Lock(m_CSPacket);
|
||||
|
||||
Reference in New Issue
Block a user