Exemple #1
0
        static AbilityFormula()
        {
            PSXAbilityFormulas    = new List <AbilityFormula>(ResourcesClass.AbilityFormulas.Count);
            PSXAbilityFormulaHash = new Dictionary <byte, AbilityFormula>(ResourcesClass.AbilityFormulas.Count);

            PSPAbilityFormulas    = new List <AbilityFormula>(ResourcesClass.AbilityFormulas.Count);
            PSPAbilityFormulaHash = new Dictionary <byte, AbilityFormula>(ResourcesClass.AbilityFormulas.Count);

            foreach (KeyValuePair <byte, string> kvp in ResourcesClass.AbilityFormulas)
            {
                AbilityFormula a = new AbilityFormula();
                a.Value   = kvp.Key;
                a.Formula = kvp.Value;

                if (a.Value >= 0x65 && a.Value <= 0x6A)
                {
                    AbilityFormula ab = new AbilityFormula();
                    ab.Value   = kvp.Key;
                    ab.Formula = string.Empty;
                    PSXAbilityFormulas.Add(ab);
                    PSXAbilityFormulaHash.Add(ab.Value, ab);
                }
                else
                {
                    PSXAbilityFormulas.Add(a);
                    PSXAbilityFormulaHash.Add(a.Value, a);
                }
                PSPAbilityFormulas.Add(a);
                PSPAbilityFormulaHash.Add(a.Value, a);
            }
        }
Exemple #2
0
        static AbilityFormula()
        {
            PSXAbilityFormulas = new List<AbilityFormula>( ResourcesClass.AbilityFormulas.Count );
            PSXAbilityFormulaHash = new Dictionary<byte, AbilityFormula>( ResourcesClass.AbilityFormulas.Count );

            PSPAbilityFormulas = new List<AbilityFormula>( ResourcesClass.AbilityFormulas.Count );
            PSPAbilityFormulaHash = new Dictionary<byte, AbilityFormula>( ResourcesClass.AbilityFormulas.Count );

            foreach (KeyValuePair<byte, string> kvp in ResourcesClass.AbilityFormulas)
            {
                AbilityFormula a = new AbilityFormula();
                a.Value = kvp.Key;
                a.Formula = kvp.Value;

                if( a.Value >= 0x65 && a.Value <= 0x6A )
                {
                    AbilityFormula ab = new AbilityFormula();
                    ab.Value = kvp.Key;
                    ab.Formula = string.Empty;
                    PSXAbilityFormulas.Add( ab );
                    PSXAbilityFormulaHash.Add( ab.Value, ab );
                }
                else
                {
                    PSXAbilityFormulas.Add( a );
                    PSXAbilityFormulaHash.Add( a.Value, a );
                }
                PSPAbilityFormulas.Add( a );
                PSPAbilityFormulaHash.Add( a.Value, a );
            }
        }