mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Add expedition event loot api
Add SetLootEventByNPCTypeID and SetLootEventBySpawnID quest apis These associate events with npcs or entities inside the dz to prevent them from being looted by characters that didn't receive the event lockout from the current expedition. This fixes an exploit that allowed a player that already had a lockout from another expedition being added to loot after the event is complete
This commit is contained in:
@@ -429,24 +429,6 @@ uint32_t ExpeditionDatabase::GetExpeditionIDFromCharacterID(uint32_t character_i
|
||||
return expedition_id;
|
||||
}
|
||||
|
||||
uint32_t ExpeditionDatabase::GetExpeditionIDFromInstanceID(uint32_t instance_id)
|
||||
{
|
||||
LogExpeditionsDetail("Getting expedition id for instance [{}]", instance_id);
|
||||
|
||||
uint32_t expedition_id = 0;
|
||||
auto query = fmt::format(
|
||||
"SELECT id FROM expedition_details WHERE instance_id = {};", instance_id
|
||||
);
|
||||
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (results.Success() && results.RowCount() > 0)
|
||||
{
|
||||
auto row = results.begin();
|
||||
expedition_id = std::strtoul(row[0], nullptr, 10);
|
||||
}
|
||||
return expedition_id;
|
||||
}
|
||||
|
||||
ExpeditionMember ExpeditionDatabase::GetExpeditionLeader(uint32_t expedition_id)
|
||||
{
|
||||
LogExpeditionsDetail("Getting expedition leader for expedition [{}]", expedition_id);
|
||||
|
||||
Reference in New Issue
Block a user