* Don't allow pets to attack in melee if owner is pacified. This applies for possessed "pets" as well.

* Use proper spell ID in unsummoning possessed units on channeling interrupt.
* Allow only once to init pet bar for CharmInfo
* Export CharmInfo to be available to scripts
* Allow to disable the melee attack command when initializing the pet action bar

--HG--
branch : trunk
This commit is contained in:
gvcoman
2008-11-20 20:27:04 -05:00
parent df6a8e5f8e
commit 4495efa1ae
4 changed files with 34 additions and 17 deletions
+3 -2
View File
@@ -640,7 +640,7 @@ struct CharmSpellEntry
typedef std::list<Player*> SharedVisionList;
struct CharmInfo
struct TRINITY_DLL_SPEC CharmInfo
{
public:
explicit CharmInfo(Unit* unit);
@@ -657,7 +657,7 @@ struct CharmInfo
void InitPossessCreateSpells();
void InitCharmCreateSpells();
void InitPetActionBar();
void InitEmptyActionBar();
void InitEmptyActionBar(bool withAttack = true);
//return true if successful
bool AddSpellToAB(uint32 oldid, uint32 newid, ActiveStates newstate = ACT_DECIDE);
void ToggleCreatureAutocast(uint32 spellid, bool apply);
@@ -671,6 +671,7 @@ struct CharmInfo
CommandStates m_CommandState;
ReactStates m_reactState;
uint32 m_petnumber;
bool m_barInit;
};
// for clearing special attacks