mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-04 22:40:05 +00:00
65 lines
2.4 KiB
C++
65 lines
2.4 KiB
C++
#pragma once
|
|
|
|
#include "Player.hpp"
|
|
#include "CNProtocol.hpp"
|
|
#include "CNStructs.hpp"
|
|
#include "CNShardServer.hpp"
|
|
#include "ChunkManager.hpp"
|
|
|
|
#include <utility>
|
|
#include <map>
|
|
#include <list>
|
|
|
|
struct WarpLocation;
|
|
|
|
namespace PlayerManager {
|
|
extern std::map<CNSocket*, Player*> players;
|
|
void init();
|
|
|
|
void addPlayer(CNSocket* key, Player plr);
|
|
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);
|
|
|
|
void enterPlayer(CNSocket* sock, CNPacketData* data);
|
|
void loadPlayer(CNSocket* sock, CNPacketData* data);
|
|
void movePlayer(CNSocket* sock, CNPacketData* data);
|
|
void stopPlayer(CNSocket* sock, CNPacketData* data);
|
|
void jumpPlayer(CNSocket* sock, CNPacketData* data);
|
|
void jumppadPlayer(CNSocket* sock, CNPacketData* data);
|
|
void launchPlayer(CNSocket* sock, CNPacketData* data);
|
|
void ziplinePlayer(CNSocket* sock, CNPacketData* data);
|
|
void movePlatformPlayer(CNSocket* sock, CNPacketData* data);
|
|
void moveSliderPlayer(CNSocket* sock, CNPacketData* data);
|
|
void moveSlopePlayer(CNSocket* sock, CNPacketData* data);
|
|
void gotoPlayer(CNSocket* sock, CNPacketData* data);
|
|
void setSpecialPlayer(CNSocket* sock, CNPacketData* data);
|
|
void heartbeatPlayer(CNSocket* sock, CNPacketData* data);
|
|
void revivePlayer(CNSocket* sock, CNPacketData* data);
|
|
void exitGame(CNSocket* sock, CNPacketData* data);
|
|
|
|
void setSpecialSwitchPlayer(CNSocket* sock, CNPacketData* data);
|
|
void setGMSpecialSwitchPlayer(CNSocket* sock, CNPacketData* data);
|
|
void changePlayerGuide(CNSocket *sock, CNPacketData *data);
|
|
|
|
void enterPlayerVehicle(CNSocket* sock, CNPacketData* data);
|
|
void exitPlayerVehicle(CNSocket* sock, CNPacketData* data);
|
|
|
|
void setFirstUseFlag(CNSocket* sock, CNPacketData* data);
|
|
|
|
Player *getPlayer(CNSocket* key);
|
|
std::string getPlayerName(Player *plr, bool id=true);
|
|
WarpLocation* getRespawnPoint(Player *plr);
|
|
|
|
bool isAccountInUse(int accountId);
|
|
void exitDuplicate(int accountId);
|
|
void setSpecialState(CNSocket* sock, CNPacketData* data);
|
|
Player *getPlayerFromID(int32_t iID);
|
|
CNSocket *getSockFromID(int32_t iID);
|
|
}
|