Mangos模拟器综合资源贴
[ post] Mangos服务器配置文件中文说明
#Mangosd.conf, 适用于芒果服务器 2600+版本
# MaNGOS Configuration file
ConfVersion=2006082301
# 国度ID 必须和国度列表里面的相符
RealmID = 1
# 0 NORMAL 1 PVP 4 NORMAL 6 RP 8 RPPVP
GameType = 8
# 数据目录设置。
# 重要说明:数据目录需要放在引号里面,因为字符串可能包含空格
# DataDir = "@MANGOSD_DATA@" //这个是默认目录
DataDir = "MANGOSD_DATA"
# 世界服务器的数据库连接设置。
# 格式:主机地址(域名或IP);端口;用户名;密码;数据库名称
LoginDatabaseInfo = "127.0.0.1;3306;mangos;mangos;realmd"
WorldDatabaseInfo = "127.0.0.1;3306;mangos;mangos;mangos"
# 日志文件
# 默认: "Server.log"
LogFile = "Server.log"
# 服务器控制台日志显示级别
# 0 = 最小日志; 1 = 基本信息和错误信息; 2 = 详细; 3 = 完整/调试信息
# 默认: 0
# 推荐: 1
LogLevel = 3
# 保存世界服务器的数据包记录
# 默认: 0 (不保存)
# 1 (保存)
LogWorld = 0
# 日志的显示颜色 (格式: "正常信息颜色 详细信息颜色 调试信息颜色 错误信息颜色")
# 颜色值: 0 - 黑, 1 - 红, 2 - 绿, 3 - 棕, 4 - 蓝, 5 - 洋红, 6 - 青, 7 - 灰,
# 8 - 黄, 9 - 浅红, 10 - 浅绿, 11 - 浅蓝, 12 - 粉红, 13 - 浅青, 14 - 白
# 默认: "" - 不使用颜色设置
# "13 7 11 9" - 举例 :)
LogColors = ""
# 记录 GM 命令的文件(该文件可以记录一切被执行的GM命令)
# 默认: "" (不记录)(如果你写上一个文件名,就代表记录)
GmLogFile = ""
# 为多处理器所作的设置(仅限Windows服务器)(具体这玩意儿怎么用我也不清楚。。。。)
# 默认: 0 (由操作系统分配CPU)
# 数字 (如果输入数字,则该数字代表选定处理器的位掩码值)(不懂。。)
UseProcessors = 0
# 进程优先级设置 (仅限 Windows)
# 0 (正常)
# 默认: 1 (高优先级)
ProcessPriority = 1
# 发送给客户端的更新包的压缩比 (1..9)
# Default: 1 (最快速)
# 9 (最高压缩比)
Compression = 4
# 服务器所能容纳的最多玩家数。不限GM
# 默认: 100
PlayerLimit = 100
# 允许使用插件的默认值, Allow then Deny or Deny then Allow(??虾米??)
# Default: 1 (true)
# 0 (false)
AddonDefault = 1
# 玩家通过经验升级可达到的最大等级 (1 到 255).
# 不建议修改
# 默认: 60
MaxPlayerLevel = 100
# 玩家所能学会的最多主要交易技能数目。
# 默认: 2
# 最大: 9
MaxPrimaryTradeSkill = 2
# 成立公会所需的最少签名数 (0..9).
# 默认: 9
MinPetitionSigns = 9
# 当你杀死怪物后,队员所能获得经验值的最大与你距离。
# 如果队员和你的距离超过了这个范围,当你杀死怪物时,他将无法获得经验值。
# Default: 74
MaxGroupXPDistance = 74
# 杀死怪物后,队员所能获得经验值的最大与怪等级差。
# 当队员和怪物之间的等级差超过了这个数值,杀死怪物后他将无法获得经验。
# 默认: 10
MaxGroupXPLevelDiff = 10
# 是/否允许同一个帐号创建不同阵营的人物。
# 默认: 0 (不允许)
# 1 (允许)
AllowTwoSide.Accounts = 0
# 是否允许不同阵营的玩家进行如下活动:chat(say,yell);channel(chat)group(join)guild(join);trade
# 默认: 0 (不允许)
# 1 (允许)
AllowTwoSide.Interaction = 0
# 是否允许在/who列表内显示不同阵营的玩家。
# 默认: 0 (不允许)
# 1 (允许)
AllowTwoSide.WhoList = 0
# 默认是否允许GM接受玩家的悄悄话。
# 默认: 0 (否)
# 1 (是)
GM.WhisperingTo = 0
# 每日消息。当玩家进入游戏的时候显示在聊天窗口的信息。
Motd = "Welcome to the Massive Network Game Object Server."
# 生命值和能量值得恢复速度。
Rate.Health = 1;
Rate.Power1 = 1;
Rate.Power2 = 1;
Rate.Power3 = 1;
# 物品掉落倍率
# Default: 1
Rate.Drop.Items = 10
Rate.Drop.Money = 1
# 经验倍率 Rate.XP.Kill = 杀怪经验; Rate.XP.Quest = 任务经验; Rate.XP.Explore = 探索经验
# Default: 1
Rate.XP.Kill = 30
Rate.XP.Quest = 50
Rate.XP.Explore = 10
# 怪物伤害倍率
# 例如: 2 - 怪物将造成 2x(2倍)伤害, 1.7 - 1.7x.
Rate.Creature.Normal.Damage = 1
Rate.Creature.Elite.Elite.Damage = 1
Rate.Creature.Elite.RAREELITE.Damage = 1
Rate.Creature.Elite.WORLDBOSS.Damage = 1
Rate.Creature.Elite.RARE.Damage = 1
# 怪物生命值倍率
# 例如:: 2 - 怪物将拥有 2x 的生命值, 1.7 - 1.7x.
Rate.Creature.Normal.HP = 1
Rate.Creature.Elite.Elite.HP = 1
Rate.Creature.Elite.RAREELITE.HP = 1
Rate.Creature.Elite.WORLDBOSS.HP = 1
Rate.Creature.Elite.RARE.HP = 1
#Aggro radius percent or off. --> 这个不懂。。。
# 0 - off (0%)
# Default: 1 - 100%
# 1.5 - 150%
Rate.Creature.Aggro = 1
# 默认远程控制台端口
Ra.Port = 3443
# 记录远程控制台的连接信息
Ra.Log = 1
# 远程控制台连接到服务器所需要的GM等级,默认为3(管理员)
Ra.MinLevel = 3
# 踢出用户,如果他输入了错误的密码 (仅限远程控制台)
Ra.Secure = 1
# Unload grids (if you have lot memory you can disbale it to speed up player move to new grids second time)
# 0 (not unload grids)
# Default: 1 (unload grids)
GridUnload = 1;
# 以下所有的时间设置都以毫秒为单位。
# 默认端口选择时间
SocketSelectTime = 10000
# 默认地图网格清理延迟
GridCleanUpDelay = 300000
# 默认地图更新间隔
MapUpdateInterval = 100
# 默认天气更新间隔
ChangeWeatherInterval = 600000
# 默认玩家数据保存间隔
PlayerSaveInterval = 900000
# 默认世界服务器端口 (mangosd.exe 的端口)
WorldServerPort = 8085
#Realmd.conf, 适用于芒果服务器 2600+版本
# MaNGOS realmd configuration file
ConfVersion=2006060401
# 国度服务器的数据库连接设置
# 格式:主机地址(域名或IP);端口;用户名;密码;数据库名称
LoginDatabaseInfo = "127.0.0.1;3306;mangos;mangos;realmd"
# 默认的国度服务器端口 (realmd.exe 的端口)
RealmServerPort = 3724
# 日志文件名称
# 默认: "Server.log" - 不推荐。不要和国度服务器用同样的文件名
LogFile = "Realmd.log"
# 日志的显示颜色 (格式: "正常信息颜色 详细信息颜色 调试信息颜色 错误信息颜色")
# 颜色值: 0 - 黑, 1 - 红, 2 - 绿, 3 - 棕, 4 - 蓝, 5 - 洋红, 6 - 青, 7 - 灰,
# 8 - 黄, 9 - 浅红, 10 - 浅绿, 11 - 浅蓝, 12 - 粉红, 13 - 浅青, 14 - 白
# 默认: "" - 不使用颜色设置
# "13 7 11 9" - 举例 :)
LogColors = ""
# 为多处理器所作的设置(仅限Windows服务器)(具体这玩意儿怎么用我也不清楚。。。。)
# 默认: 0 (由操作系统分配CPU)
# 数字 (如果输入数字,则该数字代表选定处理器的位掩码值)(不懂。。)
UseProcessors = 0
# 进程优先级设置 (仅限 Windows)
# 0 (正常)
# 默认: 1 (高优先级)
ProcessPriority = 1[/post]
-----------------------------------------------
#设置文件的版本
ConfVersion=2006082301
# RealmID 要对应 realmlist
RealmID = 1
#服务器类型 0 普通 , 1 PVP, 4 普通 6 RP 8 RPPVP
GameType = 1
# dbc和maps的路径, 如果在mangos根目录 请用 "."
DataDir = "."
# 数据库连接设置:
# 默认: 主机名;端口;用户名;密码;数据库名
LoginDatabaseInfo = "127.0.0.1;3306;root;mangos;realmd"
WorldDatabaseInfo = "127.0.0.1;3306;root;mangos;sdb053306"
#会员设置VIPlevel > 0 数据库需要添加VIPlevel
#Rate.XP.Kill.VIP = 10
#Rate.XP.Quest.VIP = 10
#Rate.XP.Explore.VIP = 10
#Rate.Drop.Money.VIP = 10
# 设置最高ping数据库的时间间隔(分钟)
MaxPingTime = 30
# 服务器控制台记录显示的级别
# 0 = 最小; 1 = 基础和错误; 2 = 详细; 3 = 完全或侦错
# 默认: 0
# 推荐: 1
LogLevel = 3
# 记录文件 的名字
# 文件名为空 则不创建记录文件,如: LogFile =
# 默认: "Server.log"
LogFile = "Server.log"
# 记录文件的记录级别
# 0 = 最小; 1 = 基础和错误; 2 = 详细; 3 = 完全或侦错
# 默认: 0
LogFileLevel = 3
# 游戏服务器的封包记录
# 默认: 0 (false)
# 1 (true)
LogWorld = 1
# 记录过滤
# 0 (默认) - 如果记录等级允许,则包含, 1 - 任何记录等级都 不包含
LogFilter_TransportMoves = 0
LogFilter_CreatureMoves = 0
# 控制台信息的颜色 (格式: "正常颜色 详情颜色 debug颜色 错误颜色)
# 颜色: 0-黑色, 1-红, 2-绿, 3-棕, 4-蓝, 5-品红, 6-青绿, 7-灰色,
# 8-黄, 9-淡红, 10-淡绿, 11-淡蓝, 12-淡品红, 13-淡青绿, 14-白色
# 默认: "" 无颜色(白色)
# 例如: "13 7 11 9"
LogColors = "13 7 11 9"
# 记录GM命令使用情况的 记录文件名
# 默认: "" (禁止) 允许时:例如: "GMcommand.log"
GmLogFile = ""
# 在多线程系统 使用线程MASK(只在Windows系统下使用)
# 默认: 0 (操作系统来选择)
# 举例: 数字
UseProcessors = 0
# 进程优先权设置(只在Windows系统下使用)
# 0 (正常优先权)
# 默认: 1 (高优先)
ProcessPriority = 1
#发送到客户端的更新数据包的压缩级别(1到9)
# 默认: 1 (速度快,不压缩)
# 9 (最好的压缩)
Compression = 1
# 除GM之外 游戏最大在线玩家数限制
# 默认: 100
PlayerLimit = 100
# 玩家获得经验能升到的最高等级(必须在 1 到 255).
# 不建议修改 建议用默认的 60 超过60 可能影响游戏平衡
# 默认: 60
MaxPlayerLevel = 60
# 玩家最多可以学的 商业技能
# 默认: 2
# 最大: 9
MaxPrimaryTradeSkill = 9
# 建立公会所需的最少玩家签名个数 (0..9).
# 默认: 9
MinPetitionSigns = 9
# 小队成员在生物死亡 获得经验的 最大距离(同怪物的距离)
# 默认: 74
MaxGroupXPDistance = 74
# 小队成员在生物死亡 获得经验的 最大等级差(同怪物的等级)
# 默认: 10
MaxGroupXPLevelDiff = 10
# 是否运行同1个帐号 建立不2个不同阵营的角色 GM号为始终为 允许
# 默认: 0 (不允许)
# 1 (允许)
AllowTwoSide.Accounts = 0
# 是否允许 不同阵营间的 聊天 频道聊天 组队 交易
# 默认: 0 (不允许)
# 1 (允许)
AllowTwoSide.Interaction = 0
# 是否在 在线玩家列表 里显示敌对阵营玩家
# 默认: 0 (不允许)
# 1 (允许)
AllowTwoSide.WhoList = 0
# GM默认是否接受玩家的悄悄话.
# Default: 0 (false)
# 1 (true)
GM.WhisperingTo = 0
# 当GM设置为可见时 是否在玩家列表显示GM.
# Default: 0 (false)
# 1 (true)
GM.InWhoList = 0
# 玩家登陆时候服务器显示的 登陆信息(请设置偶数个汉字)
Motd = "欢迎来到芒果中文服务器."
# 血 pw1=蓝,pw2=怒气,pw3=能量 恢复的速度乘以的倍数
Rate.Health = 1;
Rate.Power1 = 1;
Rate.Power2 = 1;
Rate.Power3 = 1;
# 物品,钱 的掉率乘以的倍数
# 默认: 1
Rate.Drop.Items = 1
Rate.Drop.Money = 1
# 杀怪,任务,探索地图 获得经验 乘以的倍数
# 默认: 1
Rate.XP.Kill = 1
Rate.XP.Quest = 1
Rate.XP.Explore = 1
# 普通,精英,稀有精英,BOSS,稀有普通怪 的伤害 乘以的倍数
# 例如: 1.4 就是 增加0.4倍攻击伤害
Rate.Creature.Normal.Damage = 1
Rate.Creature.Elite.Elite.Damage = 1
Rate.Creature.Elite.RAREELITE.Damage = 1
Rate.Creature.Elite.WORLDBOSS.Damage = 1
Rate.Creature.Elite.RARE.Damage = 1
# 普通,精英,稀有精英,BOSS,稀有普通怪 的血量 乘以的倍数
# 例如: 1.4 就是 增加0.4倍攻击血量
Rate.Creature.Normal.HP = 1
Rate.Creature.Elite.Elite.HP = 1
Rate.Creature.Elite.RAREELITE.HP = 1
Rate.Creature.Elite.WORLDBOSS.HP = 1
Rate.Creature.Elite.RARE.HP = 1
# 精力条增长倍数 (1 - normal, 2 - double rate, 0.5 - half rate, etc)
Rate.Rest.InGame = 1
Rate.Rest.Offline.InTavernOrCity = 1
Rate.Rest.Offline.InWilderness = 1
# 技能熟练度提升几率(0..100)
# default: 100-75-25-0
SkillChance.Orange = 100
SkillChance.Yellow = 75
SkillChance.Green = 25
SkillChance.Grey = 0
# 怪物自动攻击的范围乘以的倍数 或者 关闭自动攻击
# 0 - 关闭(0%)
# 默认: 1 - 乘以100%
# 1.5 - 乘以150%
Rate.Creature.Aggro = 1
# 默认远程控制台的端口
Ra.Port = 3443
# 记录远程控制台连接
Ra.Log = 1
# 要求登陆的最小级别,默认: 3
Ra.MinLevel = 3
# 当客户端登陆时候输入密码错误是,是否端口客户端连接
Ra.Secure = 1
# 卸载Grids (如果里的内存够大,可以禁用,提高玩家第二次经过新Grids时候的速度)
# P.S: Grids就是地图上刷出来的东西,玩家经过一个地方 就会加载该地方的环境,离开的时候 就卸载该地方的环境
# 默认: 1 ( 卸载 grids) 0 ( 不卸载 grids)
GridUnload = 1;
############# 以下时间单位都为毫秒 #############
# 默认 socket选择时间
SocketSelectTime = 10000
# 默认 grid 清除延时
GridCleanUpDelay = 300000
# 默认 地图更新的间隔
MapUpdateInterval = 100
# 默认 天气改变的间隔
ChangeWeatherInterval = 600000
# 默认 玩家资料保存的间隔
PlayerSaveInterval = 900000
# 默认 默认世界服务器的端口(mangos.exe为世界服务器worldserver)
WorldServerPort = 8085
# 在mangos启动完毕后蜂鸣一声(通常只在Unix/Linux系统下工作)
# 默认: 1
BeepAtStart = 1
################# 以下反外挂补丁设置 AntiCheat Patch 1.5################
#外挂判断
# 1 启用, 0 关闭
Cheat.EnableProtection = 1
# 向服务器广播. 如:[CHEAT]: Player "hax0r" tried to spoof spell #5
# 设置为0 则不广播~!
Cheat.Broadcast = 1
# 封帐号 (根据作弊情况最后先不要封帐号 推荐0 防止误封).
Cheat.Ban = 0
# 踢出玩家 结合封帐号 玩家就再也进不来了
Cheat.Kick = 1
# 打开,来防外挂,不完全支持任务
# 默认是 开启
Cheat.Prevent = 1
# 记录加速 (只是记录 请GM查看记录文件)
Cheat.AntiSpeedHack = 1
#记录加速查不多 检测方式不同 (只是记录 请GM查看记录文件)
Cheat.CheckPing = 1
#检测spell 数据库 判断非法技能是否被使用 开启有点卡 默认关闭!不影响 防技能作弊功能!
Cheat.CheckSpellDB = 0
#记录文件cheatlog.txt保存在mangos根目录
#会员设置VIPlevel > 0 数据库需要添加VIPlevel
#Rate.XP.Kill.VIP = 10
#Rate.XP.Quest.VIP = 10
#Rate.XP.Explore.VIP = 10
#Rate.Drop.Money.VIP = 10
-----------------------------------------------------
Mangos开飞行点的函数
bool ChatHandler::HandleTaxiCheatCommand(const char* args)
{
WorldPacket data;
if (!*args)
return false;
int flag = atoi((char*)args);
Player *chr = getSelectedPlayer();
if (chr == NULL)
{
SendSysMessage(LANG_NO_CHAR_SELECTED);
return true;
}
if (flag != 0)
PSendSysMessage(LANG_YOU_GIVE_TAXIS, chr->GetName());
else
PSendSysMessage(LANG_YOU_REMOVE_TAXIS, chr->GetName());
char buf[256];
if (flag != 0)
{
sprintf((char*)buf,LANG_YOURS_TAXIS_ADDED,
m_session->GetPlayer()->GetName());
}
else
{
sprintf((char*)buf,LANG_YOURS_TAXIS_REMOVED,
m_session->GetPlayer()->GetName());
}
FillSystemMessageData(&data, m_session, buf);
chr->GetSession()->SendPacket(&data);
for (uint8 i=0; i<8; i++)
{
if (flag != 0)
{
m_session->GetPlayer()->SetTaximask(i, 0xFFFFFFFF);
}
else
{
m_session->GetPlayer()->SetTaximask(i, 0);
}
}
return true;
}
----------------------------------------------------------
使用SQL命令快速汉化芒果(傻瓜教程)
使用说明:
代码:
UPDATE [LOW_PRIORITY] tbl_name SET col_name1=expr1,col_name2=expr2,...
[WHERE where_definition] [LIMIT #]
UPDATE用新值更新现存表中行的列,SET子句指出哪个列要修改和他们应该被给定的值,WHERE子句,如果给出,指定哪个行应该被更新,否则所有行被更新。
此语句可用于汉化表中的值,比如你要汉化creature_template表里面entry=3的怪物.格式如下:
代码:
UPDATE creature_template SET name='食腐者' WHERE entry=3
此方法比从scp中导入数据要简单.有效,稳定得多~!!
不过有个缺点就是,当原始的英文数据不存在时,无法自动往里添加.
还有,发现有时候会出现物品全部为唯一的情况,此情况下所有装备都无法使用,物品无法重叠,解决的办法是输入一下查询
代码:
UPDATE item_template SET stackable=CONCAT(1,0);
changedone 写道:
首先,你需要wowemu汉化的数据库,比如UWC的,然后找到mangos scp2sql这个工具,先将这些scp转成sql,然后在mangos数据里创建和这些结构一样的表,表名不要和mangos本身的重复,比如任务叫quest_templatecn,然后再创建和mangos结构一样的表比如叫quest_template1
然后执行一条sql,我只写简单的,后面的自己想
insert into quest_template1 select a.title,a.details,a.objectives,b.x,b.x
from quest_templatecn a,quest_template b where a.entry=b.entry
然后
alter table item_template1 rename item_template
所有的都照这个汉化做,10 分钟搞定
-----------------------------------------------
下面是傻瓜教程
-----------------------------------------------
有些初次接触SQL的人可能不太明白,简单说一下将英文的数据库汉化的方法,
首先需要中文的数据库
然后将中文数据库的creature_template等每个表所分别对应的三个文件都改名为creature_templateGB,
然后拷贝到英文数据库中,再SQL Script中执行SQL文,就可以。
拷贝时请保证你要拷贝的数据没有人在使用,重要。
SQL文如下:
[Copy to clipboard]CODE:
/*
MySQL Data Transfer
Source Host: localhost
Source Database: mangos
Target Host: localhost
Target Database: mangos
Date: 2006-9-11 10:18:22
- npc_option
- areatrigger_template
- npc_text
- creature_template
- gameobject_template
- item_template
- quest_template
*/
- --------------------------
- 怪物/NPC 信息
- --------------------------
UPDATE LOW_PRIORITY `creature_template`, `creature_templategb`
SET `creature_template`.`name` = `creature_templategb`.name,
`creature_template`.`subname` = `creature_templategb`.`subname`
WHERE `creature_template`.`entry` = `creature_templategb`.`entry`
AND `creature_template`.`modelid` = `creature_templategb`.`modelid`;
- --------------------------
- 物品 信息
- --------------------------
UPDATE LOW_PRIORITY `gameobject_template`, `gameobject_templategb`
SET `gameobject_template`.`name` = `gameobject_templategb`.`name`
WHERE `gameobject_template`.`entry` = `gameobject_templategb`.`entry`
AND `gameobject_template`.`type` = `gameobject_templategb`.`type`
AND `gameobject_template`.`displayId` = `gameobject_templategb`.`displayId`;
- --------------------------
- 道具/任务信息
- --------------------------
UPDATE LOW_PRIORITY `item_template`, `item_templategb`
SET `item_template`.`name`=`item_templategb`.`name`,
`item_template`.`name2`=`item_templategb`.`name2`,
`item_template`.`name3`=`item_templategb`.`name3`,
`item_template`.`name4`=`item_templategb`.`name4`
WHERE `item_template`.`entry` = `item_templategb`.`entry`
AND `item_template`.`class` = `item_templategb`.`class`
AND `item_template`.`subclass` = `item_templategb`.`subclass`;
- --------------------------
- 任务 信息
- --------------------------
UPDATE LOW_PRIORITY `quest_template`, `quest_templategb`
SET `quest_template`.`Title` = `quest_templategb`.`Title`,
`quest_template`.`Details` = `quest_templategb`.`Details`,
`quest_template`.`Objectives` = `quest_templategb`.`Objectives`
WHERE `quest_template`.`entry` = `quest_templategb`.`entry`
AND `quest_template`.`Type` = `quest_templategb`.`Type`
AND `quest_template`.`ZoneId` = `quest_templategb`.`ZoneId`;
- --------------------------
- NPC 信息
- --------------------------
UPDATE LOW_PRIORITY `npc_option`, `npc_optiongb`
SET `npc_option`.`option` = `npc_optiongb`.`option`,
WHERE `npc_option`.`id` = `npc_optiongb`.`id`
AND `npc_option`.`gossip_id` = `npc_optiongb`.`gossip_id`
AND `npc_option`.`npcflag` = `npc_optiongb`.`npcflag`;
- --------------------------
- NPC/对话 信息
- --------------------------
UPDATE LOW_PRIORITY `npc_text`, `npc_textgb`
SET `npc_text`.`text0_0` = `npc_textgb`.`text0_0`,
WHERE `npc_text`.`id` = `npc_textgb`.`id`
AND `npc_text`.`text0_1` = `npc_textgb`.`text0_1`
AND `npc_text`.`lang0` = `npc_textgb`.`lang0`;
- --------------------------
- 传送 信息
- --------------------------
UPDATE LOW_PRIORITY `areatrigger_template`, `areatrigger_templategb`
SET `areatrigger_template`.`name` = `areatrigger_templategb`.`name`,
WHERE `areatrigger_template`.`id` = `areatrigger_templategb`.`id`
AND `areatrigger_template`.`target_orientation` = `areatrigger_templategb`.`target_orientation`
AND `areatrigger_template`.`target_map` = `areatrigger_templategb`.`target_map`;
-----------------------------------------------------------------------------
mangos任务系统详解
mangos任务系统包括:
areatrigger_involvedrelation 探险完成任务触发点.
creature_involvedrelation 完成任务NPC.
creature_questrelation 开始任务NPC.
gameobject_involvedrelation 完成任务的物品.
gameobject_questrelation 触发任务的物品.
item_template表中的startquest系物品触发任务序号.
quest_templatege表
entry 任务编号,同官方questcache.wdb的序号一样.
ZoneId 任务区域,在AreaTable.dbc中第一项ZoneId定义.
QuestSort 任务类型.在QuestSort.dbc定义.
1 史诗 21 哀嚎洞穴 22 季节性 23 幽暗城 24 草药学 25 修道院 41 奥达曼 61 术士 81 战士 82 萨满祭司
101 钓鱼 121 锻造 141 圣骑士 161 法师 162 盗贼 181 炼金术 182 制皮 201 工程学 221 藏宝图
241 沉没的神庙 261 猎人 262 牧师 263 德鲁伊 264 裁缝 284 特殊 304 烹饪 324 急救 344 传说
364 暗月马戏团 365 安其拉战争 366 新年 367 声望 368 天灾入侵 369 仲夏
MinLevel 可以接任务最少等级.
QuestLevel 任务等级.
Type 任务种类.在QuestInfo.dbc定义
1 精英 21 传记 41 PVP 62 团队 82 世界事件 83 传说
RequiredRaces 任务需要种族.
1 人类 2 兽人 4 矮人 8 暗夜精灵 16 亡灵 32 牛头人 64 侏儒 128 巨魔
例:如果任务人类.矮人.暗夜精灵和侏儒都可以接.这个值为1+4+8+64=77.
RequiredClass 任务需要职业.
1 战士 2 圣骑士 4 猎人 8 盗贼 16 牧师 64 萨满 128 法师 256 术士 1024 德鲁依
同种族一样.值系相加的.
RequiredSkill 任务需要技能.在SkillLine.dbc定义.
182 采集356 钓鱼171 炼金393 剥皮197 裁缝165 制皮186 采矿202 工程164 锻造 129 急救 333 附魔 185 烹饪
RequiredSkillValue 任务需要技能值.
RequiredRepFaction 任务需要阵营声望.
阵营在http://bbs.lanlong.net/viewthrea ... &extra=page%3D3有详细说明.
RequiredRepValue 任务需要阵营声望值.
LimitTime 任务限时.(秒)
SpecialFlags 任务标记.
0 普通 1 传递 2 探险 4 交谈 8 杀怪 16 限时 32 重复 64 声望
PrevQuestId 前一个任务编号.
NextQuestId 后续任务编号.
srcItem 接任务给的物品.
srcItemCount 接任务给的物品数量.
Title 任务标题.
Details 任务介绍.
Objectives 任务目标.
CompletionText 完成任务的NPC对话.
IncompleteText 未完成任务的NPC对话.
EndText 任务完成时的信息.
ObjectiveText1-4 任务目标标题.
ReqItemId1-4 任务需要装备,在item_template表的Entry.
ReqItemCount1-4 任务需要装备数量.
ReqSourceId1-4 能获得ReqItem的物品,在item_template表的Entry.
ReqSourceRef1-4 能获得ReqItem的物品的数量.
ReqCreatureOrGOId1-4 完成任务需要杀死怪物,在creature_template表的Entry.或是要使用物品gameobject ID
ReqCreatureOrGOCount1-4 完成任务需要杀死怪物数量或gameobject的数量.
ReqSpellCast1-4 完成任务需要施放的技能.
RewChoiceItemId1-6 完成任务选择奖励装备.
RewChoiceItemCount1 完成任务选择奖励装备数量.
RewItemId1-4 完成任务奖励装备.
RewItemCount1-4 完成任务奖励装备数量.
RewRepFaction1/2 完成任务获得阵营声望
RewRepValue1/2 完成任务获得阵营声望值.
RewOrReqMoney 值为正时为完成任务奖励金币.值为负时为完成任务需要金币.
RewXP 完成任务奖励经验.
RewSpell 完成任务施放的法术.
PointMapId
PointX
PointY
PointOpt
DetailsEmote 接任务时NPC表情.
IncompleteEmote 未完成任务NPC表情.
CompleteEmote 完成任务NPC表情.
-------------------------------------------------------
添加职业任务技能.txt
四个关键字:
npc_trainer/creature_template/技能代码/技能训练师NPC代码
npc_trainer表中存放有技能训练师NPC代码、技能代码、学习该技能所需金钱(单位铜)、上接技能、学习该技能所需角色等级
creature_template中存放着技能训练师NPC代码
技能代码指的是学习该技能的技能代码,并非使用该技能的技能代码!!!
-----------------------------------------------------------
让Mangos 支持 1.12.3 修正方法
**********
DBCfmt.cpp
**********
// const char AreaTableEntryfmt[]="ixinxxxxxxixxxxxxxxxx";
const char AreaTableEntryfmt[]="ixinxxxxxxixxxxxxxxxxxxxx"; // 1.12.3 new structure
[...]
// const char ItemSetEntryfmt[]=& quot;dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiii
iiiiiiiii";
const char ItemSetEntryfmt[]="dxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii"; // 1.12.3 new structure
***************
WorldSocket.cpp
***************
//Create Addon Packet
// sAddOnHandler.BuildAddonPacket(&recvPacket, &SendAddonPacked, recvPacket.rpos());
SendAddonPacked.Initialize(SMSG_ADDON_INFO); // fix banned addon
SendAddonPacked << uint8( 0x41 ); // fix banned addon
SendAddonPacked << uint8( 0x64 ); // fix banned addon
SendAddonPacked << uint8( 0x64 ); // fix banned addon
SendAddonPacked << uint8( 0x6f ); // fix banned addon
SendAddonPacked << uint8( 0x6e ); // fix banned addon
SendAddonPacked << uint8( 0x00 ); // fix banned addon
SendPacket(&SendAddonPacked);
**********
Master.cpp
**********
sLog.outTitle( " MMMMMM");
sLog.outTitle( " Inofficial MaNGOS modification for 1.12.3.");
sLog.outTitle( " It can have additional problems and unstability.");
sLog.outTitle( " For this version there is NO support.\n\n");
********************
CharacterHandler.cpp
********************
data.Initialize(SMSG_CHAR_CREATE);
// data << (uint8)0x34;
data << (uint8)0x39; // fix for 1.12.3
[...]
std::string motd_1 = std::string(sWorld.GetMotd()) + "\n|cffff6060Inofficial MaNGOS modification for 1.11.x.\nIt can have additional problems and unstability.\nFor this version there is no support.|r";
sChatHandler.FillSystemMessageData(&data, NULL, motd_1.c_str());
// sChatHandler.FillSystemMessageData(&data, this, sWorld.GetMotd());
SendPacket( &data );
**************
UpdateFields.h
**************
PLAYER_FARSIGHT = 0x1CE + UNIT_END + 64,
...
PLAYER_END = 0x3F4 + PLAYER_SELECTION + 64,
************
AuthSocket.h
************
uint8 crc_hash[20];
uint8 number_of_keys;
uint8 unk; //fix for 1.12.3
**************
AuthSocket.cpp
**************
pkt.append(s.AsByteArray(), s.GetNumBytes());
pkt.append(unk3.AsByteArray(), 16);
pkt << (uint8)0; // fix for 1.12.3
********
Common.h
********
#define EXPECTED_MANGOS_CLIENT_BUILD {6141,0} // 1.12.3
------------------------------------------------------
怪物AI的一些函数资料
void AttackStart(Unit *who) 获得攻击目标
DoCast(who,3110) 这里是使用魔法,ID为3110
DoStartAttack(who); 运行上面的脚本攻击
DoGoHome(); 让怪跑回自己的出生点
who->GetTypeId() == TYPEID_PLAYER 是说明ID是不是攻击玩家
m_creature->GetHealth()
uint32 cHealth=m_creature->GetHealth();
获取怪物当前血量
m_creature->GetMaxHealth()
uint32 cMaxHealth=m_creature->GetMaxHealth();
获取怪物最大血量
m_creature->GetPower(POWER_MANA)
uint32 cPower=m_creature->GetPower(POWER_MANA);
获取怪物当前魔法量
m_creature->GetMaxPower(POWER_MANA)
uint32 cMaxPower=m_creature->GetMaxPower(POWER_MANA);
获取怪物最大魔法量
m_creature->Say("Dark!",LANG_UNIVERSAL); 让怪物说话 后参为语言
m_creature->getVictim() 取得被攻击的受害者
void DamageInflict(Unit *who, uint32 amount_damaged) 被攻击时调用此脚本
if( (cHealth<(cMaxHealth*0.8) )&&(cPower>( cMaxPower*0.8)) 怪当前HP少于总HP的80%和魔法量大于总数80%
m_creature->isInCombat() 是否在战斗中
void MoveInLineOfSight(Unit *who) 在视线之内
who->HasStealthAura()) 玩家是否隐行
who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH) 移除玩家身上技能 ()为技能名称
m_creature->IsHostileTo(who) 玩家对怪物是否有敌意
who->isAlive() 测试玩家是否还活着
creature=怪物或NPC
-------------------------------------------------------------
去掉.start的限制
truck\src\game\Level0.cpp
// not let used .start command as free replacement for hearthstone
if(chr->HaveSpellCooldown(8690))
{
SendSysMessage(LANG_YOU_USED_IT_RECENTLY);
return true;
}
把这个去掉就ok了
---------------------------------------------------------------
使用物品而不消耗Bug的修正
打开 spell.cpp 找到 void Spell::TakeCastItem() 函数
里面有一行 “if (expendable && withoutCharges)”
改为“if (!expendable && withoutCharges)”
就可以了。
现在,charge<=0时,都是无限使用。>0时,有使用次数。
----------------------------------------------------------------
修复装备绿字【转】
stat_type1:
這是想要附加屬性的類別,分別為:
1 生命值
3 敏捷
4 力量
5 智力
6 精神
7 耐力
stat_value1:
上面能力的數值,填多少就加多少!
再來就是所謂的綠字效果
綠字效果的重點在於 spellid
也就是說,一個武器的綠字是什麼,他對應的 spellid 就是那個能力。
例如:
雷霆之怒,逐风者的祝福之剑
他的效果大家都知道,找到這個物品後,去找他的spellid,分別為 spellid_1: 8118 、spellid_2: 21992
所以8118就是使用後力量會+5,持續30分鐘的那個能力。
而21992就是擊中後有機會使出連鎖閃電的那個能力。
以下小小介紹一下這個地方的類別:
spellid_1: 顯示綠字的比照ID
spelltrigger_1: 綠字的觸發條件
spelltrigger的分別:
使用效果為0,裝備效果為1,擊中可能為2
此效果必須依照 0 1 2 排列
例如你想創造一個 擊中後可能:降低低人700防禦(id:21153) 且 使用效果:增加力量5點30分鐘(id:8118)
必須先放入 8118 0 再放入 21153 2,不然使用時會連著擊中可能的效果一起出現 (不知是不是BUG?)
建議使用效果和擊中效果還是盡量分開的好,我目前的DBC版本還是許多效果會一起出現...
等有改好的DBC應該會好些!!
spellcharges_1: 這打了以後會出現次數..打99會在綠字底下出現白字99次,但是實際效果不清楚..
spellcooldown_1: 冷却时間..??(經測試後無效,似乎是用代碼決定冷卻的,不過表單內所有技能幾乎都為1,所以建議打1進去)
spellcategory_1: 種類..或是它的類型??,不過目前看到的數值皆為0
spellcategorycooldown_1: 似乎是比對的冷卻時間...(也是無效,打1進去,雖然說放0好像也可以...)
整理了一些還不錯的效果給大家玩,希望有更多代碼的人可以分享上來一起~
====近戰類====
56 擊中可能(spelltrigger:2):使對手昏迷3秒
7597 裝備效果(spelltrigger:1):使你造成致命一擊的機率上升1%
8118 使用效果(spelltrigger:0):力量提升5點,持續30分鐘
21992 擊中可能(spelltrigger:2):以閃電使出自然傷害300,彈射5人 (就是逐風者那個)
23719 擊中可能(spelltrigger:2):力量提升300點,持續8秒鐘
26108 擊中可能(spelltrigger:2):使目標疑惑,在附近周圍遊蕩,速度降為平時的40%,最多3秒
15829 裝備效果(spelltrigger:1):攻擊強度增加86點
21153 擊中可能(spelltrigger:2):你的武器可以忽略對手700點裝甲值
16602 擊中可能(spelltrigger:2):招喚沙赫拉姆的靈魂 (沙赫拉姆之劍效果)
15494 擊中可能(spelltrigger:2):使你下次的攻擊獲得額外的兩次攻擊機會
17500 擊中可能(spelltrigger:2):將目標打傻2秒,並提升自己力量50持續30秒
21440 裝備效果(spelltrigger:1):遠距攻擊強度增加36點
13049 擊中可能(spelltrigger:2):招喚翡翠雛龍為你作戰 (龍之召喚效果)
====防禦類====
20620 使用效果(spelltrigger:0):吸收3萬攻擊或魔法傷害,並給予近戰對手250的傷害 (這應該是寫代碼出來的)
17483 擊中可能(spelltrigger:2):增加13點防禦值和300點護甲值,持續10秒
15805 裝備效果(spelltrigger:1):+1000護甲
18815 裝備效果(spelltrigger:1):在戰鬥中被擊中之後,有3%的機率從目標身上偷取35的生命值
18816 裝備效果(spelltrigger:1):在戰鬥中被擊中之後,有1%的機率對附近的目標使出75-125的火焰傷害
21476 裝備效果(spelltrigger:1):盾牌格擋機率提升3%
23203 裝備效果(spelltrigger:1):盾牌格擋值提升15
13387 裝備效果(spelltrigger:1):防禦技能+8
====法術類====
23929 裝備效果(spelltrigger:1):提升所有的法術或治療效果最多71點
18382 裝備效果(spelltrigger:1):使你的法術爆擊率增加2%
23728 裝備效果(spelltrigger:1):提升所有的法術或治療效果最多84點
25767 裝備效果(spelltrigger:1):你的法術有一定機率使對方降低其魔法抗性50點,持續8秒
18264 使用效果(spelltrigger:0):智力增加20點 (院長之杖的效果)
-----------------------------------------------------------------------
MANGOS数据库表格含义
account 帐号
areatrigger_involvedrelation 传送(区域触发)包含的关系,可能
areatrigger_tavern 进传送门id指向template
areatrigger_template 传送区域的具体坐标(与travern所对应)
auctionhouse 拍卖行(参数--观看时所对应)
auctionhouse_bid 拍卖行的投标
auctionhouse_item 不明
bugreport 应该是给GM发信所对应的数据
character 创建的人物资料对应playercreateinfo
character_action 创建的人物所会的技能对应playercreateinfo_action(仅出生)
character_aura 不明
character_homebind 创建人物的出生地
character_inventory 创建人物的包里的东西
character_kill 创建人物的荣誉信息(杀或被杀,有无荣誉等)
character_pet 创建人物的宠物信息
character_queststatus 创建人物的任务信息
character_reputation 可能是声望(不明)
character_social 好友列表
character_spell 人物的魔法书(仅会魔法的人才会出现ID)
character_ticket 不明
character_tutorial 不明
command GM命令
creature NPC 怪物地图分布信息
creature_grid 可能是跟NPC对话的有效距离(不明)
creature_involvedrelation NPC或怪物(特殊类)可给与任务(不明)
creature_movement 怪物或NPC移动的关系,活动范围
creature_questrelation 不明
creature_template 怪物或NPC的具体信息如HP,SP等
game_corpse 尸体所在地信息
game_graveyard 人物死亡后所回到的墓地(复活需要对应game_corpse表)
game_spell 魔法(参数有可以创造什么,比如FS做水)
game_talent 游戏的天赋系统
game_weather 天气系统
gameobject 物品信息(地上的箱子,草,矿)仅刷新点,时间,位置
gameobject_grid 可以拿取的有效距离(不明)
gameobject_template 具体物品信息所对应的 草,矿等
guild 工会信息
guild_member 工会成员
guild_rank 工会的阶级系统
ip_banned 被封的IP列表
item_instance 不明
item_page 游戏中任务的内容(不明)
item_template 道具及任务物品的详细信息
loot_template 掉率
mail 邮件系统
mail_item 邮物品的信息
npc_gossip NPC没事说的话,比如暴风城的小孩,BOSS遇到你说的话
npc_gossip_textid 话的内容对应NPC_gossip
npc_option 不明
npc_text 跟NPC说话的内容,不同于任务内容
npc_trainer 训练师所对应的内容
npc_vendor 卖东西的NPC
object_involvedrelation 物品之间的关系(不太清楚)
object_questrelation 不明(估计这2个之间应该有个是物品合成)
playercreateinfo 人物出生的信息,character是根据此系列来的
quest_template 任务的详细信息对应QUESTID可能跟object_involvedrelation有关系
realmlist 服务器的登入信息(服务器IP等)
taxi_node WOW的飞机系统(具体不明)
taxi_path 飞到哪的价格(应该)
taxi_pathnode 飞机的完整表(对应taxi_NODE taxi_path)
-------------------------------------------------------------
修改mangos中角色的声望值
主是要透过修改资料库中的 character_reputation这个表格
此表格共有5个栏位
分别是
guid:角色的id
faction:对应的种族,例如暴风城就是72
reputation:不明,但是不影響
standing:声望值,就是改这个地方
flag:0:不显示,1:显示,即在游戏中按u ,2:不显示,且为敌对阵营,3:不明
至于在游戏中显示出来的声望值的计算方法为:
1.自己的种族:一开始为1000/6000(友好),所以standing如果是20,则实际声望值为1000 + 20 =1020
2.同阵营其它的种族:一开始为100/6000(友好),所以standing如果是20,则实际声望值为100 + 20 =120
其它的值可以自己去试试看
报告完毕
附faction内容
Alliance:
Darnassus: 69
Gnomeregan Exiles: 54
Ironforge: 47
Stormwind: 72
Horde:
Darkspear: 530
Orgrimmar: 76
Thunder Bluff: 81
Undercity: 68
Battleground Factions:
Forsaken Defilers: 510 (Horde)
Frostwolf Clan: 729 (Horde)
League of Arathor: 509 (Alliance)
Silverwing Sentinels: 890 (Alliance)
Stormpike Expedition: 730 (Alliance)
Warsong Outriders: 889 (Horde)
Factions with Reputation Rewards:
Argent Dawn: 529
Brood of Nozdormu: 910
Cenarion Circle: 609
Darkmoon Faire: 909
Thorium Brotherhood: 59
Timbermaw Hold: 576
Zandalar Tribe: 270
Steamweedle Cartell:
Everlook: 577
Gadgetzan: 369
Ratchet: 470
Booty Bay: 21
Misc. Factions:
Bloodsail Buccaneers: 87
Caer Darrow: 574
Gelkis Alliance: 92
Hydraxian Waterlords: 749
Magram Alliance: 93
Moro'gai: 789
Ravasaur: 630
Ravenholdt: 349
Shatterspear: 629
Shen'dralar: 809
Syndicate: 70
Wildhammer: 471
Wintersaber: 589
Profession Factions:
Blacksmithing - Armorsmith: 46
Blacksmithing - Weaponmith: 289
Blacksmithing - Axesmith: 570
Blacksmithing - Hammermith: 569
Blacksmithing - Swordmith: 571
Engineering - Gnome Engineer 550
Engineering - Goblin Engineer 549
Leatherworking - Elemental: 83
Leatherworking - Dragonscale: 86
------------------------------------------------------
mangos 汉化,保留人物数据,加传送师数据库完整版
以前发过帖子,写怎么来做这个,但是可能好多人都懒得做,或者也有不会写的,这里好事做到底,方便大家吧!也让mangos的数据库能百花齐放:
操作步骤:
将原来的数据库改名,这里举例改为mangos1118(请自己换),新建空库mangos,下载mangos SDB数据库最新完整版导入,并打上可能的更新补丁,然后就可以用如下操作了:
(以下内容支持最新版本2666,当然一般都不用更改,如果creature,creature_template结构变化之后请作相应更新)
1.保留人物数据下面的内容粘帖进文本文件改名为save.sql,导入方法我这里不说了)
TRUNCATE `character`;
TRUNCATE `character_action`;
TRUNCATE `character_aura`;
TRUNCATE `character_homebind`;
TRUNCATE `character_inventory`;
TRUNCATE `character_kill`;
TRUNCATE `character_pet`;
TRUNCATE `character_queststatus`;
TRUNCATE `character_reputation`;
TRUNCATE `character_social`;
TRUNCATE `character_spell`;
TRUNCATE `character_spell_cooldown`;
TRUNCATE `character_stable`;
TRUNCATE `character_ticket`;
TRUNCATE `character_tutorial`;
TRUNCATE `item_instance`;
insert into `character` select * from mangos1118.`character`;
insert into `character_action` select * from mangos1118.`character_action`;
insert into `character_aura` select * from mangos1118.`character_aura`;
insert into `character_homebind` select * from mangos1118.`character_homebind`;
insert into `character_inventory` select * from mangos1118.`character_inventory`;
insert into `character_kill` select * from mangos1118.`character_kill`;
insert into `character_pet` select * from mangos1118.`character_pet`;
insert into `character_queststatus` select * from mangos1118.`character_queststatus`;
insert into `character_reputation` select * from mangos1118.`character_reputation`;
insert into `character_social` select * from mangos1118.`character_social`;
insert into `character_spell` select * from mangos1118.`character_spell`;
insert into `character_spell_cooldown` select * from mangos1118.`character_spell_cooldown`;
insert into `character_stable` select * from mangos1118.`character_stable`;
insert into `character_ticket` select * from mangos1118.`character_ticket`;
insert into `character_tutorial` select * from mangos1118.`character_tutorial`;
insert into `item_instance` select * from mangos1118.`item_instance`;
2.从原来的库中提取数据进入汉化:下面的内容粘帖进文本文件改名为hh.sql,导入方法我这里不说了)
update mangos.areatrigger_template,mangos1118.areatrigger_template set mangos.areatrigger_template.name=mangos1118.areatrigger_template.name where mangos.areatrigger_template.id=mangos1118.areatrigger_template.id;
update mangos.creature_template,mangos1118.creature_template set mangos.creature_template.name=mangos1118.creature_template.name where mangos.creature_template.entry=mangos1118.creature_template.entry;
update mangos.creature_template,mangos1118.creature_template set mangos.creature_template.subname=mangos1118.creature_template.subname where mangos.creature_template.entry=mangos1118.creature_template.entry;
update mangos.gameobject_template,mangos1118.gameobject_template set mangos.gameobject_template.name=mangos1118.gameobject_template.name where mangos.gameobject_template.entry=mangos1118.gameobject_template.entry;
update mangos.item_template,mangos1118.item_template set mangos.item_template.name=mangos1118.item_template.name where mangos.item_template.entry=mangos1118.item_template.entry;
update mangos.item_template,mangos1118.item_template set mangos.item_template.name2=mangos1118.item_template.name2 where mangos.item_template.entry=mangos1118.item_template.entry;
update mangos.item_template,mangos1118.item_template set mangos.item_template.name3=mangos1118.item_template.name3 where mangos.item_template.entry=mangos1118.item_template.entry;
update mangos.item_template,mangos1118.item_template set mangos.item_template.name4=mangos1118.item_template.name4 where mangos.item_template.entry=mangos1118.item_template.entry;
update mangos.npc_option,mangos1118.npc_option set mangos.npc_option.option=mangos1118.npc_option.option where mangos.npc_option.id=mangos1118.npc_option.id;
update mangos.npc_text,mangos1118.npc_text set mangos.npc_text.text0_0 =mangos1118.npc_text.text0_0 where mangos.npc_text.id=mangos1118.npc_text.id;
update mangos.npc_text,mangos1118.npc_text set mangos.npc_text.text0_1 =mangos1118.npc_text.text0_1 where mangos.npc_text.id=mangos1118.npc_text.id;
update mangos.quest_template,mangos1118.quest_template set mangos.quest_template.title=mangos1118.quest_template.title where mangos.quest_template.entry=mangos1118.quest_template.entry;
update mangos.quest_template,mangos1118.quest_template set mangos.quest_template.details=mangos1118.quest_template.details where mangos.quest_template.entry=mangos1118.quest_template.entry;
update mangos.quest_template,mangos1118.quest_template set mangos.quest_template.Objectives=mangos1118.quest_template.Objectives where mangos.quest_template.entry=mangos1118.quest_template.entry;
3.新库里面是没有传送师的,所以下面的数据导入加入传送师,取自990100的数据库:
INSERT INTO `creature_template` (`entry`, `modelid_m`, `modelid_f`, `name`, `subname`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction`, `npcflag`, `speed`, `rank`, `mindmg`, `maxdmg`, `attackpower`, `baseattacktime`, `rangeattacktime`, `flags`, `mount`, `dynamicflags`, `size`, `family`, `bounding_radius`, `trainer_type`, `trainer_spell`, `class`, `race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `combat_reach`, `type`, `civilian`, `flag1`, `equipmodel1`, `equipmodel2`, `equipmodel3`, `equipinfo1`, `equipinfo2`, `equipinfo3`, `equipslot1`, `equipslot2`, `equipslot3`, `lootid`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `mingold`, `maxgold`, `AIName`, `MovementType`, `ScriptName`) VALUES (99999, 14946, 0, '????', '?????', 1, 1, 304087, 334496, 999, 999, 5000, 1080, 65, 1.23, 0, 2, 2, 100, 100, 100, 0, 0, 0, 1, 0, 0.51, 0, 0, 0, 0, 1000, 2000, 100, 2, 7, 1, 0, 22802, 0, 0, 218171138, 234948100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 'npc_teler');
INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimemin`, `spawntimemax`, `spawndist`, `currentwaypoint`, `spawn_position_x`, `spawn_position_y`, `spawn_position_z`, `spawn_orientation`, `curhealth`, `curmana`, `respawntimer`, `state`, `npcflags`, `faction`, `MovementType`, `auras`) VALUES
(187195, 99999, 0, -5045.65, -817.718, 495.132, 0.702927, 25000, 25000, 0, 0, -5045.65, -817.718, 495.132, 0, 99990, 9999, 0, 0, 65, 1080, 0, ''),
(187090, 99999, 1, 9968.89, 2065.28, 1328.9, 3.89558, 25000, 25000, 0, 0, 9968.89, 2065.28, 1328.9, 0, 99990, 100, 0, 0, 65, 1080, 0, ''),
(187094, 99999, 1, 1334.44, -4398.5, 27.9064, 1.65327, 25000, 25000, 0, 0, 1334.44, -4398.5, 27.9064, 0, 99990, 100, 0, 0, 65, 1080, 0, ''),
(187193, 99999, 1, -1301.75, 136.068, 131.404, 2.05775, 25000, 25000, 0, 0, -1301.75, 136.068, 131.404, 0, 99990, 9999, 0, 0, 65, 1080, 0, ''),
(187102, 99999, 0, 1916.55, 251.274, 51.4951, 5.10509, 25000, 25000, 0, 0, 1916.55, 251.274, 51.4951, 0, 99990, 100, 0, 0, 65, 1080, 0, ''),
(187106, 99999, 1, -966.797, -3780.81, 5.59356, 2.57733, 25000, 25000, 0, 0, -966.797, -3780.81, 5.59356, 0, 99990, 100, 0, 0, 65, 1080, 0, ''),
(187192, 99999, 1, 10312.3, 840.66, 1327.66, 5.39569, 25000, 25000, 0, 0, 10312.3, 840.66, 1327.66, 0, 99990, 9999, 0, 0, 65, 1080, 0, ''),
(187110, 99999, 0, -14302.4, 535.154, 8.66335, 5.91798, 25000, 25000, 0, 0, -14302.4, 535.154, 8.66335, 0, 99990, 100, 0, 0, 65, 1080, 0, ''),
(187191, 99999, 169, -2038.78, -1063.4, 124.299, 3.74738, 25000, 25000, 0, 0, -2038.78, -1063.4, 124.299, 0, 99990, 9999, 0, 0, 65, 1080, 0, ''),
(187203, 99999, 0, -8847.39, 488.338, 109.598, 0.671513, 25000, 25000, 0, 0, -8847.39, 488.338, 109.598, 0, 99990, 99990, 0, 0, 65, 1080, 0, ''),
(187205, 99999, 0, -6219.9, 343.143, 383.14, 3.05128, 25000, 25000, 0, 0, -6219.9, 343.143, 383.14, 0, 99990, 99990, 0, 0, 65, 1080, 0, ''),
(187216, 99999, 0, -8931.27, -108.552, 83.0799, 4.44104, 25000, 25000, 0, 0, -8931.27, -108.552, 83.0799, 0, 99990, 99990, 0, 0, 65, 1080, 0, ''),
(187219, 99999, 1, -2909.14, -276.073, 53.9165, 1.44513, 25000, 25000, 0, 0, -2909.14, -276.073, 53.9165, 0, 99990, 99990, 0, 0, 65, 1080, 0, ''),
(187220, 99999, 1, -641.357, -4265.81, 38.8264, 0.530144, 25000, 25000, 0, 0, -641.357, -4265.81, 38.8264, 0, 99990, 99990, 0, 0, 65, 1080, 0, ''),
(187259, 99999, 0, -9060.9, 415.793, 93.2968, 2.23315, 25000, 25000, 0, 0, -9060.9, 415.793, 93.2968, 0, 99990, 99990, 0, 0, 65, 1080, 0, '');
---------------------------------------------------------------------
增加武器大师学习板甲
INSERT INTO `npc_trainer` (`rowid`,`entry`,`spell`,`spellcost`) VALUES ('27646','2704','7109','10000') INSERT INTO `npc_trainer` (`rowid`,`entry`,`spell`,`spellcost`) VALUES ('27646','11865','7109','10000') INSERT INTO `npc_trainer` (`rowid`,`entry`,`spell`,`spellcost`) VALUES ('27646','11866','7109','10000') INSERT INTO `npc_trainer` (`rowid`,`entry`,`spell`,`spellcost`) VALUES ('27646','11867','7109','10000') INSERT INTO `npc_trainer` (`rowid`,`entry`,`spell`,`spellcost`) VALUES ('27646','11868','7109','10000') INSERT INTO `npc_trainer` (`rowid`,`entry`,`spell`,`spellcost`) VALUES ('27646','11869','7109','10000') INSERT INTO `npc_trainer` (`rowid`,`entry`,`spell`,`spellcost`) VALUES ('27646','11870','7109','10000') INSERT INTO `npc_trainer` (`rowid`,`entry`,`spell`,`spellcost`) VALUES ('27646','11884','7109','10000')
---------------------------------------------------------------------
在职业训练师的选项中加入洗天赋
Index: game/Creature.cpp
===================================================================
--- game/Creature.cpp (revision 2508)
+++ game/Creature.cpp (working copy)
@@ -371,7 +371,10 @@
}
}
- if ( result == DIALOG_STATUS_UNAVAILABLE )
+ if (isCanTrainingOf(pPlayer, false))
+ return DIALOG_STATUS_CHAT;
+
+ if ( result == DIALOG_STATUS_UNAVAILABLE )
return result;
if ( defstatus == DIALOG_STATUS_NONE )
@@ -491,12 +494,11 @@
switch (gso->Action)
{
case GOSSIP_OPTION_QUESTGIVER:
- {
- uint32 quest_status = getDialogStatus(pPlayer,DIALOG_STATUS_NONE);
-
- if(quest_status == DIALOG_STATUS_NONE || quest_status == DIALOG_STATUS_UNAVAILABLE)
- cantalking=false;
- }; break;
+ pPlayer->repareQuestMenu(GetGUID());
+ if (pm->GetQuestMenu()->MenuItemCount() == 0)
+ cantalking=false;
+ pm->GetQuestMenu()->ClearMenu();
+ break;
case GOSSIP_OPTION_ARMORER:
cantalking=false; // added in special mode
break;
@@ -525,6 +527,10 @@
if(!isCanTrainingOf(pPlayer,false))
cantalking=false;
break;
+ case GOSSIP_OPTION_UNLEARNTALENTS:
+ if (!isCanTrainingOf(pPlayer,false) || pPlayer->getLevel() < 10)
+ cantalking=false;
+ break;
case GOSSIP_OPTION_TAXIVENDOR:
case GOSSIP_OPTION_GUARD:
case GOSSIP_OPTION_INNKEEPER:
@@ -637,6 +643,10 @@
case GOSSIP_OPTION_TRAINER:
player->GetSession()->SendTrainerList(guid);
break;
+ case GOSSIP_OPTION_UNLEARNTALENTS:
+ player->layerTalkClass->CloseGossip();
+ player->resetTalents();
+ break;
case GOSSIP_OPTION_TAXIVENDOR:
player->GetSession()->SendTaxiStatus(guid);
break;
Index: game/Creature.h
===================================================================
--- game/Creature.h (revision 2508)
+++ game/Creature.h (working copy)
@@ -57,7 +57,8 @@
GOSSIP_OPTION_BATTLEFIELD = 12, //UNIT_NPC_FLAG_BATTLEFIELDPERSON = 2048,
GOSSIP_OPTION_AUCTIONEER = 13, //UNIT_NPC_FLAG_AUCTIONEER = 4096,
GOSSIP_OPTION_STABLEPET = 14, //UNIT_NPC_FLAG_STABLE = 8192,
- GOSSIP_OPTION_ARMORER = 15 //UNIT_NPC_FLAG_ARMORER = 16384,
+ GOSSIP_OPTION_ARMORER = 15, //UNIT_NPC_FLAG_ARMORER = 16384,
+ GOSSIP_OPTION_UNLEARNTALENTS = 16 //UNIT_NPC_FLAG_TRAINER = 16,
};
enum Gossip_Guard
Index: game/Player.cpp
===================================================================
--- game/Player.cpp (revision 2508)
+++ game/Player.cpp (working copy)
@@ -10363,3 +10363,41 @@
data << pr1 << pr2;
GetSession()->SendPacket (&data);
}
+
--------------------------------------------------------------------
mangos GM命令,分类别,分组,便于查找,较详细
物品管理
.addgo $id 根据ID从 GameObject_temlate 中添加GameObject到游戏世界你所在的位置
.gameobject $id 在你当前位置增加一个 ID=$id 的 GameObject.
.targetobject [$gid,$part] 查找并显示最近的 GameObject 信息
.delobject $gid 删除 GUID 为 $gid 的 GameObject
.lookupitem $name 通过物品名查找道具, 例查找所有物品名中带'剑' 字的物品列表 .lookup 剑
.additemset $id 添加套装编号为 $id 的套装物品到你所选择角色的背包中...
.additem $id [$n]
.additem 0 $n $name 将物品添加到你所选择角色的背包里...
.object $id $save 添加模型ID=$id 的邮箱到你的当前位置,如果 $save=true 则保存至数据库
.delticket (all,$num,$name) 删除服务器上的 ticket, ALL(全部删除), $num(删除指定ID的) $name(删除角色的)
.item $gid $num 添加Guid为$gid 的物品 $num个, 到你选择的商人出售列表内.
.itemrmv $gid 从你选择的商人出售列表里,移除GUID为 $gid 的物品
NPC,生物,管理
.addspw $cid 添加一个ID为 $cid 的生物
.die 杀死你当前目标...如果没有目标...就会成为自杀...
.delete 将当前选择的目标生物,从世界中删除
.displayid $num 改变当前目标生物的模型ID为 $num
.demorph 恢复变形效果, ( 取消 morph命令的变形效果 )
.morph $id 改变你当前的模型ID为 $id, ( 用 .demorph 命令恢复 )
.npcinfo 显示你所选择NPC 的详细信息列表
.factionid $num 改变当前目标生物的阵营为 $num
.gocreature $num 传送你的角色到 GuidID 为 $num 的生物那
.changelevel $int 改变你选择生物的等级为 $int (可以改目标怪物的等级)
.guid 显示当前目标生物的 GUID
.lookupcreature $name 根据 $name 查找所有相关的生物, 列出符合要求的生物ID.
.lookupskill $name 通过 $name 查找技能, 返回符合要求的技能ID.
.addmove $guid 添加你当前的位置为 Guid=$guid 生物的路径点
.npcflag $flag 设置你所选择的 NPCFLAG 为 $flag
.turnobject $gid 设置 GameObject $gid 的朝向为你所面对的方向
.allowmove 是否允许你所选择的生物移动
.anim $mid 玩家将向你的角色做 ID=$mid 的表情
.aura $sid 为你的角色添加ID为 $sid 的光环
.setvalue $field $value $isint 设置你所选择生物FIELD的值, 如果 $isint=1, 设置值为整数的FIELD的值
.getvalue $field $isint 取得你所选择生物的 FIELD=$field 的值,,如$isint=1,取得FIELD的值为整数
.update $field $value 更新当前选择目标的 FIELD $field 的值为 $value. (若无$value,则显示$field值)
人物角色管理
.modify aspeed $num 改变玩家所有的速度(奔跑,游泳,跑回) $num 数值是0到50
.modify speed (效果同上,但只更改奔跑速度)
.modify swim $num (效果同上, 但只更改游泳速度)
.modify bwalk (效果同上, 但只更改后退速度)
.modify bit $field $bit 修改你选择角色的 $field 的 BIT 值为 $bit
.modify energy $num 修改你所选择玩家的能量值, 如果没有选择玩家,则改变自己的 (盗贼的?)
.modify faction 修改选择生物的阵营
.modify mana $num 修改所选择玩家的魔法值
.modify money $num 修改所选择玩家的金钱, $num 为负值是扣钱
.modify rage $num 修改所选择玩家的怒气值
.modify spell $num 修改所选择玩家的附魔值
.unlearn $start $end 将你选择目标的魔法ID= $start 的魔法遗忘掉...
.learnsk $id $level $max 给你所选择的角色学习 ID=$id 当前技能为 $level 最大技能为 $max 的技能
.unlearnsk $start $end 将你选择目标的技能ID= $start 的技能遗忘掉...
.hover $flag 允许或禁止你的角色悬空模式
.mod32value $field $value 添加值 $value 到你角色的 $field.
.pinfo [$player_name] 显示当前选择玩家的帐号信息, 或者使用 $player_name 指定显示
.kick $name 将角色名为 $name 的玩家从服务器上踢下线.
.learn $id 给你所选择的角色学习 ID=$ID 的魔法
.learn all 可以学习所有GM默认的魔法
.learn all_lang 来学习所有语言
.learn all_myclass 来学习自己职业的所有可用魔法 (只可以对自己使用)
.levelup $int $int 可以是正数或负数, 增加当前目标的等级,省略目标默认选择自己
.maxskill 将当前目标所有技能设置为最大值 (单手锤..双手斧...等等)
.revive 复活当前选择的目标, (如果没有目标,则复活自己).
.reset .Reset Level ( 将选定目标的等级重新设置为 1 )
.Reset spell ( 将选定目标的技能重置 )
.Reset stats ( 将选定目标的状态重置 )
.Reset talents ( 将选定目标的天赋重置 )
.standstate $id 改变你角色表情为 $id
传送相关
.recall $place 传送到世界的各个城镇 , sunr,thun,cross,ogri,neth,thel,storm,iron,under
.taxicheat $flag 开通或移除你所选择的玩家的所有飞行路线 $flag=1 表示开通, 0表示移除
.namego $string 传送到角色名为 $string 的玩家那,用角色名或点击玩家的头像,如组队时的头像
.name $string 把角色名为 $string 的玩家传送到你的身边, (也可以组队点其头像)
.gps 显示角色或生物的坐标(x,y,z) 地图标号和地区
.tele $string 可以直接输入 .tele 查看所有可以传送的地名
.searchtele $string 搜索并显示 .tele 命令的地名中包含 $string 的地名
.prog 把你传送到程序员之岛
.go $x $y $z $mapid 传送到地图的指定坐标
.goxy $x $y [$mapid] 传送玩家到地图为 $mapid 水(地)平面的X,Y坐标
.moveobject $gid 根据 $gid 移动 GameObject 到角色当前坐标
.goobject $gid 传送你的角色到 guidID 为 $gid 的 GameObject 那
其他
.gmoff 禁止你角色的 前缀.
.gmon 开启你角色的 前缀.
.visible $num 设置GM当前的可视状态 $num 的值为 0 或 1
.whispers $flag 允许/禁止 GM 接受其他玩家的悄悄话,默认使用的是 mangosd.conf 的值
.bank 显示你的银行的详细目录 (移动银行啊?)
.explorecheat #flag 显示或者隐藏你所选择玩家所有的探索地图, 如果没目标,默认自己
.unaura $id 移除你身上 SpellID=$id 的光环效果
.createguild $s1 $s2 建立一个公会名为: $1 , 并且会长为: $2
.distance 显示你的角色到你选定生物的距离
.emote $id 你选择的生物,将做出 $id 的表情
服务器管理
.announce $string 广播 $string给所有在线玩家
.loadscripts $name 重新加载脚本名字为 $name 的脚本
.saveall 保存游戏里的所有角色信息
.shutdown [$delay] $delay(秒) , $delay 秒后关闭服务器,.
.shutdown cancel 停止关闭服务器
.wchange $type $status 设置当前天气为 $type, 天气情况为 $status
$type 的值 1=下雨, 2=下雪, 3=沙尘暴
$status 的值 0=禁止, 1=允许
--------------------------------------------------------------------
在职业训练师的选项中加入洗天赋
Index: game/Creature.cpp
===================================================================
--- game/Creature.cpp (revision 2508)
+++ game/Creature.cpp (working copy)
@@ -371,7 +371,10 @@
}
}
- if ( result == DIALOG_STATUS_UNAVAILABLE )
+ if (isCanTrainingOf(pPlayer, false))
+ return DIALOG_STATUS_CHAT;
+
+ if ( result == DIALOG_STATUS_UNAVAILABLE )
return result;
if ( defstatus == DIALOG_STATUS_NONE )
@@ -491,12 +494,11 @@
switch (gso->Action)
{
case GOSSIP_OPTION_QUESTGIVER:
- {
- uint32 quest_status = getDialogStatus(pPlayer,DIALOG_STATUS_NONE);
-
- if(quest_status == DIALOG_STATUS_NONE || quest_status == DIALOG_STATUS_UNAVAILABLE)
- cantalking=false;
- }; break;
+ pPlayer->repareQuestMenu(GetGUID());
+ if (pm->GetQuestMenu()->MenuItemCount() == 0)
+ cantalking=false;
+ pm->GetQuestMenu()->ClearMenu();
+ break;
case GOSSIP_OPTION_ARMORER:
cantalking=false; // added in special mode
break;
@@ -525,6 +527,10 @@
if(!isCanTrainingOf(pPlayer,false))
cantalking=false;
break;
+ case GOSSIP_OPTION_UNLEARNTALENTS:
+ if (!isCanTrainingOf(pPlayer,false) || pPlayer->getLevel() < 10)
+ cantalking=false;
+ break;
case GOSSIP_OPTION_TAXIVENDOR:
case GOSSIP_OPTION_GUARD:
case GOSSIP_OPTION_INNKEEPER:
@@ -637,6 +643,10 @@
case GOSSIP_OPTION_TRAINER:
player->GetSession()->SendTrainerList(guid);
break;
+ case GOSSIP_OPTION_UNLEARNTALENTS:
+ player->layerTalkClass->CloseGossip();
+ player->resetTalents();
+ break;
case GOSSIP_OPTION_TAXIVENDOR:
player->GetSession()->SendTaxiStatus(guid);
break;
Index: game/Creature.h
===================================================================
--- game/Creature.h (revision 2508)
+++ game/Creature.h (working copy)
@@ -57,7 +57,8 @@
GOSSIP_OPTION_BATTLEFIELD = 12, //UNIT_NPC_FLAG_BATTLEFIELDPERSON = 2048,
GOSSIP_OPTION_AUCTIONEER = 13, //UNIT_NPC_FLAG_AUCTIONEER = 4096,
GOSSIP_OPTION_STABLEPET = 14, //UNIT_NPC_FLAG_STABLE = 8192,
- GOSSIP_OPTION_ARMORER = 15 //UNIT_NPC_FLAG_ARMORER = 16384,
+ GOSSIP_OPTION_ARMORER = 15, //UNIT_NPC_FLAG_ARMORER = 16384,
+ GOSSIP_OPTION_UNLEARNTALENTS = 16 //UNIT_NPC_FLAG_TRAINER = 16,
};
enum Gossip_Guard
Index: game/Player.cpp
===================================================================
--- game/Player.cpp (revision 2508)
+++ game/Player.cpp (working copy)
@@ -10363,3 +10363,41 @@
data << pr1 << pr2;
GetSession()->SendPacket (&data);
}
+
----------------------------------------------------------------------
怎样调整MaNGOS中的金币掉落率:
修改数据库 creature_template 表中的 mingold 和 maxgold 字段
-----------------------------------------------------------------------
雷霆崖与幽暗城的电梯修正
--升降梯修正--
DELETE FROM gameobject_template WHERE entry IN (4170,4171,47296,47297,11898,11899);
INSERT INTO gameobject_template VALUES
(4170,11,360,'台地升降梯',0,40,1,0,0,0,0,0,0,0,0,0,0,'',0),
(4171,11,360,'台地升降梯',0,40,1,0,0,0,0,0,0,0,0,0,0,'',0),
(47296,11,360,'台地升降梯',0,40,1,0,0,0,0,0,0,0,0,0,0,'',0),
(47297,11,360,'台地升降梯',0,40,1,0,0,0,0,0,0,0,0,0,0,'',0),
(11898,11,360,'台地升降梯',0,40,1,0,0,0,0,0,0,0,0,0,0,'',0),
(11899,11,360,'台地升降梯',0,40,1,0,0,0,0,0,0,0,0,0,0,'',0);
DELETE FROM gameobject WHERE guid IN (5438,8311,8449,9238,11334,17401,21200,24969);
INSERT INTO gameobject VALUES
(5438,47296,1,-1028.1,-28.2,69.253,0.83,0,0,-0.104528,0.994522,47296,120000,0,0),
(8311,47297,1,-1037,-49,140.495,3.072,0,0,0.999391,0.034899,47297,120000,0,0),
(8449,11899,1,-5382.6,-2489.1,-41,1.3,0,0,0,0,18999,120000,0,0),
(9238,11899,1,-4671,-1850,-44,0.85,0,0,-0.091502,0.995805,11899,120000,0,0),
(11334,4171,1,-1286.8,189.9,68.552,0.99,0,0,0.116115,0.993236,4171,120000,0,0),
(17401,11898,1,-5398.8,-2504.5,89.021,2.609,0,0,0.964787,0.263032,11898,120000,0,0),
(21200,4170,1,-1308.5,185.6,130.052,0.72,0,0,0,0,4170,120000,0,0),
(24969,11898,1,-4665.6,-1828.1,85.319,0.05,0,0,0.532716,-0.846294,11899,120000,0,0);
--幽暗城电梯修正--
DELETE FROM gameobject WHERE guid IN (20649,20650,20651,20652,20653,20654,20655,20656,20657);
INSERT INTO gameobject VALUES
(21937,20649,0,1596,291.568,14.64,1.571,0,0,0.707107,0.707107,20652,120000,0,0),
(1537,20650,0,1553.27,240.621,55.242,3.147,0,0,0.999996,-0.002732,20650,120000,0,0),
(2231,20651,0,1533.8,240.761,-41,0.076,0,0,0.038062,0.999275,20651,120000,0,0),
(8351,20652,0,1543.96,240.787,-40.8,0,0,0,0,0,20649,120000,0,0),
(11243,20653,0,1595.99,282.639,55.241,1.616,0,0,0.723018,0.690829,20653,120000,0,0),
(11492,20654,0,1596.22,301.757,-41,4.742,0,0,0.696455,-0.7176,20654,120000,0,0),
(6184,20655,0,1595.34,188.672,-40.8,1.597,0,0,0.716202,0.697893,20655,120000,0,0),
(23369,20656,0,1595.48,197.743,55.2422,4.71898,0,0,0.726014,-0.68768,20656,120000,0,0),
(23371,20657,0,1595.06,178.01,-33,1.58769,0,0,0.713053,0.70111,0,25000,0,0);
--------------------------------------------------------------------------
修改新建人物等级
位置 player.cpp
修改
InitStatsForLevel(1,false,false);// 默认1
InitStatsForLevel(60,false,false);//改为60
---------------------------------------------------------------------------
Honor for 3006(荣誉补丁最新版,转载于MANGOS官方论坛)
Index: src/game/Formulas.h
===================================================================
--- src/game/Formulas.h (revision 3006)
+++ src/game/Formulas.h (working copy)
@@ -81,19 +81,42 @@
inline float HonorableKillPoints( Player *killer, Player *victim )
{
- int total_kills = killer->CalculateTotalKills(victim);
- //int k_rank = killer->CalculateHonorRank( killer->GetTotalHonor() );
- uint32 v_rank = victim->CalculateHonorRank( victim->GetTotalHonor() );
- uint32 k_level = killer->getLevel();
- //int v_level = victim->getLevel();
- float diff_honor = (victim->GetTotalHonor() /(killer->GetTotalHonor()+1))+1;
- float diff_level = (victim->getLevel()*(1.0/( killer->getLevel() )));
+ //New formulas by Zhivoi (Greetings from Russia)
+ int total_kills = killer->CalculateTotalKills(victim);
+ float f;
+ if(total_kills < 10) f = (10 - (float)total_kills)*0.1;
+ else f = 0.0;
+
+ uint32 k_grey = 0;
+ uint32 k_level = killer->getLevel();
+ uint32 v_level = victim->getLevel();
+
+ if(k_level <= 5)
+ k_grey = 0;
+ else if( k_level <= 39 )
+ k_grey = k_level - 5 - k_level/10;
+ else
+ k_grey = k_level - 1 - k_level/5;
+
+ float diff_level;
+ if((k_level - k_grey) != 0)
+ diff_level = ((float)(v_level - k_grey)) / ((float)(k_level
- k_grey));
+ else return 999; //Check, in character_kill we will see, if
working incorrectly
+
+ if(diff_level > 2.0) diff_level = 2.0;
+ if(diff_level <= 0.0) return 888; //For Debug
+
+ uint32 v_rank = (victim->GetHonorRank() - 4); //We cut all up to
the first positive rank
+ if(v_rank < 0) v_rank = 0;
+
+ //The factor of dependence on levels of the killer is probably
necessary.
+ //In wowwiki nothing is told about it (or I have not noticed).
+ float honor_points = f * diff_level * (190 + v_rank*10);
+ honor_points *= ((float)k_level) / 60.0;
- int f = (4 - total_kills) >= 0 ? (4 - total_kills) : 0;
- int honor_points = int(((float)(f * 0.25)*(float)((k_level+(v_rank*5+1))*
(1+0.05*diff_honor)*diff_level)));
- return (honor_points <= 400 ? honor_points : 400);
+ if(honor_points > 660) return 666; //For Debug
+ else return honor_points;
}
-
}
namespace Combat
Index: src/game/ItemHandler.cpp
===================================================================
--- src/game/ItemHandler.cpp (revision 3006)
+++ src/game/ItemHandler.cpp (working copy)
@@ -444,8 +444,8 @@
_player->SendBuyError( BUY_ERR_ITEM_ALREADY_SOLD, pCreature, item, 0);
return;
}
- // not check level requiremnt for normal items (PvP related bonus items is
another case)
- if(pProto->RequiredHonorRank && (_player->GetHonorRank() < pProto-
>RequiredHonorRank || _player->getLevel() < pProto->RequiredLevel) )
+ // not check level requiremnt for normal items (PvP related bonus items is
another case) //Change to Higest Rank
+ if(pProto->RequiredHonorRank && (_player->GetHonorHighestRank() < pProto-
>RequiredHonorRank || _player->getLevel() < pProto->RequiredLevel) )
{
_player->SendBuyError( BUY_ERR_LEVEL_REQUIRE, pCreature, item, 0);
return;
@@ -535,8 +535,8 @@
_player->SendBuyError( BUY_ERR_ITEM_ALREADY_SOLD, pCreature, item, 0);
return;
}
- // not check level requiremnt for normal items (PvP related bonus items is
another case)
- if(pProto->RequiredHonorRank && (_player->GetHonorRank() < pProto-
>RequiredHonorRank || _player->getLevel() < pProto->RequiredLevel) )
+ // not check level requiremnt for normal items (PvP related bonus items is
another case) //Change to Higest Rank
+ if(pProto->RequiredHonorRank && (_player->GetHonorHighestRank() < pProto-
>RequiredHonorRank || _player->getLevel() < pProto->RequiredLevel) )
{
_player->SendBuyError( BUY_ERR_LEVEL_REQUIRE, pCreature, item, 0);
return;
Index: src/game/Level0.cpp
===================================================================
--- src/game/Level0.cpp (revision 3006)
+++ src/game/Level0.cpp (working copy)
@@ -210,7 +210,7 @@
{
uint32 dishonorable_kills = m_session->GetPlayer()->GetUInt32Value
(PLAYER_FIELD_LIFETIME_DISHONORABLE_KILLS);
uint32 honorable_kills = m_session->GetPlayer()->GetUInt32Value
(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS);
- uint32 highest_rank = (m_session->GetPlayer()->GetHonorHighestRank() <
16)? m_session->GetPlayer()->GetHonorHighestRank() : 0;
+ uint32 highest_rank = (m_session->GetPlayer()->GetHonorHighestRank() >
4) ? m_session->GetPlayer()->GetHonorHighestRank() - 4 : 0;
uint32 today_honorable_kills = (uint16)m_session->GetPlayer()->GetUInt32Value
(PLAYER_FIELD_SESSION_KILLS);
uint32 today_dishonorable_kills = (uint16)(m_session->GetPlayer()->GetUInt32Value
(PLAYER_FIELD_SESSION_KILLS)>>16);
uint32 yestarday_kills = m_session->GetPlayer()->GetUInt32Value
(PLAYER_FIELD_YESTERDAY_KILLS);
---------------------------------------------------------------------
Index: src/game/Player.cpp
===================================================================
--- src/game/Player.cpp (revision 3006)
+++ src/game/Player.cpp (working copy)
@@ -3963,18 +3963,21 @@
uint32 thisWeekKills = 0;
uint32 lastWeekKills = 0;
- float total_honor = 0;
- float yestardayHonor = 0;
- float thisWeekHonor = 0;
- float lastWeekHonor = 0;
+ float total_honor = 0.0;
+ float yestardayHonor = 0.0;
+ float thisWeekHonor = 0.0;
+ float lastWeekHonor = 0.0;
+ float total_last_weekend_honor = 0.0; //Total honor (until last weekend)
+
time( &rawtime );
now = localtime( &rawtime );
today = ((uint32)(now->tm_year << 16)|(uint32)(now->tm_yday));
Yestarday = today - 1;
- ThisWeekBegin = today - now->tm_wday;
+ ThisWeekBegin = today - (now->tm_wday - 3);
+ if(ThisWeekBegin > today) ThisWeekBegin -= 7;
ThisWeekEnd = ThisWeekBegin + 7;
LastWeekBegin = ThisWeekBegin - 7;
LastWeekEnd = LastWeekBegin + 7;
@@ -3993,7 +3996,7 @@
if(fields[0].GetUInt32() == HONORABLE_KILL)
{
lifetime_honorableKills++;
- //total_honor += fields[1].GetFloat();
+ total_honor += fields[1].GetFloat();
if( date == today)
{
@@ -4018,14 +4021,17 @@
//All honor points until last week
if( date < LastWeekEnd )
{
- total_honor += fields[1].GetFloat();
+ total_last_weekend_honor += fields[1].GetFloat();
}
}
else if(fields[0].GetUInt32() == DISHONORABLE_KILL)
{
lifetime_dishonorableKills++;
- //total_honor -= fields[1].GetFloat();
+ total_honor -= fields[1].GetFloat();
+
+ if(total_honor < -2500.0) total_honor = -2500.0;
+ if(total_honor > 65000.0) total_honor = 65000.0;
if( date == today)
{
@@ -4035,7 +4041,8 @@
//All honor points until last week
if( date < LastWeekEnd )
{
- total_honor -= fields[1].GetFloat();
+ total_last_weekend_honor -= fields[1].GetFloat();
+ if(total_last_weekend_honor < -2500.0) total_last_weekend_honor = -2500.0;
}
}
}
@@ -4044,14 +4051,15 @@
delete result;
}
- //Store Total Honor points...
+ //Store Total Honor points...
SetTotalHonor(total_honor);
+ SetWeekEndHonor(total_last_weekend_honor);
//RIGHEST RANK
//If the new rank is highest then the old one, then m_highest_rank is updated
- if( CalculateHonorRank(total_honor) > GetHonorHighestRank() )
+ if( CalculateHonorRank(total_last_weekend_honor) > GetHonorHighestRank() )
{
- SetHonorHighestRank( CalculateHonorRank(total_honor) );
+ SetHonorHighestRank( CalculateHonorRank(total_last_weekend_honor) );
}
//RATING
@@ -4060,15 +4068,15 @@
//STANDING
SetHonorLastWeekStanding( MaNGOS::Honor::CalculeStanding(this) );
- //TODO Fix next rank bar... it is not working fine! For while it be set with the total
honor points...
//NEXT RANK BAR
- SetUInt32Value(PLAYER_FIELD_HONOR_BAR, (uint32)( (total_honor < 0) ? 0: total_honor)
);
+ //While works absolutely incorrectly (memory reserved - 1 byte)
+ uint32 rank_bar;
+ if (total_honor < 0.0) rank_bar = abs(total_honor);
+ else rank_bar = (uint32) total_honor;
+ SetUInt32Value(PLAYER_FIELD_HONOR_BAR, rank_bar);
- //RANK (Patent)
- if( CalculateHonorRank(total_honor) )
- SetUInt32Value(PLAYER_BYTES_3, (( CalculateHonorRank(total_honor) << 24) +
0x04000000) + (m_drunk & 0xFFFE) + getGender());
- else
- SetUInt32Value(PLAYER_BYTES_3, (m_drunk & 0xFFFE) + getGender());
+ //RANK
+ SetUInt32Value(PLAYER_BYTES_3, (CalculateHonorRank(total_last_weekend_honor) <<
24) + (m_drunk & 0xFFFE) + getGender());
//TODAY
SetUInt32Value(PLAYER_FIELD_SESSION_KILLS, (today_dishonorableKills << 16) +
today_honorableKills );
@@ -4084,7 +4092,6 @@
SetUInt32Value(PLAYER_FIELD_LAST_WEEK_RANK, GetHonorLastWeekStanding());
//LIFE TIME
- SetUInt32Value(PLAYER_FIELD_SESSION_KILLS, (lifetime_dishonorableKills << 16) +
lifetime_honorableKills );
SetUInt32Value(PLAYER_FIELD_LIFETIME_DISHONORABLE_KILLS, lifetime_dishonorableKills);
SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, lifetime_honorableKills);
//TODO: Into what field we need to set it? Fix it!
@@ -4093,19 +4100,21 @@
uint32 Player::GetHonorRank() const
{
- return CalculateHonorRank(m_total_honor_points);
+ return CalculateHonorRank(m_honor_points_lastweek);
}
-//What is Player's rank... private, scout...
+//What is Player's rank
uint32 Player::CalculateHonorRank(float honor_points) const
{
- int rank = 0;
-
- if(honor_points <= 0.00) rank = 0; else
- if(honor_points < 2000.00) rank = 1;
+ int rank = 0;
+ if (honor_points <= -2000.0) rank = 1; // Pariah (-4)
+ else if (honor_points <= -1000.0) rank = 2; // Outlaw (-3)
+ else if (honor_points <= -500.0) rank = 3; // Exiled (-2)
+ else if (honor_points < 0.0) rank = 4; // Dishonored (-1)
+ else if (honor_points == 0.0) rank = 0; // No rank (0)
+ else if (honor_points <= 2000.0) rank = 5; // First rank
else
- rank = ( (int)(honor_points / 5000) + 1);
-
+ rank = ((int)(honor_points / 5000) + 5);
return rank;
}
@@ -4113,9 +4122,15 @@
int Player::CalculateTotalKills(Player *pVictim) const
{
int total_kills = 0;
-
- QueryResult *result = sDatabase.PQuery("SELECT `honor` FROM `character_kill` WHERE
`guid` = '%u' AND `creature_template` = '%u'", GetGUIDLow(), pVictim->GetEntry());
-
+
+ //Change GetEntry to GetGUIDLow for Victim & Added Today kills (from wowwiki)
+ time_t rawtime;
+ struct tm * now;
+ uint32 today = 0;
+ time( &rawtime );
+ now = localtime( &rawtime );
+ today = ((uint32)(now->tm_year << 16)|(uint32)(now->tm_yday));
+ QueryResult *result = sDatabase.PQuery("SELECT `honor` FROM `character_kill` WHERE
`guid` = '%u' AND `creature_template` = '%u' AND `date` = '%u'", GetGUIDLow(), pVictim-
>GetGUIDLow(), (uint32)today);
if(result)
{
total_kills = result->GetRowCount();
@@ -4143,6 +4158,15 @@
{
parcial_honor_points = MaNGOS::Honor::DishonorableKillPoints( getLevel() );
kill_type = DISHONORABLE_KILL;
+///*******************************************ADDED For "Flying away DK"
+ WorldPacket data;
+ data.Initialize(SMSG_PVP_CREDIT);
+ data << (uint32) 0; // honor points
+ data << (uint64) cVictim->GetGUID(); // guid civilian victim
+ //uint32 v_rank = cVictim->GetHonorRank();
+ //data << (uint32) (v_rank);
+ this->GetSession()->SendPacket(&data);
+///*******************************************END
savekill = true;
}
}
@@ -4152,15 +4176,33 @@
Player *pVictim = (Player *)uVictim;
if( GetTeam() == pVictim->GetTeam() ) return;
-
- if( getLevel() < (pVictim->getLevel()+5) )
+ //Gray Level
+ uint32 pl_grey = 0;
+ uint32 pl_level = getLevel();
+ if( pl_level <= 5 )
+ pl_grey = 0;
+ else if( pl_level <= 39 )
+ pl_grey = pl_level - 5 - pl_level/10;
+ else
+ pl_grey = pl_level - 1 - pl_level/5;
+ if( pVictim->getLevel() > pl_grey )
{
parcial_honor_points = MaNGOS::Honor::HonorableKillPoints( this, pVictim );
kill_type = HONORABLE_KILL;
+///*******************************************ADDED For "Flying away rank"
+ WorldPacket data;
+ data.Initialize(SMSG_PVP_CREDIT);
+ data << (uint32) parcial_honor_points; // honor points
+ // If guid=0, in combatlog: You have been awarded %u honor points.
+ // If guid != 0, in combatlog - player_name dies, honorable kill
Rank: rank_name (Estimated Honor Points: %u)
+ data << (uint64) pVictim->GetGUID(); // guid victim
+ uint32 v_rank = pVictim->GetHonorRank();
+ data << (uint32) (v_rank);
+ this->GetSession()->SendPacket(&data);
+///*******************************************END
savekill = true;
}
}
-
if (savekill)
{
time_t rawtime;
---------------------------------------------------------------------
接二楼player.cpp
@@ -4170,8 +4212,8 @@
now = localtime( &rawtime );
today = ((uint32)(now->tm_year << 16)|(uint32)(now->tm_yday));
- sDatabase.PExecute("INSERT INTO `character_kill`
(`guid`,`creature_template`,`honor`,`date`,`type`) VALUES (%u, %u, %f, %u, %u)", (uint32)
GetGUIDLow(), (uint32)uVictim->GetEntry(), (float)parcial_honor_points, (uint32)today,
(uint8)kill_type);
-
+ // Change GetEntry to GetGUIDLow for Victim
+ sDatabase.PExecute("INSERT INTO `character_kill`
(`guid`,`creature_template`,`honor`,`date`,`type`) VALUES (%u, %u, %f, %u, %u)", (uint32)
GetGUIDLow(), (uint32)uVictim->GetGUIDLow(), (float)parcial_honor_points, (uint32)today,
(uint8)kill_type);
UpdateHonor();
}
}
@@ -6735,7 +6777,8 @@
}
if( pProto->RequiredSpell != 0 && !HasSpell( pProto->RequiredSpell ) )
return EQUIP_ERR_NO_REQUIRED_PROFICIENCY;
- if( GetHonorRank() < pProto->RequiredHonorRank )
+ //if( GetHonorRank() < pProto->RequiredHonorRank ) //Change to Highest Rank
+ if( GetHonorHighestRank() < pProto->RequiredHonorRank )
return EQUIP_ITEM_RANK_NOT_ENOUGH;
if( pProto->RequiredReputationFaction && GetReputationRank(pProto-
>RequiredReputationFaction) < pProto->RequiredReputationRank )
return EQUIP_ITEM_REPUTATION_NOT_ENOUGH;
@@ -6764,7 +6807,7 @@
}
if( pProto->RequiredSpell != 0 && !HasSpell( pProto->RequiredSpell ) )
return false;
- if( GetHonorRank() < pProto->RequiredHonorRank )
+ if( GetHonorHighestRank() < pProto->RequiredHonorRank ) //Change to Highest Rank (
Old GetHonorRank() )
return false;
if( getLevel() < pProto->RequiredLevel )
return false;
@@ -6796,7 +6839,7 @@
}
if( pProto->RequiredSpell != 0 && !HasSpell( pProto->RequiredSpell ) )
return EQUIP_ERR_NO_REQUIRED_PROFICIENCY;
- if( GetHonorRank() < pProto->RequiredHonorRank )
+ if( GetHonorHighestRank() < pProto->RequiredHonorRank ) //Change to Highest Rank (
Old GetHonorRank() )
return EQUIP_ITEM_RANK_NOT_ENOUGH;
/*if( GetReputation() < pProto->RequiredReputation )
return EQUIP_ITEM_REPUTATION_NOT_ENOUGH;
Index: src/game/Player.h
===================================================================
--- src/game/Player.h (revision 3006)
+++ src/game/Player.h (working copy)
@@ -1028,6 +1028,9 @@
//Acessors of total honor points
void SetTotalHonor(float total_honor_points) { m_total_honor_points =
total_honor_points; };
float GetTotalHonor(void) const { return m_total_honor_points; };
+ void SetWeekEndHonor(float total_week_honor_points) {
m_honor_points_lastweek = total_week_honor_points; };
+ float GetWeekEndHonor(void) const { return m_honor_points_lastweek; };
+
//Acessors of righest rank
uint32 GetHonorHighestRank() const { return m_highest_rank; }
void SetHonorHighestRank(uint32 hr) { m_highest_rank = hr; }
@@ -1269,6 +1272,9 @@
std::deque<uint32> m_TaxiDestinations;
float m_total_honor_points;
+ //Added by Zhivoi
+ float m_honor_points_lastweek; //For calculate rang
+
float m_rating;
uint32 m_highest_rank;
int32 m_standing;
----------------------------------------------------------------------
怪物经验计算公式
// Mob XP Functions (including Con Colors)
// Colors will be numbers:
// {grey = 0, green = 1, yellow = 2, orange = 3, red = 4, skull = 5}
// NOTE: skull = red when working with anything OTHER than mobs!
double getConColor(int playerlvl, int moblvl)
{
if(playerlvl + 5 <= moblvl) {
if(playerlvl + 10 <= moblvl) {
return 5;
}
else {
return 4;
}
}
else {
switch(moblvl - playerlvl)
{
case 4:
case 3:
return 3;
break;
case 2:
case 1:
case 0:
case -1:
case -2:
return 2;
break;
default:
// More adv formula for grey/green lvls:
if(playerlvl <= 5) {
return 1; //All others are green.
}
else {
if(playerlvl <= 39) {
if(moblvl <= (playerlvl - 5 - floor(playerlvl/10))) {
// Its below or equal to the 'grey level':
return 0;
}
else {
return 1;
}
}
else {
//player over lvl 39:
if(moblvl <= (playerlvl - 1 - floor(playerlvl/5))) {
return 0;
}
else {
return 1;
}
}
}
}
}
}
int getZD(int lvl)
{
if(lvl <= 7) {
return 5;
}
else {
if(lvl <= 9) {
return 6;
}
else {
if(lvl <= 11) {
return 7;
}
else {
if(lvl <= 15) {
return 8;
}
else {
if(lvl <= 19) {
return 9;
}
else {
if(lvl <= 29) {
return 11;
}
else {
if(lvl <= 39) {
return 12;
}
else {
if(lvl <= 44) {
return 13;
}
else {
if(lvl <= 49) {
return 14;
}
else {
if(lvl <= 54) {
return 15;
}
else {
if(lvl <= 59) {
return 16;
}
else {
return 17; // Approx.
}
}
}
}
}
}
}
}
}
}
}
}
double getMobXP(int playerlvl, int moblvl)
{
if(moblvl >= playerlvl) {
double temp = ((playerlvl * 5) + 45) * (1 + (0.05 * (moblvl - playerlvl)));
double tempcap = ((playerlvl * 5) + 45) * 1.2;
if(temp > tempcap) {
return floor(tempcap);
}
else {
return floor(temp);
}
}
else {
if(getConColor(playerlvl, moblvl) == 0) {
return 0;
}
else {
return floor((playerlvl * 5) + 45) * (1 - (playerlvl - moblvl)/getZD(playerlvl));
}
}
}
double getEliteMobXP(int playerlvl, int moblvl)
{
return getMobXP(playerlvl, moblvl) * 2;
}
// Rested Bonus:
// Restedness is double XP, but if we only have part restedness we must split the XP:
double getMobXPFull(int playerlvl, int moblvl, bool elite, int rest)
{
// rest = how much XP is left before restedness wears off:
double temp = 0;
if(elite) {
temp = getEliteMobXP(playerlvl, moblvl);
}
else {
temp = getMobXP(playerlvl, moblvl);
}
// Now to apply restedness. temp = actual XP.
// If restedness is 0...
if(rest == 0) {
return temp;
}
else {
if(rest >= temp) {
return temp * 2;
}
else {
//Restedness is partially covering the XP gained.
// XP = rest + (AXP - (rest / 2))
return rest + (temp - (rest / 2));
}
}
}
// Party Mob XP:
double getPartyMobXPFull(int playerlvl, int highestlvl, int sumlvls, int moblvl, bool elite, int rest)
{
double temp = getMobXPFull(highestlvl, moblvl, elite, 0);
// temp = XP from soloing via highest lvl...
temp = temp * playerlvl / sumlvls;
if(rest == 0) {
return temp;
}
else {
if(rest >= temp) {
return temp * 2;
}
else {
//Restedness is partially covering the XP gained.
// XP = rest + (AXP - (rest / 2))
return rest + (temp - (rest / 2));
}
}
}
Cheers!
--------------------------------------
spell.dbc列的编号 说明
spell.dbc列的编号 说明,
Field 1 Spell ID 技能代号
Field 2 School 法术的系别 如 (火焰伤害 神圣伤害)
Field 3 Category 种类
Field 4
Field 5 SpellDispellTypeID.dbc 魔法 非魔法类型ID
Field 6 SpellMechanic ID.dbc 魔法MechanicID 技能作用的代码
Field 7 Attributes * New 属性
Field 8 Attributes Ex * New 属性不包括
Field 9
Field 10
Field 11
Field 12 Targets 目标 (攻击对象的种类相关)
Field 13 Target Creature Type 目标类型 (攻击对象的种类)
Field 14 SpellFocusObject ID.dbc 需要到特定的gameobj才能施法 (工程学的 需要铁砧)
Field 15 Caster Aura State *New 施法者光环数据
Field 16 Target Aura State *NEw 目标光环数据
Field 17 Recovery Time 施法时间 1为瞬发 19
Field 18 Category Recovery Time 技能冷却时间 20
Field 19 Category Recovery Time *New 21
Field 20 Interrupt Flags *New 打断的标记
Field 21 Aura Interrupt Flags *New 光环打断的标记
Field 22 Channel Interrupt Flags *New 引导打断的标记
Field 23 Proc Flags proc标志?????
Field 24 Proc Chance $h prco机会??
Field 25 Proc Charges $n proc耗费??
Field 26 Max Level 最大等级
Field 27 Base Level 基础等级 学习此技能需要的等级
Field 28 Spell Level 魔法等级
Field 29 Spell Duration ($d) DBC 魔法持续时间DBC
Field 30 Power Type 能量类型
Field 31 Mana Costs 消耗魔法值
Field 32 Mana CostPer level 每级消耗魔法值
Field 33 Mana Per Second 每秒消耗魔法值
Field 34 Mana Per Second Per Level 每秒每级消耗魔法值
Field 35 Spell Range Index 施法距离索引
Field 36 Speed 速度
Field 37 Modal Next Spell ???
Field 38
Field 39 Totem [1] 施法需要的物品(施法后不消失)如图腾 附魔棒 扳手等
Field 40 Totem [2] 施法需要的物品(施法后不消失)如图腾 附魔棒 扳手等
Field 41 Reagent [1] 施法物品(施法后物品消失)
Field 42 Reagent [2]
Field 43 Reagent [3]
Field 44 Reagent [4]
Field 45 Reagent [5]
Field 46 Reagent [6]
Field 47 Reagent [7]
Field 48 Reagent [8]
Field 49 Reagent Count [1] 施法物品需要的个数
Field 50 Reagent Count [2]
Field 51 Reagent Count [3]
Field 52 Reagent Count [4]
Field 53 Reagent Count [5]
Field 54 Reagent Count [6]
Field 55 Reagent Count [7]
Field 56 Reagent Count [8]
Field 57 Equipped Item Class 附魔装备的分类值(class)
Field 58 Equipped Item SubClass 附魔装备的子分类值(subclass)(估计是附魔的代码 附的是什么魔)
Field 59 Spell Effect [1] ($M1) 魔法效果1
Field 60 Spell Effect [2] ($M2) 魔法效果2
Field 61 Spell Effect [3] ($M3) 魔法效果3
Field 62 EffectDieSides[1] 魔法效果值增加的最大值(火球是这项)
Field 63 EffectDieSides[2]
Field 64 EffectDieSides[3]
Field 65 EffectBaseDice[1]
Field 66 EffectBaseDice[2]
Field 67 EffectBaseDice[3]
Field 68 EffectDicePerLevel[1]
Field 69 EffectDicePerLevel[2]
Field 70 EffectDicePerLevel[3]
Field 71 EffectRealPointsPerLevel[1] 每级真实效果点数
Field 72 EffectRealPointsPerLevel[2]
Field 73 EffectRealPointsPerLevel[3]
Field 74 EffectBaseDamage[1] ($s1) 魔法基础效果值(伤害 闪避率 等)
Field 75 EffectBaseDamage[2] ($s2) 魔法基础附加值
Field 76 EffectBaseDamage[3] ($s3)
Field 77 EffectImplicitTargetA[1] 效果固有的目标A
Field 78 EffectImplicitTargetA[2]
Field 79 EffectImplicitTargetA[3]
Field 80 EffectImplicitTargetB[1]
Field 81 EffectImplicitTargetB[2]
Field 82 EffectImplicitTargetB[3]
Field 83 EffectImplicitTargetB[1]
Field 84 EffectImplicitTargetB[2]
Field 85 Effect Implicit TargetB[3]
Field 86 EffectRadiusIndex[1] 魔法有效距离索引1
Field 87 EffectRadiusIndex[2]
Field 88 EffectRadiusIndex[3]
Field 89 Effect ApplyAura Name[1] 效果应用的光环名1 (对应效果 59-61列)
Field 90 EffectApplyAuraName[2]
Field 91 EffectApplyAuraName[3]
Field 92 EffectAmplitude[1]持续性伤害的时间间隔! 95
Field 93 EffectAmplitude[2]
Field 94 EffectAmplitude[3]
Field 95 Effectunknown[1]
Field 96 Effectunknown[2]
Field 97 Effectunknown[3]
Field 98 Effect Chain Target[1] 效果链的目标
Field 99 Effect Chain Target[2]
Field 100 Effect Chain Target[3]
Field 101 Effect Item Type[1] 效果道具的类别type
Field 102 Effect Item Type[2]
Field 103 Effect Item Type[3]
Field 104 Spell 1 (creature etc) 技能creature等等(如 教授技能ID 坐骑皮肤 召唤宝宝 变形等等) 110
Field 105 Spell 2 (creature etc)
Field 106 Spell 3 (creature etc)
Field 107 Link To Spell[train>learn] 链接到技能
Field 108 Casting Spell 施放中的魔法???
Field 109 EffectTriggerSpell[3] 传送技能效果????
Field 110 EffectPointsPerComboPoint[1] 每combo点的效果点数 (盗贼的连击点数)
Field 111 EffectPointsPerComboPoint[2]
Field 112 EffectPointsPerComboPoint[2]
Field 113 Spell Visual.dbc 技能visual(视觉).dbc
Field 114
Field 115 IconID 技能图标ID
Field 116 Active Icon ID 技能使用后的图标ID
Field 117 Spell Priority 技能优先权
Field 118 Spell Name 魔法名称
Field 119 NameAlt[1]
Field 120 NameAlt[2]
Field 121 NameAlt[3]
Field 122 NameAlt[4]
Field 123 NameAlt[5]
Field 124 NameAlt[6]
Field 125 NameAlt[7]
Field 126 NameFlags 名字标志
Field 127 Rank 魔法级别
Field 128 RankAlt[1]
Field 129 RankAlt[2]
Field 130 RankAlt[3]
Field 131 RankAlt[4]
Field 132 RankAlt[5]
Field 133 RankAlt[6]
Field 134 RankAlt[7]
Field 135 RankFlags 级别标志
Field 136 Description 描述
Field 137 DescriptionAlt[1]
Field 138 DescriptionAlt[2]
Field 139 DescriptionAlt[3]
Field 140 DescriptionAlt[4]
Field 141 DescriptionAlt[5]
Field 142 DescriptionAlt[6]
Field 143 DescriptionAlt[7]
Field 144 DescriptionFlags 描述的标志
Field 145 BuffDescription 状态图标描述
Field 146 BuffDescriptionAlt[1]
Field 147 BuffDescriptionAlt[2]
Field 148 BuffDescriptionAlt[3]
Field 149 BuffDescriptionAlt[4]
Field 150 BuffDescriptionAlt[5]
Field 151 BuffDescriptionAlt[6]
Field 152 BuffDescriptionAlt[7]
Field 153 BuffDescriptionFlags 状态图标描述的标志
Field 154 ManaCostPercentage 消耗魔法百分比%
Field 155 StartRecoveryCategory 开始恢复冷却时间的类别
Field 156 Start Recovery Time 开始恢复冷却的时间
Field 157
Field 158 SpellFamilyName *New 技能系列 名称
Field 159
Field 160
Field 161
Field 162
Field 163
Field 164
Field 165
Field 166
Field 167
-----------------------------------------------
添加联盟部落都可以使用的NPC
CREATURE_TEMPLATE表里,faction 字段是表示NPC阵营的,
可以参考传送NPC的faction 值 1080
添加防御和狂暴姿态到技能训练师
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3408, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3593, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3598, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(4087, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(4089, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(4593, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(4594, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(4595, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(5113, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(5114, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(5479, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(5480, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(7315, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(8141, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(913, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(914, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(985, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(1229, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(1901, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(2131, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3041, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3042, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3043, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3059, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3063, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3153, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3169, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3353, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3354, 1612, 600, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(1901, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3041, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3042, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3043, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3169, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3353, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3354, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(3408, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(4087, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(4089, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(4593, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(4594, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(4595, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(5113, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(5114, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(5479, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(5480, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(7315, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(8141, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(914, 2468, 12000, 0, 0, 0, 0);
INSERT INTO npc_trainer
(entry, spell, spellcost, reqspell, reqskill, reqskillvalue, reqlevel)
VALUES
(985, 2468, 12000, 0, 0, 0, 0);
--------------------------------------------------------------------------
在副本死亡后到最近的灵魂使者墓地的坐标
INSERT INTO `game_graveyard_zone` VALUES ('106', '34', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('10', '33', '209', '0');
INSERT INTO `game_graveyard_zone` VALUES ('469', '48', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('6', '70', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('100', '90', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('39', '129', '722', '0');
INSERT INTO `game_graveyard_zone` VALUES ('108', '109', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('450', '209', '1176', '0');
INSERT INTO `game_graveyard_zone` VALUES ('636', '230', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('632', '229', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('909', '329', '2017', '0');
INSERT INTO `game_graveyard_zone` VALUES ('869', '289', '2057', '0');
INSERT INTO `game_graveyard_zone` VALUES ('31', '349', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('310', '429', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('850', '389', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('329', '249', '3459', '0');
INSERT INTO `game_graveyard_zone` VALUES ('632', '469', '2677', '0');
------------------------------------------------------------------------
芒果参数配置所在的源码文件
芒果参数配置所在的文件(比如:杀怪倍率多少,开地图倍率多少,在代码中的定义)
world.cpp
rate_values[RATE_HEALTH] = sConfig.GetFloatDefault("Rate.Health", 1);
rate_values[RATE_POWER_MANA] = sConfig.GetFloatDefault("Rate.Power1", 1);
rate_values[RATE_POWER_RAGE] = sConfig.GetFloatDefault("Rate.Power2", 1);
rate_values[RATE_POWER_FOCUS] = sConfig.GetFloatDefault("Rate.Power3", 1);
rate_values[RATE_DROP_ITEMS] = sConfig.GetFloatDefault("Rate.Drop.Items", 1);
rate_values[RATE_DROP_MONEY] = sConfig.GetFloatDefault("Rate.Drop.Money", 1);
rate_values[RATE_XP_KILL] = sConfig.GetFloatDefault("Rate.XP.Kill", 1);
rate_values[RATE_XP_QUEST] = sConfig.GetFloatDefault("Rate.XP.Quest", 1);
rate_values[RATE_XP_EXPLORE] = sConfig.GetFloatDefault("Rate.XP.Explore", 1);
rate_values[RATE_CREATURE_NORMAL_DAMAGE] = sConfig.GetFloatDefault("Rate.Creature.Normal.Damage", 1);
rate_values[RATE_CREATURE_ELITE_ELITE_DAMAGE] = sConfig.GetFloatDefault("Rate.Creature.Elite.Elite.Damage", 1);
rate_values[RATE_CREATURE_ELITE_RAREELITE_DAMAGE] = sConfig.GetFloatDefault("Rate.Creature.Elite.RAREELITE.Damage", 1);
rate_values[RATE_CREATURE_ELITE_WORLDBOSS_DAMAGE] = sConfig.GetFloatDefault("Rate.Creature.Elite.WORLDBOSS.Damage", 1);
rate_values[RATE_CREATURE_ELITE_RARE_DAMAGE] = sConfig.GetFloatDefault("Rate.Creature.Elite.RARE.Damage", 1);
rate_values[RATE_CREATURE_NORMAL_HP] = sConfig.GetFloatDefault("Rate.Creature.Normal.HP", 1);
rate_values[RATE_CREATURE_ELITE_ELITE_HP] = sConfig.GetFloatDefault("Rate.Creature.Elite.Elite.HP", 1);
rate_values[RATE_CREATURE_ELITE_RAREELITE_HP] = sConfig.GetFloatDefault("Rate.Creature.Elite.RAREELITE.HP", 1);
rate_values[RATE_CREATURE_ELITE_WORLDBOSS_HP] = sConfig.GetFloatDefault("Rate.Creature.Elite.WORLDBOSS.HP", 1);
rate_values[RATE_CREATURE_ELITE_RARE_HP] = sConfig.GetFloatDefault("Rate.Creature.Elite.RARE.HP", 1);
rate_values[RATE_CREATURE_AGGRO] = sConfig.GetFloatDefault("Rate.Creature.Aggro", 1);
rate_values[RATE_REST_INGAME] = sConfig.GetFloatDefault("Rate.Rest.InGame", 1);
rate_values[RATE_REST_OFFLINE_IN_TAVERN_OR_CITY] = sConfig.GetFloatDefault("Rate.Rest.Offline.InTavernOrCity", 1);
rate_values[RATE_REST_OFFLINE_IN_WILDERNESS] = sConfig.GetFloatDefault("Rate.Rest.Offline.InWilderness", 1);
m_configs[CONFIG_LOG_LEVEL] = sConfig.GetIntDefault("LogLevel", 0);
m_configs[CONFIG_LOG_WORLD] = sConfig.GetIntDefault("LogWorld", 0);
if(sConfig.GetIntDefault("LogFilter_TransportMoves", 0)!=0)
m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
if(sConfig.GetIntDefault("LogFilter_CreatureMoves", 0)!=0)
m_logFilter |= LOG_FILTER_CREATURE_MOVES;
m_configs[CONFIG_COMPRESSION] = sConfig.GetIntDefault("Compression", 1);
if(m_configs[CONFIG_COMPRESSION] < 1 || m_configs[CONFIG_COMPRESSION] > 9)
{
sLog.outError("Compression level (%i) must be in range 1..9. Using default compression level (1).",m_configs[CONFIG_COMPRESSION]);
m_configs[CONFIG_COMPRESSION] = 1;
}
m_configs[CONFIG_GRID_UNLOAD] = sConfig.GetIntDefault("GridUnload", 1);
m_configs[CONFIG_INTERVAL_SAVE] = sConfig.GetIntDefault("PlayerSaveInterval", 900000);
m_configs[CONFIG_INTERVAL_GRIDCLEAN] = sConfig.GetIntDefault("GridCleanUpDelay", 300000);
m_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfig.GetIntDefault("MapUpdateInterval", 100);
m_configs[CONFIG_INTERVAL_CHANGEWEATHER] = sConfig.GetIntDefault("ChangeWeatherInterval", 600000);
m_configs[CONFIG_PORT_WORLD] = sConfig.GetIntDefault("WorldServerPort", DEFAULT_WORLDSERVER_PORT);
m_configs[CONFIG_PORT_REALM] = sConfig.GetIntDefault("RealmServerPort", DEFAULT_REALMSERVER_PORT);
m_configs[CONFIG_SOCKET_SELECTTIME] = sConfig.GetIntDefault("SocketSelectTime", DEFAULT_SOCKET_SELECT_TIME);
m_configs[CONFIG_GROUP_XP_DISTANCE] = sConfig.GetIntDefault("MaxGroupXPDistance", 74);
m_configs[CONFIG_GROUP_XP_DISTANCE] = m_configs[CONFIG_GROUP_XP_DISTANCE]*m_configs[CONFIG_GROUP_XP_DISTANCE];
m_configs[CONFIG_GROUP_XP_LEVELDIFF] = sConfig.GetIntDefault("MaxGroupXPLevelDiff", 10);
m_configs[CONFIG_SIGHT_MONSTER] = sConfig.GetIntDefault("MonsterSight", 400);
m_configs[CONFIG_SIGHT_GUARDER] = sConfig.GetIntDefault("GuarderSight", 500);
m_configs[CONFIG_GAME_TYPE] = sConfig.GetIntDefault("GameType", 0);
m_configs[CONFIG_ALLOW_TWO_SIDE_ACCOUNTS] = sConfig.GetIntDefault("AllowTwoSide.Accounts", 0);
m_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION] = sConfig.GetIntDefault("AllowTwoSide.Interaction",0);
m_configs[CONFIG_ALLOW_TWO_SIDE_WHO_LIST] = sConfig.GetIntDefault("AllowTwoSide.WhoList", 0);
m_configs[CONFIG_MAX_PLAYER_LEVEL] = sConfig.GetIntDefault("MaxPlayerLevel", 60);
if(m_configs[CONFIG_MAX_PLAYER_LEVEL] > 255)
{
sLog.outError("MaxPlayerLevel (%i) must be in range 1..255. Set to 255.",m_configs[CONFIG_MAX_PLAYER_LEVEL]);
m_configs[CONFIG_MAX_PLAYER_LEVEL] = 255;
}
m_configs[CONFIG_IGNORE_AT_LEVEL_REQUIREMENT] = sConfig.GetBoolDefault("IgnoreATLevelRequirement", 0);
m_configs[CONFIG_MAX_PRIMARY_TRADE_SKILL] = sConfig.GetIntDefault("MaxPrimaryTradeSkill", 2);
m_configs[CONFIG_MIN_PETITION_SIGNS] = sConfig.GetIntDefault("MinPetitionSigns", 9);
if(m_configs[CONFIG_MIN_PETITION_SIGNS] > 9)
{
sLog.outError("MinPetitionSigns (%i) must be in range 0..9. Set to 9.",m_configs[CONFIG_MIN_PETITION_SIGNS]);
m_configs[CONFIG_MIN_PETITION_SIGNS] = 9;
}
m_configs[CONFIG_GM_WISPERING_TO] = sConfig.GetIntDefault("GM.WhisperingTo",0);
m_configs[CONFIG_GM_IN_GM_LIST] = sConfig.GetIntDefault("GM.InGMList",0);
m_configs[CONFIG_GM_IN_WHO_LIST] = sConfig.GetIntDefault("GM.InWhoList",0);
m_configs[CONFIG_GM_LOGIN_STATE] = sConfig.GetIntDefault("GM.LoginState",2);
m_configs[CONFIG_GROUP_VISIBILITY] = sConfig.GetIntDefault("GroupVisibility",0);
m_configs[CONFIG_SKILL_CHANCE_ORANGE] = sConfig.GetIntDefault("SkillChance.Orange",100);
m_configs[CONFIG_SKILL_CHANCE_YELLOW] = sConfig.GetIntDefault("SkillChance.Yellow",75);
m_configs[CONFIG_SKILL_CHANCE_GREEN] = sConfig.GetIntDefault("SkillChance.Green",25);
m_configs[CONFIG_SKILL_CHANCE_GREY] = sConfig.GetIntDefault("SkillChance.Grey",0);
m_configs[CONFIG_MAX_OVERSPEED_PINGS] = sConfig.GetIntDefault("MaxOverspeedPings",10);
if(m_configs[CONFIG_MAX_OVERSPEED_PINGS] != 0 && m_configs[CONFIG_MAX_OVERSPEED_PINGS] < 2)
{
sLog.outError("MaxOverspeedPings (%i) must be in range 2..infinity (or 0 for disbale check. Set to 2.",m_configs[CONFIG_MAX_OVERSPEED_PINGS]);
m_configs[CONFIG_MAX_OVERSPEED_PINGS] = 2;
}
m_gameTime = time(NULL);
----------------------------------------------------------------------
分解效果控制
Spell::EffectDisEnchant 管分解效果
void Spell::EffectDisEnchant(uint32 i)
{
if(m_caster->GetTypeId() != TYPEID_PLAYER)
return;
Player* p_caster = (Player*)m_caster;
if(!itemTarget)
return;
uint32 item_level = itemTarget->GetProto()->ItemLevel;
uint32 item_quality = itemTarget->GetProto()->Quality;
uint32 item_class = itemTarget->GetProto()->Class; //w1w
uint32 item = 0;
uint32 count = 0;
if(item_level >= 66)
{
{
count = 1;
item = 20725;
}
}
else if(item_level >= 51 && item_level <= 65)
{
if(item_quality == 4)
{
count = urand(3,5);
item = 14344;
}
else if(item_quality == 3)
{
count = 1;
item = 14344;
}
else if(item_quality == 2)
{
// w1w
if(item_class==ITEM_CLASS_WEAPON)
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 16203;
else
item = 16204;
}
else
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 16204;
else
item = 16203;
}
// w1w
}
}
else if(item_level >= 46 && item_level <= 50)
{
if(item_quality == 4)
{
count = urand(3,5);
item = 14343;
}
else if(item_quality == 3)
{
count = 1;
item = 14343;
}
else if(item_quality == 2)
{
// w1w
if(item_class==ITEM_CLASS_WEAPON)
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 16202;
else
item = 11176;
}
else
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11176;
else
item = 16202;
}
// w1w
// count = urand(1,(item_level/10));
// if(urand(1,100)< 85)
// item = 11176;
// else
// item = 16202;
}
}
else if(item_level >= 41 && item_level <= 45)
{
if(item_quality == 4)
{
count = urand(3,5);
item = 11178;
}
else if(item_quality == 3)
{
count = 1;
item = 11178;
}
else if(item_quality == 2)
{
// w1w
if(item_class==ITEM_CLASS_WEAPON)
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11175;
else
item = 11176;
}
else
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11176;
else
item = 11175;
}
// w1w
// count = urand(1,(item_level/10));
// if(urand(1,100)< 85)
// item = 11176;
// else
// item = 11175;
}
}
else if(item_level >= 36 && item_level <= 40)
{
if(item_quality == 4)
{
count = urand(3,5);
item = 11177;
}
else if(item_quality == 3)
{
count = 1;
item = 11177;
}
else if(item_quality == 2)
{
// w1w
if(item_class==ITEM_CLASS_WEAPON)
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11174;
else
item = 11137;
}
else
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11137;
else
item = 11174;
}
// w1w
// count = urand(1,(item_level/10));
// if(urand(1,100)< 85)
// item = 11137;
// else
// item = 11174;
}
}
else if(item_level >= 31 && item_level <= 35)
{
if(item_quality == 4)
{
count = urand(3,5);
item = 11139;
}
else if(item_quality == 3)
{
count = 1;
item = 11139;
}
else if(item_quality == 2)
{
// w1w
if(item_class==ITEM_CLASS_WEAPON)
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11135;
else
item = 11137;
}
else
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11137;
else
item = 11135;
}
// w1w
// count = (item_level/10);
// if(urand(1,100)< 85)
// item = 11137;
// else
// item = 11135;
}
}
else if(item_level >= 25 && item_level <= 30)
{
if(item_quality == 4)
{
count = urand(3,5);
item = 11138;
}
else if(item_quality == 3)
{
count = 1;
item = 11138;
}
else if(item_quality == 2)
{
// w1w
if(item_class==ITEM_CLASS_WEAPON)
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11134;
else
item = 11083;
}
else
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11083;
else
item = 11134;
}
// w1w
// count = (item_level/10);
// if(urand(1,100)< 85)
// item = 11083;
// else
// item = 11134;
}
}
else if(item_level >= 21 && item_level <= 25)
{
if(item_quality == 4)
{
count = urand(3,5);
item = 11084;
}
else if(item_quality == 3)
{
count = 1;
item = 11084;
}
else if(item_quality == 2)
{
// w1w
if(item_class==ITEM_CLASS_WEAPON)
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11082;
else
item = 11083;
}
else
{
count = urand(1,(item_level/10));
if(urand(1,100)< 85)
item = 11083;
else
item = 11082;
}
// w1w
// count = (item_level/10);
// if(urand(1,100)< 85)
// item = 11083;
// else
// item = 11082;
}
}
else if(item_level >= 1 && item_level <= 20)
{
if(item_quality == 4)
{
count = urand(3,5);
item = 10978;
}
else if(item_quality == 3 && item_level >=16)
{
count = 1;
item = 10978;
}
else if(item_quality == 2)
{
if(urand(1,100)< 70)
{
count = urand(1,3);
item = 10940;
}
else if(item_level <=15 && urand(1,100)< 70 )
{
count = urand(1,3);
item = 10938;
}
else if(urand(1,100)< 50)
{
count = urand(1,3);
item = 10939;
}
else
{
count = urand(1,3);
item = 10998;
}
}
}
if ( item == 0 || count == 0 )
{ //Fix crash
SendCastResult(CAST_FAIL_CANT_BE_DISENCHANTED);
//SendChannelUpdate(0);
return;
}
uint32 item_count = 1;
p_caster->DestroyItemCount(itemTarget,item_count, true);
p_caster->UpdateCraftSkill(m_spellInfo->Id);
uint16 dest;
uint8 msg = p_caster->CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, item, count, false );
if( msg == EQUIP_ERR_OK )
p_caster->StoreNewItem( dest, item, count, true );
else
p_caster->SendEquipError( msg, NULL, NULL );
return ;
}
------------------------------------------------------------
学习骑术熟练度修复!
Index: SpellEffects.cpp
===================================================================
--- src/game/SpellEffects.cpp (revision 2671)
+++ src/game/SpellEffects.cpp (working copy)
@@ -969,6 +969,16 @@
player->learnSpell(2764);
break;
}
+ case 33388: //Min riding
+ {
+ player->SetSkill(762,75,75);
+ break;
+ }
+ case 33391: //Mid riding
+ {
+ player->SetSkill(762,150,150);
+ break;
+ }
default:break;
}
sLog.outDebug( "Spell: Player %u have learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow() );
-------------------------------------------------------------------
mangos编译方法
实际上只需要简单的几步就可以用MaNGOS的最新源码编译出最新版的MaNGOS.
你所要作的就是简单的照我写的方法一步一步去作.
1) 首先,你需要有2个软件,第一个就是下载及更新MANGOS源码用的TortoiseSVN.第二个就是VS2003或者VS2005.
注意:这里推荐使用VS2003.因为在使用VS2005时,出现了很多错误...导致编译失败...
而用VS2003时,没有出现任何问题.
MaNGOS
2) 在作完第一步后,我们可以在电脑里新建一个文件夹.这里以C:\盘来举例.例如C:\mangos.
在建好的文件夹上点击右键.你会看到"SVN Checkout..." , 点了...跳出来一个框框,
在"URL of repository"里面输入"https://svn.mangosproject.org/svn/MaNGOS/trunk"
在这个下面有一个选项,你需要选中"HEAD",好了...点击OK吧.
3) 作完上面这一步后, 用右键点击MANGOS文件夹,你会看到"SVN Update",点击他吧,这会让你的MANGOS源码升级,以后每次只要点击"SVN Update",就可以让你的MANGOS源码保持在最新版.
4) 接下来,就是开始编译MANGOS了~~~是不是很兴奋了...
打开VS2003, 选择"Open Project",然后打开"C:\Mangos\win\" 选择"mangosdVC71.sln"
如果你用的是VS2005, 就要打开"mangosdVC80.sln"
5) 接下来的这一步,我建议你看一下图片来明白你需要作什么.
6) 呵呵.这一步就是等待了.编译是需要时间的...等VS帮你作好吧.
7)嗯...过了一会~~~ 编译好了.
你可以"C:\Mangos\bin\release\"里面找到编译好的MANGOS. 需要的是这几个文件
libeay32.dll, libmySQL.dll, mangosd.exe, MaNGOSScript.dll, realmd.exe
嗯, 好像还少什么
mangosd.conf和realmd.conf是不是, 我们可以在"C:\Mangos\src\mangosd\"和C:\mangos\src\realmd\"里面找到mangosd.conf.in , realmd.conf.in
啊 名字不一样 嗯 把后面的.in去掉吧.
SQL文件了可以在"C:\Mangos\sql\"里面找到...当然只有一个架构的..嘿嘿...
升级的SQL文件可以在"E:\Mangos\sql\updates"里面找到...
ScriptDev
下载最新版本的ScriptDev并将和MaNGOS一起使用,你需要以下几个步骤:
1) 新建一个文件夹,并命名。在文件夹上点右键。。。
如同上面Mangos源码的下载方式一样, 使用SVN Checkout, URL地址为 https://opensvn.csie.org/ScriptDev/trunk , 然后使用 SVN Update
2) 在作完上面的步骤后,在这个文件夹上点右键, 选择“TortoiseSVN” ,再选择 “Export“
选择一个新建文件夹.然后点OK,好了 最新版本的ScriptDev已经出来了
3) 到Export好的这个新文件夹里面,复制 SQL, SRC, WIN 这三个文件夹到Mangos文件夹里,
好了,当你编译MANGOS时,将带着最新版本的ScriptDev...
重要:当有ScriptDev的新版出来时。。。你必需重复上面的动作。。。
-----------------------------------------------------------------------
爱东东
我的各类资源收集收集网站 http://tag.iddgame.com
我的实验性技术网站 http://www.iddgame.com
我的魔兽世界网站 http://www.iddwow.com.cn