public T1Battlefront(RegionMgr region, bool oRvRFront) : base(region, oRvRFront)
 {
     if (oRvRFront)
     {
         _EvtInterface.AddEvent(UpdateVictoryPoints, FLAG_SECURE_REWARD_INTERVAL, 0);
     }
 }
Пример #2
0
        private void OnSettings()
        {
            var    activeView = RegionMgr.Regions[Const.RegionMainView].ActiveViews.FirstOrDefault();
            string viewName   = activeView is DefaultView?nameof(SettingsView) : nameof(DefaultView);

            RegionMgr.RequestNavigate(Const.RegionMainView, viewName);
        }
Пример #3
0
        public void Setup()
        {
            FakeKeepComms = A.Fake <IKeepCommunications>();
            FakeApocComms = A.Fake <IApocCommunications>();
            RegionMgrs    = new List <RegionMgr>();

            var R1ZoneList = new List <Zone_Info>();

            R1ZoneList.Add(new Zone_Info {
                ZoneId = 200, Name = "R1Zone200 PR", Pairing = 2, Tier = 4
            });
            R1ZoneList.Add(new Zone_Info {
                ZoneId = 201, Name = "R1Zone201 CW", Pairing = 2, Tier = 4
            });

            var R3ZoneList = new List <Zone_Info>();

            R3ZoneList.Add(new Zone_Info {
                ZoneId = 400, Name = "R3Zone400 TM", Pairing = 1, Tier = 4
            });
            R3ZoneList.Add(new Zone_Info {
                ZoneId = 401, Name = "R3Zone401 KV", Pairing = 1, Tier = 4
            });

            Region1 = new RegionMgr(1, R1ZoneList, "Region1", FakeApocComms);
            Region3 = new RegionMgr(3, R3ZoneList, "Region3", FakeApocComms);


            RegionMgrs.Add(Region1);
            RegionMgrs.Add(Region3);
        }
        public RoRBattlefront(RegionMgr region, bool oRvRFront)
        {
            Region           = region;
            Region.Bttlfront = this;

            Tier = (byte)Region.GetTier();

            // TODO - this is a nasty piece of work by previous devs. Replace with something more suitable.
            if (Tier == 2)
            {
                Tier = 3;
            }

            if (oRvRFront && Tier > 0)
            {
                BattlefrontList.AddBattlefront(this, Tier);
            }

            Zones = Region.ZonesInfo;

            if (oRvRFront)
            {
                LoadObjectives();
                LoadKeeps();

                _aaoTracker          = new AAOTracker();
                _rationTracker       = new RationTracker(region);
                _contributionTracker = new ContributionTracker(Tier, region);

                _EvtInterface.AddEvent(RecalculateAAO, 10000, 0);                  // 20000
                _EvtInterface.AddEvent(BattlePopulationDistributionData, 6000, 0); // 60000
                _EvtInterface.AddEvent(UpdateBattlefrontScalers, 12000, 0);        // 120000
            }
        }
        /// <summary>
        /// Imports the data file click execute.
        /// </summary>
        /// <param name="arg">The argument.</param>
        private void ImportDataFileClickExecute(object arg)
        {
            SelectedDataSet = null;
            if (arg == null || SelectedDataType.DataTypeName.EqualsIgnoreCase("Medicare Provider Charge Data"))
            {
                RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.DataImportWizard, UriKind.Relative));
            }
            else
            {
                var selectEntry = arg as DataTypeDetailsViewModel;
                if (selectEntry != null)
                {
                    SelectedDataSet = new DatasetMetadataViewModel()
                    {
                        Dataset = selectEntry.Entry
                    };
                }

                var attachedWebsites = Service.GetWebsitesForDataset(SelectedDataSet.Dataset.Id);
                if (attachedWebsites.Any())
                {
                    string websiteNames   = string.Join(",", attachedWebsites);
                    var    warningMessage = string.Format("This dataset \"{0}\" is already used in a website and re-importing the data may change the reports in the website. You must republish your website to include the updated data in your website. Do you want to proceed?", SelectedDataSet.Dataset.Name);
                    warningMessage += string.Format("{0}{0}Associate Website(s): {1}", Environment.NewLine, websiteNames);

                    if (MessageBox.Show(warningMessage, "Dataset ReImport Warning", MessageBoxButton.YesNo) != MessageBoxResult.Yes)
                    {
                        return;
                    }
                }

                RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.DataImportWizard, UriKind.Relative));
            }
        }
