Core/Unit: Add switch to prevent COMMAND_ATTACK being added to action bar for supplied creature entries.

This commit is contained in:
Malcrom committed 2013-12-08 11:55:28 -03:30
1 parent 98d2dbbd3f
commit 5c15e88da9
1 file changed
+13 -1
+13 -1
View File
@@ -13607,9 +13607,19 @@ void CharmInfo::InitEmptyActionBar(bool withAttack)
void CharmInfo::InitPossessCreateSpells()
{
InitEmptyActionBar();
if (_unit->GetTypeId() == TYPEID_UNIT)
{
// Adding switch until better way is found. Malcrom
// Adding entrys to this switch will prevent COMMAND_ATTACK being added to pet bar.
switch (_unit->GetEntry())
{
case 23575: // Mindless Abomination
break;
default:
InitEmptyActionBar();
break;
}
for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
uint32 spellId = _unit->ToCreature()->m_spells[i];
@@ -13623,6 +13633,8 @@ void CharmInfo::InitPossessCreateSpells()
}
}
}
else
InitEmptyActionBar();
}
void CharmInfo::InitCharmCreateSpells()