码迷,mamicode.com
首页 > 其他好文 > 详细

程序记录3(设置机器人2,新)

时间:2014-05-14 23:41:27      阅读:334      评论:0      收藏:0      [点我收藏+]

标签:style   blog   class   code   java   c   

bubuko.com,布布扣
    int userID = 50000;
    int mapID = 1005;

    for (int j = 0; j < 10000; ++j)
    {
        UserInfo uinfo = {0};
        uinfo.userID = userID + j;
        sprintf_s(uinfo.userName, MAX_NAME_LENGTH, "map%duser%04d", mapID, j);
        strcpy(uinfo.userPwd, "123");
        i->addUser_(uinfo);
        if(j < 5000)
        {
            ActorInfo ainfo = {0};
            ainfo.id = userID + uinfo.userID % userID * 2;
            sprintf_s(ainfo.name, "map%dplayer%04d", mapID, j * 2);
            ainfo.prof = Role_DS;
            ainfo.sex = DB::sex::MAN;
            i->addActor_(uinfo.userID, ainfo);

            memset(&ainfo, 0, sizeof(ActorInfo));
            ainfo.id = userID + uinfo.userID % userID * 2 + 1;
            sprintf_s(ainfo.name, "map%dplayer%04d", mapID, j * 2 + 1);
            ainfo.prof = Role_DS;
            ainfo.sex = DB::sex::MAN;
            i->addActor_(uinfo.userID, ainfo);
        }
    }
    //设置MapID
    int actidStart = 50000;
    int mapID = 1005;
    for (int j = actidStart; j < actidStart + 10000; ++j)
    {
        i->setActorMap(j, mapID);
    }
bubuko.com,布布扣

 

程序记录3(设置机器人2,新),布布扣,bubuko.com

程序记录3(设置机器人2,新)

标签:style   blog   class   code   java   c   

原文地址:http://www.cnblogs.com/zzyoucan/p/3728730.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!