OpenFusion/src/PlayerManager.hpp
dongresource e9bc2fe561 [refactor] Remove the word 'Manager' from most source files/namespaces
ChatManager -> Chat
MissionManager -> Missions
NanoManager -> Nanos
TransportManager -> Transport
ChunkManager -> Chunking
BuddyManager -> Buddies
GroupManager -> Groups
RacingManager -> Racing
ItemManager -> Items

NPCManager and PlayerManager remain.

Note: You can use git log --follow src/file.cpp to trace the history of
a file from before it was renamed.
2021-03-17 20:16:43 +01:00

38 lines
1.1 KiB
C++

#pragma once
#include "Player.hpp"
#include "CNProtocol.hpp"
#include "CNStructs.hpp"
#include "CNShardServer.hpp"
#include "Chunking.hpp"
#include <utility>
#include <map>
#include <list>
struct WarpLocation;
namespace PlayerManager {
extern std::map<CNSocket*, Player*> players;
void init();
void removePlayer(CNSocket* key);
void updatePlayerPosition(CNSocket* sock, int X, int Y, int Z, uint64_t I, int angle);
void sendPlayerTo(CNSocket* sock, int X, int Y, int Z, uint64_t I);
void sendPlayerTo(CNSocket* sock, int X, int Y, int Z);
void sendToViewable(CNSocket* sock, void* buf, uint32_t type, size_t size);
Player *getPlayer(CNSocket* key);
std::string getPlayerName(Player *plr, bool id=true);
bool isAccountInUse(int accountId);
void exitDuplicate(int accountId);
Player *getPlayerFromID(int32_t iID);
CNSocket *getSockFromID(int32_t iID);
CNSocket *getSockFromName(std::string firstname, std::string lastname);
CNSocket *getSockFromAny(int by, int id, int uid, std::string firstname, std::string lastname);
}