Пример #6
0
        private void comboBoxMaps_SelectionChangeCommitted(object sender, EventArgs e)
        {
            char[] seps = { '[', ']' };
            string item = (string)comboBoxMaps.Items[comboBoxMaps.SelectedIndex];

            string[] split = item.Split(seps, 3); //befor, between, after ;)

            if (item == "")
            {
                return;
            }

            if (split.Length < 2)
            {
                return;
            }

            string region = split[1];


            int id = int.Parse(region);

            RegionMgr.Region reg = RegionMgr.GetRegion(id);

            if (reg != null)
            {
                RegionMgr.LoadRegion(reg);
            }
        }
Пример #7
0
        public ContributionTracker(int tier, RegionMgr region)
        {
            _tier   = tier;
            _region = region;

            Reset();
        }
Пример #8
0
        /// <summary>
        /// Changes the current faction of selected Unit (byte Faction)
        /// </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 ModifyFaction(Player plr, ref List <string> values)
        {
            byte faction = (byte)GetInt(ref values);
            byte save    = (byte)(values.Count > 0 ? GetInt(ref values) : 0);

            Object obj = GetObjectTarget(plr);

            RegionMgr region = obj.Region;
            ushort    zoneId = obj.Zone.ZoneId;

            obj.RemoveFromWorld();
            obj.GetUnit().SetFaction(faction);
            region.AddObject(obj.GetUnit(), zoneId, true);

            if (save > 0)
            {
                if (obj.IsCreature())
                {
                    Creature crea = obj.GetCreature();
                    crea.Spawn.Faction = faction;
                    WorldMgr.Database.SaveObject(crea.Spawn);
                }
            }

            return(true);
        }
Пример #9
0
        /// <summary>
        ///     Constructor
        /// </summary>
        /// <param name="objective"></param>
        /// <param name="tier"></param>
        public GuildClaimObjective(RegionMgr region, BattleFront_Objective objective)
        {
            Id       = objective.Entry;
            Name     = objective.Name;
            ZoneId   = objective.ZoneId;
            RegionId = objective.RegionId;
            Tier     = (byte)region.GetTier();
            State    = StateFlags.Unsecure;

            _x            = (uint)objective.X;
            _y            = (uint)objective.Y;
            _z            = (ushort)objective.Z;
            _o            = (ushort)objective.O;
            _tokdiscovery = objective.TokDiscovered;
            _tokunlocked  = objective.TokUnlocked;

            Heading         = _o;
            WorldPosition.X = (int)_x;
            WorldPosition.Y = (int)_y;
            WorldPosition.Z = _z;

            CommsEngine      = new ApocCommunications();
            _captureProgress = 20000;
            CaptureDuration  = 10;
            // TODO : Can add a default buff here.
            BuffId = 14121;  // King of the hill
        }
Пример #10
0
        /// <summary>
        /// Cancels this instance.
        /// </summary>
        void Cancel()
        {
            var isCancelled = false;

            GuardBusinessObject(() => isCancelled = BusinessObject.Cancel());
            if (isCancelled)
            {
                RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.MainDataSetView, UriKind.Relative));
            }
        }
Пример #11
0
 public GeoWizardViewModel()
 {
     _stepManager = new StepManager <WizardBusinessObject>();
     RegionMgr    = ServiceLocator.Current.GetInstance <IRegionManager>();
     Events       = ServiceLocator.Current.GetInstance <IEventAggregator>();
     Events.GetEvent <WizardNavigateSelectStatesEvent>().Subscribe(uri =>
     {
         RegionMgr.RequestNavigate(RegionNames.HospitalsMainRegion, new Uri(ViewNames.GeoContextWizard, UriKind.Relative));
         _stepManager.Navigate(_stepManager.Steps.First());
     });
 }
Пример #12
0
 private void NavigateOut()
 {
     if (HospitalRegion.Default.DefaultStates.Count == 0)
     {
         Events.GetEvent <NavigateToMeasureDataEvent>().Publish(EventArgs.Empty);
     }
     else
     {
         RegionMgr.RequestNavigate(RegionNames.HospitalsMainRegion, new Uri(ViewNames.HospitalsDataTabView, UriKind.Relative));
     }
 }
Пример #13
0
 public void BuildCaptureStatus(PacketOut Out, RegionMgr region, Realms realm)
 {
     if (region == null)
     {
         Out.Fill(0, 3);
     }
     else
     {
         region.Campaign?.WriteCaptureStatus(Out, realm);
     }
 }
