Пример #1
0
    public static Boolean UpdateAbilitiesAchievement(Int32 abilId, Boolean autoReport)
    {
        Boolean flag = false;

        if (abilId == 0)
        {
            return(flag);
        }
        if (abilId < 192)
        {
            if (!FF9StateSystem.Achievement.abilities.Contains(abilId))
            {
                FF9StateSystem.Achievement.abilities.Add(abilId);
                flag = true;
            }
        }
        else
        {
            if (!FF9StateSystem.Achievement.abilities.Contains(abilId))
            {
                FF9StateSystem.Achievement.abilities.Add(abilId);
                flag = true;
            }
            if (!FF9StateSystem.Achievement.passiveAbilities.Contains(abilId))
            {
                FF9StateSystem.Achievement.passiveAbilities.Add(abilId);
                flag = true;
            }
        }
        if (autoReport && flag)
        {
            BattleAchievement.SendAbilitiesAchievement();
        }
        return(flag);
    }
Пример #2
0
    public void SetMasterSkill()
    {
        if (!IsMasterSkill)
        {
            return;
        }
        bool flag = false;

        for (int index1 = 0; index1 < 9; ++index1)
        {
            PLAYER player = FF9StateSystem.Common.FF9.player[index1];
            foreach (FF9ITEM ff9Item in FF9StateSystem.Common.FF9.item)
            {
                if (ff9Item.count > 0 && ff9item.FF9Item_GetEquipPart(ff9Item.id) > -1)
                {
                    foreach (byte num in ff9item._FF9Item_Data[ff9Item.id].ability)
                    {
                        int index2 = ff9abil.FF9Abil_GetIndex(player.info.slot_no, num);
                        if (index2 > -1)
                        {
                            player.pa[index2] = (byte)ff9abil.FF9Abil_GetMax(player.info.slot_no, num);
                            if (BattleAchievement.UpdateAbilitiesAchievement(num, false))
                            {
                                flag = true;
                            }
                        }
                    }
                }
            }
            for (int index2 = 0; index2 < 5; ++index2)
            {
                byte num1 = player.equip[index2];
                if (num1 != byte.MaxValue)
                {
                    foreach (byte num2 in ff9item._FF9Item_Data[num1].ability)
                    {
                        int index3 = ff9abil.FF9Abil_GetIndex(player.info.slot_no, num2);
                        if (index3 > -1)
                        {
                            player.pa[index3] = (byte)ff9abil.FF9Abil_GetMax(player.info.slot_no, num2);
                            if (BattleAchievement.UpdateAbilitiesAchievement(num2, false))
                            {
                                flag = true;
                            }
                        }
                    }
                }
            }
            if (player.info.serial_no == 9)
            {
                foreach (PA_DATA paData in ff9abil._FF9Abil_PaData[player.info.menu_type])
                {
                    if (paData.id != 0 && paData.id < 192)
                    {
                        int index2 = ff9abil.FF9Abil_GetIndex(player.info.slot_no, paData.id);
                        player.pa[index2] = paData.max_ap;
                        if (BattleAchievement.UpdateAbilitiesAchievement(paData.id, false))
                        {
                            flag = true;
                        }
                    }
                }
            }
        }
        if (!flag)
        {
            return;
        }
        BattleAchievement.SendAbilitiesAchievement();
    }