Planeshift
Public Member Functions

ServerSongManager Class Reference

This class takes care of played songs and players' ranking for musical instruments skills. More...

#include <serversongmngr.h>

List of all members.

Public Member Functions

void HandlePlaySongMessage (MsgEntry *me, Client *client)
 Handles a play song request.
void HandleStopSongMessage (MsgEntry *me, Client *client)
 Handles a stop song request.
bool Initialize ()
void OnStopSong (gemActor *charActor, bool isEnded)
 Stop the song and (contrary to StopSong) update the player's mode.
 ServerSongManager ()
 Constructor.
void StopSong (gemActor *charActor, bool skillRanking)
 Takes care of the skill ranking and of sending the stop song message to the player's proximity list.
 ~ServerSongManager ()
 Destructor.

Detailed Description

This class takes care of played songs and players' ranking for musical instruments skills.

Definition at line 80 of file serversongmngr.h.


Constructor & Destructor Documentation

ServerSongManager::ServerSongManager ( )

Constructor.

ServerSongManager::~ServerSongManager ( )

Destructor.


Member Function Documentation

void ServerSongManager::HandlePlaySongMessage ( MsgEntry me,
Client client 
)

Handles a play song request.

Parameters:
methe message from the client.
clientthe sender.
void ServerSongManager::HandleStopSongMessage ( MsgEntry me,
Client client 
)

Handles a stop song request.

Parameters:
methe message from the client.
clientthe sender.
bool ServerSongManager::Initialize ( )
void ServerSongManager::OnStopSong ( gemActor charActor,
bool  isEnded 
)

Stop the song and (contrary to StopSong) update the player's mode.

This is the function called when the player stop manually the song or when it ends.

Parameters:
charActorthe gemActor of the player.
isEndedtrue if the song has is ended, false otherwise.
void ServerSongManager::StopSong ( gemActor charActor,
bool  skillRanking 
)

Takes care of the skill ranking and of sending the stop song message to the player's proximity list.

Parameters:
charActorthe player that has just stopped to play his instrument.
skillRankingtrue to make the player gain practice points, false otherwise.
Note:
This function is called by a gemActor when it exits from the PLAY mode thus StopSong does not take care of updating the player's status.

The documentation for this class was generated from the following file: