How Clients Get Real-time Server Threat
Level 70 Server Sending Real-time Threat to Client
It is currently known that the 3.3.5 client receives detailed server threat data, but the 1.14.2 and 2.4.3 clients (i.e., level 60 and 70 servers) do not send threat data to the client.
This article explains how to enable a 2.4.3 server (currently only 2.4.3 is supported; level 60 support will be opened after the feature has been time-tested) to accurately send threat data down to the 2.5.3 client.
Currently only supports TBC servers, sending threat data to the 2.5.3 client
Heitu must be updated to at least version 1.10.9
Logical Overview
Prerequisites for this feature:
- First, the server must recognize the Heitu 2.5.3 client and know which 2.5.3 extended features the current Heitu version supports. The server does not need to send all data packets to the 2.5.3 client — older Heitu versions may not support this feature, and sending everything would waste server bandwidth.
- The server should also not send threat data to the 2.4.3 client, because the 2.4.3 client simply does not support this feature. Sending it would be wasteful.
- The implementation itself is the simplest part, as I will provide the complete code below.
Implementation Details
After successfully logging into the server using the Heitu 2.5.3 client, the server must first send an SMSG_HEITU_HELLO protocol. Upon receiving it, Heitu will attempt to send a CMSG_HEITU_HELLO protocol to the server. If the first byte of the protocol body is 1, it means the Heitu client supports the threat extension feature.
Below are the custom protocols involved:
V243opcode.CMSG_HEITU_HELLO=0x424
V243opcode.SMSG_HEITU_HELLO = 0x429
V243opcode.SMSG_HEITU_THREAT_CLEAR=0x425
V243opcode.SMSG_HEITU_THREAT_REMOVE=0x426
V243opcode.SMSG_HEITU_THREAT_UPDATE=0x427
V243opcode.SMSG_HEITU_HIGHEST_THREAT_UPDATE=0x428Code Details
For enthusiasts who may not be deeply familiar with coding, I have specifically forked the cmangos-tbc source code and implemented this feature on it. You can view my commit details to easily pull the code.
Project address:
https://github.com/zyfei/mangos-tbc-heitu
If you have any questions, feel free to communicate with me through the Q&A community.