Revamp CNShared logic

* Use a specialized connection object
* Copy the Player object less frequently
* Use a randomly generated serial key for shard auth
* Refuse invalid shard connection attempts
* Clean up connection metadata when a Player joins the shard
* Prune abandoned connections when they time out
This commit is contained in:
2022-07-24 00:16:04 +02:00
parent c5dd745aa1
commit 741bfb675b
6 changed files with 78 additions and 48 deletions

View File

@@ -14,9 +14,7 @@
struct Player : public Entity {
int accountId = 0;
int accountLevel = 0; // permission level (see CN_ACCOUNT_LEVEL enums)
int64_t SerialKey = 0;
int32_t iID = 0;
uint64_t FEKey = 0;
int level = 0;
int HP = 0;