CtrlEvent.java 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 evenements 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 responce, 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. /** An event that previous action was completed. The action may be an attempt
  41. * to physically/magically hit an enemy, or an action that discarded
  42. * attack attempt has finished. */
  43. EVT_READY_TO_ACT,
  44. /** User's command, like using a combat magic or changing weapon, etc.
  45. * The command is not intended to change final goal */
  46. EVT_USER_CMD,
  47. /** The actor arrived to assigned location, or it's a time to modify
  48. * movement destination (follow, interact, random move and others intentions). */
  49. EVT_ARRIVED,
  50. /** The actor arrived to an intermidiate point, and needs revalidate destination.
  51. * This is sent when follow/move to pawn if destination is far away. */
  52. EVT_ARRIVED_REVALIDATE,
  53. /** The actor cannot move anymore. */
  54. EVT_ARRIVED_BLOCKED,
  55. /** Forgets an object (if it's used as attack target, follow target and so on */
  56. EVT_FORGET_OBJECT,
  57. /** Attempt to cancel current step execution, but not change the intention.
  58. * For example, the actor was putted into a stun, so it's current attack
  59. * or movement has to be canceled. But after the stun state expired, the
  60. * actor may try to attack again. Another usage for CANCEL is a user's
  61. * attempt to cancel a cast/bow attack and so on.
  62. */
  63. EVT_CANCEL,
  64. /** The character is dead */
  65. EVT_DEAD,
  66. /** The character looks like dead */
  67. EVT_FAKE_DEATH,
  68. /** The character attack anyone randomly **/
  69. EVT_CONFUSED,
  70. /** The character cannot cast spells anymore **/
  71. EVT_MUTED,
  72. /** The character flee in randoms directions **/
  73. EVT_AFRAID,
  74. /** The character finish casting **/
  75. EVT_FINISH_CASTING,
  76. /** The character betrayed its master */
  77. EVT_BETRAYED
  78. }