Dawn of Light - Class documentation 2900
This is the Dawn of Light project
DOL.GS.GameTimer Class Reference

The GameTimer class invokes OnTick() method after certain intervals which are defined in milliseconds. More...

Inheritance diagram for DOL.GS.GameTimer:
DOL.GS.BaseInstance.AutoCloseRegionTimer DOL.GS.BaseInstance.DelayCloseRegionTimer DOL.GS.Effects.GameSpellEffect.PulsingEffectTimer DOL.GS.GameDragon.DespawnTimer DOL.GS.RealmAbilities.PurgeAbility.PurgeTimer DOL.GS.RegionAction DOL.GS.RegionTimer DOL.GS.Spells.SpellHandler.DelayedCastTimer

List of all members.

Classes

class  TimeManager
 This class manages all the GameTimers. It is started from within the GameServer.Start() method and stopped from within the GameServer.Stop() method. It runs an own thread when it is started, that cylces through all GameTimers and executes them at the right moment. More...

Public Member Functions

 GameTimer (TimeManager time)
 Constructs a new GameTimer.
override string ToString ()
 Returns short information about the timer.
virtual void Start (int initialDelay)
 Starts the timer with defined initial delay.
virtual void Stop ()
 Stops the timer.

Static Public Member Functions

static long GetTickCount ()
 Get the tick count, this is needed because Environment.TickCount resets to 0 when server has been up 48 days because it returned an int, this is a long.

Static Public Attributes

static readonly long TIMER_DISABLED = long.MinValue
 Flags the timer as disabled.
static readonly long TIMER_RESCHEDULED = 0x40000000
 Flags the current tick timers as rescheduled.

Protected Member Functions

abstract void OnTick ()
 Called on every timer tick.

Properties

int TimeUntilElapsed [get]
 Gets the time left until this timer fires, in milliseconds.
virtual int Interval [get, set]
 Gets or sets the timer intervals in milliseconds.
long MaxInterval [get]
 Gets the maximal allowed interval.
bool IsAlive [get]
 Checks whether this timer is disabled.

Detailed Description

The GameTimer class invokes OnTick() method after certain intervals which are defined in milliseconds.


Constructor & Destructor Documentation

DOL.GS.GameTimer.GameTimer ( TimeManager  time)

Constructs a new GameTimer.

Parameters:
timeThe time manager for this timer

Member Function Documentation

static long DOL.GS.GameTimer.GetTickCount ( ) [static]

Get the tick count, this is needed because Environment.TickCount resets to 0 when server has been up 48 days because it returned an int, this is a long.

Returns:
abstract void DOL.GS.GameTimer.OnTick ( ) [protected, pure virtual]

Called on every timer tick.

