*Merge.
--HG-- branch : trunk
This commit is contained in:
+3
-2
@@ -38,7 +38,7 @@ int PetAI::Permissible(const Creature *creature)
|
|||||||
return PERMIT_BASE_NO;
|
return PERMIT_BASE_NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
PetAI::PetAI(Creature *c) : CreatureAI(c), i_pet(*c), i_tracker(TIME_INTERVAL_LOOK), inCombat(false)
|
PetAI::PetAI(Creature *c) : CreatureAI(c), i_pet(*c), i_tracker(TIME_INTERVAL_LOOK)
|
||||||
{
|
{
|
||||||
m_AllySet.clear();
|
m_AllySet.clear();
|
||||||
UpdateAllies();
|
UpdateAllies();
|
||||||
@@ -59,7 +59,6 @@ bool PetAI::_needToStop() const
|
|||||||
|
|
||||||
void PetAI::_stopAttack()
|
void PetAI::_stopAttack()
|
||||||
{
|
{
|
||||||
inCombat = false;
|
|
||||||
if( !i_pet.isAlive() )
|
if( !i_pet.isAlive() )
|
||||||
{
|
{
|
||||||
DEBUG_LOG("Creature stoped attacking cuz his dead [guid=%u]", i_pet.GetGUIDLow());
|
DEBUG_LOG("Creature stoped attacking cuz his dead [guid=%u]", i_pet.GetGUIDLow());
|
||||||
@@ -126,6 +125,8 @@ void PetAI::UpdateAI(const uint32 diff)
|
|||||||
|
|
||||||
if (i_pet.GetGlobalCooldown() == 0 && !i_pet.hasUnitState(UNIT_STAT_CASTING))
|
if (i_pet.GetGlobalCooldown() == 0 && !i_pet.hasUnitState(UNIT_STAT_CASTING))
|
||||||
{
|
{
|
||||||
|
bool inCombat = me->getVictim();
|
||||||
|
|
||||||
//Autocast
|
//Autocast
|
||||||
for (uint8 i = 0; i < i_pet.GetPetAutoSpellSize(); i++)
|
for (uint8 i = 0; i < i_pet.GetPetAutoSpellSize(); i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ class TRINITY_DLL_DECL PetAI : public CreatureAI
|
|||||||
void UpdateAllies();
|
void UpdateAllies();
|
||||||
|
|
||||||
Creature &i_pet;
|
Creature &i_pet;
|
||||||
bool inCombat;
|
|
||||||
TimeTracker i_tracker;
|
TimeTracker i_tracker;
|
||||||
std::set<uint64> m_AllySet;
|
std::set<uint64> m_AllySet;
|
||||||
uint32 m_updateAlliesTimer;
|
uint32 m_updateAlliesTimer;
|
||||||
|
|||||||
Reference in New Issue
Block a user