01wow魔兽世界爱好者论坛

新帖: [/loop]
查看: 1186717|回复: 0
打印 上一主题 下一主题

conditions 表结构解析

[复制链接]

1182

主题

1482

帖子

8599

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
8599
跳转到指定楼层
楼主
发表于 2017-8-2 20:24:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

多个系统(掉落、对话等)的条件定义

SourceTypeOrReferenceId:如果是负数,可以参考以下数据表模板
CONDITION_SOURCE_TYPE_NONE = 0,
CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE = 1,
CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE = 2,
CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE = 3,
CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE = 4,
CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE = 5,
CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE = 6,
CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE = 7,
CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE = 8,
CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE = 9,
CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE = 10,
CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE = 11,
CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE = 12,
CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET = 13,
CONDITION_SOURCE_TYPE_GOSSIP_MENU = 14,
CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 15,
CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE = 16,
CONDITION_SOURCE_TYPE_SPELL = 17,
CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT = 18,
CONDITION_SOURCE_TYPE_QUEST_ACCEPT = 19,
CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20,
CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21,
CONDITION_SOURCE_TYPE_SMART_EVENT = 22,
CONDITION_SOURCE_TYPE_NPC_VENDOR = 23,
CONDITION_SOURCE_TYPE_SPELL_PROC = 24,
CONDITION_SOURCE_TYPE_MAX = 25
ElseGroup:允许所有建筑状态归类,所有相同状态的编号(相同的SourceType、SourceGroup和SourceEntry)在ElseGroup中共享同一个数字,定义为一个组;
ConditionTypeOrReference: CONDITION_NONE = 0,
CONDITION_AURA = 1,
CONDITION_ITEM = 2,
CONDITION_ITEM_EQUIPPED = 3,
CONDITION_ZONEID = 4,
CONDITION_REPUTATION_RANK = 5,
CONDITION_TEAM = 6,
CONDITION_SKILL = 7,
CONDITION_QUESTREWARDED = 8,
CONDITION_QUESTTAKEN = 9,
CONDITION_DRUNKENSTATE = 10,
CONDITION_WORLD_STATE = 11,
CONDITION_ACTIVE_EVENT = 12,
CONDITION_INSTANCE_INFO = 13,
CONDITION_QUEST_NONE = 14,
CONDITION_CLASS = 15,
CONDITION_RACE = 16,
CONDITION_ACHIEVEMENT = 17,
CONDITION_TITLE = 18,
CONDITION_SPAWNMASK = 19,
CONDITION_GENDER = 20,
CONDITION_UNIT_STATE = 21,
CONDITION_MAPID = 22,
CONDITION_AREAID = 23,
CONDITION_UNUSED_24 = 24,
CONDITION_SPELL = 25,
CONDITION_PHASEMASK = 26,
CONDITION_LEVEL = 27,
CONDITION_QUEST_COMPLETE = 28,
CONDITION_NEAR_CREATURE = 29,
CONDITION_NEAR_GAMEOBJECT = 30,
CONDITION_OBJECT_ENTRY = 31,
CONDITION_TYPE_MASK = 32,
CONDITION_RELATION_TO = 33,
CONDITION_REACTION_TO = 34,
CONDITION_DISTANCE_TO = 35,
CONDITION_ALIVE = 36,
CONDITION_HP_VAL = 37,
CONDITION_HP_PCT = 38,
CONDITION_REALM_ACHIEVEMENT = 39,
CONDITION_IN_WATER = 40,
CONDITION_MAX = 41
ConditionTarget:所选物体的状态;
NegativeCondition:如果设为1,则为倒立状态;
ErrorType:只有当CONDITION_SOURCE_TYPE_SPELL = 17时显示;
ErrorTextId:只有当CONDITION_SOURCE_TYPE_SPELL = 17时显示;
(ErrorType 必须是 SPELL_FAILED_CUSTOM_ERROR (172) 否则为 0)
ScriptName:状态使用的脚本名称,默认为NULL;
Comment:对状态和参考的说明;

condition types说明
SourceGroup 和 SourceEntry字段关联 SourceTypeOrReferenceId
*CONDITION_SOURCE_TYPE_NONE = 0 只在参考模板中使用

