• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ Is this a valid call in ProtocalGame?

Status
Not open for further replies.

Digital

Learning C++
Joined
Jul 15, 2018
Messages
57
Solutions
1
Reaction score
12
TFS 1.3
I want to detect the operating system a player is using but I also would like to detect the client. I'll assume that this is correct but how would I detect the client type (Official or Otclient)?
C++:
    if(player->getOperatingSystem() == CLIENTOS_WINDOWS){
        return;
    }
 
enums.h
C++:
enum OperatingSystem_t : uint8_t {
    CLIENTOS_NONE = 0,

    CLIENTOS_LINUX = 1,
    CLIENTOS_WINDOWS = 2,
    CLIENTOS_FLASH = 3,

    CLIENTOS_OTCLIENT_LINUX = 10,
    CLIENTOS_OTCLIENT_WINDOWS = 11,
    CLIENTOS_OTCLIENT_MAC = 12,
};
 
enums.h
C++:
enum OperatingSystem_t : uint8_t {
    CLIENTOS_NONE = 0,

    CLIENTOS_LINUX = 1,
    CLIENTOS_WINDOWS = 2,
    CLIENTOS_FLASH = 3,

    CLIENTOS_OTCLIENT_LINUX = 10,
    CLIENTOS_OTCLIENT_WINDOWS = 11,
    CLIENTOS_OTCLIENT_MAC = 12,
};
I've been there that is where I got CLIENTOS_WINDOWS my question is how can i differentiate between the the official client and otclient?
 
I've been there that is where I got CLIENTOS_WINDOWS my question is how can i differentiate between the the official client and otclient?
@topic Feel free to correct me if I'm wrong.

These values are set by default on Tibia client, as the client itself it's not open source we are not able to change them so they are defined by CipSoft and we are unable to change them.
Code:
CLIENTOS_LINUX, CLIENTOS_WINDOWS, CLIENTOS_FLASH

In the other hand, values for OTClient can be changed as it's open source and we can modify the way we read packets OTClient sends to TFS something that you are unable to do in CipClient.
Code:
CLIENTOS_OTCLIENT_LINUX,  CLIENTOS_OTCLIENT_WINDOWS, CLIENTOS_OTCLIENT_MAC
 
Last edited:
Status
Not open for further replies.
Back
Top