您的位置:首页 > 其它

GameMap其他初始化

2014-08-29 23:41 176 查看
//其他初始化
init_prop();//初始化道具
init_ornamemtal();//初始化装饰物
init_monster_type_info();//初始化怪物基本信息
这个比较重要在加载NPC时会用到这些基本信息的储存在m_monster_type_infos[mo_type_info.nBodyID] = mo_type_info;
貌似战斗模拟器也要用到这些数值
init_region();//具体的区域有安全区,战斗区,摆摊区...
init_skill_info();初始化技能等级信息这个也很有用
init_dropinfo();初始化怪物掉落信息
init_player_droprule();初始化人物物品掉落信息
init_pet_attribute();初始化宠物的等级信息

//NPC的加载
m_spNPCmgr = NEWSP(NPCmgr); //NPC加载,如怪物等
m_spNPCmgr->setFT(m_spTimerFactory.get()); //共享Map中的定时器,让Map线程来驱动。
m_spNPCmgr->init(this); //一定要先调用地图
m_spNPCmgr->initNPC();

//罪恶(玩家有白名,红名,灰名)
m_spSinMgr.reset(new SinMgr);
m_spSinMgr->setFT(m_spTimerFactory.get());
m_spSinMgr->init(this);

//初始化人物信息
InitMission();

//这两个不知干啥的
m_sendBuffer = new char[1024 * 1000];

m_status_opt = new StatusOpt(this, m_spTimerFactory.get());

start();//开启线程,驱动定时器运行程序
void thrTransData::start()
{
m_thr.reset(new std::thread(std::bind(&thrTransData::thread, this)));
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: