10155 Commits

Author SHA1 Message Date
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
Chris Miles
db12c069ef
[Luabind] Silence deprecation warning (#2657)
* [Luabind] Silence deprecation warning

* [libuv] Bump to v1.44.2 from v1.26.0

* Revert "[libuv] Bump to v1.44.2 from v1.26.0"

This reverts commit c794735d169aa4c8fa920a06113158d072e3a0fc.

* Update libuv
2022-12-20 13:13:04 -06:00
Chris Miles
4ea38bf896
[libuv] Bump to v1.44.2 from v1.26.0 (#2658) 2022-12-20 13:12:55 -06:00
Chris Miles
0d1fa9e96e
[Repositories] Add Cereal support to repository generator (#2660)
* [Repositories] Add Cereal support to repository generator

* Update base_repository.template
2022-12-20 13:12:44 -06:00
Chris Miles
51c62d3b3e
[Cereal] Bump to v1.3.2 from v1.2.2 (#2654) 2022-12-20 13:12:35 -06:00
Aeadoin
900e1aecf6
[Cleanup] Cleanup magic numbers (#2662)
* [Cleanup] Cleanup magic numbers

* renamed RACE_NODE
2022-12-20 11:31:42 -05:00
Aeadoin
ed6194ad19
[Aggro] Cleanup Mob::CombatRange (#2652)
* [Aggro] Cleanup Mob::CombatRange

* Change to Race_ constants
2022-12-19 21:08:50 -06:00
Michael
e6f58382de
[Rule] Add ManaOnDeath and EndurOnDeath (#2661)
* [Rule] Add ManaOnDeath and EndurOnDeath
This rule allows death to fully fill Mana or Endurance.

* Updates rules to live-like

* Adjust rule names to be more descriptive of their intent, remove else cases

Co-authored-by: Akkadius <akkadius1@gmail.com>
2022-12-19 21:04:03 -06:00
Aeadoin
083d44d4fe
[Bug Fix] Resolve Warning due to Virtual Mob Method GetInv() (#2650) 2022-12-19 16:51:05 -05:00
Aeadoin
f12090d109
[Bots] Cleanup various Bot Spell Focus methods (#2649)
* [Bots] Cleanup GetFocusEffect & GetActSpellDamage

* Remove unused CalcBotFocusEffect

* Cleanup unneeded derived class methods

* compile error
2022-12-16 17:21:37 -05:00
Paul Coene
f188c1394a
Add ground spawns to discovered items feature. (#2648)
* Add ground spawns to discovered items feature.

* Add {}
2022-12-16 16:11:58 -05:00
Chris Miles
d9e5056657
[Repositories] Migrate LoadPerlEventExportSettings to use repositories (#2637)
* [Repositories] Migrate LoadPerlEventExportSettings to use repositories

* Update quest_parser_collection.cpp
2022-12-14 22:26:14 -06:00
Chris Miles
dce5f03e74
[Commands] Nested Command Aliases (#2636) 2022-12-14 22:26:05 -06:00
Chris Miles
6ddd5db480
[Quests] Improve Quest Error Handling - Add back in process based syntax validation (#2646) 2022-12-14 23:20:00 -05:00
nytmyr
1338d21823
[Bug Fix] Fix trading with bots when in an illusion. (#2645)
Trade check was not checking GetBaseRace and would fail if the bot's illusion couldn't equip the item.

Co-authored-by: toxin06 <53322305+toxin06@users.noreply.github.com>
2022-12-14 21:32:34 -05:00
Aeadoin
0fd4d82553
[Bots] Resolve incorrect values on Bot Creation (#2644) 2022-12-14 18:03:56 -05:00
Alex King
bca04b969f
[Bug Fix] Remove Unnecessary Attack Log (#2643)
# Notes
- This log fires every time for no reason.
2022-12-14 17:31:28 -05:00
Alex King
89ba1270d9
[Bug Fix] Remove unnecessary log messages. (#2642) 2022-12-14 17:31:21 -05:00
Alex King
337dc54eb9
[Bug Fix] Allow High Level Spells to be Unmemorized. (#2641)
* [Bug Fix] Allow High Level Spells to be Unmemorized.

# Notes
- If you deleveled below a spell's level, you couldn't unmemorize it, this fixes that.

* Update client_process.cpp
2022-12-14 17:18:51 -05: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
nytmyr
7189bab848
[Bots] Fix Gender not saving as GetBaseGender on BotSave (#2639)
Bots were not saving their Base Gender when saving. This could result in bots with illusions saving as gender 2 and becoming a male human model upon illusion fade.

Co-authored-by: toxin06 <53322305+toxin06@users.noreply.github.com>
2022-12-13 11:40:59 -05:00
Chris Miles
c3cb0b8cdf
[Quests] Improve Quest Error Handling (#2635)
* Improve Quest Error handling

* Update embperl.cpp

* Bench test (temp)

* Swap log category for benchmark

* Swap external process invocation for native Perl eval throw
2022-12-12 19:21:33 -06:00
Aeadoin
ae4908b40c
[Bots] Add Quest API Methods (#2631)
* [Bots] Add Quest API Methods

* Cleanup unneeded methods.
2022-12-12 17:25:36 -06:00
Aeadoin
13a3afbfac
[Bots] Add Event_Trade Support for ^inventorygive Command (#2628) 2022-12-11 16:25:47 -05:00
Chris Miles
f5126222c2
[Process] Process Execution Refactor (#2632)
* Swap execute output method

* Create "Process" class and move random string to Strings

* test

* Tweaks
2022-12-11 14:08:55 -05:00
Alex King
70719852d6
[Quest API] Fix Lua Door/Object Create Methods. (#2633)
# Notes
- Lua door/object create methods were `void` type instead of `uint16`, so you couldn't get the entity ID of the door you created.
- Converted Perl's door/object create methods to return `uint16` instead of `int` as well.
2022-12-11 14:08:43 -05:00
Alex King
46f993ef71
[Quest API] Add EVENT_GM_COMMAND to Perl/Lua. (#2634)
# Perl
- Add `EVENT_GM_COMMAND`, exports `$message`.

# Lua
- Add `event_gm_command`, exports `e.message`.

# Notes
- Only parses with real GM commands such as `#reload quest`.
2022-12-11 14:08:38 -05:00
Alex King
20efa83f73
[Bug Fix] Fix possible crash in ProcessSpecialAbilities. (#2630)
* [Bug Fix] Fix possible crash in ProcessSpecialAbilities.

# Notes
- Passing an invalid special ability along such as `4,1,,-1,100` currently causes a crash since every `,` assumes it's followed by a number.
- Fixed by making sure first and second parameters are numbers and then when looping additional parameters we also check if they are numbers.

* Update mob.cpp
2022-12-11 09:07:06 -05:00
Alex King
d3fac8a0cb
[Quest API] Add EVENT_LEVEL_DOWN to Perl/Lua. (#2620)
* [Quest API] Add EVENT_LEVEL_DOWN to Perl/Lua.

# Perl
- Add `EVENT_LEVEL_DOWN`, exports `$levels_lost`.
- Add `$levels_gained` export to `EVENT_LEVEL_UP`.

# Lua
- Add `event_level_down`, exports `e.levels_lost`.
- Add `e.levels_gained` export to `event_level_up`.

# Notes
- Allows operators to perform actions on level down.
- Allows operators to tell how many levels were lost or gained in case people are gaining/losing multiple levels and they want to keep track or use this as a mechanic in their code somewhere.

* Update exp.cpp

* Update embparser.cpp
2022-12-10 19:22:31 -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
Aeadoin
c8218574cc
[Logging] More AI Logging Cleanup (#2616)
* [Logging] Additional AI Cleanup

* More cleanup/formatting fixes

* Typo
2022-12-10 17:36:40 -06:00
Chris Miles
3dfeda9cea
[Tasks] Crash fix with data input sanitization (#2629) 2022-12-10 18:31:18 -05:00
Alex King
1d06a4117a
[Quest API] Add DoAnim Overloads to Perl/Lua. (#2627)
# Perl
- Add `$mob->DoAnim(animation_id, animation_speed, ackreq)`.
- Add `$mob->DoAnim(animation_id, animation_speed, ackreq, filter)`.
- Add `quest::doanim(animation_id, animation_speed)`.
- Add `quest::doanim(animation_id, animation_speed, ackreq)`.
- Add `quest::doanim(animation_id, animation_speed, ackreq, filter)`.

# Lua
- Add `eq.do_anim(animation_id)`.
- Add `eq.do_anim(animation_id, animation_speed)`.
- Add `eq.do_anim(animation_id, animation_speed, ackreq)`.
- Add `eq.do_anim(animation_id, animation_speed, ackreq, filter)`.

# Notes
- Adds overloads and cleans up spots where `animation_speed` was named `type` erroneously.
2022-12-10 17:30:40 -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
Michael
3872555332
[Rules] Rule Gate Pet Zoning (#2625)
Allows preventing pet zoning from happening for more classic servers.
2022-12-07 18:50:02 -05:00
Aeadoin
86af0f0759
[Bots] Cleanup Fast Rest Regen (#2626) 2022-12-07 17:21:50 -05:00
Alex King
88e8b25fa1
[Bug Fix] Data Bucket Permanent Duration String (#2624)
# Notes
- "F" or "f" weren't handled in this method, so they weren't working properly.
- Most people don't provide this parameter when setting a permanent data bucket, so wasn't noticed in testing.
2022-12-06 09:28:38 -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
91ea6462f2
[Quest API] Add CopyHateList() to Perl/Lua. (#2623)
* [Quest API] Add CopyHateList() to Perl/Lua.

# Perl
- Add `$mob->CopyHateList(to_mob)`.

# Lua
- Add `mob:CopyHateList(to_mob)`.

# Notes
- Allows operators to easily copy and entire hatelist from one mob to another.

* Update mob.cpp
2022-12-06 08:38:51 -05:00
Alex King
3774dc50d9
[Quest API] Add Fling Overloads to Perl/Lua. (#2622)
* [Quest API] Add Fling Overload to Perl/Lua.

# Perl
- Add `$client->Fling(target_x, target_y, target_z)`.
- Add `$client->Fling(target_x, target_y, target_z, ignore_los)`.
- Add `$client->Fling(target_x, target_y, target_z, ignore_los, clipping)`.

# Lua
- Add `client:Fling(target_x, target_y, target_z)`.
- Add `client:Fling(target_x, target_y, target_z, ignore_los)`.
- Add `client:Fling(target_x, target_y, target_z, ignore_los, clipping)`.

# Notes
- These overloads calculate the speed based on the distance automatically.

* Update client.cpp

* Update client.cpp

* Update client.cpp

* clip_through_walls
2022-12-06 08:38:33 -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
a9c161011e
[Hot Fix] Fix Bot Data Repository (#2618)
* [Hot Fix] Fix Bot Data Repository

Query was in wrong order.

* Update base_repository.template
2022-12-04 22:35:17 -05:00
Alex King
423e6ae751
[Bots] Convert Load, Save, SaveNew, and Delete to Repositories. (#2614)
* [Bots] Convert Load, Save, SaveNew, and Delete to Repositories.

# Notes
- General code cleanup, as manually adding to these queries doesn't scale very well.

* FindOne.

* Update base_bot_data_repository.h

* Update template.
2022-12-04 18:22:35 -05:00
Alex King
9a35cacf27
[Quest API] Add EVENT_PAYLOAD to Perl/Lua. (#2611)
* [Quest API] Add EVENT_PAYLOAD to Perl/Lua.

# Perl
- Add `$bot->SendPayload(payload_id)`.
- Add `$bot->SendPayload(payload_id, payload_value)`.
- Add `$client->SendPayload(payload_id)`.
- Add `$client->SendPayload(payload_id, payload_value)`.
- Add `$mob->SendPayload(payload_id)`.
- Add `$mob->SendPayload(payload_id, payload_value)`.
- Add `$npc->SendPayload(payload_id)`.
- Add `$npc->SendPayload(payload_id, payload_value)`.

# Lua
- Add `bot:SendPayload(payload_id)`.
- Add `bot:SendPayload(payload_id, payload_value)`.
- Add `client:SendPayload(payload_id)`.
- Add `client:SendPayload(payload_id, payload_value)`.
- Add `mob:SendPayload(payload_id)`.
- Add `mob:SendPayload(payload_id, payload_value)`.
- Add `npc:SendPayload(payload_id)`.
- Add `npc:SendPayload(payload_id, payload_value)`.

# Notes
- Allows operators to send payload IDs with a payload value, the value can be a comma separated value, JSON, etc.
- The idea is to allow a more configurable event for operators to send information to/from entities.

* Cleanup parser events.
2022-12-04 17:47:49 -05:00
Alex King
e1d5274bd5
[Quest API] Cleanup Signal Methods in Perl/Lua. (#2604)
# Perl
- Add `$client->Signal(signal_id)`.

# Notes
- Some places still had signal as `uint32` versus `int`.
- Rename `signal` to `signal_id` where valid so we don't have conflicts.
2022-12-04 17:40:48 -05:00
Aeadoin
ede3ed4df3
[HotFix] Resolve issue with Bot Casting after zoning. (#2617) 2022-12-04 15:43:38 -06:00
Aeadoin
318e487515
[Logging] Cleanup AI Logging Events (#2615) 2022-12-04 14:22:53 -05:00
Aeadoin
7e0fe93039
[Bots] Save Bot Toggle Archer Setting between Loads. (#2612)
* [Bots] Save Bot Toggle Archer Setting between Loads.

* [Bots] Save Bot Toggle Archer Setting between Loads.

* Typo
2022-12-04 13:23:25 -05:00
Alex King
7abc084cd1
[Quest API] Add Entity Variable Methods to Perl/Lua. (#2609)
* [Quest API] Add Entity Variable Methods to Perl/Lua.

# Perl
- Add `$mob->ClearEntityVariables()`.
- Add `$mob->DeleteEntityVariable(variable_name)`.
- Add `$object->ClearEntityVariables()`.
- Add `$object->DeleteEntityVariable(variable_name)`.

# Lua
- Add `mob:ClearEntityVariables()`.
- Add `mob:DeleteEntityVariable(variable_name)`.
- Add `object:ClearEntityVariables()`.
- Add `object:DeleteEntityVariable(variable_name)`.

# Notes
- Allows operators to clear all entity variables or delete one by name, previously you just had to set to an empty value to clear after being set.

* Cleanup.
2022-12-04 12:18:27 -05:00