• enum PlayerEvents C++ 枚举 案例


    1. enum PlayerEvents
    2. {
    3. PLAYER_EVENT_ON_CHARACTER_CREATE = 1, // (event, player)
    4. PLAYER_EVENT_ON_CHARACTER_DELETE = 2, // (event, guid)
    5. PLAYER_EVENT_ON_LOGIN = 3, // (event, player)
    6. PLAYER_EVENT_ON_LOGOUT = 4, // (event, player)
    7. PLAYER_EVENT_ON_SPELL_CAST = 5, // (event, player, spell, skipCheck)
    8. PLAYER_EVENT_ON_KILL_PLAYER = 6, // (event, killer, killed)
    9. PLAYER_EVENT_ON_KILL_CREATURE = 7, // (event, killer, killed)
    10. PLAYER_EVENT_ON_KILLED_BY_CREATURE = 8, // (event, killer, killed)
    11. PLAYER_EVENT_ON_DUEL_REQUEST = 9, // (event, target, challenger)
    12. PLAYER_EVENT_ON_DUEL_START = 10, // (event, player1, player2)
    13. PLAYER_EVENT_ON_DUEL_END = 11, // (event, winner, loser, type)
    14. PLAYER_EVENT_ON_GIVE_XP = 12, // (event, player, amount, victim) - Can return new XP amount
    15. PLAYER_EVENT_ON_LEVEL_CHANGE = 13, // (event, player, oldLevel)
    16. PLAYER_EVENT_ON_MONEY_CHANGE = 14, // (event, player, amount) - Can return new money amount
    17. PLAYER_EVENT_ON_REPUTATION_CHANGE = 15, // (event, player, factionId, standing, incremental) - Can return new standing
    18. PLAYER_EVENT_ON_TALENTS_CHANGE = 16, // (event, player, points)
    19. PLAYER_EVENT_ON_TALENTS_RESET = 17, // (event, player, noCost)
    20. PLAYER_EVENT_ON_CHAT = 18, // (event, player, msg, Type, lang) - Can return false, newMessage
    21. PLAYER_EVENT_ON_WHISPER = 19, // (event, player, msg, Type, lang, receiver) - Can return false, newMessage
    22. PLAYER_EVENT_ON_GROUP_CHAT = 20, // (event, player, msg, Type, lang, group) - Can return false, newMessage
    23. PLAYER_EVENT_ON_GUILD_CHAT = 21, // (event, player, msg, Type, lang, guild) - Can return false, newMessage
    24. PLAYER_EVENT_ON_CHANNEL_CHAT = 22, // (event, player, msg, Type, lang, channel) - Can return false, newMessage
    25. PLAYER_EVENT_ON_EMOTE = 23, // (event, player, emote) - Not triggered on any known emote
    26. PLAYER_EVENT_ON_TEXT_EMOTE = 24, // (event, player, textEmote, emoteNum, guid)
    27. PLAYER_EVENT_ON_SAVE = 25, // (event, player)
    28. PLAYER_EVENT_ON_BIND_TO_INSTANCE = 26, // (event, player, difficulty, mapid, permanent)
    29. PLAYER_EVENT_ON_UPDATE_ZONE = 27, // (event, player, newZone, newArea)
    30. PLAYER_EVENT_ON_MAP_CHANGE = 28, // (event, player)
    31. // Custom
    32. PLAYER_EVENT_ON_EQUIP = 29, // (event, player, item, bag, slot)
    33. PLAYER_EVENT_ON_FIRST_LOGIN = 30, // (event, player)
    34. PLAYER_EVENT_ON_CAN_USE_ITEM = 31, // (event, player, itemEntry) - Can return InventoryResult enum value
    35. PLAYER_EVENT_ON_LOOT_ITEM = 32, // (event, player, item, count)
    36. PLAYER_EVENT_ON_ENTER_COMBAT = 33, // (event, player, enemy)
    37. PLAYER_EVENT_ON_LEAVE_COMBAT = 34, // (event, player)
    38. PLAYER_EVENT_ON_REPOP = 35, // (event, player)
    39. PLAYER_EVENT_ON_RESURRECT = 36, // (event, player)
    40. PLAYER_EVENT_ON_LOOT_MONEY = 37, // (event, player, amount)
    41. PLAYER_EVENT_ON_QUEST_ABANDON = 38, // (event, player, questId)
    42. PLAYER_EVENT_ON_LEARN_TALENTS = 39, // (event, player, talentId, talentRank, spellid)
    43. // UNUSED = 40, // (event, player)
    44. // UNUSED = 41, // (event, player)
    45. PLAYER_EVENT_ON_COMMAND = 42, // (event, player, command) - player is nil if command used from console. Can return false
    46. };

  • 相关阅读:
    《大话设计模式》学习总结
    Prometheus规则定义及基于docker简单邮箱钉钉服务发现
    3.容器的学习(2/2)
    Windows 下 Sublime Text 3.2.2 下载及配置
    DPU网络开发SDK——DPDK(一)
    基于数组寻址的SCL算法实现S7-1200_1500中的配方功能Recipe
    装饰器模式
    Unity制作透明材质直接方法——6.15山大软院项目实训
    项目实战——类似Everything的加强版软件
    【利用冒泡排序的思想模拟实现qsort函数】
  • 原文地址:https://blog.csdn.net/laocooon/article/details/127834311