*CONDITION_SOURCE_TYPE_ * _LOOT_TEMPLATE = 1 - 12
*SourceGroup: 掉落编号 (_loot_template表的Entry字段或者Reference_loot_template表的Entry字段)
*SourceEntry: 物体编号 (_loot_template表的Item字段或者Reference_loot_template表的Item字段)




    • ConditionTarget: 总为0


*CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET = 13



    • SourceGroup: 状态影响效果(1 - EFFECT_0, 2 - EFFECT_1, 4 - EFFECT_2)
    • SourceEntry: spell.dbc文件的技能编号
    • ConditionTarget:

      • 0 - 技能目标
      • 1 - 施法者



*CONDITION_SOURCE_TYPE_GOSSIP_MENU = 14



    • SourceGroup: gossip_menu 表的entry字段
    • SourceEntry: gossip_menu 表的text_id字段
    • ConditionTarget:

      • 0 - 显示对话内容的玩家
      • 1 - 提供对话菜单的物体


*CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 15



    • SourceGroup:关联gossip_menu_option表的menu_id字段;
    • SourceEntry:关联gossip_menu_option表的id字段;
    • ConditionTarget:

      • 0 - 显示对话内容的玩家
      • 1 - 提供对话菜单的物体


*CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE = 16



    • SourceGroup: 总为0
    • SourceEntry: 关联creature_template表的entry字段;
    • ConditionTarget:

      • 0 - 玩家骑乘交通工具
      • 1 - 坐骑


注意,该生物必须是个坐骑。

*CONDITION_SOURCE_TYPE_SPELL = 17




    • SourceGroup: 总为0
    • SourceEntry: 关联spell.dbc文件的id;
    • ConditionTarget:

      • 0 - 施法者
      • 1 - 施法的目标(必须是玩家选中的,范围内目标不算)



*CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT = 18



    • SourceGroup: 生物编号,关联npc_spellclick_spells表的npc_entry字段;
    • SourceEntry: 技能,关联npc_spellclick_spells表的spell_id字段
    • ConditionTarget:

      • 0 - 选中目标
      • 1 - 法术目标


*CONDITION_SOURCE_TYPE_QUEST_ACCEPT = 19



    • SourceGroup: ?
    • SourceEntry: Quest id)
    • ConditionTarget: always 0

*CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20



    • SourceGroup: ?
    • SourceEntry: 关联任务表的ID
    • ConditionTarget: 总为0

*CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21



    • SourceGroup: 关联creature_template表的entry字段
    • SourceEntry: 关联spell.dbc文件的id
    • ConditionTarget:

      • 0 - 显示施法条的玩家
      • 1 - 骑乘生物



*CONDITION_SOURCE_TYPE_SMART_EVENT = 22



    • SourceGroup: smart_scripts表的id+ 1
    • SourceEntry: smart_scripts表的EntryOrGuid字段
    • SourceId: smart_scripts表的Source_Type字段
    • ConditionTarget:

      • 0 - 脚本调用者
      • 1 - 物体


*CONDITION_SOURCE_TYPE_NPC_VENDOR = 23



    • SourceGroup: 关联npc_vendor表的entry字段
    • SourceEntry: 关联npc_vendor表的item字段
    • SourceId: 总为0

*CONDITION_SOURCE_TYPE_SPELL_PROC = 24



    • SourceGroup: 总为0
    • SourceEntry: 触发的光环技能
    • ConditionTarget:

      • 0 - 执行者
      • 1 - 执行目标



ConditionValueX fields说明

*CONDITION_NONE = 0 从不用

*CONDITION_AURA = 1




    • ConditionValue1: 关联spell.dbc的id
    • ConditionValue2: 法术效果标志(0-2)
    • ConditionValue3: 总为0

*CONDITION_ITEM = 2



    • ConditionValue1: 关联item_template表的entry字段
    • ConditionValue2: 物品数量
    • ConditionValue3: 是否在银行 (1=是)

