public string GetSetName(SetBufKnd knd) { string name = string.Empty; switch (knd) { case SetBufKnd.ATK_UP: name = "메이드 셋트"; break; case SetBufKnd.HP_UP: name = "루키 셋트"; break; case SetBufKnd.ATK_SKILL_DMG_UP: name = "어택 스킬 셋트"; break; case SetBufKnd.DMG_DECLINE: name = "방어 셋트"; break; default: break; } return(name); }
void Activation_DisableButton() { //현재 세트장비 타입반환 SetBufKnd bufKnd = Chk_EquipSet(unitIdx); for (int i = 0; i < DisableButtons.Count; i++) { DisableButtons[i].SetActive(i == (int)bufKnd - 1); } }
//착용된 아이템중 셋트장비인지 체크 public SetBufKnd Chk_EquipSetBuf(bool isEffectActive) { Dictionary <ushort, Infos_SetBuf> infosSetbuf = TableDataManager.instance.Infos_SetBuffs; bool isSet = false; SetBufKnd setKind = SetBufKnd.NONE; if (isEffectActive == true) { if (gainUserUnit != null) { foreach (var sb in infosSetbuf) { bool correct = true; if (isSet == true) { break; } if (sb.Value.MainWpnIdx != gainUserUnit.MainWpnIdx) { correct = false; } else if (sb.Value.MainWpnIdx == 0) { correct = true; } if (sb.Value.SubWpnIdx != gainUserUnit.SubWpnIdx) { correct = false; } else if (sb.Value.SubWpnIdx == 0) { correct = true; } if (sb.Value.DecoIdx1 != gainUserUnit.DecoIdx1) { correct = false; } if (sb.Value.DecoIdx2 != gainUserUnit.DecoIdx2) { correct = false; } if (sb.Value.DecoIdx3 != gainUserUnit.DecoIdx3) { correct = false; } if (correct == true) { isSet = correct; setKind = (SetBufKnd)sb.Value.BufKind; } } } } //셋트이펙트 활성/비활성 Activate_ChrcEffect(CharacterEffect.SetEffect, isSet); return(setKind); }
//현재 세트장비 타입 반환 public SetBufKnd Chk_EquipSet(uint _unitidx) { User user = UserDataManager.instance.user; bool isSet = false; SetBufKnd setKind = SetBufKnd.NONE; User_Units gainUserUnit = null; if (user.User_Units.ContainsKey(_unitidx)) { gainUserUnit = user.User_Units[_unitidx]; } if (gainUserUnit != null) { foreach (var sb in infosSetbuff) { bool correct = true; if (isSet == true) { break; } if (sb.Value.MainWpnIdx != gainUserUnit.MainWpnIdx) { correct = false; } else if (sb.Value.MainWpnIdx == 0) { correct = true; } if (sb.Value.SubWpnIdx != gainUserUnit.SubWpnIdx) { correct = false; } else if (sb.Value.SubWpnIdx == 0) { correct = true; } if (sb.Value.DecoIdx1 != gainUserUnit.DecoIdx1) { correct = false; } if (sb.Value.DecoIdx2 != gainUserUnit.DecoIdx2) { correct = false; } if (sb.Value.DecoIdx3 != gainUserUnit.DecoIdx3) { correct = false; } if (correct == true) { isSet = correct; setKind = (SetBufKnd)sb.Value.BufKind; } } } return(setKind); }