#52 refactor gagmanager

open
nobody
None
5
2008-04-14
2008-04-14
No

gagmanager has a task that equals jailmanager
but is coded in a totally different way

Discussion

  • Markus

    Markus - 2008-08-08

    Logged In: YES
    user_id=1264420
    Originator: NO

    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.

     
  • Hendrik Brummermann

    Logged In: YES
    user_id=990499
    Originator: NO

    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
    http://sourceforge.net/tracker/index.php?func=detail&aid=1406506&group_id=1111&atid=101111

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks