fix(Core/Taxi): don't advertise flight paths on opposite-faction flight masters (#26737)

Co-authored-by: sudlud <[email protected]>
This commit is contained in:
Øyvind Bertelsen
2026-08-20 15:35:37 +02:00
committed by GitHub
co-authored by sudlud
parent 3f1146ff64
commit a189dc1360
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -10691,7 +10691,8 @@ void Player::SendTaxiNodeStatusMultiple()
DoForAllVisibleWorldObjects([this](WorldObject* worldObject)
{
Creature* creature = worldObject->ToCreature();
if (!creature || creature->IsHostileTo(this))
// reaction must be checked both ways: the Dark Portal flight masters are neutral toward opposite-faction players, while players are hostile toward them
if (!creature || creature->GetReactionTo(this) <= REP_UNFRIENDLY || IsHostileTo(creature))
return;
if (!creature->HasNpcFlag(UNIT_NPC_FLAG_FLIGHTMASTER))
+2 -1
View File
@@ -36,7 +36,8 @@ void WorldSession::SendTaxiStatus(ObjectGuid guid)
{
Player* const player = GetPlayer();
Creature* unit = ObjectAccessor::GetCreature(*player, guid);
if (!unit || unit->IsHostileTo(player) || !unit->HasNpcFlag(UNIT_NPC_FLAG_FLIGHTMASTER))
// reaction must be checked both ways: the Dark Portal flight masters are neutral toward opposite-faction players, while players are hostile toward them
if (!unit || unit->GetReactionTo(player) <= REP_UNFRIENDLY || player->IsHostileTo(unit) || !unit->HasNpcFlag(UNIT_NPC_FLAG_FLIGHTMASTER))
{
LOG_DEBUG("network", "WorldSession::SendTaxiStatus - Unit ({}) not found.", guid.ToString());
return;