CtrlEvent.java 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. /**
  22. * Something has changed, usually a previous step has being completed or maybe was completed, the AI must thing on next action.
  23. */
  24. EVT_THINK,
  25. /**
  26. * The actor was attacked. This event comes each time a physical or magical<br>
  27. * attack was done on the actor. NPC may start attack in response, or ignore<br>
  28. * this event if they already attack someone, or change target and so on.
  29. */
  30. EVT_ATTACKED,
  31. /** Increase/decrease aggression towards a target, or reduce global aggression if target is null */
  32. EVT_AGGRESSION,
  33. /** Actor is in stun state */
  34. EVT_STUNNED,
  35. /** Actor is paralyzed or petrified */
  36. EVT_PARALYZED,
  37. /** Actor starts/stops sleeping */
  38. EVT_SLEEPING,
  39. /** Actor is in rooted state (cannot move) */
  40. EVT_ROOTED,
  41. /** Actor evaded hit **/
  42. EVT_EVADED,
  43. /**
  44. * An event that previous action was completed. The action may be an attempt to physically/magically hit an enemy, or an action that discarded attack attempt has finished.
  45. */
  46. EVT_READY_TO_ACT,
  47. /**
  48. * User's command, like using a combat magic or changing weapon, etc. The command is not intended to change final goal
  49. */
  50. EVT_USER_CMD,
  51. /**
  52. * The actor arrived to assigned location, or it's a time to modify movement destination (follow, interact, random move and others intentions).
  53. */
  54. EVT_ARRIVED,
  55. /**
  56. * The actor arrived to an intermediate point, and needs to revalidate destination. This is sent when follow/move to pawn if destination is far away.
  57. */
  58. EVT_ARRIVED_REVALIDATE,
  59. /** The actor cannot move anymore. */
  60. EVT_ARRIVED_BLOCKED,
  61. /** Forgets an object (if it's used as attack target, follow target and so on */
  62. EVT_FORGET_OBJECT,
  63. /**
  64. * Attempt to cancel current step execution, but not change the intention.<br>
  65. * For example, the actor was put into a stun, so it's current attack<br>
  66. * or movement has to be canceled. But after the stun state expired,<br>
  67. * the actor may try to attack again. Another usage for CANCEL is a user's<br>
  68. * attempt to cancel a cast/bow attack and so on.
  69. */
  70. EVT_CANCEL,
  71. /** The character is dead */
  72. EVT_DEAD,
  73. /** The character looks like dead */
  74. EVT_FAKE_DEATH,
  75. /** The character attack anyone randomly **/
  76. EVT_CONFUSED,
  77. /** The character cannot cast spells anymore **/
  78. EVT_MUTED,
  79. /** The character flee in random directions **/
  80. EVT_AFRAID,
  81. /** The character finish casting **/
  82. EVT_FINISH_CASTING,
  83. /** The character betrayed its master */
  84. EVT_BETRAYED
  85. }