Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
PetAI.h
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
6
#ifndef SKYFIRE_PETAI_H
7
#define SKYFIRE_PETAI_H
8
9
#include "
CreatureAI.h
"
10
#include "
Timer.h
"
11
12
class
Creature
;
13
class
Spell
;
14
15
class
PetAI
:
public
CreatureAI
16
{
17
public
:
18
explicit
PetAI
(
Creature
* c);
19
20
void
UpdateAI
(
uint32
)
OVERRIDE
;
21
static
int
Permissible
(
const
Creature
*);
22
23
void
KilledUnit
(
Unit
*
/*victim*/
)
OVERRIDE
;
24
void
AttackStart
(
Unit
* target)
OVERRIDE
;
25
void
MovementInform
(
uint32
moveType,
uint32
data)
OVERRIDE
;
26
void
OwnerAttackedBy
(
Unit
* attacker)
OVERRIDE
;
27
void
OwnerAttacked
(
Unit
* target)
OVERRIDE
;
28
void
AttackedBy
(
Unit
* attacker)
OVERRIDE
;
29
void
ReceiveEmote
(
Player
* player,
uint32
textEmote)
OVERRIDE
;
30
31
// The following aren't used by the PetAI but need to be defined to override
32
// default CreatureAI functions which interfere with the PetAI
33
//
34
void
MoveInLineOfSight
(
Unit
*
/*who*/
)
OVERRIDE
{ }
// CreatureAI interferes with returning pets
35
void
MoveInLineOfSight_Safe
(
Unit
*
/*who*/
) { }
// CreatureAI interferes with returning pets
36
void
EnterEvadeMode
()
OVERRIDE
{ }
// For fleeing, pets don't use this type of Evade mechanic
37
38
private
:
39
//bool _isVisible(Unit*) const;
40
bool
_needToStop
(
void
);
41
void
_stopAttack
(
void
);
42
43
void
UpdateAllies
();
44
45
TimeTracker
i_tracker
;
46
bool
inCombat
;
47
std::set<uint64>
m_AllySet
;
48
uint32
m_updateAlliesTimer
;
49
50
Unit
*
SelectNextTarget
(
bool
allowAutoSelect)
const
;
51
void
HandleReturnMovement
();
52
void
DoAttack
(
Unit
* target,
bool
chase);
53
bool
CanAttack
(
Unit
* target);
54
void
ClearCharmInfoFlags
();
55
};
56
#endif
CreatureAI.h
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
Timer.h
CreatureAI::CreatureAI
CreatureAI(Creature *creature)
Definition
CreatureAI.h:69
Creature
Definition
Creature.h:427
PetAI::OwnerAttacked
void OwnerAttacked(Unit *target) OVERRIDE
Definition
PetAI.cpp:341
PetAI::_needToStop
bool _needToStop(void)
Definition
PetAI.cpp:33
PetAI::CanAttack
bool CanAttack(Unit *target)
Definition
PetAI.cpp:507
PetAI::Permissible
static int Permissible(const Creature *)
Definition
PetAI.cpp:20
PetAI::UpdateAllies
void UpdateAllies()
Definition
PetAI.cpp:247
PetAI::AttackedBy
void AttackedBy(Unit *attacker) OVERRIDE
Definition
PetAI.cpp:603
PetAI::inCombat
bool inCombat
Definition
PetAI.h:46
PetAI::KilledUnit
void KilledUnit(Unit *) OVERRIDE
Definition
PetAI.cpp:287
PetAI::DoAttack
void DoAttack(Unit *target, bool chase)
Definition
PetAI.cpp:441
PetAI::PetAI
PetAI(Creature *c)
Definition
PetAI.cpp:28
PetAI::MovementInform
void MovementInform(uint32 moveType, uint32 data) OVERRIDE
Definition
PetAI.cpp:473
PetAI::i_tracker
TimeTracker i_tracker
Definition
PetAI.h:45
PetAI::OwnerAttackedBy
void OwnerAttackedBy(Unit *attacker) OVERRIDE
Definition
PetAI.cpp:321
PetAI::ClearCharmInfoFlags
void ClearCharmInfoFlags()
Definition
PetAI.cpp:587
PetAI::EnterEvadeMode
void EnterEvadeMode() OVERRIDE
Definition
PetAI.h:36
PetAI::m_updateAlliesTimer
uint32 m_updateAlliesTimer
Definition
PetAI.h:48
PetAI::MoveInLineOfSight
void MoveInLineOfSight(Unit *) OVERRIDE
Definition
PetAI.h:34
PetAI::AttackStart
void AttackStart(Unit *target) OVERRIDE
Definition
PetAI.cpp:309
PetAI::_stopAttack
void _stopAttack(void)
Definition
PetAI.cpp:42
PetAI::SelectNextTarget
Unit * SelectNextTarget(bool allowAutoSelect) const
Definition
PetAI.cpp:362
PetAI::MoveInLineOfSight_Safe
void MoveInLineOfSight_Safe(Unit *)
Definition
PetAI.h:35
PetAI::ReceiveEmote
void ReceiveEmote(Player *player, uint32 textEmote) OVERRIDE
Definition
PetAI.cpp:563
PetAI::HandleReturnMovement
void HandleReturnMovement()
Definition
PetAI.cpp:406
PetAI::m_AllySet
std::set< uint64 > m_AllySet
Definition
PetAI.h:47
PetAI::UpdateAI
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
Definition
PetAI.cpp:63
Player
Definition
Player.h:1289
Spell
Definition
Spell.h:289
Unit
Definition
Unit.h:1367
TimeTracker
Definition
Timer.h:76
src
server
game
AI
CoreAI
PetAI.h
Generated on
for Project SkyFire Core by
1.17.0