public override void Process(CmdTrigger <RealmServerCmdArgs> trigger) { var occurence = trigger.Text.NextTimeSpan(); var id = trigger.Text.NextUInt(); var worldEvent = WorldEventMgr.GetEvent(id); if (worldEvent == null) { trigger.Reply("Invalid World Event {0} specified", id); return; } if (occurence == null) { trigger.Reply("Invalid Occurence specified {0}", EnglishParamInfo); return; } if (occurence < worldEvent.Duration) { trigger.Reply("Invalid Occurence {0} specified, must be greater than the duration {1}", occurence, worldEvent.Duration); return; } worldEvent.Occurence = (TimeSpan)occurence; WorldEvent.CalculateEventDelays(worldEvent); }
public override void Process(CmdTrigger <RealmServerCmdArgs> trigger) { var duration = trigger.Text.NextTimeSpan(); var id = trigger.Text.NextUInt(); var worldEvent = WorldEventMgr.GetEvent(id); if (worldEvent == null) { trigger.Reply("Invalid World Event {0} specified", id); return; } if (duration == null) { trigger.Reply("Invalid Duration specified {0}", EnglishParamInfo); return; } if (duration > worldEvent.Occurence) { trigger.Reply("Invalid Duration {0} specified, must be less than the occurence {1}", duration, worldEvent.Occurence); return; } worldEvent.Duration = (TimeSpan)duration; WorldEvent.CalculateEventDelays(worldEvent); }
public override void Process(CmdTrigger <RealmServerCmdArgs> trigger) { var id = trigger.Text.NextUInt(); var worldEvent = WorldEventMgr.GetEvent(id); if (worldEvent == null) { trigger.Reply("Invalid World Event {0} specified", id); if (id == 0) { trigger.Reply("Usage:" + EnglishParamInfo); } return; } WorldEvent.CalculateEventDelays(worldEvent); }