mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-05 13:32:26 +00:00
Add rule to always notify new expedition leader
On live, new expedition leaders are only notified if made leader from the /dzmakeleader command (or from ui). This rule makes it so the new leader is always messaged on a leader change for cases where previous leader goes offline or quits
This commit is contained in:
parent
1f3c5af996
commit
ce19deb5d1
@ -792,6 +792,7 @@ RULE_BOOL(Expedition, EmptyDzShutdownEnabled, true, "Enable early instance shutd
|
|||||||
RULE_INT(Expedition, EmptyDzShutdownDelaySeconds, 900, "Seconds to set dynamic zone instance expiration if early shutdown enabled")
|
RULE_INT(Expedition, EmptyDzShutdownDelaySeconds, 900, "Seconds to set dynamic zone instance expiration if early shutdown enabled")
|
||||||
RULE_INT(Expedition, RequestExpiredLockoutLeewaySeconds, 60, "Seconds remaining on lockout to count as expired for creation requests (client hides timers under 60s remaining)")
|
RULE_INT(Expedition, RequestExpiredLockoutLeewaySeconds, 60, "Seconds remaining on lockout to count as expired for creation requests (client hides timers under 60s remaining)")
|
||||||
RULE_INT(Expedition, WorldExpeditionProcessRateMS, 6000, "Timer interval (ms) that world checks expedition states")
|
RULE_INT(Expedition, WorldExpeditionProcessRateMS, 6000, "Timer interval (ms) that world checks expedition states")
|
||||||
|
RULE_BOOL(Expedition, AlwaysNotifyNewLeaderOnChange, false, "Always notify clients when made expedition leader. If false (live-like) new leaders are only notified when made leader via /dzmakeleader")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(DynamicZone)
|
RULE_CATEGORY(DynamicZone)
|
||||||
|
|||||||
@ -1133,6 +1133,11 @@ void Expedition::ProcessLeaderChanged(uint32_t new_leader_id, const std::string&
|
|||||||
if (member_client)
|
if (member_client)
|
||||||
{
|
{
|
||||||
member_client->QueuePacket(outapp_leader.get());
|
member_client->QueuePacket(outapp_leader.get());
|
||||||
|
|
||||||
|
if (member.char_id == new_leader_id && RuleB(Expedition, AlwaysNotifyNewLeaderOnChange))
|
||||||
|
{
|
||||||
|
member_client->MessageString(Chat::Yellow, DZMAKELEADER_YOU);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1160,7 +1165,10 @@ void Expedition::ProcessMakeLeader(
|
|||||||
|
|
||||||
if (new_leader_client)
|
if (new_leader_client)
|
||||||
{
|
{
|
||||||
new_leader_client->MessageString(Chat::Yellow, DZMAKELEADER_YOU);
|
if (!RuleB(Expedition, AlwaysNotifyNewLeaderOnChange))
|
||||||
|
{
|
||||||
|
new_leader_client->MessageString(Chat::Yellow, DZMAKELEADER_YOU);
|
||||||
|
}
|
||||||
SetNewLeader(new_leader_client->CharacterID(), new_leader_client->GetName());
|
SetNewLeader(new_leader_client->CharacterID(), new_leader_client->GetName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user