CtrlEvent.java 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package com.l2jserver.gameserver.ai;
  16. /**
  17. * This class contains an enum of each possibles events that can happen on an AI character.
  18. */
  19. public enum CtrlEvent
  20. {
  21. /** Something has changed, usually a previous step has being completed
  22. * or maybe was completed, the AI must thing on next action
  23. */
  24. EVT_THINK,
  25. /** The actor was attacked. This event comes each time a physical or magical
  26. * attack was done on the actor. NPC may start attack in response, or ignore
  27. * this event if they already attack someone, or change target and so on.
  28. */
  29. EVT_ATTACKED,
  30. /** Increase/decrease aggression towards a target, or reduce global aggression if target is null */
  31. EVT_AGGRESSION,
  32. /** Actor is in stun state */
  33. EVT_STUNNED,
  34. /** Actor is paralyzed or petrified */
  35. EVT_PARALYZED,
  36. /** Actor starts/stops sleeping */
  37. EVT_SLEEPING,
  38. /** Actor is in rooted state (cannot move) */
  39. EVT_ROOTED,
  40. /** Actor evaded hit **/
  41. EVT_EVADED,
  42. /** An event that previous action was completed. The action may be an attempt
  43. * to physically/magically hit an enemy, or an action that discarded
  44. * attack attempt has finished. */
  45. EVT_READY_TO_ACT,
  46. /** User's command, like using a combat magic or changing weapon, etc.
  47. * The command is not intended to change final goal */
  48. EVT_USER_CMD,
  49. /** The actor arrived to assigned location, or it's a time to modify
  50. * movement destination (follow, interact, random move and others intentions). */
  51. EVT_ARRIVED,
  52. /** The actor arrived to an intermediate point, and needs to revalidate destination.
  53. * This is sent when follow/move to pawn if destination is far away. */
  54. EVT_ARRIVED_REVALIDATE,
  55. /** The actor cannot move anymore. */
  56. EVT_ARRIVED_BLOCKED,
  57. /** Forgets an object (if it's used as attack target, follow target and so on */
  58. EVT_FORGET_OBJECT,
  59. /** Attempt to cancel current step execution, but not change the intention.
  60. * For example, the actor was put into a stun, so it's current attack
  61. * or movement has to be canceled. But after the stun state expired, the
  62. * actor may try to attack again. Another usage for CANCEL is a user's
  63. * attempt to cancel a cast/bow attack and so on.
  64. */
  65. EVT_CANCEL,
  66. /** The character is dead */
  67. EVT_DEAD,
  68. /** The character looks like dead */
  69. EVT_FAKE_DEATH,
  70. /** The character attack anyone randomly **/
  71. EVT_CONFUSED,
  72. /** The character cannot cast spells anymore **/
  73. EVT_MUTED,
  74. /** The character flee in random directions **/
  75. EVT_AFRAID,
  76. /** The character finish casting **/
  77. EVT_FINISH_CASTING,
  78. /** The character betrayed its master */
  79. EVT_BETRAYED
  80. }