feat(Core/Player): Additional option for worldserver config parameter "InstantFlightPaths" (#2246)

This commit is contained in:
Stoabrogga
2019-09-04 01:19:57 +02:00
committed by GitHub
parent 22b360ee0d
commit e314a0c716
8 changed files with 58 additions and 4 deletions

View File

@@ -19310,8 +19310,13 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
uint32 appendValue = m_uint32Values[UNIT_NPC_FLAGS];
if (creature)
{
if (sWorld->getIntConfig(CONFIG_INSTANT_TAXI) == 2 && appendValue & UNIT_NPC_FLAG_FLIGHTMASTER)
appendValue |= UNIT_NPC_FLAG_GOSSIP; // flight masters need NPC gossip flag to show instant flight toggle option
if (!target->CanSeeSpellClickOn(creature))
appendValue &= ~UNIT_NPC_FLAG_SPELLCLICK;
}
fieldBuffer << uint32(appendValue);
}