diff options
Diffstat (limited to 'protocols/Xfire/src/clientversionpacket.cpp')
-rw-r--r-- | protocols/Xfire/src/clientversionpacket.cpp | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/protocols/Xfire/src/clientversionpacket.cpp b/protocols/Xfire/src/clientversionpacket.cpp index 3150eac746..84f2c8788f 100644 --- a/protocols/Xfire/src/clientversionpacket.cpp +++ b/protocols/Xfire/src/clientversionpacket.cpp @@ -25,28 +25,30 @@ #include "xfireutils.h" #include <string.h> -namespace xfirelib { +namespace xfirelib +{ + int ClientVersionPacket::getPacketContent(char *packet) + { + int index = 0; - int ClientVersionPacket::getPacketContent(char *packet) { - int index = 0; - - index = XFireUtils::addAttributName(packet,index, "version");/*add xfire version*/ - packet[index] = 0x02; - packet[index+1] = (char) version;//protocol version - packet[index+2] = 0x00; - packet[index+3] = 0x00; - packet[index+4] = 0x00; - index += 5; - length = index; - return index; - } + index = XFireUtils::addAttributName(packet, index, "version");/*add xfire version*/ + packet[index] = 0x02; + packet[index + 1] = (char)version;//protocol version + packet[index + 2] = 0x00; + packet[index + 3] = 0x00; + packet[index + 4] = 0x00; + index += 5; + length = index; + return index; + } - int ClientVersionPacket::getPacketAttributeCount() { - return 1; - } - - void ClientVersionPacket::setProtocolVersion(int newVersion){ - version = newVersion; - } + int ClientVersionPacket::getPacketAttributeCount() + { + return 1; + } + void ClientVersionPacket::setProtocolVersion(int newVersion) + { + version = newVersion; + } } |