mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-10-10 07:06:38 +08:00
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:
co-authored by
sudlud
parent
3f1146ff64
commit
a189dc1360
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user