CtrlEvent.java 3.3 KB

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