Implemented in DOL.GS.Effects.GameSpellEffect.PulsingEffectTimer, DOL.GS.GameBoatStableMaster.MountHorseAction, DOL.GS.GameBoatStableMaster.HorseRideAction, DOL.GS.GameStableMaster.MountHorseAction, DOL.GS.GameStableMaster.HorseRideAction, DOL.GS.GameDragon.DespawnTimer, DOL.GS.GameDoor.CloseDoorAction, DOL.GS.GameLiving.AttackAction, DOL.GS.GameLiving.WeaponOnTargetAction, DOL.GS.GameNPC.RestoreHeadingAction, DOL.GS.GameNPC.ArriveAtTargetAction, DOL.GS.GameNPC.WaypointDelayAction, DOL.GS.GameNPC.SpellAction, DOL.GS.GamePlayer.PrayAction, DOL.GS.GamePlayer.UncoverStealthAction, DOL.GS.GamePlayer.InvulnerabilityTimer, DOL.GS.SiegeTimer, DOL.GS.GameStaticItemTimed.RemoveItemAction, DOL.GS.RegionTimer, DOL.GS.Keeps.HookpointTimer, DOL.GS.PacketHandler.Client.v168.CheckLOSResponseHandler.HandleCheckAction, DOL.GS.PacketHandler.Client.v168.DialogResponseHandler.DialogBoxResponseAction, DOL.GS.PacketHandler.Client.v168.DisbandFromGroupHandler.PlayerDisbandAction, DOL.GS.PacketHandler.Client.v168.DoorRequestHandler.ChangeDoorAction, DOL.GS.PacketHandler.Client.v168.InviteToGroupHandler.HandleGroupInviteAction, DOL.GS.PacketHandler.Client.v168.ObjectInteractRequestHandler.InteractActionHandler, DOL.GS.PacketHandler.Client.v168.PetWindowHandler.HandlePetCommandAction, DOL.GS.PacketHandler.Client.v168.PlayerAppraiseItemRequestHandler.AppraiseActionHandler, DOL.GS.PacketHandler.Client.v168.PlayerAttackRequestHandler.AttackRequestHandler, DOL.GS.PacketHandler.Client.v168.PlayerCancelsEffectHandler.CancelEffectHandler, DOL.GS.PacketHandler.Client.v168.PlayerDismountRequestHandler.DismountRequestHandler, DOL.GS.PacketHandler.Client.v168.PlayerGroundTargetHandler.ChangeGroundTargetHandler, DOL.GS.PacketHandler.Client.v168.PlayerInitRequestHandler.PlayerInitRequestAction, DOL.GS.PacketHandler.Client.v168.PlayerSitRequestHandler.SitRequestHandler, DOL.GS.PacketHandler.Client.v168.PlayerTargetHandler.ChangeTargetAction, DOL.GS.PacketHandler.Client.v168.QuestRewardChosenHandler.QuestRewardChosenAction, DOL.GS.PacketHandler.Client.v168.PlayerRegionChangeRequestHandler.RegionChangeRequestHandler, DOL.GS.PacketHandler.Client.v168.RemoveConcentrationEffectHandler.CancelEffectHandler, DOL.GS.PacketHandler.Client.v168.UseSkillHandler.UseSkillAction, DOL.GS.PacketHandler.Client.v168.UseSlotHandler.UseSlotAction, DOL.GS.PacketHandler.Client.v168.UseSpellHandler.UseSpellAction, DOL.GS.PacketHandler.Client.v168.WorldInitRequestHandler.WorldInitAction, DOL.GS.RealmAbilities.PurgeAbility.PurgeTimer, DOL.GS.Spells.ArrowSpellHandler.ArrowOnTargetAction, DOL.GS.Spells.StarsProc.BoltOnTargetAction, DOL.GS.Spells.BoltSpellHandler.BoltOnTargetAction, DOL.GS.Spells.BuffCheckAction, DOL.GS.Spells.SpellHandler.DelayedCastTimer, DOL.GS.Spells.VampiirBoltSpellHandler.BoltOnTargetAction, DOL.GS.BaseInstance.AutoCloseRegionTimer, and DOL.GS.BaseInstance.DelayCloseRegionTimer.

virtual void DOL.GS.GameTimer.Start ( int  initialDelay) [virtual]

Starts the timer with defined initial delay.

Parameters:
initialDelayThe initial timer delay. Must be more than 0 and less than MaxInterval

Reimplemented in DOL.GS.Effects.GameSpellEffect.PulsingEffectTimer.

virtual void DOL.GS.GameTimer.Stop ( ) [virtual]

Stops the timer.

override string DOL.GS.GameTimer.ToString ( )

Returns short information about the timer.

Returns:
Short info about the timer

Reimplemented in DOL.GS.Effects.GameSpellEffect.PulsingEffectTimer, DOL.GS.RegionAction, DOL.GS.RegionTimer, and DOL.GS.Spells.SpellHandler.DelayedCastTimer.


Member Data Documentation

readonly long DOL.GS.GameTimer.TIMER_DISABLED = long.MinValue [static]

Flags the timer as disabled.

readonly long DOL.GS.GameTimer.TIMER_RESCHEDULED = 0x40000000 [static]

Flags the current tick timers as rescheduled.


Property Documentation

virtual int DOL.GS.GameTimer.Interval [get, set]

Gets or sets the timer intervals in milliseconds.

bool DOL.GS.GameTimer.IsAlive [get]

Checks whether this timer is disabled.

long DOL.GS.GameTimer.MaxInterval [get]

Gets the maximal allowed interval.

int DOL.GS.GameTimer.TimeUntilElapsed [get]

Gets the time left until this timer fires, in milliseconds.


The documentation for this class was generated from the following file:
All Classes Namespaces Functions Variables Enumerations Properties Events