コード例 #1
0
        public CaptureTheFlagScenario(Scenario_Info info, byte tier) : base(info, tier)
        {
            foreach (Scenario_Object obj in info.ScenObjects)
            {
                if (obj.Type == "Flag")
                {
                    HoldObject flag = new HoldObject(obj.Identifier, obj.ObjectiveName, new Point3D(obj.WorldPosX, obj.WorldPosY, obj.PosZ), 60001, 13000, ObjectPickedUp, FlagDropped, FlagReset, FlagBuffAssigned, 3442, 3442);

                    if (obj.ObjectiveName == "Order Flag")
                    {
                        flag.VfxState = 2;
                        _captureScore = obj.PointGain;
                        flag.SetActive(Realms.REALMS_REALM_DESTRUCTION);
                    }

                    else if (obj.ObjectiveName == "Destruction Flag")
                    {
                        flag.VfxState = 5;
                        _captureScore = obj.PointGain;
                        flag.SetActive(Realms.REALMS_REALM_ORDER);
                    }

                    else
                    {
                        flag.SetActive(0);
                        flag.HoldResetTimeSeconds = 180;
                        _captureScore             = obj.PointGain;
                    }

                    flag.ObjectType = 1;

                    _flags.Add(flag);
                    Region.AddObject(flag, info.MapId);
                    AddTrackedObject(flag);
                }
                else
                {
                    LoadScenarioObject(obj);
                }

                ZoneMgr curZone = Region.GetZoneMgr(Info.MapId);

                Region.LoadCells((ushort)(curZone.Info.OffX + 8), (ushort)(curZone.Info.OffY + 8), 8);
            }
        }
コード例 #2
0
        public void ActivateFlag()
        {
            _flag.SetActive(0);

            for (int i = 0; i < 2; ++i)
            {
                foreach (Player plr in Players[i])
                {
                    SendFlagObjectState(plr, _flag);
                }
            }
        }