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:
parent
3f1146ff64
commit
a189dc1360
2 changed files with 4 additions and 2 deletions
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue