zoukankan      html  css  js  c++  java
  • GameMap其他初始化

    //其他初始化
    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)));
    }
  • 相关阅读:
    7个简单但棘手的JavaScript面试问题
    Promise.then链式调用顺序
    JS模拟实现枚举
    web前端常见的加密算法介绍
    JavaScript浮点数精度
    工作中常用的JavaScript函数片段
    JavaScript Array (数组) 对象
    快速找出数组中是否包含公共项
    用JavaScript让你的浏览器说话
    JavaScript的声明提升
  • 原文地址:https://www.cnblogs.com/zzyoucan/p/3945907.html
Copyright © 2011-2022 走看看