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)));
    }
  • 相关阅读:
    C# 中的委托和事件
    sql笔记-group by 统计功能
    js,css小知识点记录
    sql小技巧
    《孙子兵法》总结
    .Net深复制、浅复制
    《君主论》
    php邮箱找回密码功能
    后台管理员账号不能同时登陆,以及登陆使对方强制下线功能
    好程序员应该读的30本书
  • 原文地址:https://www.cnblogs.com/zzyoucan/p/3945907.html
Copyright © 2011-2022 走看看