Fix NPCBot check

This commit is contained in:
郑佩茹
2023-08-11 17:16:31 -06:00
parent 2b5d6e7a24
commit 9c971f9217

View File

@@ -571,7 +571,7 @@ public:
// NPCBots compatibility
#ifdef _BOT_AI_H
if (healer->ToCreature()->IsNPCBotOrPet())
if (healer->GetTypeId() != TYPEID_PLAYER && healer->ToCreature()->IsNPCBotOrPet())
{
if (healer->getLevel() < 61)
{
@@ -611,7 +611,7 @@ public:
return;
// NPCBots compatibility
#ifdef _BOT_AI_H
if (attacker->ToCreature()->IsNPCBotOrPet())
if (attacker->GetTypeId() != TYPEID_PLAYER && attacker->ToCreature()->IsNPCBotOrPet())
{
if (attacker->getLevel() < 61)
{
@@ -652,7 +652,7 @@ public:
// NPCBots compatibility
#ifdef _BOT_AI_H
if (attacker->ToCreature()->IsNPCBotOrPet())
if (attacker->GetTypeId() != TYPEID_PLAYER && attacker->ToCreature()->IsNPCBotOrPet())
{
if (attacker->getLevel() < 61)
{