示例#1
0
        private static void SetBuffValue(BuffMethodTypes type, ref OShort param, int value)
        {
            switch (type)
            {
            case BuffMethodTypes.Add:
                param = (OShort)((int)param + value);
                break;

            case BuffMethodTypes.Highest:
                if ((int)param >= value)
                {
                    break;
                }
                param = (OShort)value;
                break;

            case BuffMethodTypes.Lowest:
                if ((int)param <= value)
                {
                    break;
                }
                param = (OShort)value;
                break;
            }
        }
示例#2
0
        private void SetBuffValue(BuffTypes type, ref OShort param, int value)
        {
            switch (type)
            {
            case BuffTypes.Buff:
                if ((int)param >= value)
                {
                    break;
                }
                param = (OShort)value;
                break;

            case BuffTypes.Debuff:
                if ((int)param <= value)
                {
                    break;
                }
                param = (OShort)value;
                break;
            }
        }