/// <param name="isBasicStatue"> 힘민지만 계산할지 </param>
    public void Buff(int id, bool isBasicStatue = true, int?tribeType = null)
    {
        DBSkillPassiveData passive = CSVData.Inst.GetSkillPassiveData(id);

        if (tribeType == null || tribeType + 900 == passive.targetID || passive.targetID == 2)
        {
            if ((isBasicStatue && (passive.effectID == EFFECT_ID.STR || passive.effectID == EFFECT_ID.DEX || passive.effectID == EFFECT_ID.INT)) ||
                (!isBasicStatue && passive.effectID != EFFECT_ID.STR && passive.effectID != EFFECT_ID.DEX && passive.effectID != EFFECT_ID.INT))
            {
                if (passive.effectID == EFFECT_ID.HP)
                {
                    buff.Add(id);
                    return;
                }

                if (passive.effectType == EFFECT_TYPE.ADD)
                {
                    Status[passive.effectID] += passive.effectAdd;
                }
                else if (passive.effectType == EFFECT_TYPE.ADD_PER)
                {
                    Status[passive.effectID] += (int)(Status[passive.effectID] * (passive.effectAdd / 100.0f));
                }
                else if (passive.effectType == EFFECT_TYPE.MINUS)
                {
                    Status[passive.effectID] -= passive.effectAdd;
                }
                else if (passive.effectType == EFFECT_TYPE.MINUS_PER)
                {
                    Status[passive.effectID] -= (int)(Status[passive.effectID] * (passive.effectAdd / 100.0f));
                }
                buff.Add(id);
            }
        }
    }
    public void updateFormation()
    {
        for (int i = 0; i < 5; i++)
        {
            if (formationSlot[i] == 0)
            {
                buttonServantFormation[i].image.sprite = spriteSlot[1];
                imageServantFormation[i].enabled       = false;

                objectServantInfo[i].SetActive(false);
            }
            else
            {
                UserServantData servant = UserDataManager.Inst.GetServantInfo(formationSlot[i]);
                if (servant == null)
                {
                    DebugLog.Log(false, "Invalid Servant ID : " + formationSlot[i]);
                    return;
                }

                buttonServantFormation[i].image.sprite = CSVData.Inst.GetSpriteGrade((GRADE_TYPE)servant.grade);
                imageServantFormation[i].enabled       = true;
                imageServantFormation[i].sprite        = CSVData.Inst.GetServantData(servant.id).servantIcon;

                imageServantType[i].sprite = CSVData.Inst.GetSpriteServantJob(servant.jobType);
                textServantLevel[i].text   = servant.level.ToString();

                if (servant.level >= DEFINE.MAX_LEVEL)
                {
                    textServantExpPer[i].text     = "MAX";
                    imageServantExp[i].fillAmount = 1f;
                }
                else
                {
                    DBExpData dbExpData = CSVData.Inst.GetExpData(servant.level);
                    if (dbExpData == null)
                    {
                        DebugLog.Log(false, "Invalid Level Data");
                    }
                    else
                    {
                        int exExp = 0;
                        if (servant.level - 1 > 0)
                        {
                            DBExpData exDBExpData = CSVData.Inst.GetExpData(servant.level - 1);
                            if (exDBExpData == null)
                            {
                                DebugLog.Log(false, "Invalid Level Data");
                            }
                            else
                            {
                                exExp = exDBExpData.charExp;
                            }
                        }
                        float expPer = (exExp - servant.exp) / (float)(exExp - dbExpData.charExp);
                        textServantExpPer[i].text     = (int)(expPer * 100) + "%";
                        imageServantExp[i].fillAmount = expPer;
                    }
                }


                objectServantInfo[i].SetActive(true);
            }
        }

        int[] synergy = new int[8];

        for (int i = 0; i < 5; i++)
        {
            if (formationSlot[i + 5] == 0)
            {
                buttonMonsterFormation[i].image.sprite = spriteSlot[1];
                imageMonsterFormation[i].enabled       = false;

                objectMonsterInfo[i].SetActive(false);
            }
            else
            {
                UserMonsterData monster = UserDataManager.Inst.GetMonsterInfo(formationSlot[i + 5]);
                if (monster == null)
                {
                    DebugLog.Log(false, "Invalid Monster ID : " + formationSlot[i + 5]);
                    return;
                }

                buttonMonsterFormation[i].image.sprite = CSVData.Inst.GetSpriteGrade((GRADE_TYPE)monster.grade);
                imageMonsterFormation[i].enabled       = true;
                imageMonsterFormation[i].sprite        = CSVData.Inst.GetMonsterData(monster.id).monsterIcon;

                imageMonsterTribe[i].sprite          = CSVData.Inst.GetSmallSpriteTribeType(monster.tribeType);
                synergy[(int)monster.tribeType - 1] += 1;
                imageMonsterType[i].sprite           = CSVData.Inst.GetSpriteElementType(monster.elementType);
                textMonsterLevel[i].text             = monster.level.ToString();

                if (monster.level >= DEFINE.MAX_LEVEL)
                {
                    textMonsterExpPer[i].text     = "MAX";
                    imageMonsterExp[i].fillAmount = 1f;
                }
                else
                {
                    DBExpData dbExpData = CSVData.Inst.GetExpData(monster.level);
                    if (dbExpData == null)
                    {
                        DebugLog.Log(false, "Invalid Level Data");
                    }
                    else
                    {
                        int exExp = 0;
                        if (monster.level - 1 > 0)
                        {
                            DBExpData exDBExpData = CSVData.Inst.GetExpData(monster.level - 1);
                            if (exDBExpData == null)
                            {
                                DebugLog.Log(false, "Invalid Level Data");
                            }
                            else
                            {
                                exExp = exDBExpData.charExp;
                            }
                        }
                        float expPer = (exExp - monster.exp) / (float)(exExp - dbExpData.charExp);
                        textMonsterExpPer[i].text     = (int)(expPer * 100) + "%";
                        imageMonsterExp[i].fillAmount = expPer;
                    }
                }


                objectMonsterInfo[i].SetActive(true);
            }
        }

        int synergyCount = 0;

        for (int i = 0; i < 8; i++)
        {
            int idCount = 0;
            if (synergy[i] == 5)
            {
                idCount = 3;
            }
            else if (synergy[i] >= 3)
            {
                idCount = 2;
            }
            else if (synergy[i] >= 2)
            {
                idCount = 1;
            }

            if (idCount == 0)
            {
                continue;
            }

            DBSkillPassiveData synergyData = CSVData.Inst.GetSynergyData(i + 1, idCount);
            imageSynergyIcon[synergyCount].sprite = synergyData.passiveIcon;
            textSynergySubject[synergyCount].text = synergyData.name;
            textSynergyDetail[synergyCount].text  = synergyData.explain;
            PartySynergy[synergyCount].SetActive(true);
            synergyCount += 1;
        }

        for (int i = synergyCount; i < 3; i++)
        {
            PartySynergy[i].SetActive(false);
        }
    }