20 #ifndef __PSSERVER_H__ 21 #define __PSSERVER_H__ 27 #include <csutil/ref.h> 28 #include <csutil/randomgen.h> 29 #include <csutil/csstring.h> 41 struct iObjectRegistry;
42 struct iConfigManager;
180 bool LoadMap(
const char* mapname);
217 void RemovePlayer(uint32_t clientnum,
const char* reason);
228 void MutePlayer(uint32_t clientnum,
const char* reason);
233 void UnmutePlayer(uint32_t clientnum,
const char* reason);
240 return (
const char*)
motd.GetData();
596 return (pos - range +
GetRandom()*range*2);
606 return rng->Get(limit);
692 void UpdateDialog(
const char* area,
const char* trigger,
693 const char* response,
int num);
707 void UpdateDialog(
const char* area,
const char* trigger,
708 const char* prohim,
const char* proher,
709 const char* it,
const char* them);
IntroductionManager * intromanager
CombatManager * combatmanager
TutorialManager * tutorialmanager
WorkManager * GetWorkManager()
Returns the work manager.
This class controls loading and saving Characters and Character specific data to and from an iDatabas...
WorkManager * workmanager
Manages CEL entities on the server.
iResultSet * GetAllTriggersInArea(csString data)
Gets all the triggers from a particular knowledge area.
Manager class that handles loading/searching/casting spells.
csRef< EventManager > eventmanager
bool Initialize(iObjectRegistry *objreg)
Initialize the server.
bool CheckAccess(Client *client, const char *command, bool returnError=true)
Check if a client is authorized to execute a command.
bool GetServerOption(const char *option_name, csString &value)
Check for options in table 'server_options'.
HireManager * hiremanager
AdminManager * GetAdminManager()
Returns the Administration Manager.
SpawnManager * spawnmanager
NetManager * GetNetManager()
Returns the server's network thread.
ProgressionManager * GetProgressionManager()
Returns the Progression Manager.
CombatManager * GetCombatManager()
Returns the Combat Manager.
Used to manage incoming user commands from a client.
psServer()
Default constructor.
void SendSystemError(int clientnum, const char *fmt,...)
Convenience command to send a client an error psSystemMessage.
SpellManager * GetSpellManager()
Returns the spell manager.
SpellManager * spellmanager
BankManager * bankmanager
static psCharacterLoader CharacterLoader
This manager catches events posted by the rest of the server and decides whether each client needs to...
csRef< GroupManager > groupmanager
bool LoadMap(const char *mapname)
Loads a map and changes the MapLoaded.
CacheManager * cachemanager
MiniGameManager * GetMiniGameManager()
Returns the minigame manager.
BankManager * GetBankManager()
Returns the Bank Manager.
ProgressionManager * progression
UserManager * usermanager
void MutePlayer(uint32_t clientnum, const char *reason)
Mutes a player from the world.
This class generates logs at a particular interval that has information that can be displayed later o...
AdminManager * adminmanager
void RemovePlayer(uint32_t clientnum, const char *reason)
Removes a player from the world.
Main PlayerGroup Manager that holds all the groups.
uint32_t unused_pid
Unused PID.
csRef< AuthenticationServer > authserver
iObjectRegistry * GetObjectReg()
Returns the object registry.
AdviceManager * GetAdviceManager()
Returns the Advice manager.
ServerConsole * serverconsole
void QuitServer(int time, Client *client)
Quits the server and sends informative messages.
bool SetServerOption(const char *option_name, const csString &value)
Set an option in table 'server_options'.
Manages character details over the net.
bool HasBeenReady()
Checks to see if a world has loaded in the past.
QuestionManager keeps track of all the questions of any kind that are pending.
float GetRandom()
Returns a random number.
QuestManager * GetQuestManager()
Return the quest manager.
GuildManager * GetGuildManager()
Returns the guild manager.
csRef< QuestionManager > questionmanager
ExchangeManager * GetExchangeManager()
Returns the Exchange Manager.
bool AddBuddy(PID self, PID buddy)
Adds a buddy to this players list of buddies.
GameMaster Events manager class.
MiniGameManager * minigamemanager
AuthenticationServer * GetAuthServer()
Returns a pointer to the AuthenticationServer.
This class manages all marriage related stuff.
void SendSystemInfo(int clientnum, const char *fmt,...)
Convenience command to send a client a psSystemMessage.
Admin manager that handles GM commands and general game control.
EconomyManager * economymanager
csRef< ActionManager > actionmanager
psQuitEvent * server_quit_event
Used to keep track of the shut down event.
EventManager * GetEventManager()
Returns the event manager.
const char * GetMOTD()
Gets the MOTD string.
WeatherManager * GetWeatherManager()
Returns the Weather manager.
This class handles all calculations around combat, using statistics and information from the pspcchar...
void MainLoop()
Runs a script file to set up server and goes to the consoles main loop.
CacheManager * GetCacheManager()
Returns the Chace Manager.
bool RemoveBuddy(PID self, PID buddy)
Removes a buddy from this character's list of buddies.
iConfigManager * GetConfig()
Returns the configuration manager.
iResultSet * GetSuperclientNPCs(int superclientID)
Return a list of NPCs (with their info) managed by a particular superclient.
void SaveLogSettings()
Used to save the log settings.
csRef< GuildManager > guildmanager
IntroductionManager * GetIntroductionManager()
Returns the Introduction Manager.
SpawnManager * GetSpawnManager()
Returns the spawn manager.
void SetMOTD(const char *str)
Sets the MOTD string.
CharCreationManager * charCreationManager
MathScriptEngine * GetMathScriptEngine()
Returns the Math Scripting Engine.
ClientConnectionSet * GetConnections()
Gets a list of all connected clients.
ExchangeManager * exchangemanager
ServerCharManager * GetCharManager()
Returns the character manager.
psMarriageManager * GetMarriageManager()
Returns the Marriage Manager.
ServerCharManager * charmanager
This class collects data of a netclient.
QuestManager * questmanager
MathScriptEngine * mathscriptengine
void SendSystemBaseInfo(int clientnum, const char *fmt,...)
Similar to SendSystemInfo(), but the message is shown also on the "Main" tab.
psDatabase * GetDatabase()
Returns the database manager.
This class is implements the user input and output console for the server.
The Hire Manager will manage all aspects related to hiring of NPCs.
This class is the client's and server's main interface for either sending network messages out or get...
This class takes care of played songs and players' ranking for musical instruments skills...
Handles the map interaction system.
This is the network thread handling packets sending/receiving to/from network other threads can regis...
HireManager * GetHireManager()
Returns the Hire Manager.
Server manager for character creation.
bool IsMapLoaded()
Checks to see if a world is loaded.
psMarriageManager * marriageManager
This class manages the caching of data that is unchanging during server operation.
csRef< ChatManager > chatmanager
csRef< AdviceManager > advicemanager
TutorialManager * GetTutorialManager()
Returns the Tutorial Manager.
ActionManager * GetActionManager()
Returns the Advice manager.
void SendSystemOK(int clientnum, const char *fmt,...)
Convenience command to send a client a psSystemMessage with the MSG_OK type.
bool IsFull(size_t numclients, Client *client)
Checks if the server is full.
AdviceManager keeps track of all the invitations of any kind that are pending, using a collection of ...
This class handles generation of any and all weather events in the game, including rain...
void SendSystemResult(int clientnum, const char *fmt,...)
Convenience command to send a client a psSystemMessage with the MSG_RESULT type.
Handles minigame sessions.
ChatManager * GetChatManager()
Returns the Chat manager.
This class handles all calculations around work, using statistics and information from the pspccharac...
This class is a list of several CLient objects, it's designed for finding clients very fast based on ...
This holds all the formulas loaded from the MathScript table and provides a container for them...
csRef< iConfigManager > configmanager
This class handles quest management for the player, tracking who has what quests assigned, etc.
uint32 GetRandom(uint32 limit)
Returns a random number with a limit.
GMEventManager * GetGMEventManager()
Returns the GM Event Manager.
PID GetUnusedPID()
Return a unused PID for temporary usage.
iResultSet * GetAllResponses(csString &trigger)
void UnmutePlayer(uint32_t clientnum, const char *reason)
Unmutes player.
GMEventManager * gmeventManager
ServerSongManager * GetSongManager()
Returns the Song Manager.
void UpdateDialog(const char *area, const char *trigger, const char *response, int num)
Change the dialog responses for that trigger in the area.
WeatherManager * weathermanager
EconomyManager * GetEconomyManager()
Returns the economy manager.
This class handles all queueing and invoking of timed events, such as combat, spells, NPC dialog responses, range weapons, or NPC respawning.
EntityManager * entitymanager
float GetRandomRange(const float pos, const float range)
Returns a random position within a range.
ServerSongManager * songManager
UserManager * GetUserManager()
Returns the User Manager.
NPCManager * GetNPCManager()
Returns the NPC Superclient manager.
This class is periodically called by the engine to ensure that monsters (and other NPCs) are respawne...
bool IsReady()
Checks to see if a world is loaded ready to go.
void LoadLogSettings()
Used to load the log settings.