Ejemplo n.º 1
0
    public NkBattleChar SelectBattleSkillChar_GRID_ALL(NkBattleChar pkSendChar, int BattleSkillUnique, eBATTLE_ALLY eAlly)
    {
        BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(BattleSkillUnique);

        int battleSkillLevelByUnique         = pkSendChar.GetBattleSkillLevelByUnique(BattleSkillUnique);
        BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(BattleSkillUnique, battleSkillLevelByUnique);

        if (battleSkillBase == null || battleSkillDetail == null)
        {
            return(null);
        }
        NkBattleChar[] arChar = this.m_arChar;
        for (int i = 0; i < arChar.Length; i++)
        {
            NkBattleChar nkBattleChar = arChar[i];
            if (nkBattleChar != null)
            {
                int iD = nkBattleChar.GetID();
                if (iD >= 0 && this.m_arChar[iD] != null && this.m_arChar[iD].Ally == eAlly)
                {
                    int num = pkSendChar.CanBattleSkill(this.m_arChar[iD], this.m_arChar[iD].GetCharPos(), battleSkillBase, battleSkillDetail);
                    if (num == 1 || num == -2)
                    {
                        if (this.CheckBuffSkillToType(nkBattleChar, 98))
                        {
                            if (battleSkillDetail.GetSkillDetalParamValue(75) > 0 || battleSkillDetail.GetSkillDetalParamValue(76) > 0)
                            {
                                return(this.m_arChar[iD]);
                            }
                        }
                        else
                        {
                            if (!this.CheckBuffSkillToType(nkBattleChar, 99))
                            {
                                return(this.m_arChar[iD]);
                            }
                            if (nkBattleChar.Ally != pkSendChar.Ally && (battleSkillDetail.GetSkillDetalParamValue(75) > 0 || battleSkillDetail.GetSkillDetalParamValue(76) > 0))
                            {
                                return(this.m_arChar[iD]);
                            }
                        }
                    }
                }
            }
        }
        return(null);
    }