public bool IsWall(Aisling obj, int x, int y) { if (obj.Flags.HasFlag(AislingFlags.GM)) { return(false); } if (obj.Flags.HasFlag(AislingFlags.Dead)) { return(false); } return(IsWall(x, y)); }
public static Aisling Create() { var fractions = Enum.GetValues(typeof(Fraction)); var randomFraction = (int)fractions.GetValue(Generator.Random.Next(fractions.Length)); var result = new Aisling { Username = string.Empty, Password = string.Empty, AbpLevel = 0, AbpTotal = 0, AbpNext = 0, ExpLevel = 1, ExpTotal = 1, ExpNext = 600, Gender = 0, Title = 0, CurrentMapId = ServerContextBase.Config.StartingMap, Stage = ClassStage.Class, Path = Class.Peasant, CurrentHp = 60, CurrentMp = 30, _MaximumHp = 60, _MaximumMp = 30, _Str = 3, _Int = 3, _Wis = 3, _Con = 3, _Dex = 3, GamePoints = 0, GoldPoints = 0, StatPoints = 0, BodyColor = 0, BodyStyle = 0, FaceColor = 0, FaceStyle = 0, HairColor = 0, HairStyle = 0, NameColor = 1, BootColor = 0, Amplified = 0, TutorialCompleted = false, SkillBook = new SkillBook(), SpellBook = new SpellBook(), Inventory = new Inventory(), EquipmentManager = new EquipmentManager(null), BankManager = new Bank(), Created = DateTime.UtcNow, LastLogged = DateTime.UtcNow, XPos = ServerContextBase.Config.StartingPosition.X, YPos = ServerContextBase.Config.StartingPosition.Y, Nation = (byte)randomFraction, AnimalForm = AnimalForm.None }; if (ServerContextBase.Config.GiveAssailOnCreate) { Skill.GiveTo(result, "Assail", 1); } if (ServerContextBase.Config.DevMode) { foreach (var temp in ServerContextBase.GlobalSpellTemplateCache) { Spell.GiveTo(result, temp.Value.Name); } foreach (var temp in ServerContextBase.GlobalSkillTemplateCache) { Skill.GiveTo(result, temp.Value.Name); } } if (result.Nation == 1) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.Orange, Icon = (byte)LegendIcon.Community, Value = "Lorule Citizen." }); } else if (result.Nation == 2) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.LightGreen, Icon = (byte)LegendIcon.Community, Value = "Lividia Citizen." }); } else if (result.Nation == 3) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.Darkgreen, Icon = (byte)LegendIcon.Community, Value = "Amongst the Exile." }); } return(result); }
public static Aisling Create() { var fractions = Enum.GetValues(typeof(Fraction)); var randomFraction = (int)fractions.GetValue(Generator.Random.Next(fractions.Length)); var result = new Aisling { Username = string.Empty, Password = string.Empty, AbpLevel = 0, AbpTotal = 0, AbpNext = 0, ExpLevel = 1, ExpTotal = 1, ExpNext = 600, Gender = 0, Title = 0, Flags = 0, CurrentMapId = ServerContext.Config.StartingMap, ClassID = 0, Stage = ClassStage.Class, Path = Class.Peasant, CurrentHp = 60, CurrentMp = 30, _MaximumHp = 60, _MaximumMp = 30, _Str = 3, _Int = 3, _Wis = 3, _Con = 3, _Dex = 3, GamePoints = 0, GoldPoints = 0, StatPoints = 0, BodyColor = 0, BodyStyle = 0, FaceColor = 0, FaceStyle = 0, HairColor = 0, HairStyle = 0, NameColor = 1, BootColor = 0, Amplified = 0, TutorialCompleted = false, SkillBook = new SkillBook(), SpellBook = new SpellBook(), Inventory = new Inventory(), EquipmentManager = new EquipmentManager(null), BankManager = new Bank(), Created = DateTime.UtcNow, LastLogged = DateTime.UtcNow, X = ServerContext.Config.StartingPosition.X, Y = ServerContext.Config.StartingPosition.Y, Nation = (byte)randomFraction, }; int idx = 1; foreach (var skill in ServerContext.GlobalSkillTemplateCache.Keys) { if (ServerContext.GlobalSkillTemplateCache[skill].Pane == Pane.Tools) { continue; } Skill.GiveTo(result, skill, 100); } foreach (var skill in ServerContext.GlobalSkillTemplateCache.Keys) { if (ServerContext.GlobalSkillTemplateCache[skill].Pane == Pane.Tools) { Skill.GiveTo(result, skill, (byte)(72 + idx)); idx++; } } foreach (var spell in ServerContext.GlobalSpellTemplateCache.Keys) { if (ServerContext.GlobalSpellTemplateCache[spell].Pane == Pane.Tools) { continue; } Spell.GiveTo(result, spell, 100); } idx = 1; foreach (var spell in ServerContext.GlobalSpellTemplateCache.Keys) { if (ServerContext.GlobalSpellTemplateCache[spell].Pane == Pane.Tools) { Spell.GiveTo(result, spell, (byte)(72 + idx)); idx++; } } Spell.GiveTo(result, "Needle Trap", 100); if (DateTime.UtcNow.Year <= 2019) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.DarkPurple, Icon = (byte)LegendIcon.Victory, Value = string.Format("Aisling Age of Aquarius") }); } if (result.Nation == 1) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.Orange, Icon = (byte)LegendIcon.Community, Value = string.Format("Lorule Citizen") }); } else if (result.Nation == 2) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.LightGreen, Icon = (byte)LegendIcon.Community, Value = string.Format("Lividia Citizen") }); } else if (result.Nation == 3) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.Darkgreen, Icon = (byte)LegendIcon.Community, Value = string.Format("Amongst the Exile.") }); } return(result); }
public static Aisling Create() { var result = new Aisling { Username = string.Empty, Password = string.Empty, AbpLevel = 0, AbpTotal = 0, AbpNext = 0, ExpLevel = 1, ExpTotal = 1, ExpNext = 600, Gender = 0, Title = 0, CurrentMapId = ServerContext.Config.StartingMap, Stage = ClassStage.Class, Path = Class.Peasant, CurrentHp = 60, CurrentMp = 30, _MaximumHp = 60, _MaximumMp = 30, _Str = 3, _Int = 3, _Wis = 3, _Con = 3, _Dex = 3, GamePoints = 0, GoldPoints = 0, StatPoints = 0, BodyColor = 0, BodyStyle = 0, FaceColor = 0, FaceStyle = 0, HairColor = 0, HairStyle = 0, NameColor = 1, BootColor = 0, Amplified = 0, TutorialCompleted = false, SkillBook = new SkillBook(), SpellBook = new SpellBook(), Inventory = new Inventory(), BankManager = new Bank(), Created = DateTime.UtcNow, LastLogged = DateTime.UtcNow, XPos = ServerContext.Config.StartingPosition.X, YPos = ServerContext.Config.StartingPosition.Y, AnimalForm = AnimalForm.None, Nation = "Mileth", EquipmentManager = new EquipmentManager(null) }; if (ServerContext.Config.GiveAssailOnCreate) { Skill.GiveTo(result, "Assail", 1); } if (ServerContext.Config.DevMode) { foreach (var temp in ServerContext.GlobalSpellTemplateCache) { Spell.GiveTo(result, temp.Value.Name); } foreach (var temp in ServerContext.GlobalSkillTemplateCache) { Skill.GiveTo(result, temp.Value.Name); } } return(result); }
public static Aisling Create() { var fractions = Enum.GetValues(typeof(Fraction)); var randomFraction = (int)fractions.GetValue(Generator.Random.Next(fractions.Length)); var result = new Aisling { Username = string.Empty, Password = string.Empty, AbpLevel = 0, AbpTotal = 0, AbpNext = 0, ExpLevel = 1, ExpTotal = 1, ExpNext = 600, Gender = 0, Title = 0, Flags = 0, CurrentMapId = ServerContext.Config.StartingMap, ClassID = 0, Stage = ClassStage.Class, Path = Class.Peasant, CurrentHp = 60, CurrentMp = 30, _MaximumHp = 60, _MaximumMp = 30, _Str = 3, _Int = 3, _Wis = 3, _Con = 3, _Dex = 3, GamePoints = 0, GoldPoints = 0, StatPoints = 0, BodyColor = 0, BodyStyle = 0, FaceColor = 0, FaceStyle = 0, HairColor = 0, HairStyle = 0, NameColor = 1, BootColor = 0, Amplified = 0, TutorialCompleted = false, SkillBook = new SkillBook(), SpellBook = new SpellBook(), Inventory = new Inventory(), EquipmentManager = new EquipmentManager(null), BankManager = new Bank(), Created = DateTime.UtcNow, LastLogged = DateTime.UtcNow, X = ServerContext.Config.StartingPosition.X, Y = ServerContext.Config.StartingPosition.Y, Nation = (byte)randomFraction, }; // foreach (var skill in ServerContext.GlobalSkillTemplateCache.Keys) // Skill.GiveTo(result, skill); // foreach (var spell in ServerContext.GlobalSpellTemplateCache.Keys) // Spell.GiveTo(result, spell); if (DateTime.UtcNow.Year <= 2020) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.White, Icon = (byte)LegendIcon.Victory, Value = string.Format("Aisling") }); } if (result.Nation == 1) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.Blue, Icon = (byte)LegendIcon.Community, Value = string.Format("Saved by Fioschad") }); } else if (result.Nation == 2) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.Blue, Icon = (byte)LegendIcon.Community, Value = string.Format("Saved by Luathas") }); } else if (result.Nation == 3) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.Blue, Icon = (byte)LegendIcon.Community, Value = string.Format("Saved by Danaan") }); } else if (result.Nation == 4) { result.LegendBook.AddLegend(new Legend.LegendItem { Category = "Event", Color = (byte)LegendColor.Blue, Icon = (byte)LegendIcon.Community, Value = string.Format("Saved by Gramail") }); } return(result); }
public static Aisling Create() { var result = new Aisling() { Created = DateTime.UtcNow, LastLogged = DateTime.UtcNow, Username = string.Empty, Password = string.Empty, X = ServerContext.Config.StartingPosition.X, Y = ServerContext.Config.StartingPosition.Y, AbpLevel = 0, AbpTotal = 0, AbpNext = 0, ExpLevel = 1, ExpTotal = 1, ExpNext = 600, Gender = 0, Title = 0, Flags = 0, AreaID = ServerContext.Config.StartingMap, ClassID = 0, Stage = ClassStage.Class, Path = Class.Peasant, CurrentHp = 60, CurrentMp = 30, _MaximumHp = 60, _MaximumMp = 30, _Ac = ServerContext.Config.BaseAC, _Str = 3, _Int = 3, _Wis = 3, _Con = 3, _Dex = 3, GamePoints = 0, GoldPoints = 1000, StatPoints = 0, Medal = 0, LIcon = 0, RIcon = 0, BodyColor = 0, BodyStyle = 0, FaceColor = 0, FaceStyle = 0, HairColor = 0, HairStyle = 0, CurrentMapId = ServerContext.Config.StartingMap, SkillBook = new SkillBook(), SpellBook = new SpellBook(), Inventory = new Inventory(), EquipmentManager = new EquipmentManager(null), NameColor = 1, BootColor = 0, }; foreach (var skill in ServerContext.GlobalSkillTemplateCache.Keys) { Skill.GiveTo(result, skill); } foreach (var spell in ServerContext.GlobalSpellTemplateCache.Keys) { Spell.GiveTo(result, spell); } result.LegendBook.AddLegend(new Legend.LegendItem() { Category = "Event", Color = (byte)LegendColor.Green, Icon = (byte)LegendIcon.Victory, Value = string.Format("Lorule: VIP {0}", DateTime.UtcNow.ToShortDateString()) }); if (ServerContext.GlobalMapCache.ContainsKey(result.AreaID)) { result.Map = ServerContext.GlobalMapCache[result.AreaID]; } return(result); }
internal void UpdateCollisions(Aisling obj) { SetWarps(); }
public void OnEntered(Aisling aisling) { }