public string GetRandomName()
    {
        ResRobotName     resRobotName     = null;
        ResRobotSubNameC resRobotSubNameC = null;
        ResRobotSubNameA resRobotSubNameA = null;
        ResRobotSubNameB resRobotSubNameB = null;

        while (resRobotName == null)
        {
            uint num = (uint)this.m_random.Next(0, GameDataMgr.robotName.count);
            resRobotName = GameDataMgr.robotName.GetDataByKey(num + 1u);
        }
        while (resRobotSubNameC == null)
        {
            uint num2 = (uint)this.m_random.Next(0, GameDataMgr.robotSubNameC.count);
            resRobotSubNameC = GameDataMgr.robotSubNameC.GetDataByKey(num2 + 1u);
        }
        while (resRobotSubNameA == null)
        {
            uint num3 = (uint)this.m_random.Next(0, GameDataMgr.robotSubNameA.count);
            resRobotSubNameA = GameDataMgr.robotSubNameA.GetDataByKey(num3 + 1u);
        }
        while (resRobotSubNameB == null)
        {
            uint num4 = (uint)this.m_random.Next(0, GameDataMgr.robotSubNameB.count);
            resRobotSubNameB = GameDataMgr.robotSubNameB.GetDataByKey(num4 + 1u);
        }
        return(string.Format("{0}{1}{2}{3}", new object[]
        {
            Utility.UTF8Convert(resRobotName.szName),
            Utility.UTF8Convert(resRobotSubNameC.szName),
            Utility.UTF8Convert(resRobotSubNameA.szName),
            Utility.UTF8Convert(resRobotSubNameB.szName)
        }));
    }
Beispiel #2
0
    public string GetRandomName()
    {
        uint             num       = 0;
        uint             num2      = 0;
        uint             num3      = 0;
        ResRobotName     dataByKey = null;
        ResRobotSubNameA ea        = null;
        ResRobotSubNameB eb        = null;

        while (dataByKey == null)
        {
            num       = (uint)this.m_random.Next(0, GameDataMgr.robotName.count);
            dataByKey = GameDataMgr.robotName.GetDataByKey((uint)(num + 1));
        }
        while (ea == null)
        {
            num2 = (uint)this.m_random.Next(0, GameDataMgr.robotSubNameA.count);
            ea   = GameDataMgr.robotSubNameA.GetDataByKey((uint)(num2 + 1));
        }
        while (eb == null)
        {
            num3 = (uint)this.m_random.Next(0, GameDataMgr.robotSubNameB.count);
            eb   = GameDataMgr.robotSubNameB.GetDataByKey((uint)(num3 + 1));
        }
        return(string.Format("{0}{1}{2}", Utility.UTF8Convert(dataByKey.szName), Utility.UTF8Convert(ea.szName), Utility.UTF8Convert(eb.szName)));
    }