Files
TCPlayerbotCore/src/game/ScriptedSimpleAI.h
T

72 lines
2.2 KiB
C++
Raw Normal View History

2009-02-17 18:08:26 +01:00
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
2009-10-17 15:51:44 -07:00
#ifndef SC_SIMPLEAI_H
#define SC_SIMPLEAI_H
2009-10-17 15:51:44 -07:00
enum CastTarget
{
CAST_SELF = 0, //Self cast
2009-10-27 21:39:53 -07:00
CAST_HOSTILE_TARGET, //Our current target (ie: highest aggro)
CAST_HOSTILE_SECOND_AGGRO, //Second highest aggro (generaly used for cleaves and some special attacks)
CAST_HOSTILE_LAST_AGGRO, //Dead last on aggro (no idea what this could be used for)
2009-10-27 21:39:53 -07:00
CAST_HOSTILE_RANDOM, //Just any random target on our threat list
CAST_FRIENDLY_RANDOM, //NOT YET IMPLEMENTED
2009-10-17 15:51:44 -07:00
//Special cases
CAST_KILLEDUNIT_VICTIM, //Only works within KilledUnit function
CAST_JUSTDIED_KILLER, //Only works within JustDied function
};
2009-10-17 15:51:44 -07:00
2010-02-05 00:31:28 +01:00
struct SimpleAI : public ScriptedAI
{
SimpleAI(Creature *c);// : ScriptedAI(c);
2009-10-17 15:51:44 -07:00
void Reset();
2009-10-17 15:51:44 -07:00
2010-04-19 09:26:37 +02:00
void EnterCombat(Unit * /*who*/);
2009-10-17 15:51:44 -07:00
2010-04-19 09:26:37 +02:00
void KilledUnit(Unit * /*victim*/);
2009-10-17 15:51:44 -07:00
void DamageTaken(Unit *killer, uint32 &damage);
2009-10-17 15:51:44 -07:00
void UpdateAI(const uint32 diff);
2009-10-17 15:51:44 -07:00
public:
2009-10-17 15:51:44 -07:00
2009-02-20 14:14:16 +01:00
int32 Aggro_TextId[3];
uint32 Aggro_Sound[3];
2009-10-17 15:51:44 -07:00
2009-02-20 14:14:16 +01:00
int32 Death_TextId[3];
uint32 Death_Sound[3];
uint32 Death_Spell;
uint32 Death_Target_Type;
2009-10-17 15:51:44 -07:00
2009-02-20 14:14:16 +01:00
int32 Kill_TextId[3];
uint32 Kill_Sound[3];
uint32 Kill_Spell;
uint32 Kill_Target_Type;
2009-10-17 15:51:44 -07:00
struct SimpleAI_Spell
{
uint32 Spell_Id; //Spell ID to cast
int32 First_Cast; //Delay for first cast
uint32 Cooldown; //Cooldown between casts
uint32 CooldownRandomAddition; //Random addition to cooldown (in range from 0 - CooldownRandomAddition)
uint32 Cast_Target_Type; //Target type (note that certain spells may ignore this)
bool InterruptPreviousCast; //Interrupt a previous cast if this spell needs to be cast
bool Enabled; //Spell enabled or disabled (default: false)
2009-10-17 15:51:44 -07:00
//3 texts to many?
2009-02-20 14:14:16 +01:00
int32 TextId[3];
uint32 Text_Sound[3];
}Spell[10];
2009-10-17 15:51:44 -07:00
protected:
uint32 Spell_Timer[10];
};
2009-10-17 15:51:44 -07:00
#endif
2009-02-17 20:07:49 -06:00