public void AddChapter(Chapter_Info Chapter) { Chapter.OffX = X; Chapter.OffY = Y; ChapterSpawns.Add(Chapter); }
public ChapterObject CreateChapter(Chapter_Info Chapter) { ChapterObject Obj = new ChapterObject(Chapter); AddObject(Obj, Chapter.ZoneId); return(Obj); }
public void AddChapter(Chapter_Info chapter) { chapter.OffX = _x; chapter.OffY = _y; ChapterSpawns.Add(chapter); }
public ChapterObject CreateChapter(Chapter_Info chapter) { ChapterObject obj = new ChapterObject(chapter); AddObject(obj, chapter.ZoneId); return(obj); }
static public Chapter_Info GetChapter(uint Entry) { Chapter_Info Info = null; _Chapters.TryGetValue(Entry, out Info); return(Info); }
/// <summary> /// Set tok entry /// </summary> /// <param name="plr">Player that initiated the command</param> /// <param name="values">List of command arguments (after command name)</param> /// <returns>True if command was correctly handled, false if operation was canceled</returns> public static bool ChapterTok(Player plr, ref List <string> values) { int entry = GetInt(ref values); int tokEntry = GetInt(ref values); Chapter_Info chapter = ChapterService.GetChapter((ushort)entry); Tok_Info tok = TokService.GetTok((ushort)entry); if (tok == null || chapter == null) { return(false); } chapter.TokEntry = (ushort)tokEntry; chapter.Dirty = true; WorldMgr.Database.SaveObject(chapter); return(true); }
static public bool ChapterTok(Player Plr, ref List <string> Values) { int Entry = GetInt(ref Values); int TokEntry = GetInt(ref Values); Chapter_Info Chapter = WorldMgr.GetChapter((UInt32)Entry); Tok_Info Tok = WorldMgr.GetTok((UInt32)Entry); if (Tok == null || Chapter == null) { return(false); } Chapter.TokEntry = (UInt32)TokEntry; Chapter.Dirty = true; WorldMgr.Database.SaveObject(Chapter); return(true); }
/// <summary> /// Save chapter position /// </summary> /// <param name="plr">Player that initiated the command</param> /// <param name="values">List of command arguments (after command name)</param> /// <returns>True if command was correctly handled, false if operation was canceled</returns> public static bool ChapterSave(Player plr, ref List <string> values) { int entry = GetInt(ref values); Chapter_Info info = ChapterService.GetChapter((ushort)entry); if (info == null) { return(false); } info.PinX = (ushort)plr.X; info.PinY = (ushort)plr.Y; plr.SendClientMessage("Saved [" + info.Name + "] to '" + plr.X + "','" + plr.Y + "'"); info.Dirty = true; WorldMgr.Database.SaveObject(info); return(true); }
static public bool ChapterSave(Player Plr, ref List <string> Values) { int Entry = GetInt(ref Values); Chapter_Info Info = WorldMgr.GetChapter((UInt32)Entry); if (Info == null) { return(false); } Info.PinX = (ushort)Plr.X; Info.PinY = (ushort)Plr.Y; Plr.SendMessage(Plr, "Saved [" + Info.Name + "] to '" + Plr.X + "','" + Plr.Y + "'", SystemData.ChatLogFilters.CHATLOGFILTERS_SAY); Info.Dirty = true; WorldMgr.Database.SaveObject(Info); return(true); }
public ChapterObject(Chapter_Info info) { Info = info; Name = Info.Name; }
public ChapterObject(Chapter_Info Info) : this() { this.Info = Info; Name = Info.Name; }