Election System
From WoWIIIDev
Contents |
Requirements
Electable positions list to be read from config table
Anyone inside a country has one vote for each electable position
Tick engine will change the minister positions during every election period
Capital city to have extra options to choose who will have the non-electable positions.
Tick Engine task required to handle the actual electing-de-electing of users, should be forced to run every tick if there is no one elected (until someone is elected)
API Functions
get me a list of all the minister positions and who they are (in my country)
change my vote for minister id X
make this person minister id (with priv check to make sure they are allowed to select ministers if the position is non-electable)
change continent settings (with priv check to make sure they are allowed to change settings)
post message from minister X ((with priv check)
Tick Engine Functions
re-elect the electable ministers after the election period
API Methods
| Method Name | Returns | Params | Description | Done |
|---|---|---|---|---|
| getMinisterPosistions | List<Minister> | Get a list of all the minister positions | Yes | |
| getMinisterPosistionsByCountry | List<Minister> | long pCountryID | Get a list of all the minister positions and who holds the position within the given country | Yes |
| castVote | void | String pUserCode, long pVoteForID, String pVoteForUsername | Changes the vote from whatever it might be to the new username | Yes |
| !!PROTECTED!! userHasGamePriv | boolean | String pUsercode, String pPriv | Checks to see if the user has the pPriv granted by being a minister with the provides priv | Yes |
| checkUserIsMinister | void | String pUserCode, long pMinisterID | Checks whether the specified user is the specified minister. | Yes |
| postMinisterMessage | void | String pUserCode, String pMessage | Changes a ministers leader message (they must be a minister) | Yes |
| updateCountrySettings | void | String pUserCode, String pCountryName, String pCountryMotd, boolean pCountryPrivateFlag, String pCountryPassword | Changes the country settings (ie flag, name), they must have the appropriate game priv to be able to call this | Yes |