*CONDITION_ITEM_EQUIPPED = 3



    • ConditionValue1: 关联item_template表的entry字段
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_ZONEID = 4



    • ConditionValue1: 区域ID
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_REPUTATION_RANK = 5



    • ConditionValue1: 关联Faction.dbc文件的ID
    • ConditionValue2: 等级标志(仇恨 - 1, 敌对 - 2, 冷漠 - 4, 中立 - 8, 友善 - 16, 尊敬 - 32, 崇敬 - 64, 崇拜 - 128)
    • ConditionValue3: 总为0

*CONDITION_TEAM = 6



    • ConditionValue1: 团队id (469 - 联盟, 67 - 部落)
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_SKILL = 7



    • ConditionValue1: 所需专业,参考 SkillLine.dbc
    • ConditionValue2: 专业熟练度
    • ConditionValue3: 总为0

*CONDITION_QUESTREWARDED = 8



    • ConditionValue1: 任务表quest_template的id
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_QUESTTAKEN = 9



    • ConditionValue1:任务表quest_template的id
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_DRUNKENSTATE = 10



    • ConditionValue1: 饮酒状态: 0 - 清醒; 1 - 微醉, 2 - 喝醉, 3 - 烂醉
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0
    • (Formerly AD_COMMISSION_AURA)

*CONDITION_WORLD_STATE = 11



    • ConditionValue1: 世界状态索引
    • ConditionValue2: 世界状态数值
    • ConditionValue3: 总为0

*CONDITION_ACTIVE_EVENT= 12



    • ConditionValue1: 关联game_event表的eventEntry字段
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_INSTANCE_INFO = 13



    • ConditionValue1: 编号
    • ConditionValue2: 数据
    • ConditionValue3: 类型:

      • 0 - INSTANCE_INFO_DATA
      • 1 - INSTANCE_INFO_DATA64
      • 2 - INSTANCE_INFO_BOSS_STATE


*CONDITION_QUEST_NONE = 14



    • ConditionValue1: 关联quest_template表的id字段
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_CLASS = 15



    • ConditionValue1: 职业标志. 参考 ChrClasses.dbc
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_RACE = 16



    • ConditionValue1: 玩家种族. 参考 ChrRaces.dbc
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_ACHIEVEMENT = 17



    • ConditionValue1: 成就ID,关联Achievement.dbc
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_TITLE = 18



    • ConditionValue1: 称号ID,关联 CharTitles.dbc
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_SPAWNMASK = 19



    • ConditionValue1: 刷新标志(参考 Gameobject表的spawnMask字段/Creature表的spawnMask字段)
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_GENDER = 20



    • ConditionValue1: 0 = 男, 1 = 女, 2 = 无
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_UNIT_STATE = 21



    • ConditionValue1: 单位状态
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_MAPID = 22



    • ConditionValue1: 地图编号
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_AREAID = 23



    • ConditionValue1: 区域编号
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_SPELL = 25



    • ConditionValue1: 技能编号,参考 Spell.dbc
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_PHASEMASK = 26



    • ConditionValue1: 相位数值
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_LEVEL = 27



    • ConditionValue1: 玩家等级
    • ConditionValue2: 选项

      • 0 = 等级相等
      • 1 = 等级高
      • 2 = 等级低
      • 3 = 等级相同或者高
      • 4 = 等级相同或者低

    • ConditionValue3: 总为0

*CONDITION_QUEST_COMPLETE = 28



    • ConditionValue1: 任务编号
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

仅适用于玩家完成任务目标,但尚未提交的情况
*CONDITION_NEAR_CREATURE = 29



    • ConditionValue1: 生物编号
    • ConditionValue2: 距离
    • ConditionValue3: 总为0

*CONDITION_NEAR_GAMEOBJECT = 30



    • ConditionValue1: 物体编号
    • ConditionValue2: 距离
    • ConditionValue3: 总为0

*CONDITION_OBJECT_ENTRY= 31



    • ConditionValue1: 可用目标类型

      • 3 - TYPEID_UNIT 单位
      • 4 - TYPEID_PLAYER 玩家
      • 5 - TYPEID_GAMEOBJECT 物体
      • 7 - TYPEID_CORPSE (施放灵魂后的玩家尸体)

    • ConditionValue2: 编号

      • 0 所有物体
      • 物体编号 TypeID = TYPEID_GAMEOBJECT
      • 生物编号 TypeID = TYPEID_UNIT

    • ConditionValue3: 总为0

