private static void EventConfig(ServerInfoDto xml) { GlobalEventsManager = new GlobalEvents(); GoldenInvasionManager = new GoldenInvasion(); foreach (var e in xml.Events) { var ev = new GlobalEvent(GlobalEventsManager) { Active = e.active, Rate = e.rate }; foreach (var c in e.Conditions) { ev.AddRange(new Item((ItemNumber)c.item, Options: new { Plus = c.itemLevel }), c.mobMinLevel, c.mobMaxLevel, c.map); } GlobalEventsManager.AddEvent(e.name, ev); } /*GlobalEventsManager * .AddEvent( * "BoxOfRibbon", * new GlobalEvent(GlobalEventsManager) * { Active = xml.BoxOfRibbon.active, Rate = xml.BoxOfRibbon.rate } * .AddRange(new Item(6176), 12, 49) * .AddRange(new Item(6177), 50, 69) * .AddRange(new Item(6178), 70, 1000) * ) * .AddEvent( * "Medals", * new GlobalEvent(GlobalEventsManager) * { Active = xml.Medals.active, Rate = xml.Medals.rate } * .AddRange(new Item(7179, Options: new { Plus = (byte)5 }), 0, 1000, Maps.Dugeon) * .AddRange(new Item(7179, Options: new { Plus = (byte)5 }), 0, 1000, Maps.Davias) * .AddRange(new Item(7179, Options: new { Plus = (byte)6 }), 0, 1000, Maps.LostTower) * .AddRange(new Item(7179, Options: new { Plus = (byte)6 }), 0, 1000, Maps.Atlans) * .AddRange(new Item(7179, Options: new { Plus = (byte)6 }), 0, 1000, Maps.Tarkan) * ) * .AddEvent( * "HeartOfLove", * new GlobalEvent(GlobalEventsManager) * { Active = xml.HeartOfLove.active, Rate = xml.HeartOfLove.rate } * .AddRange(new Item(7179, Options: new { Plus = (byte)3 }), 15, 1000) * ) * .AddEvent( * "FireCracker", * new GlobalEvent(GlobalEventsManager) * { Active = xml.FireCracker.active, Rate = xml.FireCracker.rate } * .AddRange(new Item(7179, Options: new { Plus = (byte)2 }), 17, 1000) * ) * .AddEvent( * "EventChip", * new GlobalEvent(GlobalEventsManager) * { Active = xml.EventChip.active, Rate = xml.EventChip.rate } * .AddRange(new Item(7179, Options: new { Plus = (byte)7 }), 0, 1000) * ) * .AddEvent( * "Heart", * new GlobalEvent(GlobalEventsManager) * { Active = xml.Heart.active, Rate = xml.Heart.rate } * .AddRange(new Item(7180, Options: new { Plus = (byte)1 }), 0, 1000) * ) * .AddEvent( * "StarOfXMas", * new GlobalEvent(GlobalEventsManager) * { Active = xml.StarOfXMas.active, Rate = xml.StarOfXMas.rate } * .AddRange(new Item(7179, Options: new { Plus = (byte)1 }), 0, 1000, Maps.Davias) * .AddRange(new Item(7179, Options: new { Plus = (byte)1 }), 0, 1000, Maps.Raklion) * .AddRange(new Item(7179, Options: new { Plus = (byte)1 }), 0, 1000, Maps.Selupan) * );*/ }