| | |
| | | public static string GetSuitNameByName(string attrName)
|
| | | {
|
| | | string suitStr = "";
|
| | | for(int i = 0; i < attrName.Length; i++)
|
| | | for (int i = 0; i < attrName.Length; i++)
|
| | | {
|
| | | if(i != attrName.Length - 1)
|
| | | if (i != attrName.Length - 1)
|
| | | {
|
| | | if (attrName.Length == 2)
|
| | | {
|
| | | suitStr = StringUtility.Contact(suitStr,attrName[i]," ");
|
| | | suitStr = StringUtility.Contact(suitStr, attrName[i], " ");
|
| | | }
|
| | | else if(attrName.Length == 3)
|
| | | else if (attrName.Length == 3)
|
| | | {
|
| | | suitStr = StringUtility.Contact(suitStr,attrName[i], " ");
|
| | | suitStr = StringUtility.Contact(suitStr, attrName[i], " ");
|
| | | }
|
| | | else
|
| | | {
|
| | | suitStr = StringUtility.Contact(suitStr,attrName[i]);
|
| | | suitStr = StringUtility.Contact(suitStr, attrName[i]);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | }
|
| | | return suitStr;
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | public static void SetItemBackGround(this Image _image, int itemColor)
|
| | |
| | | {
|
| | | _textBuilder.Length = 0;
|
| | | float hm = (float)Math.Round(num / 100000000, 2);
|
| | | if(hm >= 100)
|
| | | if (hm >= 100)
|
| | | {
|
| | | hm = (int)Math.Round(num / 100000000);
|
| | | _textBuilder.Append(hm);
|
| | | _textBuilder.Append(Language.Get("L1070"));
|
| | | return _textBuilder.ToString();
|
| | | }
|
| | | else if(hm >= 10)
|
| | | else if (hm >= 10)
|
| | | {
|
| | | hm = (float)Math.Round(num / 100000000,1);
|
| | | hm = (float)Math.Round(num / 100000000, 1);
|
| | | _textBuilder.Append(hm);
|
| | | _textBuilder.Append(Language.Get("L1070"));
|
| | | return _textBuilder.ToString();
|
| | |
| | | _textBuilder.Append(Language.Get("L1070"));
|
| | | return _textBuilder.ToString();
|
| | | }
|
| | | |
| | |
|
| | | float tt = (float)Math.Round(num / 10000, 2);
|
| | | if (tt >= 100)
|
| | | {
|
| | |
| | | _textBuilder.Append(Language.Get("L1071"));
|
| | | return _textBuilder.ToString();
|
| | | }
|
| | | else if(tt >= 10)
|
| | | else if (tt >= 10)
|
| | | {
|
| | | tt = (float)Math.Round(num / 10000,1);
|
| | | tt = (float)Math.Round(num / 10000, 1);
|
| | | _textBuilder.Append(tt);
|
| | | _textBuilder.Append(Language.Get("L1071"));
|
| | | return _textBuilder.ToString();
|
| | | }
|
| | | else if(tt >= 1)
|
| | | else if (tt >= 1)
|
| | | {
|
| | | _textBuilder.Append(tt);
|
| | | _textBuilder.Append(Language.Get("L1071"));
|
| | |
| | |
|
| | | if (_textBuilder.Length == 0)
|
| | | {
|
| | | tt = (float)Math.Round(num,2);
|
| | | tt = (float)Math.Round(num, 2);
|
| | | _textBuilder.Append(tt);
|
| | | }
|
| | | return _textBuilder.ToString();
|
| | |
| | | sb.Append(Language.Get("L1070"));
|
| | | return sb.ToString();
|
| | | }
|
| | | else if(hm >= 1)
|
| | | else if (hm >= 1)
|
| | | {
|
| | | sb.Append(hm);
|
| | | sb.Append(Language.Get("L1070"));
|
| | |
| | | sb.Append(Language.Get("L1071"));
|
| | | return sb.ToString();
|
| | | }
|
| | | |
| | |
|
| | | if (sb.Length == 0)
|
| | | {
|
| | | tt = (float)Math.Round(num, 2);
|
| | |
| | |
|
| | | public static string GetColorNameByItemColor(int itemColor)
|
| | | {
|
| | | switch(itemColor)
|
| | | switch (itemColor)
|
| | | {
|
| | | case 1:
|
| | | return Language.Get("Market_Text_42");
|
| | |
| | | #endregion
|
| | |
|
| | | #region 文字色值
|
| | | public static readonly Color32 s_BrightPinkColor = new Color32(246, 64, 141, 255);
|
| | | public static readonly Color32 s_BrightRedColor = new Color32(255, 3, 3, 255);
|
| | | public static readonly Color32 s_BrightPurpleColor = new Color32(218, 72, 213, 255);
|
| | | public static readonly Color32 s_BrightBlueColor = new Color32(0, 107, 227, 255); //006BE3FF
|
| | | public static readonly Color32 s_BrightOrangeColor = new Color32(255, 103, 1, 255); //FF6701FF
|
| | | public static readonly Color32 s_BrightWhiteColor = new Color32(104, 104, 104, 255); //686868
|
| | | public static readonly Color32 s_BrightGreenColor = new Color32(16, 157, 6, 255); //109d06
|
| | | public static readonly Color s_BrightPinkColor = new Color32(246, 64, 141, 255);
|
| | | public static readonly Color s_BrightRedColor = new Color32(255, 3, 3, 255);
|
| | | public static readonly Color s_BrightPurpleColor = new Color32(218, 72, 213, 255);
|
| | | public static readonly Color s_BrightBlueColor = new Color32(0, 107, 227, 255); //006BE3FF
|
| | | public static readonly Color s_BrightOrangeColor = new Color32(255, 103, 1, 255); //FF6701FF
|
| | | public static readonly Color s_BrightWhiteColor = new Color32(104, 104, 104, 255); //686868
|
| | | public static readonly Color s_BrightGreenColor = new Color32(16, 157, 6, 255); //109d06
|
| | |
|
| | | public static readonly Color32 s_DarkPinkColor = new Color32(255, 124, 124, 255);
|
| | | public static readonly Color32 s_DarkRedColor = new Color32(250, 1, 1, 255);
|
| | | public static readonly Color32 s_DarkPurpleColor = new Color32(236, 75, 246, 255);
|
| | | public static readonly Color32 s_DarkBlueColor = new Color32(49, 206, 251, 255);
|
| | | public static readonly Color32 s_DarkOrangeColor = new Color32(248, 152, 59, 255);
|
| | | public static readonly Color32 s_DarkWhiteColor = new Color32(247, 247, 247, 255);
|
| | | public static readonly Color32 s_DarkGreenColor = new Color32(53, 225, 34, 255); //35e122
|
| | | public static readonly Color s_DarkPinkColor = new Color32(255, 124, 124, 255);
|
| | | public static readonly Color s_DarkRedColor = new Color32(250, 1, 1, 255);
|
| | | public static readonly Color s_DarkPurpleColor = new Color32(236, 75, 246, 255);
|
| | | public static readonly Color s_DarkBlueColor = new Color32(49, 206, 251, 255);
|
| | | public static readonly Color s_DarkOrangeColor = new Color32(248, 152, 59, 255);
|
| | | public static readonly Color s_DarkWhiteColor = new Color32(247, 247, 247, 255);
|
| | | public static readonly Color s_DarkGreenColor = new Color32(53, 225, 34, 255); //35e122
|
| | |
|
| | | public static readonly Color s_NavyBrown = new Color32(64, 28, 6, 255);//401c06
|
| | | public static readonly Color s_Black = new Color32(0, 0, 0, 255);
|
| | |
| | | public static readonly Color s_LightYellow = new Color32(255, 244, 205, 255); //fff4cd
|
| | | public static readonly Color s_Gray = new Color32(204, 204, 204, 255);
|
| | |
|
| | | public static readonly Color s_BrightDanLV0 = new Color32(102,102,102,255); //666666
|
| | | public static readonly Color s_BrightDanLV0 = new Color32(102, 102, 102, 255); //666666
|
| | | public static readonly Color s_BrightDanLV1 = new Color32(148, 96, 255, 255); //9460ff
|
| | | public static readonly Color s_BrightDanLV2 = new Color32(0, 102, 255, 255); //0066ff
|
| | | public static readonly Color s_BrightDanLV3 = new Color32(0, 179, 55, 255); //00b337
|
| | |
| | | public static readonly Color s_BrightDanLV5 = new Color32(255, 0, 0, 255); //ff0000
|
| | | public static readonly Color s_BrightDanLV6 = new Color32(255, 0, 246, 255); //ff00f6
|
| | |
|
| | | public static readonly Color s_GrayDanLV0 = new Color32(221,221, 221, 255); //dddddd
|
| | | public static readonly Color s_GrayDanLV1 = new Color32(121,153, 255, 255); //7999ff
|
| | | public static readonly Color s_GrayDanLV0 = new Color32(221, 221, 221, 255); //dddddd
|
| | | public static readonly Color s_GrayDanLV1 = new Color32(121, 153, 255, 255); //7999ff
|
| | | public static readonly Color s_GrayDanLV2 = new Color32(0, 198, 255, 255); //00c6ff
|
| | | public static readonly Color s_GrayDanLV3 = new Color32(102, 255, 0, 255); //66ff00
|
| | | public static readonly Color s_GrayDanLV4 = new Color32(255, 144, 0, 255); //ff9000
|
| | | public static readonly Color s_GrayDanLV5 = new Color32(255, 0, 0, 255); //ff0000
|
| | | public static readonly Color s_GrayDanLV6 = new Color32(240, 0, 255, 255); //f000ff
|
| | |
|
| | | public static Color GetDanLVColor(int danLv,bool bright = false)
|
| | | public static Color GetDanLVColor(int danLv, bool bright = false)
|
| | | {
|
| | | var crossDanLVConfig = CrossServerArenaConfig.Get(danLv);
|
| | | if(crossDanLVConfig != null)
|
| | | if (crossDanLVConfig != null)
|
| | | {
|
| | | switch (crossDanLVConfig.DanType)
|
| | | {
|
| | |
| | | return StringUtility.Contact("<color=#", "000000", ">", msg, "</color>");
|
| | | case TextColType.LightYellow:
|
| | | return StringUtility.Contact("<color=#", "fff4cd", ">", msg, "</color>");
|
| | | case TextColType.LightGreen:
|
| | | return StringUtility.Contact("<color=#", "8ddc11", ">", msg, "</color>");
|
| | | }
|
| | | return msg;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static string GetRealmColorByLv(int realmLv,string msg, bool bright = false)
|
| | | public static string GetRealmColorByLv(int realmLv, string msg, bool bright = false)
|
| | | {
|
| | | var config = RealmConfig.Get(realmLv);
|
| | | if (config == null)
|
| | |
| | | switch (config.Quality)
|
| | | {
|
| | | case 1:
|
| | | return StringUtility.Contact("<color=#", bright ? "686868" : "f7f7f7", ">",msg, "</color>");
|
| | | return StringUtility.Contact("<color=#", bright ? "686868" : "f7f7f7", ">", msg, "</color>");
|
| | | case 2:
|
| | | return StringUtility.Contact("<color=#", bright ? "08d00a" : "08d00a", ">", msg, "</color>");
|
| | | case 3:
|
| | |
| | | {
|
| | | return 0;
|
| | | }
|
| | | |
| | |
|
| | | foreach (var _key in _propertyDict.Keys)
|
| | | {
|
| | | PlayerPropertyConfig cfg = PlayerPropertyConfig.Get(_key);
|
| | |
| | | Equation.Instance.AddKeyValue("MinAtk", _propertyDict[_key]);
|
| | | Equation.Instance.AddKeyValue("MaxAtk", _propertyDict[_key]);
|
| | | }
|
| | | else if(_key == 24)
|
| | | else if (_key == 24)
|
| | | {
|
| | | Equation.Instance.AddKeyValue("PetMinAtk", _propertyDict[_key]);
|
| | | Equation.Instance.AddKeyValue("PetMaxAtk", _propertyDict[_key]);
|
| | |
| | | {
|
| | | float attrValue = _propertyDict[_key];
|
| | | int fightParm = GetFightPowerParmByAttrId(_key);
|
| | | if(_key == 11)
|
| | | if (_key == 11)
|
| | | {
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | FightPowerParamConfig paramConfig = FightPowerParamConfig.Get(playerLv);
|
| | | Equation.Instance.AddKeyValue("AtkSpeedParameter", paramConfig.AtkSpeedParameter);
|
| | | }
|
| | | else if(_key == 15)
|
| | | else if (_key == 15)
|
| | | {
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | FightPowerParamConfig paramConfig = FightPowerParamConfig.Get(playerLv);
|
| | | Equation.Instance.AddKeyValue("LuckyHitParameter",paramConfig.LuckyHitParameter);
|
| | | Equation.Instance.AddKeyValue("LuckyHitParameter", paramConfig.LuckyHitParameter);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | Equation.Instance.AddKeyValue(cfg.Parameter, attrValue);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | | FuncConfigConfig funcCfg = FuncConfigConfig.Get(FightPowerFormula);
|
| | | return Equation.Instance.Eval<int>(funcCfg.Numerical1);
|
| | |
| | | PlayerPropertyConfig cfg = PlayerPropertyConfig.Get(attrId);
|
| | | if (paramConfig == null || cfg == null) return 0;
|
| | |
|
| | | switch(cfg.Parameter)
|
| | | switch (cfg.Parameter)
|
| | | {
|
| | | case "Hit":
|
| | | return paramConfig.Hit;
|
| | |
| | | #region 得到装备位对应的部位名称
|
| | | public static string GetEquipPlaceName(int place)
|
| | | {
|
| | | if(GeneralDefine.equipPlaceNameDict.ContainsKey(place))
|
| | | if (GeneralDefine.equipPlaceNameDict.ContainsKey(place))
|
| | | {
|
| | | return GeneralDefine.equipPlaceNameDict[place];
|
| | | }
|