Beispiel #1
0
            public FlowChecker(GenericReader reader, FountainEncounter encounter)
            {
                int version = reader.ReadInt();

                _Encounter = encounter;

                _Spigot = reader.ReadItem() as ShadowguardSpigot;
                _Drain  = reader.ReadItem() as ShadowguardDrain;

                int count = reader.ReadInt();

                for (int i = 0; i < count; i++)
                {
                    if (_Checked == null)
                    {
                        _Checked = new List <ShadowguardCanal>();
                    }

                    ShadowguardCanal c = reader.ReadItem() as ShadowguardCanal;

                    if (c != null)
                    {
                        _Checked.Add(c);
                    }
                }
            }
Beispiel #2
0
            public bool CheckUse(ShadowguardSpigot spigot, Mobile m)
            {
                if (spigot != _Spigot)
                {
                    return(false);
                }

                Check(m);
                return(true);
            }
Beispiel #3
0
        public void UseSpigot(ShadowguardSpigot spigot, Mobile m)
        {
            if (FlowCheckers == null)
            {
                return;
            }

            foreach (FlowChecker checker in FlowCheckers)
            {
                if (checker.CheckUse(spigot, m))
                {
                    return;
                }
            }
        }
Beispiel #4
0
        public override void Setup()
        {
            ShadowguardCanals = new List <Item>();
            Elementals        = new List <BaseCreature>();
            FlowCheckers      = new List <FlowChecker>();

            int toSpawn = 3 + (PartySize() * 2);

            Timer.DelayCall(ShadowguardController.ReadyDuration + TimeSpan.FromSeconds(30), () =>
            {
                for (int i = 0; i < toSpawn; i++)
                {
                    SpawnRandomElemental();
                }
            });

            for (int i = 0; i < 4; i++)
            {
                ShadowguardSpigot spigot = new ShadowguardSpigot(i < 2 ? 0x9BF2 : 0x9BE5);
                Point3D           p      = SpawnPoints[i];

                ConvertOffset(ref p);

                spigot.MoveToWorld(p, Map.TerMur);
                AddShadowguardCanal(spigot);
                FlowCheckers.Add(new FlowChecker(spigot, this));
            }

            Rectangle2D rec1 = SpawnRecs[4];
            Rectangle2D rec2 = SpawnRecs[5];

            ConvertOffset(ref rec1);
            ConvertOffset(ref rec2);

            SpawnDrain(rec1);
            SpawnDrain(rec2);
        }
Beispiel #5
0
 public FlowChecker(ShadowguardSpigot start, FountainEncounter encounter)
 {
     _Spigot    = start;
     _Encounter = encounter;
 }