Beispiel #1
0
    // Token: 0x060019AF RID: 6575 RVA: 0x002B8790 File Offset: 0x002B6990
    private CString GetEffectStr(GATTR_ENUM effect, double effectValue)
    {
        CString cstring = null;
        int     num     = 0;

        if (this.m_DeshieldCStr != null)
        {
            ushort[] array = new ushort[]
            {
                4326,
                4327,
                4328,
                4311,
                4312,
                4313,
                4314,
                4316,
                4317,
                4318,
                4319,
                4321,
                4322,
                4323,
                4324
            };
            switch (effect)
            {
            case GATTR_ENUM.EGA_DESHIELD_INFANTRY_ATK:
                cstring = this.m_DeshieldCStr[3];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[3]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_CAVALRY_ATK:
                cstring = this.m_DeshieldCStr[4];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[4]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_RANGED_ATK:
                cstring = this.m_DeshieldCStr[5];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[5]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_SIEGE_ATK:
                cstring = this.m_DeshieldCStr[6];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[6]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_INFANTRY_DEF:
                cstring = this.m_DeshieldCStr[7];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[7]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_CAVALRY_DEF:
                cstring = this.m_DeshieldCStr[8];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[8]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_RANGED_DEF:
                cstring = this.m_DeshieldCStr[9];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[9]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_SIEGE_DEF:
                cstring = this.m_DeshieldCStr[10];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[10]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_INFANTRY_HEALTH:
                cstring = this.m_DeshieldCStr[11];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[11]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_CAVALRY_HEALTH:
                cstring = this.m_DeshieldCStr[12];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[12]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_RANGED_HEALTH:
                cstring = this.m_DeshieldCStr[13];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[13]));
                break;

            case GATTR_ENUM.EGA_DESHIELD_SIEGE_HEALTH:
                cstring = this.m_DeshieldCStr[14];
                cstring.ClearString();
                cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[14]));
                break;

            default:
                switch (effect)
                {
                case GATTR_ENUM.EGE_DESHIELD_ATK:
                    num     = 5;
                    cstring = this.m_DeshieldCStr[0];
                    cstring.ClearString();
                    cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[0]));
                    break;

                case GATTR_ENUM.EGE_DESHIELD_DEF:
                    cstring = this.m_DeshieldCStr[1];
                    cstring.ClearString();
                    cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[1]));
                    break;

                case GATTR_ENUM.EGE_DESHIELD_HEALTH:
                    cstring = this.m_DeshieldCStr[2];
                    cstring.ClearString();
                    cstring.Append(this.DM.mStringTable.GetStringByID((uint)array[2]));
                    break;
                }
                break;
            }
            double f = effectValue / 100.0 + (double)num;
            cstring.DoubleToFormat(f, 2, false);
            if (this.GM.IsArabic)
            {
                cstring.AppendFormat("%{0}");
            }
            else
            {
                cstring.AppendFormat("{0}%");
            }
            return(cstring);
        }
        return(null);
    }