Пример #14
0
 public FlagGuard(BattlefieldObjective flag, RegionMgr Region, ushort ZoneId, uint OrderId, uint DestroId, int x, int y, int z, int o)
 {
     this.Region   = Region;
     this.ZoneId   = ZoneId;
     this.OrderId  = OrderId;
     this.DestroId = DestroId;
     this.x        = x;
     this.y        = y;
     this.z        = z;
     this.o        = o;
 }
Пример #15
0
 public void BuildBattleFrontStatus(PacketOut Out, RegionMgr region)
 {
     //if (region == null)
     //    Out.Fill(0, 3);
     //else
     //{
     Out.WriteByte((byte)0);
     Out.WriteByte((byte)0);
     Out.WriteByte((byte)1);
     //}
     //region.Campaign.WriteBattleFrontStatus(Out);
 }
Пример #16
0
        public Form1()
        {
            InitializeComponent();

            _LogMgr = new Core.LogModule.LogMgr(@"J:\Other_project\MyUtils\Deps\NLog\NLog.config");
            _Logger = _LogMgr.GetLogger("XtraCompositeTest");
            _Logger.Info("Start XtraCompositeTest.");

            _regionMgr = new RegionMgr(_LogMgr);
            ICommandRegion MainMenuRegion = new BarCommandRegion(Core.SDK.Composite.UI.CommonRegionName.MainMenu, barManager1.MainMenu, 0);

            _regionMgr.AddCommandRegion(MainMenuRegion.Name, MainMenuRegion);
        }
Пример #17
0
        public void Broadcast(string message, Realms realm, RegionMgr region, int tier)
        {
            foreach (Player plr in region.Players)
            {
                if (!plr.ValidInTier(tier, true))
                {
                    continue;
                }

                plr.SendLocalizeString(message, ChatLogFilters.CHATLOGFILTERS_RVR, Localized_text.CHAT_TAG_DEFAULT);
                plr.SendLocalizeString(message, realm == Realms.REALMS_REALM_ORDER ? ChatLogFilters.CHATLOGFILTERS_C_ORDER_RVR_MESSAGE : ChatLogFilters.CHATLOGFILTERS_C_DESTRUCTION_RVR_MESSAGE, Localized_text.CHAT_TAG_DEFAULT);
            }
        }
Пример #18
0
        /// <summary>
        /// Cancels the click execute.
        /// </summary>
        private void CancelClickExecute()
        {
            // TODO: Ask for a yes / no confirmation
            var dialog = ServiceLocator.Current.GetInstance <IPopupDialogService>();

            dialog.Closed += (o, e) =>
            {
                if (dialog.ClickedButton == PopupDialogButtons.Yes)
                {
                    RegionMgr.RequestNavigate(RegionNames.MainContent, new Uri(ViewNames.MainDataSetView, UriKind.Relative));
                }
            };
            dialog.ShowMessage(@"Are you sure you wish to cancel the data import process?", "Cancel Data Import", PopupDialogButtons.Yes | PopupDialogButtons.No);
        }
