예제 #1
0
 internal void RaisePartyList(DataPartyDetails party)
 {
     if (OnPartyList != null)
     {
         OnPartyList(party);
     }
 }
예제 #2
0
        private void FFRKViewInventory_Load(object sender, EventArgs e)
        {
            if (DesignMode)
            {
                return;
            }

            if (FFRKProxy.Instance != null)
            {
                mAnalyzerSettings = AnalyzerSettings.DefaultSettings;
                mAnalyzerSettings.LevelConsideration = TranslateLevelConsideration((ScoreUpgradeModeComboIndex)comboBoxScoreSelection.SelectedIndex);
                mAnalyzer = new EquipmentAnalyzer(mAnalyzerSettings);

                FFRKProxy.Instance.OnPartyList += FFRKProxy_OnPartyList;

                DataPartyDetails party = FFRKProxy.Instance.GameState.PartyDetails;
                if (party != null)
                {
                    // Run the initial analysis before updating the grids, so we can pass the
                    // scores straight through.  We'll run the analysis again every time they
                    // change one of the settings, so that the scores update on the fly.
                    mAnalyzer.Items   = party.Equipments;
                    mAnalyzer.Buddies = party.Buddies;
                    mAnalyzer.Run();
                    UpdatePartyGrid(party.Buddies.ToList());
                    UpdateEquipmentGrid(party.Equipments);
                }
            }
        }
예제 #3
0
 internal void RaisePartyList(DataPartyDetails party)
 {
     if (this.OnPartyList == null)
     {
         return;
     }
     this.OnPartyList(party);
 }
예제 #4
0
 void FFRKProxy_OnPartyList(DataPartyDetails party)
 {
     BeginInvoke((Action)(() =>
     {
         mAnalyzer.Items = party.Equipments;
         mAnalyzer.Buddies = party.Buddies;
         mAnalyzer.Run();
         UpdatePartyGrid(party.Buddies.ToList());
         UpdateEquipmentGrid(party.Equipments);
     }));
 }
예제 #5
0
 private void RecalculateInventory()
 {
     if (FFRKProxy.Instance != null)
     {
         DataPartyDetails party = FFRKProxy.Instance.GameState.PartyDetails;
         if (party != null)
         {
             UpdateEquipmentGrid(party.Equipments);
         }
     }
 }
예제 #6
0
        public override void Handle(Session Session)
        {
            DataPartyDetails party           = JsonConvert.DeserializeObject <DataPartyDetails>(this.GetResponseBody(Session));
            DbOpInsertItems  dbOpInsertItems = new DbOpInsertItems();

            foreach (DataEquipmentInformation equipment in party.Equipments)
            {
                dbOpInsertItems.Items.Add(new DbOpInsertItems.ItemRecord()
                {
                    EquipCategory = new SchemaConstants.EquipmentCategory?(equipment.Category),
                    Id            = equipment.EquipmentId,
                    Name          = equipment.Name.TrimEnd(' ', '+', '+'),
                    Type          = equipment.Type,
                    Rarity        = equipment.BaseRarity,
                    Series        = new uint?(equipment.SeriesId)
                });
            }
            FFRKProxy.Instance.GameState.PartyDetails = party;
            FFRKProxy.Instance.RaisePartyList(party);
        }
예제 #7
0
        public override void Handle(Session Session)
        {
            DataPartyDetails party          = JsonConvert.DeserializeObject <DataPartyDetails>(GetResponseBody(Session));
            DbOpInsertItems  insert_request = new DbOpInsertItems();

            foreach (DataEquipmentInformation equip in party.Equipments)
            {
                DbOpInsertItems.ItemRecord record = new DbOpInsertItems.ItemRecord();
                record.EquipCategory = equip.Category;
                record.Id            = equip.EquipmentId;
                record.Name          = equip.Name.TrimEnd(' ', '+', '+');
                record.Type          = equip.Type;
                record.Rarity        = equip.BaseRarity;
                record.Series        = equip.SeriesId;
                insert_request.Items.Add(record);
            }
            FFRKProxy.Instance.Database.BeginExecuteRequest(insert_request);

            FFRKProxy.Instance.GameState.PartyDetails = party;
            FFRKProxy.Instance.RaisePartyList(party);
        }