[refactor] Move files to core/ and servers/ subdirectories

CNProtocol, CNShared, CNStructs and Defines are now in core/.
CNLoginServer, CNShardServer and Monitor are now in servers/.

core/Core.hpp wraps all the core headers except for CNShared.hpp.

Defines.cpp has been renamed to Packets.cpp, and so has its
corresponding namespace, but not the header file. This is in preparation
for upcoming changes.
This commit is contained in:
2021-03-17 20:07:40 +01:00
parent e9bc2fe561
commit a55a34e09a
47 changed files with 89 additions and 96 deletions

20
src/core/CNShared.hpp Normal file
View File

@@ -0,0 +1,20 @@
/*
* core/CNShared.hpp
* There's some data shared between the Login Server and the Shard Server. Of course all of this needs to be thread-safe. No mucking about on this one!
*/
#pragma once
#include <map>
#include <string>
#include "Player.hpp"
namespace CNSharedData {
// serialkey corresponds to player data
extern std::map<int64_t, Player> players;
void setPlayer(int64_t sk, Player& plr);
Player getPlayer(int64_t sk);
void erasePlayer(int64_t sk);
}