Пример #19
0
        public static void RecordMetrics(Logger logger, int tier, RegionMgr region, IBattleFrontManager battleFrontManager)
        {
            try
            {
                var groupId = Guid.NewGuid().ToString();

                logger.Trace($"There are {battleFrontManager.GetBattleFrontStatusList().Count} battlefront statuses ({battleFrontManager.GetType().ToString()}).");
                foreach (var status in battleFrontManager.GetBattleFrontStatusList())
                {
                    lock (status)
                    {
                        if (status.RegionId == region.RegionId)
                        {
                            logger.Trace($"Recording metrics for BF Status : ({status.BattleFrontId}) {status.Description}");
                            if (!status.Locked)
                            {
                                var metrics = new RVRMetrics
                                {
                                    BattlefrontId            = status.BattleFrontId,
                                    BattlefrontName          = status.Description,
                                    DestructionVictoryPoints = (int)battleFrontManager.ActiveBattleFront.DestroVP,
                                    OrderVictoryPoints       = (int)battleFrontManager.ActiveBattleFront.OrderVP,
                                    Locked                   = status.LockStatus,
                                    OrderPlayersInLake       = PlayerUtil.GetTotalOrderPVPPlayerCountInZone(battleFrontManager.ActiveBattleFront.ZoneId),
                                    DestructionPlayersInLake = PlayerUtil.GetTotalDestPVPPlayerCountInZone(battleFrontManager.ActiveBattleFront.ZoneId),
                                    Tier      = tier,
                                    Timestamp = DateTime.UtcNow,
                                    GroupId   = groupId,
                                    TotalPlayerCountInRegion      = PlayerUtil.GetTotalPVPPlayerCountInRegion(status.RegionId),
                                    TotalDestPlayerCountInRegion  = PlayerUtil.GetTotalDestPVPPlayerCountInRegion(status.RegionId),
                                    TotalOrderPlayerCountInRegion = PlayerUtil.GetTotalOrderPVPPlayerCountInRegion(status.RegionId),
                                    TotalPlayerCount        = Player._Players.Count(x => !x.IsDisposed && x.IsInWorld() && x != null),
                                    TotalFlaggedPlayerCount = Player._Players.Count(x => !x.IsDisposed && x.IsInWorld() && x != null && x.CbtInterface.IsPvp)
                                };
                                WorldMgr.Database.AddObject(metrics);
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                logger.Error($"Could not write rvr metrics..continuing. {e.Message} {e.StackTrace}");
            }
        }
Пример #20
0
        public Form1()
        {
            InitializeComponent();

            _LogMgr = new Core.LogModule.LogMgr(@"J:\Other_project\MyUtils\Deps\NLog\NLog.config");
            _Logger = _LogMgr.GetLogger("XtraCompositeTest");
            _Logger.Info("Start XtraCompositeTest.");

            _regionMgr = new RegionMgr(_LogMgr);
            DocumentViewRegion docRegion = new DocumentViewRegion("DocumentRegion", documentManager1, dockManager1, _LogMgr);

            _regionMgr.AddViewRegion("DocumentRegion", docRegion);
            DockingViewRegion dockingRegion = new DockingViewRegion("DockingRegion", documentManager1, dockManager1, _LogMgr);

            _regionMgr.AddViewRegion("DockingRegion", dockingRegion);

            _dialogMgr = new ViewFormMgr(this, bar3, _LogMgr);
        }
Пример #21
0
        public static LootChest Create(RegionMgr region, Point3D location, ushort zoneId, bool convertPin = true)
        {
            if (region == null)
            {
                Log.Error("LootChest", "Attempt to create for NULL region");
                return(null);
            }

            GameObject_proto proto = GameObjectService.GetGameObjectProto(188);
            GameObject_spawn spawn = new GameObject_spawn();

            if (convertPin)  // Non-fort zone location points are PIN position system, forts are worldposition.
            {
                var targetPosition = ZoneService.GetWorldPosition(ZoneService.GetZone_Info(zoneId), (ushort)location.X,
                                                                  (ushort)location.Y, (ushort)location.Z);

                spawn.Guid   = (uint)GameObjectService.GenerateGameObjectSpawnGUID();
                spawn.WorldO = 0;
                spawn.WorldY = targetPosition.Y + StaticRandom.Instance.Next(50, 100);
                spawn.WorldZ = targetPosition.Z;
                spawn.WorldX = targetPosition.X + StaticRandom.Instance.Next(50, 100);
                spawn.ZoneId = zoneId;
            }
            else
            {
                spawn.Guid   = (uint)GameObjectService.GenerateGameObjectSpawnGUID();
                spawn.WorldO = 0;
                spawn.WorldY = location.Y + StaticRandom.Instance.Next(50, 100);
                spawn.WorldZ = location.Z;
                spawn.WorldX = location.X + StaticRandom.Instance.Next(50, 100);
                spawn.ZoneId = zoneId;
            }


            spawn.BuildFromProto(proto);
            var chest = region.CreateLootChest(spawn);

            chest.LootBags = new Dictionary <uint, KeyValuePair <Item_Info, List <Talisman> > >();


            return(chest);
        }
Пример #22
0
        public Instance(ushort zoneid, ushort id, byte realm, Instance_Lockouts lockouts)
        {
            Lockout = lockouts;
            ID      = id;
            ZoneID  = zoneid;
            Realm   = realm;
            Region  = new RegionMgr(zoneid, ZoneService.GetZoneRegion(zoneid), "", new ApocCommunications());
            InstanceService._InstanceInfo.TryGetValue(zoneid, out Info);
            LoadBossSpawns();
            LoadSpawns(); // todo get the saved progress from group
            _running      = true;
            _evtInterface = new EventInterface();
            closetime     = (TCPManager.GetTimeStamp() + 7200);

            // instancing stuff
            InstanceService.SaveLockoutInstanceID(ZoneID + ":" + ID, Lockout);

            new Thread(Update).Start();

            Log.Success("Opening Instance", "Instance ID " + ID + "  Map: " + Info.Name);
            // TOVL
            if (zoneid == 179)
            {
                foreach (var p in GameObjectService.GameObjectSpawns.Where(e => e.Value.ZoneId == 179))
                {
                    if (p.Value.Entry == 98908)
                    {
                        GameObject go = new GameObject(p.Value);

                        _Objects.Add(go);
                        Region.AddObject(go, zoneid, true);
                    }
                }

                if (Info != null && Info.Objects.Count > 0)
                {
                    LoadObjects();
                }
                _evtInterface.AddEvent(UpdatePendulums, 7000, 0);
            }
        }
Пример #23
0
        public void ShowLocation(Vector3 point, int regionID)
        {
            if (Common.DeviceReady)
            {
                RegionMgr.LoadRegion(regionID);

                if (point.X <= hScrollBar.Maximum && point.X >= hScrollBar.Minimum)
                {
                    hScrollBar.Value = (int)point.X;
                }
                if (point.Y <= vScrollBar.Maximum && point.Y >= vScrollBar.Minimum)
                {
                    vScrollBar.Value = (int)point.Y;
                }
                SetZoom(0.25F);
            }
            else
            {
                cachedRegionID = regionID;
                cachedLocation = point;
            }
        }
Пример #24
0
        public static void Diag(Player plr, string targetString = null)
        {
            // Weird algorithm but it's for legacy purpose only
            bool bLocalZone  = true;
            var  battlefront = plr.Region.ndbf;

            switch (targetString)
            {
            case "zone":
                bLocalZone = true;
                break;

            case "region":
                bLocalZone = false;
                break;

            default:
                bLocalZone = false;
                ushort regionId;
                if (targetString != null && UInt16.TryParse(targetString, out regionId))
                {
                    RegionMgr region = WorldMgr.GetRegion(regionId, false);
                    if (region == null)
                    {
                        SendCsr(plr, "Unkown region : ", regionId.ToString());
                        return;
                    }
                    battlefront = region.ndbf;
                }
                else
                {
                    SendCsr(plr, "Please enter a valid regionID");
                }
                break;
            }

            battlefront.CampaignDiagnostic(plr, bLocalZone);
        }
Пример #25
0
        /// <summary>
        ///     Constructor
        /// </summary>
        /// <param name="objective"></param>
        /// <param name="tier"></param>
        public BattlefieldObjective(RegionMgr region, BattleFront_Objective objective)
        {
            Id       = objective.Entry;
            Name     = objective.Name;
            ZoneId   = objective.ZoneId;
            RegionId = objective.RegionId;
            Tier     = (byte)region.GetTier();
            State    = StateFlags.Unsecure;

            _x            = (uint)objective.X;
            _y            = (uint)objective.Y;
            _z            = (ushort)objective.Z;
            _o            = (ushort)objective.O;
            _tokdiscovery = objective.TokDiscovered;
            _tokunlocked  = objective.TokUnlocked;

            Heading         = _o;
            WorldPosition.X = (int)_x;
            WorldPosition.Y = (int)_y;
            WorldPosition.Z = _z;

            CommsEngine   = new ApocCommunications();
            RewardManager = new RVRRewardManager();
            fsm           = new CampaignObjectiveStateMachine(this).fsm;
            fsm.Initialize(CampaignObjectiveStateMachine.ProcessState.Neutral);
            if (objective.Guards != null)
            {
                foreach (BattleFront_Guard Guard in objective.Guards)
                {
                    Guards.Add(new FlagGuard(this, region, objective.ZoneId, Guard.OrderId, Guard.DestroId, Guard.X, Guard.Y, Guard.Z, Guard.O));
                }
            }
            _captureProgress = 20000;
            CaptureDuration  = 10;
            EvtInterface.AddEvent(CheckTimers, 1000, 0);
            BuffId = 0;
        }
Пример #26
0
        public static void Create(RegionMgr region, PQuest_Info info, ref Dictionary <uint, ContributionInfo> players, float bagCountMod)
        {
            if (region == null)
            {
                Log.Error("GoldChest", "Attempt to create for NULL region");
                return;
            }

            if (info == null)
            {
                Log.Error("GoldChest", "NULL PQuest in Region " + region);
                return;
            }

            if (bagCountMod == 0.0f)
            {
                return;
            }

            GameObject_proto proto = GameObjectService.GetGameObjectProto(188);

            GameObject_spawn spawn = new GameObject_spawn
            {
                Guid   = (uint)GameObjectService.GenerateGameObjectSpawnGUID(),
                WorldO = 0,
                WorldY = info.GoldChestWorldY,
                WorldZ = info.GoldChestWorldZ,
                WorldX = info.GoldChestWorldX,
                ZoneId = info.ZoneId
            };

            spawn.BuildFromProto(proto);

            GoldChest chest = new GoldChest(spawn, info, ref players, bagCountMod, region);

            region.AddObject(chest, info.ZoneId);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="regionMgr"></param>
        /// <param name="objectives"></param>
        /// <param name="players"></param>
        public NewDawnBattlefront(RegionMgr regionMgr, List <BattlefrontObjective> objectives, HashSet <Player> players, IBattlefrontManager bfm)
        {
            this.Region = regionMgr;
            this.VictoryPointProgress  = new VictoryPointProgress();
            this.BattlefrontObjectives = objectives;
            this.PlayersInLakeSet      = players;
            this.Objectives            = new List <NewDawnBattlefieldObjective>();
            this.BattleFrontManager    = bfm;
            this.BattlefrontName       = bfm.GetActivePairing().PairingName;

            Tier = (byte)Region.GetTier();
            LoadObjectives();
            LoadKeeps();

            _contributionTracker = new ContributionTracker(Tier, regionMgr);
            _aaoTracker          = new AAOTracker();

            _EvtInterface.AddEvent(UpdateBattlefrontScalers, 12000, 0); // 120000
            _EvtInterface.AddEvent(UpdateVictoryPoints, 6000, 0);
            // Tell each player the RVR status
            _EvtInterface.AddEvent(UpdateRVRStatus, 60000, 0);
            // Recalculate AAO
            _EvtInterface.AddEvent(UpdateAAOBuffs, 60000, 0);
        }
Пример #28
0
        private void DXControl_Load(object sender, EventArgs e)
        {
            RegionMgr.LoadRegions();
            ModulMgr.LoadModules();

            ZoomSlider.KeyDown += new KeyEventHandler(DXControl_KeyDown);

            if (cachedRegionID >= 0)
            {
                RegionMgr.LoadRegion(cachedRegionID);
                if (cachedLocation.X <= hScrollBar.Maximum && cachedLocation.X >= hScrollBar.Minimum)
                {
                    //hScrollBar.Value += diffX;
                    hScrollBar.Value = (int)cachedLocation.X;
                }
                if (cachedLocation.Y <= vScrollBar.Maximum && cachedLocation.Y >= vScrollBar.Minimum)
                {
                    //vScrollBar.Value += diffY;
                    vScrollBar.Value = (int)cachedLocation.Y;
                }

                Invalidate();
            }
        }
Пример #29
0
        public GoldChest(GameObject_spawn spawn, PQuest_Info info, ref Dictionary <uint, ContributionInfo> players, float bagCountMod, RegionMgr region)
        {
            Spawn            = spawn;
            _publicQuestInfo = info;
            //Note: _amountOfBags is the original calulation for generating bags, testing math.min to see if this is the cause of the empty bags (clientside limitations)
            int _amountOfBags = (int)(players.Count * bagCountMod);

            if (info.PQType == 2 && WorldMgr.WorldSettingsMgr.GetGenericSetting(16) == 0)
            {
                //foreach (ContributionInfo contrib in players.Values)
                //{
                //    RollForPersonalBag(contrib, 1f, players, region);

                //}
                EvtInterface.AddEvent(Destroy, 180 * 1000, 1);
                // AssignPersonalLoot(player);
            }
            else  //PQs still use the original roll system
            {
                GenerateLootBags(Math.Min(_amountOfBags, 24));
                // Note - if there are more than 42 players, the lowest rarity bag should be green.

#warning if there are more than 114 players, 25 bags will be awarded. Nalgol has the PQ boards restricted to 24 players, for an unknown reason. This could cause something to break.

                AssignLoot(players);

                foreach (KeyValuePair <uint, ContributionInfo> playerRoll in players)
                {
                    Scoreboard(playerRoll.Value, _preRoll.IndexOf(playerRoll), _postRoll.IndexOf(playerRoll));
                }

                EvtInterface.AddEvent(Destroy, 180 * 1000, 1);
            }
        }
Пример #30
0
 public KeepDoor(RegionMgr region, Keep_Door info, BattleFrontKeep keep)
 {
     Region = region;
     Info   = info;
     Keep   = keep;
 }