Permission check and readability improvements (#997)

* AiFactory check by spell instead of level

* Ignore group security for guild invitation
This commit is contained in:
Yunfan Li
2025-02-24 03:09:59 +08:00
committed by GitHub
parent 114eeb3b37
commit 95c2ba9105
5 changed files with 9 additions and 13 deletions

View File

@@ -322,7 +322,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
case CLASS_WARRIOR:
if (tab == 2)
engine->addStrategiesNoInit("tank", "tank assist", "aoe", nullptr);
else if (player->GetLevel() < 36 || tab == 0)
else if (tab == 0 || !player->HasSpell(1680)) // Whirlwind
engine->addStrategiesNoInit("arms", "aoe", "dps assist", /*"behind",*/ nullptr);
else
engine->addStrategiesNoInit("fury", "aoe", "dps assist", /*"behind",*/ nullptr);
@@ -356,7 +356,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
engine->addStrategiesNoInit("heal", "cure", "dps assist", nullptr);
else
{
if (player->GetLevel() >= 20 && !player->HasAura(16931) /*thick hide*/)
if (player->HasSpell(768) /*cat form*/&& !player->HasAura(16931) /*thick hide*/)
{
engine->addStrategiesNoInit("cat", "dps assist", nullptr);
}