mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +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()
|
||||
{
|
||||
SetActionBar(ACTION_BAR_INDEX_START, COMMAND_ATTACK, ACT_COMMAND);
|
||||
for (uint32 x = ACTION_BAR_INDEX_START + 1; x < ACTION_BAR_INDEX_END; ++x)
|
||||
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
|
||||
return;
|
||||
|
||||
SetActionBar(ACTION_BAR_INDEX_START, COMMAND_ATTACK, ACT_COMMAND);
|
||||
|
||||
for (uint32 x = 0; x < CREATURE_MAX_SPELLS; ++x)
|
||||
{
|
||||
if (IsPassiveSpell(((Creature*)m_unit)->m_spells[x]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue