gagmanager has a task that equals jailmanager
but is coded in a totally different way
Logged In: YES
I would go further with the refactoring. We have certain actions, that last some time for a player. Those actions all have common, that they start at some particular time and end some time later. Both at start and beginning there is something special to do, what only the specific action can decide. But the handling of the term, which the effect of an action (gag, jail, antidote, maybe healing of food, (if magic is implemented) effects of spells lasting for some time. So in my opinion there has to be some managerthingy, which manages starting and begin of such events. The events only have to provide their behaviour for start and end.
You seem to have CSS turned off.
Please don't fill out this field.
Logged In: YES
Another difference is the way such things are made persistent for server restart and logout.
Jail uses zone-storage.
Gags are reset on server restart and time out normally even if logged out.
Food and Poison is inactive while logged out and removed on login.
Putting food/poison into zone-storage does not seem to be a good idea because of the huge amount of players in database compared to the small amount of players which are actually in game.
This is related to TurnNotifier.
Another difference is the way such things are supposed to stack if activated multiple times.
Bug-Report: Poison, food, antidote is removed on logout
Please see also https://sourceforge.net/tracker/index.php?func=detail&aid=1745799&group_id=1111&atid=351111
Sign up for the SourceForge newsletter: