Exemplo n.º 1
0
            public WorkerGump(Mobile from, FellowshipChain chain)
                : base(100, 100)
            {
                int cliloc;

                if (FellowshipChainList.ContainsKey(from))
                {
                    if (chain > FellowshipChainList[from])
                    {
                        cliloc = clilocs[(int)(chain - 1), 0];
                    }
                    else
                    {
                        cliloc = clilocs[(int)(chain - 1), 1];
                    }
                }
                else
                {
                    cliloc = clilocs[(int)(chain - 1), 0];
                }

                AddPage(0);

                AddBackground(0, 0, 620, 328, 0x2454);
                AddImage(0, 0, 0x61A);
                AddHtmlLocalized(335, 14, 273, 18, 1114513, "#1159237", 0xC63, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
                AddHtmlLocalized(335, 51, 273, 267, cliloc, 0xC63, false, true);
            }
Exemplo n.º 2
0
 public BlackthornDungeonTeleporter(FellowshipChain chain)
     : base(0x1827)
 {
     Chain   = chain;
     Visible = true;
     Movable = false;
 }
Exemplo n.º 3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            _ = reader.ReadInt();

            Dest  = reader.ReadPoint3D();
            Chain = (FellowshipChain)reader.ReadInt();
        }
Exemplo n.º 4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            Chain = (FellowshipChain)reader.ReadInt();

            if (Map == Map.Trammel)
            {
                InstanceTram = this;
            }

            if (Map == Map.Felucca)
            {
                InstanceFel = this;
            }
        }
Exemplo n.º 5
0
        public static void OnLoad()
        {
            Persistence.Deserialize(
                FilePath,
                reader =>
            {
                int version = reader.ReadInt();
                int count   = reader.ReadInt();

                for (int i = count; i > 0; i--)
                {
                    Mobile m = reader.ReadMobile();
                    FellowshipChain chain = (FellowshipChain)reader.ReadInt();

                    if (m != null)
                    {
                        FellowshipChainList[m] = chain;
                    }
                }
            });
        }
Exemplo n.º 6
0
        public static void GenerateMapDecoration(Map map)
        {
            blocker.ToList().ForEach(x =>
            {
                if (map.FindItem <Blocker>(new Point3D(x)) == null)
                {
                    Blocker bl = new Blocker();

                    bl.MoveToWorld(new Point3D(x), map);
                }

                if (map.FindItem <LOSBlocker>(new Point3D(x)) == null)
                {
                    LOSBlocker lb = new LOSBlocker();

                    lb.MoveToWorld(new Point3D(x), map);
                }
            });

            for (int i = 0; i < Workers.Length; i++)
            {
                Point3D p = Workers[i];

                if (map.FindMobile <Worker>(p) == null)
                {
                    Worker w = new Worker((FellowshipChain)(i + 1));

                    w.MoveToWorld(p, map);
                }
            }

            FellowshipChain c = FellowshipChain.One;

            for (int t = 0; t < Teleporters.Length / 2; t++)
            {
                Point3D p = Teleporters[t, 0];

                if (map.FindItem <BlackthornDungeonTeleporter>(p) == null)
                {
                    BlackthornDungeonTeleporter bl;

                    if (t % 2 == 0)
                    {
                        bl = new BlackthornDungeonTeleporter(c)
                        {
                            Dest = Teleporters[t, 1]
                        };

                        c++;
                    }
                    else
                    {
                        bl = new BlackthornDungeonTeleporter()
                        {
                            Dest = Teleporters[t, 1]
                        };
                    }

                    bl.MoveToWorld(p, map);
                }
            }
        }
Exemplo n.º 7
0
 public Worker(FellowshipChain chain)
     : base("the Worker")
 {
     Chain = chain;
 }
Exemplo n.º 8
0
        public static void GenerateMapDecoration(Map map)
        {
            List <Point3D> list = new List <Point3D>();

            for (var index = 0; index < blocker.Length; index++)
            {
                var point3D = blocker[index];

                list.Add(point3D);
            }

            for (var index = 0; index < list.Count; index++)
            {
                var x = list[index];

                if (map.FindItem <Blocker>(new Point3D(x)) == null)
                {
                    Blocker bl = new Blocker();

                    bl.MoveToWorld(new Point3D(x), map);
                }

                if (map.FindItem <LOSBlocker>(new Point3D(x)) == null)
                {
                    LOSBlocker lb = new LOSBlocker();

                    lb.MoveToWorld(new Point3D(x), map);
                }
            }

            for (int i = 0; i < Workers.Length; i++)
            {
                Point3D p = Workers[i];

                if (map.FindMobile <Worker>(p) == null)
                {
                    Worker w = new Worker((FellowshipChain)(i + 1));

                    w.MoveToWorld(p, map);
                }
            }

            FellowshipChain c = FellowshipChain.One;

            for (int t = 0; t < Teleporters.Length / 2; t++)
            {
                Point3D p = Teleporters[t, 0];

                if (map.FindItem <BlackthornDungeonTeleporter>(p) == null)
                {
                    BlackthornDungeonTeleporter bl;

                    if (t % 2 == 0)
                    {
                        bl = new BlackthornDungeonTeleporter(c)
                        {
                            Dest = Teleporters[t, 1]
                        };

                        c++;
                    }
                    else
                    {
                        bl = new BlackthornDungeonTeleporter
                        {
                            Dest = Teleporters[t, 1]
                        };
                    }

                    bl.MoveToWorld(p, map);
                }
            }
        }