mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[12220] Improve Initialisation of COMMAND_ATTACK field
This moves the set command of COMMAND_ATTACK out of CharmInfo::InitPetAction bar, so that this function can be used more genericly for other purposes Signed-off-by: Schmoozerd <cmangos>
This commit is contained in:
parent
e635569d08
commit
164c2e137b
2 changed files with 3 additions and 2 deletions
|
|
@ -10075,7 +10075,6 @@ void CharmInfo::InitPetActionBar()
|
||||||
|
|
||||||
void CharmInfo::InitEmptyActionBar()
|
void CharmInfo::InitEmptyActionBar()
|
||||||
{
|
{
|
||||||
SetActionBar(ACTION_BAR_INDEX_START, COMMAND_ATTACK, ACT_COMMAND);
|
|
||||||
for (uint32 x = ACTION_BAR_INDEX_START + 1; x < ACTION_BAR_INDEX_END; ++x)
|
for (uint32 x = ACTION_BAR_INDEX_START + 1; x < ACTION_BAR_INDEX_END; ++x)
|
||||||
SetActionBar(x, 0, ACT_PASSIVE);
|
SetActionBar(x, 0, ACT_PASSIVE);
|
||||||
}
|
}
|
||||||
|
|
@ -10087,6 +10086,8 @@ void CharmInfo::InitPossessCreateSpells()
|
||||||
if (m_unit->GetTypeId() == TYPEID_PLAYER) // possessed players don't have spells, keep the action bar empty
|
if (m_unit->GetTypeId() == TYPEID_PLAYER) // possessed players don't have spells, keep the action bar empty
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
SetActionBar(ACTION_BAR_INDEX_START, COMMAND_ATTACK, ACT_COMMAND);
|
||||||
|
|
||||||
for (uint32 x = 0; x < CREATURE_MAX_SPELLS; ++x)
|
for (uint32 x = 0; x < CREATURE_MAX_SPELLS; ++x)
|
||||||
{
|
{
|
||||||
if (IsPassiveSpell(((Creature*)m_unit)->m_spells[x]))
|
if (IsPassiveSpell(((Creature*)m_unit)->m_spells[x]))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "12219"
|
#define REVISION_NR "12220"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue