CtrlEvent.java 3.1 KB

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