DarkEmu_GameServer.Systems.GetGroupId C# (CSharp) Метод

GetGroupId() приватный Метод

private GetGroupId ( int playerid ) : short
playerid int
Результат short
        short GetGroupId(int playerid)
        {
            try
            {
                //Get count of groups
                int count = MsSQL.GetRowsCount("SELECT * FROM friends_groups WHERE playerid='" + playerid + "'");
                //If no groups have been created
                if (count == 0) return (short)0;
                //If groups have been created
                else if (count > 0)
                {
                    //We add one + to the count since def non classified is a group
                    count = count + 1;
                    //Return the new count value
                    return (short)count;
                }
                //Def return 0
            }
            catch (Exception ex)
            {
                Systems.Debugger.Write(ex);
            }
            return 0;
        }
Systems