posts - 311, comments - 0, trackbacks - 0, articles - 0
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

(搬运工)MaNGOS-Zero编译注意事项

Posted on 2012-07-24 10:35 点点滴滴 阅读(1185) 评论(0)  编辑 收藏 引用 所属分类: 10 服务器
最近周末咸蛋,抽时间看了一下传说中的开源WOW服务器模拟器,虽然只看了登陆认证这块,但感触颇多,兴起随便写写。

MaNGOS的介绍如下:

What is MaNGOS?

The mangos project is a full featured World of Warcraft server suite, including servers for authentication, client updates, world content serving, and battlegrounds. Additional features include tools to build and develop game content. It is compatible with client version 3.3.5a.

mangos is an educational project. This means, our primary interest is to learn and teach us and our users more about C++ project development in a large scale. Our software is not intended for running public servers, and we do not support that.

本篇所编译的mangos版本是MaNGOS-Zero,对应的客户端版本是1.12.1 (build 5875) ~ 1.12.2 (build 6005)。这是现在所能找到的最原始的版本,之所以选择这个版式,因为想看看mangos“化妆前”的摸样,从较早的版本开始看也是我的习惯。

主要的编译过程和方法参照:http://hi.baidu.com/sunsee/blog/item/8b34f043238dd51972f05d15.html

client 1.12.1(build 5875)的下载地址是:http://thepiratebay.org/torrent/5158084/World_of_Warcraft_1.12.1_Full_Client___Patches

这里主要进行以下补充和一些注意事项的说明:

  1. 获取代码:使用git从下面给出的mangos、scripts和database三个连接里去获取对应的代码,没有注册登录就直接用http下载可能不是最新的版本,导致程序版本和db版本对不上。“Looking for client 1.12.1 support? No need to hold your breath, there is a solution for you. mangos zero, an offspring project of mangos has your back covered. The server, the scripts, and the database are available. mangos zero has its' own forums, too”
  2. 检查版本一致:下载完毕后对照/mangos-zero/src/shared/revision_sql.h文件里的三个宏:REVISION_DB_CHARACTERS、REVISION_DB_MANGOS、REVISION_DB_REALMD的值和所下载的database对应的表是否一致,分别对应:character/character_db_version、mangos/db_version、realmd/realmd_db_version
  3. DB版本:其实直接使用mangos-zero/sql目录下的sql文件也是可以的,不需要单独取database文件。
  4. 所需配置文件:realmd.exe、mangos.exe运行所需要的配置文件分别是mangosd.conf、realmd.conf、mods.conf、scriptdevzero.conf在mangos目录下能找到以*.dist.in结尾的配置文件模板,拷贝并修改名字后即可使用。
  5. ScriptDev2:要放在src/binding目录下,VS2010可以顺利的编译通过。VS2005要编译Debug版没有问题,编译成Debug_NoPCH不能通过,不知道为什么?
  6. contrib:mangos/contrib目录下是各种小工具及源码,包括解压maps的ad.exe,解压vmaps的vmap_extractor。
  7. 解压vmaps文件:将使用/contrib/vmap_extract_assembler_bin目录下的所有文件拷贝到客户端的根目录,运行makevmaps_SIMPLE.bat即可。如果系统中存在两个以上的WOW客户端,则需要按照以下步骤进行:(a)使用-d参数指定目录的位置,比如 vmapextractor3.exe -d Data 等待程序提取和分析map data;(b)然后再相同目录下直接运行vmap_assembler.exe生成vmaps

 

配置文件说明:

(1)mangos.conf

  • 看代码时经常会设置断点,为了不让连接断开可以将配置文件里的MaxOverspeedPings设置为0