mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
a62f6d63c6
* Moving and organizing Player code - Move code to CharacterComponent - Remove extraneous interfaces - Simplify some code greatly - Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.) - Update code to use CharacterComponent for sending to zone instead of Player*. * Moving and organizing Player code - Move code to CharacterComponent - Remove extraneous interfaces - Simplify some code greatly - Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.) - Update code to use CharacterComponent for sending to zone instead of Player*. - Remove static storage container (static containers can be destroyed before exit/terminate handler executes) * remove player cast * Remove extra includes * Add a player manager Used for the static Player functions. Further removes stuff from the Player class/file.
26 lines
457 B
C++
26 lines
457 B
C++
#ifndef __PLAYERMANAGER__H__
|
|
#define __PLAYERMANAGER__H__
|
|
|
|
#include "dCommonVars.h"
|
|
|
|
#include <string>
|
|
|
|
class Player;
|
|
struct SystemAddress;
|
|
|
|
namespace PlayerManager {
|
|
void AddPlayer(Player* player);
|
|
|
|
void RemovePlayer(Player* player);
|
|
|
|
Player* GetPlayer(const SystemAddress& sysAddr);
|
|
|
|
Player* GetPlayer(const std::string& name);
|
|
|
|
Player* GetPlayer(LWOOBJID playerID);
|
|
|
|
const std::vector<Player*>& GetAllPlayers();
|
|
};
|
|
|
|
#endif //!__PLAYERMANAGER__H__
|