Advertisement
Rochet2

CreatureHooks

Feb 22nd, 2013
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.70 KB | None | 0 0
  1. //Called for reaction at enter to combat if not in combat yet (enemy can be NULL)
  2. //Called at creature aggro either by MoveInLOS or Attack Start
  3. void EnterCombat(Unit* target)
  4.  
  5. // Called at any Damage from any attacker (before damage apply)
  6. void DamageTaken(Unit* attacker, uint32& damage)
  7.  
  8. //Called at World update tick
  9. void UpdateAI(uint32 const diff)
  10.  
  11. //Called at creature death
  12. void JustDied(Unit* killer)
  13.  
  14. //Called at creature killing another unit
  15. void KilledUnit(Unit* victim)
  16.  
  17. // Called when the creature summon successfully other creature
  18. void JustSummoned(Creature* summon)
  19.  
  20. // Called when a summoned creature is despawned
  21. void SummonedCreatureDespawn(Creature* summon)
  22.  
  23. // Called when hit by a spell
  24. void SpellHit(Unit* caster, SpellInfo const* spell)
  25.  
  26. // Called when spell hits a target
  27. void SpellHitTarget(Unit* target, SpellInfo const* spell)
  28.  
  29. //Called at waypoint reached or PointMovement end
  30. void MovementInform(uint32 type, uint32 id)
  31.  
  32. // Called when AI is temporarily replaced or put back when possess is applied or removed
  33. void OnPossess(bool apply)
  34.  
  35. //Called at creature reset either by death or evade
  36. void Reset()
  37.  
  38. // Called before EnterCombat even before the creature is in combat.
  39. void AttackStart(Unit* target)
  40.  
  41. // Called in Creature::Update when deathstate = DEAD. Inherited classes may maniuplate the ability to respawn based on scripted events.
  42. bool CanRespawn()
  43.  
  44. // Called for reaction at stopping attack at no attackers or targets
  45. void EnterEvadeMode()
  46.  
  47. // Called when the creature is summoned successfully by other creature
  48. void IsSummonedBy(Unit* summoner)
  49.  
  50. void SummonedCreatureDies(Creature* summon, Unit* killer)
  51.  
  52. // Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc)
  53. void AttackedBy(Unit* attacker)
  54.  
  55. // Called when creature is spawned or respawned (for reseting variables)
  56. void JustRespawned()
  57.  
  58. void OnCharmed(bool apply)
  59.  
  60. // Called at reaching home after evade
  61. void JustReachedHome()
  62.  
  63. // Called at text emote receive from player
  64. void ReceiveEmote(Player* player, uint32 emoteId)
  65.  
  66. // Called when owner takes damage
  67. void OwnerAttackedBy(Unit* attacker)
  68.  
  69. // Called when owner attacks something
  70. void OwnerAttacked(Unit* target)
  71.  
  72. // called when the corpse of this creature gets removed
  73. void CorpseRemoved(uint32& respawnDelay)
  74.  
  75. // Called when victim entered water and creature can not enter water
  76. bool canReachByRangeAttack(Unit* target)
  77.  
  78. void PassengerBoarded(Unit* passenger, int8 seatId, bool apply)
  79.  
  80. void OnSpellClick(Unit* clicker)
  81.  
  82. void MoveInLineOfSight(Unit* who)
  83.  
  84. // Called if IsVisible(Unit* who) is true at each who move, reaction at visibility zone enter
  85. void MoveInLineOfSight_Safe(Unit* who)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement