mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-10 22:42:25 +00:00
Remove rule to verify expedition leader with db
This is a holdover from earlier system design and shouldn't be necessary
This commit is contained in:
parent
a3a6e55d22
commit
c26c6af356
@ -787,7 +787,6 @@ RULE_CATEGORY_END()
|
|||||||
|
|
||||||
RULE_CATEGORY(Expedition)
|
RULE_CATEGORY(Expedition)
|
||||||
RULE_INT(Expedition, MinStatusToBypassPlayerCountRequirements, 80, "Minimum GM status to bypass minimum player requirements for Expedition creation")
|
RULE_INT(Expedition, MinStatusToBypassPlayerCountRequirements, 80, "Minimum GM status to bypass minimum player requirements for Expedition creation")
|
||||||
RULE_BOOL(Expedition, UseDatabaseToVerifyLeaderCommands, false, "Use database instead of zone cache to verify Expedition leader for commands")
|
|
||||||
RULE_BOOL(Expedition, EmptyDzShutdownEnabled, true, "Enable early instance shutdown after last member of expedition removed")
|
RULE_BOOL(Expedition, EmptyDzShutdownEnabled, true, "Enable early instance shutdown after last member of expedition removed")
|
||||||
RULE_INT(Expedition, EmptyDzShutdownDelaySeconds, 1500, "Seconds to set dynamic zone instance expiration if early shutdown enabled")
|
RULE_INT(Expedition, EmptyDzShutdownDelaySeconds, 1500, "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)")
|
||||||
|
|||||||
@ -908,25 +908,15 @@ bool Expedition::ConfirmLeaderCommand(Client* requester)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpeditionMember leader;
|
if (m_leader.char_id == 0)
|
||||||
if (RuleB(Expedition, UseDatabaseToVerifyLeaderCommands))
|
|
||||||
{
|
|
||||||
leader = ExpeditionDatabase::GetExpeditionLeader(m_id);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
leader = m_leader;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (leader.char_id == 0)
|
|
||||||
{
|
{
|
||||||
requester->MessageString(Chat::Red, UNABLE_RETRIEVE_LEADER); // unconfirmed message
|
requester->MessageString(Chat::Red, UNABLE_RETRIEVE_LEADER); // unconfirmed message
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (leader.char_id != requester->CharacterID())
|
if (m_leader.char_id != requester->CharacterID())
|
||||||
{
|
{
|
||||||
requester->MessageString(Chat::System, EXPEDITION_NOT_LEADER, leader.name.c_str());
|
requester->MessageString(Chat::System, EXPEDITION_NOT_LEADER, m_leader.name.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -430,28 +430,6 @@ uint32_t ExpeditionDatabase::GetExpeditionIDFromCharacterID(uint32_t character_i
|
|||||||
return expedition_id;
|
return expedition_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpeditionMember ExpeditionDatabase::GetExpeditionLeader(uint32_t expedition_id)
|
|
||||||
{
|
|
||||||
LogExpeditionsDetail("Getting expedition leader for expedition [{}]", expedition_id);
|
|
||||||
|
|
||||||
auto query = fmt::format(SQL(
|
|
||||||
SELECT expedition_details.leader_id, character_data.name
|
|
||||||
FROM expedition_details
|
|
||||||
INNER JOIN character_data ON expedition_details.leader_id = character_data.id
|
|
||||||
WHERE expedition_id = {}
|
|
||||||
), expedition_id);
|
|
||||||
|
|
||||||
ExpeditionMember leader;
|
|
||||||
auto results = database.QueryDatabase(query);
|
|
||||||
if (results.Success() && results.RowCount() > 0)
|
|
||||||
{
|
|
||||||
auto row = results.begin();
|
|
||||||
leader.char_id = strtoul(row[0], nullptr, 10);
|
|
||||||
leader.name = row[1];
|
|
||||||
}
|
|
||||||
return leader;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ExpeditionDatabase::InsertCharacterLockouts(
|
void ExpeditionDatabase::InsertCharacterLockouts(
|
||||||
uint32_t character_id, const std::vector<ExpeditionLockoutTimer>& lockouts,
|
uint32_t character_id, const std::vector<ExpeditionLockoutTimer>& lockouts,
|
||||||
bool replace_timer, bool is_pending)
|
bool replace_timer, bool is_pending)
|
||||||
|
|||||||
@ -60,7 +60,6 @@ namespace ExpeditionDatabase
|
|||||||
void DeletePendingLockouts(uint32_t character_id);
|
void DeletePendingLockouts(uint32_t character_id);
|
||||||
void DeleteAllMembersPendingLockouts(const std::vector<ExpeditionMember>& members);
|
void DeleteAllMembersPendingLockouts(const std::vector<ExpeditionMember>& members);
|
||||||
uint32_t GetExpeditionIDFromCharacterID(uint32_t character_id);
|
uint32_t GetExpeditionIDFromCharacterID(uint32_t character_id);
|
||||||
ExpeditionMember GetExpeditionLeader(uint32_t expedition_id);
|
|
||||||
std::pair<std::vector<ExpeditionLockoutTimer>, std::vector<uint32_t>> GetMembersLockout(
|
std::pair<std::vector<ExpeditionLockoutTimer>, std::vector<uint32_t>> GetMembersLockout(
|
||||||
const std::vector<ExpeditionMember>& members, const std::string& expedition_name,
|
const std::vector<ExpeditionMember>& members, const std::string& expedition_name,
|
||||||
const std::string& event_name);
|
const std::string& event_name);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user