241 Commits

Author SHA1 Message Date
Alex King
c7dde7832d
[Commands] Add #setanon Command (#2690)
* [Commands] Add #setanon Command.

# Commands
- Adds `#setanon [Anonymous Flag]`.

# Notes
- Allows operators to turn on/off a player's anonymous flag so they can view their Magelo.

* Update eq_constants.h

* Add character ID support.

* Update setanon.cpp
2023-01-03 12:06:20 -05:00
Alex King
c544221838
[Bug Fix] Fix #zone 0. (#2691)
# Notes
- `#zone 0` was used to send you to safe coordinates, this has been broken for a while now.
2023-01-01 13:55:17 -05:00
Alex King
a6fa6084fa
[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.
2022-12-30 17:30:23 -05:00
Alex King
a590ea1d52
[Feature] Add "Keeps Sold Items" Flag to NPCs (#2671)
# Perl
- Add `$npc->GetKeepsSoldItems()`.
- Add `$npc->SetKeepsSoldItems(keeps_sold_items)`.

# Lua
- Add `npc:GetKeepsSoldItems()`.
- Add `npc:SetKeepsSoldItems(keeps_sold_items)`.

# Notes
- Allows operators to keep specific NPCs from keeping items sold to them.
- Keeps NPCs from being cluttered with stuff like Cloth Caps, Bone Chips, etc.
2022-12-25 16:36:20 -05:00
Aeadoin
5bb27dd4c0
[Commands] Fix Flymode Command Help Prompt (#2669) 2022-12-22 19:37:54 -05:00
Chris Miles
c236c57a2c
[C++20] Enable C++20 + Fixes + FMT 9.1 (#2664)
* [CPP] Enable and build compliance with cpp20

* Windows build fix

* bump fmt version

* Updated fmt to 9.1, updated cmake minimum and verified preprocessor stuff works.

* Missing :

* Fix warning: top-level comma expression in array subscript is deprecated

* Fix warning: top-level comma expression in array subscript is deprecated

Co-authored-by: KimLS <KimLS@peqtgc.com>
2022-12-20 21:52:36 -06:00
Aeadoin
900e1aecf6
[Cleanup] Cleanup magic numbers (#2662)
* [Cleanup] Cleanup magic numbers

* renamed RACE_NODE
2022-12-20 11:31:42 -05:00
Chris Miles
dce5f03e74
[Commands] Nested Command Aliases (#2636) 2022-12-14 22:26:05 -06:00
nytmyr
bc277ac296
[Commands] Add max_hp back to #modifynpcstat command. (#2638)
Restores max_hp back to the #modifynpcstat command to adjust the target's HPs.

Co-authored-by: toxin06 <53322305+toxin06@users.noreply.github.com>
2022-12-13 11:41:10 -05:00
Alex King
8c707f9fe5
[Commands] Add #suspendmulti Command. (#2619)
* [Commands] Add #suspendmulti Command.

# Notes
- Allows operators to suspend multiple people at once in case they have  a player who is boxing and want to suspend them all at once.

* To lower.

* Update command.cpp

* Update suspendmulti.cpp

* Create suspendmulti.cpp
2022-12-10 18:07:33 -06:00
Alex King
b1c4e7c23f
[Commands] Cleanup #rules Command. (#2593)
* [Commands] Cleanup #rules Command.

- Cleanup messages and logic.
- Rewrite all rules logic to use `std::string` and repositories.

* References

* Update rules.cpp

* Strings::Equal and Strings::EqualFold.

* Cleanup.

* Update rulesys.cpp

* Update rulesys.cpp

Co-authored-by: Akkadius <akkadius1@gmail.com>
2022-12-10 18:08:55 -05:00
Alex King
f7fb1c9fe1
[Quest API] Add MaxSkills() to Perl/Lua. (#2621)
* [Quest API] Add MaxSkills() to Perl/Lua.

# Perl
- Add `$client->MaxSkills()`.

# Lua
- Add `client:MaxSkills()`.

# Notes
- Allows operators an easy short hand for maxing a player's skills for their level without needing to do all the looping and stuff on their own.

* Cleanup.

* Only set if it's higher than skill level player has.

* Add constant.
2022-12-06 08:46:21 -05:00
Alex King
0455868f66
[Commands] Cleanup #scale Command. (#2591)
* [Commands] Cleanup #scale Command.

- Cleanup messages and logic.

* One line message.
2022-12-04 23:17:56 -06:00
Alex King
ef42e00df8
[Bug Fix] Fix case-sensitivity in #suspend Command. (#2613)
* [Bug Fix] Fix case-sensitivity in #suspend Command.

# Notes
- This command required you to properly send the name as it appears in the database otherwise it wouldn't kick the player.
- Solution is to `Strings::ToLower` then `Strings::UcFirst`.

* To lower.
2022-12-04 23:17:17 -06:00
Alex King
d6db35b84e
[Commands] Cleanup #gearup Command. (#2589)
# Notes
- Cleanup messages and logic.
- Add support for gearing up target client (with #gm on) and/or target bots.
2022-11-27 18:56:40 -05:00
Alex King
15b2baa663
[Commands] Cleanup #npcedit Command. (#2582)
* [Commands] Cleanup #npcedit Command.

- Make use of repositories and cleanup logic.

* Remove accidental change.
2022-11-27 11:37:22 -05:00
Alex King
253f4c07e0
[Commands] Cleanup #chat Command. (#2581)
- Cleanup messages and logic.
2022-11-26 19:28:28 -05:00
Alex King
b91d879662
[Quest API] Add Instance Methods to Perl/Lua. (#2573)
* [Quest API] Add Instance Methods to Perl/Lua.

# Perl
- Add `quest::GetInstanceIDs(zone_name)`.
- Add `quest::GetInstanceIDsByCharID(zone_name, character_id)`.
- Add `quest::GetInstanceVersionByID(instance_id)`.
- Add `quest::GetInstanceZoneIDByID(instance_id)`.

# Lua
- Add `eq.get_instance_ids(zone_name)`.
- Add `eq.get_instance_ids_by_char_id(zone_name, character_id)`.
- Add `eq.get_instance_version_by_id(instance_id)`.
- Add `eq.get_instance_zone_id_by_id(instance_id)`.

# Notes
- The instance IDs methods return arrays of IDs for looping so you can check on mass the instances a player has for a zone.
- Keeps operators from having to guess which possible versions of a zone a player has an instance for or loop through them all to find out.
- Cleanup `common/database_instances.cpp` to mostly use repositories where possible.

* Update database.h

* Update character_corpses_repository.h
2022-11-26 10:43:29 -05:00
Kinglykrab
52e1bc943a
[Commands] Add #bugs Command. (#2559)
* [Commands] Add #bugs Command.

- Adds a #bugs command for viewing bug reports.
- Remove unused bug related rules in favor of hard-coding the new system.

* Cleanup.

* Typo.

* Push.

* Lower status so it fits with message.
2022-11-22 17:32:26 -05:00
Kinglykrab
8373dd1cb9
[Commands] Cleanup #timers Command. (#2562)
- Cleanup popup window and add a message for if there are no recast timers.
2022-11-22 09:17:09 -05:00
Kinglykrab
9f65159cb2
[Commands] Cleanup #serverinfo Command. (#2568)
- Cleanup messages.
- Use new dialogue window methods.
2022-11-22 09:14:22 -05:00
Kinglykrab
f143d0a75f
[Commands] Cleanup #delacct Command. (#2567)
- Cleanup messages and logic.
- Use repositories.
2022-11-22 09:14:15 -05:00
Kinglykrab
19e7f0a6b1
[Commands] Cleanup #heromodel Command. (#2566)
- Cleanup messages and logic.
2022-11-22 09:14:08 -05:00
Kinglykrab
3c361be739
[Commands] Remove #iteminfo Command. (#2565)
- Command is unused and doesn't have most of the item data anyway, seems like a command for back when items weren't fully working.
2022-11-22 09:13:59 -05:00
Kinglykrab
3424fe78f5
[Commands] Cleanup #suspend Command. (#2564)
- Cleanup messages and logic.
- Use repositories.
2022-11-22 09:13:37 -05:00
Kinglykrab
ce4d96dc91
[Commands] Cleanup #xtargets Command. (#2545)
* [Commands] Cleanup #xtargets Command.

- Cleanup messages and logic.

* Update client.cpp

* Update client.cpp
2022-11-16 19:11:35 -05:00
Kinglykrab
93d8471487
[Commands] Cleanup #opcode Command. (#2547)
* [Commands] Cleanup #opcode Command.

- Cleanup logic.

* Update command.cpp
2022-11-16 08:30:35 -06:00
Kinglykrab
b5035d7e03
[Commands] Remove #profiledump and #profilereset Commands. (#2546)
- These commands don't seem to be used anymore.
2022-11-16 07:15:03 -06:00
Kinglykrab
fd2fc76706
[Commands] Cleanup #depopzone Command. (#2537)
* [Commands] Cleanup #depopzone Command.

- Cleanup messages and logic.
- Add optional `start_spawn_timers` parameter to start spawn timers of NPCs when depopped.

* Update depopzone.cpp
2022-11-14 16:47:20 -05:00
Kinglykrab
36887203d3
[Commands] Cleanup #doanim Command. (#2540)
* [Commands] Cleanup #doanim Command.

- Cleanup messages and logic.
- Allow you to use animation names or IDs, could possibly extend this to quest API in the future.

* Update dialogue_window.h
2022-11-14 16:38:05 -05:00
Kinglykrab
df57138a61
[Commands] Cleanup #devtools Command. (#2538)
* [Commands] Cleanup #devtools Command.

- Cleanup messages and logic.

* Update client.cpp
2022-11-14 14:06:36 -05:00
Kinglykrab
aa506110e1
[Commands] Cleanup #depop Command. (#2536)
* [Commands] Cleanup #depop Command.

- Cleanup messages and logic.
- Add optional `start_spawn_timer` parameter to start spawn timer of NPC when depopped.

* Update command.cpp
2022-11-14 14:05:48 -05:00
Kinglykrab
2c656c4110
[Commands] Cleanup #emote Command. (#2535)
* [Commands] Cleanup #emote Command.

- Cleanup messages and logic.
- Allow `^` separator to send multiple messages by name, world, or zone.

* Update emote.cpp
2022-11-14 14:05:40 -05:00
Kinglykrab
8d184fc6c0
[Commands] Cleanup #scribespell and #scribespells Commands. (#2534)
- Cleanup messages and logic.
2022-11-14 14:05:34 -05:00
Kinglykrab
f6dbdf5db8
[Quest API] Add EVENT_AA_BUY and EVENT_AA_GAIN to Perl/Lua. (#2504)
# Perl
- Add EVENT_AA_BUY to Perl.
  - Exports `$aa_cost`, `$aa_id`, `$aa_previous_id`, and `$aa_next_id`
- Add EVENT_AA_GAIN to Perl.
  - Exports `$aa_gained`
- Add quest::getaaname(aa_id) to Perl.

# Lua
- Add event_aa_buy to Lua.
  - Exports `e.aa_cost`, `e.aa_id`, `e.aa_previous_id`, and `e.aa_next_id`
- Add event_aa_gain to Lua.
  - Exports `e.aa_gained`
- Add eq.get_aa_name(aa_id) to Lua.
2022-11-05 11:09:47 -04:00
Kinglykrab
2218f46b5b
[Commands] Cleanup #dbspawn2 Command. (#2493)
* [Commands] Cleanup #dbspawn2 Command.

Add some descriptive messages so that you get some feedback from the command.

* Update dbspawn2.cpp
2022-10-29 21:22:24 -04:00
Kinglykrab
53dcd14534
[Commands] Cleanup #emotesearch and #emoteview Command. (#2494)
* [Commands] Cleanup #emoteview Command.

Cleanup command messages and logic.

Add constants for Emote Events and Emote Types and replace all the old constants with the new constants.

* Update emoteview.cpp

* Cleanup #emotesearch Command.
2022-10-29 21:22:17 -04:00
Kinglykrab
dcbc9a358f
[Commands] Cleanup #modifynpcstat Command. (#2499)
* [Commands] Cleanup #modifynpcstat Command.

Cleanup messages and logic,

Add map and loop through it to display all stats, can add to this in the future if we add more stuff modifiable by this command.

* Delete settings.json

* Update modifynpcstat.cpp

* Update modifynpcstat.cpp

* Update questmgr.h
2022-10-29 21:22:07 -04:00
Chris Miles
7092183103
[Crash] Stability Fixes (#2489)
* Input sanitation for #zone

* Update zone.cpp

* Update clientlist.cpp

* Test

* Test

* Remove logging, revert /who all code

* Remove log

* Update clientlist.cpp
2022-10-15 15:17:50 -05:00
Kinglykrab
0240a9cc76
[Quest API] Add IsRaining() and IsSnowing() to Perl/Lua. (#2477)
* [Quest API] Add IsRaining() and IsSnowing() to Perl/Lua.

- Add quest::IsRaining() to Perl.
- Add quest::IsSnowing() to Perl.
- Add eq.is_raining() to Lua.
- Add eq.is_snowing() to Lua.

This will allow server operators to tell if a zone is currently raining, snowing, or neither.

* Remove unnecessary quest manager stuff.

* Added constants and cleaned up #weather command

* Revert "Added constants and cleaned up #weather command"

This reverts commit 2ec85304b7407bbd4acfcc0dd7e1e5710f7bce8f.

* Revert "Revert "Added constants and cleaned up #weather command""

This reverts commit 76f4e411b6239aec9e6c8945ede0656e5e2ad9c1.

* Delete settings.json

* Update zone.cpp
2022-10-13 20:59:55 -05:00
Kinglykrab
303b35a755
[Commands] Cleanup #setlanguage Command. (#2464)
* [Commands] Cleanup #setlanguage Command.

Cleanup #setlanguage command and remove unnecessary variables.

* Tabs not spaces.

* newline
2022-10-12 20:13:25 -05:00
Chris Miles
714fb032e9
[Crash] Fix spawn race condition shown by #repop (#2455)
* Troubleshooting

* Debugging

* Debugging

* Debugging

* Debugging

* Remove debug line

* Revert back to GetRawNPCTypeName
2022-09-28 21:03:05 -05:00
Chris Miles
19791195e5
[Logging] Netcode Logging Unify (#2443)
* [Logging] Unify netcode logging

* More tweaks, generator

* Exclude OP_SpecialMesg at callback level

* Consolidate packet loggers

* Log at EQStream level instead of proxy

* Fix C->S

* Server to server logging

* C-S for Loginserver

* Hook UCS for C->S

* Update eqemu_logsys.h

* World C->S logging

* Translate opcodes through patch system for client to server

* Additional logging requests

* Add detailed opcode translation logging

* vStringFormat resiliency

* Translate loginserver C->S

* Simplify out message string (reduce copies) and ignore legacy formats

* Update eqemu_logsys.cpp

* Log file format

* Handle deprecated categories
2022-09-28 03:42:09 -05:00
hg
e883703b2f
[Tasks] Schema simplification (#2449)
* Combine task_activity item and npc fields

This will make tooling easier.

While denormalizing goallists may not be ideal, it decouples tasks from
rewards which share the table and removes a redundant column in favor
of a using the delimited string which better matches live packet data.

* [Tasks] Deprecate goallists table, migrate reward goal lists, simplify logic

* Update 2022_09_25_task_concat_matchlists.sql

* Update 2022_09_25_task_concat_matchlists.sql

* Tweaks

* Fix reward column name in conversion script

* Task reward stacking

* Update task_client_state.cpp

* Implement stack counts

* Fix reward item instance memory leak

* Validate reward item instance

* Fix item reward message

* Fix findtask

Co-authored-by: Akkadius <akkadius1@gmail.com>
2022-09-28 02:31:05 -05:00
Aeadoin
406ea039d7
[Bug Fix] Fix Spellinfo Command to work with SpellIDs above int16 (#2437)
* Fix Spellinfo Command SpellIDs to work above int16

* Updated to use int32_t
2022-09-20 09:06:01 -04:00
hg
78223b7ebf
[Commands] Make #damage require a target (#2426)
Fixes annoying issue where it affected the client if no target
2022-09-05 12:12:46 -05:00
Chris Miles
78d4bd464e
[Zone Points] Fix zone point heading data (#2415)
* [Zone Points] Fix zone point heading data

* Update 2022_09_03_fix_zone_point_heading_data.sql

* Augment #showzonepoints with saylinks

* Add more heading fixes to zone points

* Account for 999 target_heading

* Add zone safe headings
2022-09-05 04:08:34 -05:00
Michael Cook (mackal)
2b4e555eae
[Feature] Faction Association (#2408)
* Add faction logging category

Probably should use this for more things

* Add FactionAssociation struct

This is simply just a struct that contains an array of faction ids and
multiplier. This can hold a maximum of 10 entries (Seru hit is 8, so 2
extra) this can be raised if need be.

* Add database changes and other data point changes

This is all the database changes and loading changes

Included is an optional SQL that will be used as a starting point, there
is likely errors or typos, but we will fix those as they are discovered.

* Add Client::RewardFaction function

This just takes the faction ID and the magnitude of the primary faction
hit and calculates the rest.

The minimum change will be either 1 or -1. We stop processing after we
see an ID of 0 and assume there will be no later entries.

The primary faction ID will always receive a hit even if there is no
faction association entries

* Add users of RewardFaction to NPC death, tasks, and QuestRewards

This will only use the new system if the magnitude is set, otherwise we
will just use the old system still

* Add quest system calls and lua QuestReward support

* Add #factionassociation command

This just calls RewardFaction, mostly useful for debugging
2022-09-03 10:57:55 -04:00
hg
efe1879115
[Tasks] Change zone task data container (#2410)
This allows removal of the task id limit (MAXTASKS)

There's some suspect places task data isn't verified but left unchanged

If memory use becomes too high once more live data is added tasks can be
stored in shared memory instead
2022-09-03 03:33:49 -05:00
hg
7482cfc066
[Tasks] Replace task goals with explicit fields (#2402)
The task goal system made implementing tasks a little confusing since
the goal could be ambiguous depending on type. This also didn't support
filtering on multiple goals (e.g. looting items from matching npc names
inside an area). Deliver types could specify an npc id in `delivertonpc`
but the database may have multiple npcs with the same name or a task
might want to match partial npc names.

This replaces goalids with explicit fields for npcs, items, proximity
areas, and touch switch ids. These changes make managing task data
easier without needing to update multiple tables and allows filtering
task updates by multiple criteria. To mitigate any performance impact
from merging task proximities, only clients with explore tasks in the
current zone are checked during client movement updates.

Items and npcs still support goallists but it would be possible to
denormalize entries into delimited strings to combine with the match
lists. This would also decouple task goals from reward lists.

The client task update functions were refactored to run through a single
filtering function which significantly reduces duplicated code from the
legacy task system. This will also make it easier to later implement
any unhandled types.

Since the new fields will handle filtering single entries and lists
based on having values set, `goalmethod` now only distinguishes quest
controlled from source controlled.

This is a breaking api change, `taskexploredarea` has been removed
since explore ids no longer exist.
2022-09-01 19:18:21 -05:00