MapServer.PlayerObject.GetCurrentRandom C# (CSharp) Method

GetCurrentRandom() public method

public GetCurrentRandom ( ) : int
return int
        public int GetCurrentRandom()
        {
            return mnCurrentRandom;
        }

Usage Example

Example #1
0
        private bool Action_Random_Compare(ActionInfo info, PlayerObject play)
        {
            String[] option = info.param.Split(' ');
            int nValue  = Convert.ToInt32(option[1]);
            int nRandom = play.GetCurrentRandom();
            switch (option[0])
            {
                case ">":
                    {
                        return nValue > nRandom;

                    }
                case "=":
                    {
                        return nValue == nRandom;
                    }
                case "<":
                    {
                        return nValue < nRandom;
                    }
                case ">=":
                    {
                        return nValue >= nRandom;
                    }
                case "<=":
                    {
                        return nValue <= nRandom;
                    }
            }
            return false;
        }