mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 17:38:26 +00:00
[Feature] Add Experience Gain Toggle. (#2676)
* [Feature] Add Experience Gain Toggle. # Perl - Add `$client->IsEXPEnabled()`. - Add `$client->SetEXPEnabled(is_exp_enabled)`. # Lua - Add `client:IsEXPEnabled()`. - Add `client:SetEXPEnabled(is_exp_enabled)`. # Commands - Add `#exptoggle [Toggle] - Toggle your or your target's experience gain.`. # Notes - Allows operators to turn on/off a player's experience gain individually without changing their rule values. - The command allows operators to give players access to the command to disable their own experience gain.
This commit is contained in:
@@ -1217,15 +1217,19 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
/* Load Character Data */
|
||||
query = StringFormat("SELECT `lfp`, `lfg`, `xtargets`, `firstlogon`, `guild_id`, `rank` FROM `character_data` LEFT JOIN `guild_members` ON `id` = `char_id` WHERE `id` = %i", cid);
|
||||
query = fmt::format(
|
||||
"SELECT `lfp`, `lfg`, `xtargets`, `firstlogon`, `guild_id`, `rank`, `exp_enabled` FROM `character_data` LEFT JOIN `guild_members` ON `id` = `char_id` WHERE `id` = {}",
|
||||
cid
|
||||
);
|
||||
auto results = database.QueryDatabase(query);
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
for (auto row : results) {
|
||||
if (row[4] && atoi(row[4]) > 0) {
|
||||
guild_id = atoi(row[4]);
|
||||
if (row[5] != nullptr) { guildrank = atoi(row[5]); }
|
||||
else { guildrank = GUILD_RANK_NONE; }
|
||||
guildrank = row[5] ? atoi(row[5]) : GUILD_RANK_NONE;
|
||||
}
|
||||
|
||||
SetEXPEnabled(atobool(row[6]));
|
||||
|
||||
if (LFP) { LFP = atoi(row[0]); }
|
||||
if (LFG) { LFG = atoi(row[1]); }
|
||||
if (row[3])
|
||||
|
||||
Reference in New Issue
Block a user