public string GetText(enUserBuff buffType) { string result = string.Empty; string format = "\n{0} ({1}%)"; switch (buffType) { case enUserBuff.GOLD: { // 8797 [FFBB00]골드 획득량 {0}% 증가[-]\n─────────────\n result = string.Format(StringTableManager.GetData(8797), GetValue(buffType)); if (GoldBuffGuild > 0.0f) { result += string.Format(format, BuffTextGuild, (GoldBuffGuild * 100.0f)); } if (GoldBuffBuySubItem > 0.0f) { result += string.Format(format, StringTableManager.GetData(8794), (GoldBuffBuySubItem * 100.0f)); } if (GoldBuffEvent > 0.0f) { result += string.Format(format, BuffTextEvent[(int)_enTempEventType.Stage_Gold], (GoldBuffEvent)); } } break; case enUserBuff.EXP: { // 8798 [FFBB00]영웅 획득량 { 0}% 증가[-]\n─────────────\n result = string.Format(StringTableManager.GetData(8798), GetValue(buffType)); if (ExpBuffGuild > 0.0f) { result += string.Format(format, BuffTextGuild, (ExpBuffGuild * 100.0f)); } if (ExpBuffBuySubItem > 0.0f) { result += string.Format(format, StringTableManager.GetData(8791), (ExpBuffBuySubItem * 100.0f)); } if (ExpBuffEvent > 0.0f) { result += string.Format(format, BuffTextEvent[(int)_enTempEventType.Stage_Exp], (ExpBuffEvent)); } } break; default: #if DEBUG_LOG Debug.LogError("enUserBuff - no buff type"); #endif break; } return(result); }
private float GetValue(enUserBuff buffType) { float result = 0.0f; switch (buffType) { case enUserBuff.GOLD: result += (GoldBuffGuild * 100.0f) + (GoldBuffBuySubItem * 100.0f) + (GoldBuffEvent); break; case enUserBuff.EXP: result += (ExpBuffGuild * 100.0f) + (ExpBuffBuySubItem * 100.0f) + (ExpBuffEvent); break; default: #if DEBUG_LOG Debug.LogError("enUserBuff - no buff type"); #endif break; } return(result); }