/// <summary> /// 获取装备名 /// </summary> /// <param name="bCommunity">false:正常装备名;true:用于聊天系统的特殊装备名</param> /// <returns></returns> private string GetName(bool bCommunity = false) { if (name <= 0) { name = 6000; } //Debug.LogError("getName!!"); string qualityStr = LanguageData.dataMap[6000 + quality].content; string themeStr = ""; string slotStr = ""; int themeIndex; int slotIndex; //非戒指项链 if (type != 2 && type != 9) { //int level = levelNeed + 4; themeIndex = levelNeed / 5; slotIndex = 0; switch (vocation) { case (int)Vocation.Warrior: //这里是取巧方法,若等级排列有变化即不成立 themeIndex += 6045; break; case (int)Vocation.Assassin: themeIndex += 6060; break; case (int)Vocation.Archer: themeIndex += 6075; break; case (int)Vocation.Mage: themeIndex += 6090; break; } //非武器时部位名 if (type != 10) { slotIndex = 6016 + (type > 1 ? type - 1 : type) + (vocation - 1) * 7; } else { slotIndex = 6007 + subtype - 1; } } //戒指项链 else { //int level = levelNeed + 4; themeIndex = levelNeed / 5 + 6105; if (type == 2) { slotIndex = 6015; } else { slotIndex = 6016; } } themeStr = LanguageData.dataMap[themeIndex].content; slotStr = LanguageData.dataMap[slotIndex].content; string strName = ""; QualityColorData colorData = QualityColorData.dataMap[quality]; if (!bCommunity) { //Debug.LogError("name:" + name); //Debug.LogError("qualityStr:" + qualityStr); //Debug.LogError("themeStr:" + themeStr); //Debug.LogError("slotStr:" + slotStr); strName = string.Concat("[", colorData.color, "]", LanguageData.dataMap[name].Format(qualityStr, themeStr, slotStr), "[-]"); } else { strName = string.Concat("LV", levelNeed, " ", LanguageData.dataMap[name].Format(qualityStr, themeStr, slotStr)); strName = string.Format(LanguageData.GetContent(47304), strName); strName = string.Concat("[", colorData.color, "]", strName, "[-]"); } //Debug.LogError("getName:" + strName); return(strName); }