首页 > 代码库 > 程序记录3(设置机器人2,新)
程序记录3(设置机器人2,新)
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); }
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。