*CONDITION_TYPE_MASK= 32



    • ConditionValue1: 类型标志

      • 0x0008 - TYPEMASK_UNIT 单位
      • 0x0010 - TYPEMASK_PLAYER 玩家
      • 0x0020 - TYPEMASK_GAMEOBJECT 物体
      • 0x0080 - TYPEMASK_CORPSE (施放灵魂后的玩家尸体)

    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_RELATION_TO= 33



    • ConditionValue1: 关联的目标 - 当前SourceType中可用
    • ConditionValue2: 关联类型

      • 0 - RELATION_SELF 单人
      • 1 - RELATION_IN_PARTY 队伍
      • 2 - RELATION_IN_RAID_OR_PARTY 团队或队伍
      • 3 - RELATION_OWNED_BY (从属)
      • 4 - RELATION_PASSENGER_OF (骑乘)
      • 5 - RELATION_CREATED_BY (召唤)

    • ConditionValue3: 总为0

*CONDITION_REACTION_TO= 34



    • ConditionValue1: 关联的目标 - 当前SourceType中可用
    • ConditionValue2: 等级标志

      • 1 - 仇恨
      • 2 - 敌对
      • 4 - 冷漠
      • 8 - 中立
      • 16 - 友善
      • 32 - 尊敬
      • 64 - 崇敬
      • 128 - 崇拜

    • ConditionValue3: 总为 0

*CONDITION_DISTANCE_TO= 35



    • ConditionValue1: 距离内目标
    • ConditionValue2: 距离
    • ConditionValue3: 比较类型

      • 0 = 距离和ConditionValue2相等
      • 1 = 距离比ConditionValue2大
      • 2 = 距离比ConditionValue2小
      • 3 = 距离大于等于ConditionValue2
      • 4 = 距离小于等于ConditionValue2


*CONDITION_ALIVE= 36



    • ConditionValue1: 总为 0
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0
    • NegativeCondition:

      • 0 (目标必须或者)
      • 1 (目标必须死亡)
        注意:生物死亡和看起来像死亡是两回事,前者是真的死亡了,后者只是做出一个死亡的动作。


*CONDITION_HP_VAL = 37



    • ConditionValue1: 血量
    • ConditionValue2: 比较类型

      • 0 = 血量相等
      • 1 = 血量高
      • 2 = 血量低
      • 3 = 血量必须相等或者高于
      • 4 = 血量必须相等或者低于

    • ConditionValue3: 总为0

*CONDITION_HP_PCT = 38



    • ConditionValue1: 最大血量百分比
    • ConditionValue2: 比较类型

      • 0 = 最大血量百分比必须相同
      • 1 = 最大血量百分比必须高
      • 2 = 最大血量百分比必须低
      • 3 = 最大血量百分比必须相同或者高
      • 4 = 最大血量百分比必须相同或者低

    • ConditionValue3: 总为0

*CONDITION_REALM_ACHIEVEMENT = 39



    • ConditionValue1: 成就ID,参考 Achievement.dbc
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0

*CONDITION_IN_WATER = 40



    • ConditionValue1: 总为0
    • ConditionValue2: 总为0
    • ConditionValue3: 总为0
    • NegativeCondition:

      • 0 (目标必须在陆地上)
      • 1 (目标必须在水里)


*REFERENCE TEMPLATES



    • SourceTypeOrReferenceId : 用作否定,参考 ID
    • SourceGroup : 总为0
    • SourceEntry : 总为0
    • ElseGroup : 修改者
    • ConditionTypeOrReference: ConditionTypeOrReference
    • ConditionValue1 : 参考上面内容
    • ConditionValue2 : 参考上面内容
    • ConditionValue3 : 参考上面内容
    • ErrorType : 参考上面内容
    • ErrorTextId : 参考上面内容
    • Comment : 参考上面内容

加群请说在01wow.com看到
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则





Archiver|手机版|小黑屋|01wow魔兽世界爱好者论坛

GMT+8, 2024-11-17 04:47 , Processed in 0.755346 second(s), 17 queries .

Powered by Discuz! X3.4 Designed by 999test.cn & 01wow魔兽世界爱好者论坛

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表