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

Co-authored-by: sudlud <sudlud@users.noreply.github.com>
This commit is contained in:
Øyvind Bertelsen 2026-08-20 15:35:37 +02:00 committed by GitHub
parent 3f1146ff64
commit a189dc1360
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -10691,7 +10691,8 @@ void Player::SendTaxiNodeStatusMultiple()
DoForAllVisibleWorldObjects([this](WorldObject* worldObject) DoForAllVisibleWorldObjects([this](WorldObject* worldObject)
{ {
Creature* creature = worldObject->ToCreature(); 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; return;
if (!creature->HasNpcFlag(UNIT_NPC_FLAG_FLIGHTMASTER)) if (!creature->HasNpcFlag(UNIT_NPC_FLAG_FLIGHTMASTER))

View file

@ -36,7 +36,8 @@ void WorldSession::SendTaxiStatus(ObjectGuid guid)
{ {
Player* const player = GetPlayer(); Player* const player = GetPlayer();
Creature* unit = ObjectAccessor::GetCreature(*player, guid); 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()); LOG_DEBUG("network", "WorldSession::SendTaxiStatus - Unit ({}) not found.", guid.ToString());
return; return;