Skip to content

Commit

Permalink
Show quest greeting only if player has more than one menu option avai…
Browse files Browse the repository at this point in the history
…lable, and add config value to keep previous behavior if so inclined.
  • Loading branch information
Nytanath authored and killerwife committed Aug 16, 2024
1 parent dd034ee commit 5964022
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game/Entities/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12031,7 +12031,8 @@ void Player::SendPreparedQuest(ObjectGuid guid) const
else
type = QUESTGIVER_GAMEOBJECT;

if (QuestgiverGreeting const* data = sObjectMgr.GetQuestgiverGreetingData(guid.GetEntry(), type))
QuestgiverGreeting const* data = sObjectMgr.GetQuestgiverGreetingData(guid.GetEntry(), type);
if (data && (questMenu.MenuItemCount() > 1 || sWorld.getConfig(CONFIG_BOOL_ALWAYS_SHOW_QUEST_GREETING)))
{
QEmote qe;
qe._Delay = data->emoteDelay;
Expand Down
2 changes: 2 additions & 0 deletions src/game/World/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@ void World::LoadConfigSettings(bool reload)

setConfigMinMax(CONFIG_UINT32_MAINTENANCE_DAY, "MaintenanceDay", 4, 0, 6);

setConfig(CONFIG_BOOL_ALWAYS_SHOW_QUEST_GREETING, "AlwaysShowQuestGreeting", false);

setConfig(CONFIG_BOOL_TAXI_FLIGHT_CHAT_FIX, "TaxiFlightChatFix", false);
setConfig(CONFIG_BOOL_LONG_TAXI_PATHS_PERSISTENCE, "LongFlightPathsPersistence", false);
setConfig(CONFIG_BOOL_ALL_TAXI_PATHS, "AllFlightPaths", false);
Expand Down
1 change: 1 addition & 0 deletions src/game/World/World.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ enum eConfigBoolValues
CONFIG_BOOL_PATH_FIND_OPTIMIZE,
CONFIG_BOOL_PATH_FIND_NORMALIZE_Z,
CONFIG_BOOL_LFG_MATCHMAKING,
CONFIG_BOOL_ALWAYS_SHOW_QUEST_GREETING,
CONFIG_BOOL_DISABLE_INSTANCE_RELOCATE,
CONFIG_BOOL_VALUE_COUNT
};
Expand Down
8 changes: 8 additions & 0 deletions src/mangosd/mangosd.conf.dist.in
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,12 @@ LogColors = ""
# Enable or disable Waterbreathing
# Default: 4 (Console as noneone)
#
# AlwaysShowQuestGreeting
# Controls whether quest greetings (used when NPC is a quest giver but does not have UNIT_NPC_FLAG_GOSSIP) is always
# shown, or is shown only if there are more than one menu items available to the player.
# Default: 0 (disabled, original behavior)
# 1 (enabled)
#
# TaxiFlightChatFix
# Workaround for client bug: resuming taxi flight on login causes missing chat channels until the flight ends.
# When enabled allows clients to join local channels of the zone they are flying over on login and all custom channels.
Expand Down Expand Up @@ -814,6 +820,8 @@ StartHonorPoints = 0
MinHonorKills = 15
MaintenanceDay = 3
InstantLogout = 1
DisableWaterBreath = 4
AlwaysShowQuestGreeting = 0
TaxiFlightChatFix = 0
LongFlightPathsPersistence = 0
AllFlightPaths = 0
Expand Down

0 comments on commit 5964022

Please sign in to comment.