Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-08-26 22:29:54 +08:00
358 changed files with 1165 additions and 1381 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ bool ThreatCalcHelper::isValidProcess(Unit* hatedUnit, Unit* hatingUnit, SpellIn
return false;
// not to GM
if (hatedUnit->GetTypeId() == TYPEID_PLAYER && hatedUnit->ToPlayer()->IsGameMaster())
if (hatedUnit->IsPlayer() && hatedUnit->ToPlayer()->IsGameMaster())
return false;
// not to dead and not for dead
@@ -498,7 +498,7 @@ void ThreatMgr::_addThreat(Unit* victim, float threat)
HostileReference* hostileRef = new HostileReference(victim, this, 0);
iThreatContainer.addReference(hostileRef);
hostileRef->AddThreat(threat); // now we add the real threat
if (victim->GetTypeId() == TYPEID_PLAYER && victim->ToPlayer()->IsGameMaster())
if (victim->IsPlayer() && victim->ToPlayer()->IsGameMaster())
hostileRef->setOnlineOfflineState(false); // GM is always offline
}
}