• event_scripts | Spell_scripts


    event_scripts

    保存每当激活事件时激活的脚本,可以是由 Gameobject 激活的,也可以由具有以下法术效果的法术(Spell)激活

    SPELL _ EFFECT _ SEND _ EVENT (61)

    • id:事件脚本 ID
    • delay:事件脚本触发延时,秒为单位
    • command:取值来源源码 ObjectMgr.h 的 ScriptCommands 定义
    1. enum ScriptCommands
    2. {
    3. SCRIPT_COMMAND_TALK = 0, // source/target = Creature, target = any, datalong = talk type (see ChatType enum), datalong2 & 1 = player talk (instead of creature), dataint = string_id
    4. SCRIPT_COMMAND_EMOTE = 1, // source/target = Creature, datalong = emote id, datalong2 = 0: set emote state; > 0: play emote state
    5. SCRIPT_COMMAND_FIELD_SET_DEPRECATED = 2,
    6. SCRIPT_COMMAND_MOVE_TO = 3, // source/target = Creature, datalong2 = time to reach, x/y/z = destination
    7. SCRIPT_COMMAND_FLAG_SET_DEPRECATED = 4,
    8. SCRIPT_COMMAND_FLAG_REMOVE_DEPRECATED= 5,
    9. SCRIPT_COMMAND_TELEPORT_TO = 6, // source/target = Creature/Player (see datalong2), datalong = map_id, datalong2 = 0: Player; 1: Creature, x/y/z = destination, o = orientation
    10. SCRIPT_COMMAND_QUEST_EXPLORED = 7, // target/source = Player, target/source = GO/Creature, datalong = quest id, datalong2 = distance or 0
    11. SCRIPT_COMMAND_KILL_CREDIT = 8, // target/source = Player, datalong = creature entry, datalong2 = 0: personal credit, 1: group credit
    12. SCRIPT_COMMAND_RESPAWN_GAMEOBJECT = 9, // source = WorldObject (summoner), datalong = GO guid, datalong2 = despawn delay
    13. SCRIPT_COMMAND_TEMP_SUMMON_CREATURE = 10, // source = WorldObject (summoner), datalong = creature entry, datalong2 = despawn delay, x/y/z = summon position, o = orientation
    14. SCRIPT_COMMAND_OPEN_DOOR = 11, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15)
    15. SCRIPT_COMMAND_CLOSE_DOOR = 12, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15)
    16. SCRIPT_COMMAND_ACTIVATE_OBJECT = 13, // source = Unit, target = GO
    17. SCRIPT_COMMAND_REMOVE_AURA = 14, // source (datalong2 != 0) or target (datalong2 == 0) = Unit, datalong = spell id
    18. SCRIPT_COMMAND_CAST_SPELL = 15, // source and/or target = Unit, datalong2 = cast direction (0: s->t 1: s->s 2: t->t 3: t->s 4: s->creature with dataint entry), dataint & 1 = triggered flag
    19. SCRIPT_COMMAND_PLAY_SOUND = 16, // source = WorldObject, target = none/Player, datalong = sound id, datalong2 (bitmask: 0/1=anyone/player, 0/2=without/with distance dependency, so 1|2 = 3 is target with distance dependency)
    20. SCRIPT_COMMAND_CREATE_ITEM = 17, // target/source = Player, datalong = item entry, datalong2 = amount
    21. SCRIPT_COMMAND_DESPAWN_SELF = 18, // target/source = Creature, datalong = despawn delay
    22. SCRIPT_COMMAND_LOAD_PATH = 20, // source = Unit, datalong = path id, datalong2 = is repeatable
    23. SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT = 21, // source = WorldObject (if present used as a search center), datalong = script id, datalong2 = unit lowguid, dataint = script table to use (see ScriptsType)
    24. SCRIPT_COMMAND_KILL = 22, // source/target = Creature, dataint = remove corpse attribute
    25. // TrinityCore only
    26. SCRIPT_COMMAND_ORIENTATION = 30, // source = Unit, target (datalong > 0) = Unit, datalong = > 0 turn source to face target, o = orientation
    27. SCRIPT_COMMAND_EQUIP = 31, // soucre = Creature, datalong = equipment id
    28. SCRIPT_COMMAND_MODEL = 32, // source = Creature, datalong = model id
    29. SCRIPT_COMMAND_CLOSE_GOSSIP = 33, // source = Player
    30. SCRIPT_COMMAND_PLAYMOVIE = 34, // source = Player, datalong = movie id
    31. SCRIPT_COMMAND_MOVEMENT = 35, // source = Creature, datalong = MovementType, datalong2 = MovementDistance (wander_distance f.ex.), dataint = pathid
    32. SCRIPT_COMMAND_PLAY_ANIMKIT = 36 // source = Creature, datalong = AnimKit id
    33. };
    • datalong - datalong2:取值由 command 决定,详见上表
    • dataint:取值由 command 决定,详见上表
    • x,y,z,o:坐标信息

    Spell_scripts

    保存每当使用(激活)法术时激活的脚本,此表脚本应由具有以下法术效果的法术(Spell)激活:

    SPELL_EFFECT_SCRIPT_EFFECT (77)

    SPELL_EFFECT_DUMMY (3)

    •  id:法术脚本ID
    • effIndex:对应的法术效果索引
      • 以传送暴风城法术为例,该法术共有 Effect 0 和 Effect 1 两个法术效果,如填 0,则此法术脚本对 Effect 0 生效
    • delay:法术脚本触发延时,秒为单位
    • command:取值来源源码 ObjectMgr.h 的 ScriptCommands 定义,见上表
    • datalong - datalong2:取值由 command 决定,详见上表
    • dataint:取值由 command 决定,详见上表
    • x,y,z,o:坐标信息
  • 相关阅读:
    AttributeError: module ‘xxx‘ has no attribute
    LabVIEW基础-子VI创建与调用
    基于扰动观测器的控制系统LMI控制
    useEffect
    python学习之基本语法---语法规则---注释,标识符,关键字,命名规则(二)day8
    【实战项目开发技术分享】如何设置机器人禁行区/虚拟墙
    Unity 鼠标悬浮时文本滚动(Text Mesh Pro)
    linux网络编程-TCP-TCP协议
    一文1600字使用Postman搞定各种接口token实战(建议收藏)
    MySQL基本操作之数据库设计理论
  • 原文地址:https://blog.csdn.net/weixin_51122280/article/details/138213271