Esempio n. 1
0
        public void AddChapter(Chapter_Info Chapter)
        {
            Chapter.OffX = X;
            Chapter.OffY = Y;

            ChapterSpawns.Add(Chapter);
        }
Esempio n. 2
0
        public ChapterObject CreateChapter(Chapter_Info Chapter)
        {
            ChapterObject Obj = new ChapterObject(Chapter);

            AddObject(Obj, Chapter.ZoneId);
            return(Obj);
        }
Esempio n. 3
0
        public void AddChapter(Chapter_Info chapter)
        {
            chapter.OffX = _x;
            chapter.OffY = _y;

            ChapterSpawns.Add(chapter);
        }
Esempio n. 4
0
        public ChapterObject CreateChapter(Chapter_Info chapter)
        {
            ChapterObject obj = new ChapterObject(chapter);

            AddObject(obj, chapter.ZoneId);
            return(obj);
        }
Esempio n. 5
0
        static public Chapter_Info GetChapter(uint Entry)
        {
            Chapter_Info Info = null;

            _Chapters.TryGetValue(Entry, out Info);

            return(Info);
        }
Esempio n. 6
0
        /// <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);
        }
Esempio n. 7
0
        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);
        }
Esempio n. 8
0
        /// <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);
        }
Esempio n. 9
0
        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);
        }
Esempio n. 10
0
 public ChapterObject(Chapter_Info info)
 {
     Info = info;
     Name = Info.Name;
 }
Esempio n. 11
0
 public ChapterObject(Chapter_Info Info)
     : this()
 {
     this.Info = Info;
     Name      = Info.Name;
 }