eqemu-server/world/world_server_cli.cpp
Mitch Freeman 8f4f8368df
[Player Event Logs] Migrate and Deprecate QS Legacy Logging (#4542)
* First pass of player_event_loot_items

* Second pass of player_event_loot_items

* Third pass of player_event_loot_items

* Example without RecordDetailEvent template

* Cleanup the removal of the template

* Fourth Pass

Add retention for etl tables
Rename tables/fields to etl nomenclature
Combine database work to one atomic load

* Reposition to reduce db tasks

* Refactor etl processing for easier additions

* Add merchant purchase event
testing passed though appears that the event itself has a few bugs.  Will fix them in another commit

* Fix PlayerEventMerchantPurchase in client_packet.cpp

* WIP - Handin

* Handin Event added

* Cleanup

* All a rentention period of 0 days which deletes all current records.

* Updates

Cleanup and refactor a few items.

* Cleanup and Formatting

Cleanup and Formatting

* Add etl for
Playerevent::Trade
PlayerEvent::Speech (new event to mirror functionality of qs_speech

* Add etl for
Playerevent::KilledNPC, KilledNamedNPC and KilledRaidNPC

* Add etl for Playerevent::AA_purchase

Add etl for Playerevent::AA_purchase

* Cleanup before PR

* Review comment updates.

* Add world cli etl:settings to output a json on all player event details.

* Add reserve for all etl_queues
Correct a failed test case for improper next id for etl tables when table is first created.

* Potential solution for a dedicated database connection for player events.

* Simple thread for player_events.  Likely there is a better way to do this.

* Add zone to qs communications for recordplayerevents

First pass of enabling zone to qs direct transport to allow for PlayerEvents to bypass world.

* Cleanup a linux compile issue

* Add augments to LOOT ITEM and DESTROY ITEM

* Add augments to ITEMCREATION, FORAGESUCCESS, FISHSUCCESS, DESTROYITEM, LOOTITEM, DROPPEDITEM, TRADERPURCHASE, TRADERSELL, GUILDTRIBUTEDONATE and cleaned up the naming convention of augments

* Formatting fixes

* Swap out GetNextTableId

* Statically load counter

* Add counter.clear() since the counter is static

* Upload optional QS conversion scripts

* Remove all qs_tables and code referencing them

* Update database.cpp

* Simplify ProcessBatchQueue

* Simplify PorcessBatchQueue

* Simplify event truncation

* Build event truncation to bulk query by retention groups

* Post rebase

* Update player_events.h

* Fix build

* Update npc.cpp

* First pass of direct zone to qs sending for player events

* Remove keepalive logic

* Fix event ordering

* Cleanup

* Update player_event_logs.cpp

* Wipe event data after ETL processed

* Split up database connections, hot reload logs for QS

* Load rules from database vs qs_database

* Update player_event_logs.cpp

* Hot toggle queryserv connect

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2025-02-05 02:02:16 -06:00

61 lines
2.6 KiB
C++

#include "world_server_cli.h"
/**
* @param argc
* @param argv
*/
void WorldserverCLI::CommandHandler(int argc, char **argv)
{
if (argc == 1) { return; }
argh::parser cmd;
cmd.parse(argc, argv, argh::parser::PREFER_PARAM_FOR_UNREG_OPTION);
EQEmuCommand::DisplayDebug(cmd);
// Declare command mapping
auto function_map = EQEmuCommand::function_map;
// Register commands
function_map["bots:enable"] = &WorldserverCLI::BotsEnable;
function_map["bots:disable"] = &WorldserverCLI::BotsDisable;
function_map["mercs:enable"] = &WorldserverCLI::MercsEnable;
function_map["mercs:disable"] = &WorldserverCLI::MercsDisable;
function_map["world:version"] = &WorldserverCLI::Version;
function_map["character:copy-character"] = &WorldserverCLI::CopyCharacter;
function_map["database:version"] = &WorldserverCLI::DatabaseVersion;
function_map["database:set-account-status"] = &WorldserverCLI::DatabaseSetAccountStatus;
function_map["database:schema"] = &WorldserverCLI::DatabaseGetSchema;
function_map["database:dump"] = &WorldserverCLI::DatabaseDump;
function_map["database:updates"] = &WorldserverCLI::DatabaseUpdates;
function_map["test:test"] = &WorldserverCLI::TestCommand;
function_map["test:colors"] = &WorldserverCLI::TestColors;
function_map["test:expansion"] = &WorldserverCLI::ExpansionTestCommand;
function_map["test:repository"] = &WorldserverCLI::TestRepository;
function_map["test:repository2"] = &WorldserverCLI::TestRepository2;
function_map["test:db-concurrency"] = &WorldserverCLI::TestDatabaseConcurrency;
function_map["test:string-benchmark"] = &WorldserverCLI::TestStringBenchmarkCommand;
function_map["etl:settings"] = &WorldserverCLI::EtlGetSettings;
EQEmuCommand::HandleMenu(function_map, cmd, argc, argv);
}
#include "cli/database_concurrency.cpp"
#include "cli/bots_enable.cpp"
#include "cli/bots_disable.cpp"
#include "cli/mercs_enable.cpp"
#include "cli/mercs_disable.cpp"
#include "cli/copy_character.cpp"
#include "cli/database_updates.cpp"
#include "cli/database_dump.cpp"
#include "cli/database_get_schema.cpp"
#include "cli/database_set_account_status.cpp"
#include "cli/database_version.cpp"
#include "cli/test.cpp"
#include "cli/test_colors.cpp"
#include "cli/test_expansion.cpp"
#include "cli/test_repository.cpp"
#include "cli/test_repository_2.cpp"
#include "cli/test_string_benchmark.cpp"
#include "cli/version.cpp"
#include "cli/etl_get_settings.cpp"