11233 Commits

Author SHA1 Message Date
Chris Miles
21ec832ca6
[CI] Switch to use clang for Linux builds (speed) (#3777) 2023-12-17 15:17:29 -06:00
nytmyr
bdf5f8b4a3
[Bots] [Quest API] Add ^clickitem, ^timer, fix GetBestBotSpellForCure (#3755)
* [Bots][Quest API] Add ^clickitem, ^timer, revamp bot timers, fix GetBestBotSpellForCure

This adds the command **^clickitem** for bots.
Bots can click items they are wearing with the provided slot ID, players can use **^invlist** on their bots to see items and slot IDs.
This supports actionables.
**^itemclick 13 byclass 11** would command all Necromancer bots to attempt to click their Primary item.

This adds and supports charges for items to bots, when an item is used, it will lose a charge and cannot be clicked once no charges remain.

This adds the following rules:
**Bots, BotsClickItemsMinLvl** - Minimum level bots can use **^clickitem**.
**Bots, BotsCanClickItems** - Whether or not **^clickitem** is allowed for bots.
**Bots, CanClickMageEpicV1** - Whether or not players are allowed to command their bots to use the Magician Epic 1.0

This adds quest methods to Perl/Lua for:
ClearDisciplineReuseTimer, ClearItemReuseTimer, ClearSpellRecastTimer
GetDisciplineReuseTimer, GetItemReuseTimer, GetSpellRecastTimer
SetDisciplineReuseTimer, SetItemReuseTimer, SetSpellRecastTimer

Discipline and Spell methods use the spell_id to check, get and set. Item uses the item_id.
Clear and Get support wildcards (no spell/item id) to clear all timers of the type or get the first timer of the type.
Get will return the remaining time on the chosen timer, if any.
Set supports a wildcard (no recast/reuse provided) to use the default of the provided type, you can also specify a recast/reuse timer to set that timer to the chosen value.

**^timer** has been added as a bot command, defaulted for GM access.
This can be used to set, get and clear timers of different types. Use **^timer help** for info.

This revamps the way timers are set, stored, loaded for bots.

**GetBestBotSpellForCure** was previously checking only the first spell found and not properly iterating through the checks.

This requires modifications to the **bot_timers** table and is included in this commit.

* Rebase Conflicts

* Update queries to use repositories

* Minor adjustment

* Formatting

* Handle delete as well

* Cleanup.

* Adjust primary keys to prevent conflicts

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
2023-12-17 14:53:34 -05:00
Alex King
4ca6485398
[Bug Fix] Fix issue with HOTBonusHealingSplitOverDuration Rule (#3776)
# Notes
- This rule didn't function properly since we didn't add extra heal regardless of rule setting.
2023-12-16 22:48:19 -06:00
Alex King
0c9c2e25c1
[Quest API] Add EVENT_CRYSTAL_GAIN and EVENT_CRYSTAL_LOSS to Perl/Lua (#3735)
* [Quest API] Add EVENT_CRYSTAL_GAIN and EVENT_CRYSTAL_LOSS

- Add `$client->AddEbonCrystals(amount)`.
- Add `$client->AddRadiantCrystals(amount)`.
- Add `$client->RemoveEbonCrystals(amount)`.
- Add `$client->RemoveRadiantCrystals(amount)`.
- Add `EVENT_CRYSTAL_GAIN`.
- Add `EVENT_CRYSTAL_LOSS`.
- Export `$ebon_amount`, `$radiant_amount`, and `$is_reclaim`.

- Add `client:AddEbonCrystals(amount)`.
- Add `client:AddRadiantCrystals(amount)`.
- Add `client:RemoveEbonCrystals(amount)`.
- Add `client:RemoveRadiantCrystals(amount)`.
- Add `event_crystal_gain`.
- Add `event_crystal_loss`.
- Export `e.ebon_amount`, `e.radiant_amount`, and `e.is_reclaim`.

- Allows operators to add or remove Ebon/Radiant Crystals directly.
- Allows operators to track gain/loss of Ebon/Radiant Crystals.

* Update perl_client.cpp

* Update lua_client.cpp
2023-12-16 22:47:13 -06:00
regneq
7e651877c7
[Bug Fix] Fixed the discrepacy with time using command #time and in quests. (#3767)
* [BUG] Fixed the discrepacy with time using command #time and in quests. https://github.com/EQEmu/Server/issues/3700

* removed comments and paratheses from previous commit.

* fixed typos.

* made some adjustment so #time, /time, scripting, and log all match.

* Update lua_general.cpp
2023-12-16 22:40:40 -06:00
Alex King
9739c1c8ef
[Quest API] Add EVENT_ALT_CURRENCY_GAIN and EVENT_ALT_CURRENCY_LOSS to Perl/Lua (#3734)
* [Quest API] Add EVENT_ALT_CURRENCY_GAIN and EVENT_ALT_CURRENCY_LOSS

- Add `EVENT_ALT_CURRENCY_GAIN`.
- Add `EVENT_ALT_CURRENCY_LOSS`.
- Export `$currency_id`, `$amount`, and `$total.

- Add `event_alt_currency_gain`.
- Add `event_alt_currency_loss`.
- Export `e.currency_id`, `e.amount`, and `e.total.

- Convert `int8 method` to `bool is_scripted` in `Client::AddAlternateCurrencyValue`.
- Properly utilize `is_scripted` parameter in `perl_client.cpp`.
- Allows operators to perform events on alternate currency gains/losses.

* Update lua_general.cpp

* Cleanup types.

* Update lua_client.cpp
2023-12-16 22:40:24 -06:00
Alex King
8aae59eebe
[Quest API] Add EVENT_LDON_POINTS_GAIN and EVENT_LDON_POINTS_LOSS to Perl/Lua (#3742)
* [Quest API] Add EVENT_LDON_POINTS_GAIN and EVENT_LDON_POINTS_LOSS to Perl/Lua

- Add `EVENT_LDON_POINTS_GAIN`.
- Add `EVENT_LDON_POINTS_LOSS`.
- Exports `$theme_id` and `$points`.

- Add `event_ldon_points_gain`.
- Add `event_ldon_points_loss`.
- Exports `e.theme_id` and `e.points`.

- Allows operators to track gain/loss of LDoN Points of any theme.

* Update client.cpp
2023-12-16 22:31:25 -06:00
Alex King
c1b07afae9
[Quest API] Add EVENT_LOOT_ADDED to Perl/Lua (#3739)
* [Quest API] Add EVENT_ADDED_LOOT to Perl/Lua

# Perl
- Add `EVENT_ADDED_LOOT`.
- Exports `$item`, `$item_id`, `$item_name`, `$item_charges`, `$augment_one`, `$augment_two`, `$augment_three`, `$augment_four`, `$augment_five`, and `$augment_six`.

# Lua
- Add `event_added_loot`.
- Exports `e.item`, `e.item_id`, `e.item_name`, `e.item_charges`, `e.augment_one`, `e.augment_two`, `e.augment_three`, `e.augment_four`, `e.augment_five`, and `e.augment_six`.

# Notes
- Allows operators to perform events when loot is added to an NPC, such as removing the loot or keeping track of it.

* Update lua_parser_events.cpp

* Rename event.

* loot_added

* AddItem changese
2023-12-16 22:25:09 -06:00
Alex King
9c238cd08d
[Quest API] Add EVENT_LEVEL_UP and EVENT_LEVEL_DOWN to Bots (#3750)
* [Quest API] Add EVENT_LEVEL_UP and EVENT_LEVEL_DOWN to bots

# Notes
- Bots did not have these events, this will allow operators to perform events on bot level up/down.

* Update bot.cpp
2023-12-16 22:23:38 -06:00
Akkadius
33adb9bcc1 [Hotfix] Fix bad merge 2023-12-16 21:06:36 -06:00
nytmyr
2e8bf82861
[Bots] Expand ^itemuse options (#3756)
Adds additional options to **^itemuse** to narrow down the list of accepting bots.

You can now specify by class, casters, hybrids, melee, WIS caster, INT caster or plate/chain/leather/cloth wearing.
2023-12-16 20:54:23 -05:00
nytmyr
4d118ab978
[Bots] Fix ^oo autodefend from sending bots/pets to invalid haters (#3772)
Bots and especially their pets could get in a loop where they try to attack an invalid target. This would result in their pets spamming "That is not a legal target" messages.
2023-12-16 16:08:16 -05:00
Chris Miles
fcb40daaf1
[Release] 22.36.0 (#3774) v22.36.0 2023-12-16 01:07:19 -06:00
Alex King
553bafdbe1
[Bug Fix] Fix Starting Items SQL (#3766)
* [Bug Fix] Fix Starting Items SQL

# Notes
- `race_list` comes before `class_list`,query had them in the wrong order.

* Real fix.

* Update database_update_manifest.cpp

* Manifest change

* Repository generate

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-12-16 00:45:27 -06:00
Chris Miles
d0443db199
[Database] When database version is greater than binary, we are up to date (#3771) 2023-12-16 00:44:40 -06:00
Chris Miles
9206163190
[Database] Make it clearer to users that a database backup is occurring (#3769) 2023-12-16 00:44:25 -06:00
Chris Miles
e504482b94
[Corpse] Fix /corpse command regression from #3727 (#3770) 2023-12-16 00:44:11 -06:00
Alex King
77b88e3dec
[Rules] Add DOT and HOT Rules (#3760)
* [Rules] Add DOT and HOT Rules

# Notes
- Add `Spells:DOTDamageBonusSplitOverDuration` rule.
- Allows operators to disable the DOT bonus damage being split over duration and instead adds the full amount every tic.
- Add `Spells:HOTBonusHealingSplitOverDuration` rule.
- Allows operators to disable the HOT bonus healing being split over duration and instead adds the full amount every tic.

* Update effects.cpp

* Update effects.cpp
2023-12-15 19:25:38 -06:00
Alex King
aeeb350068
[Cleanup] Cleanup classes.cpp/classes.h (#3752)
* [Cleanup] Cleanup classes.cpp/classes.h

# Notes
- Remove unused methods and cleanup logic.

* Update classes.cpp

* Final push.
2023-12-13 18:38:45 -05:00
nytmyr
df83113cea
[Bots] Enable auto-saving of bots. (#3758)
Adds the rule **Bots, AutosaveIntervalSeconds** to control the frequency of the autosave of bots. Currently they only fully save on camp/zone.

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
2023-12-12 22:22:44 -05:00
nytmyr
940abfaf7a
[Logging] Change empty object loading to warning (#3759) 2023-12-11 17:06:29 -05:00
nytmyr
a46443b95e
[Bots] Add rule to toggle DT hitting owner (#3757)
**Bots, CazicTouchBotsOwner** is a rule that will toggle whether or not DT will hit the targeted bot or the owner. Similar to how **Spells, CazicTouchTargetsPetOwner** functions except for  bots.
2023-12-11 14:31:33 -05:00
JJ
871f320311
[Release] 22.35.0 (#3754)
### Bots

* Add BotHealOnLevel to fully heal/mana on level. ([#3745](https://github.com/EQEmu/Server/pull/3745)) @nytmyr 2023-12-08
* Fix bots learning spells on level ([#3744](https://github.com/EQEmu/Server/pull/3744)) @nytmyr 2023-12-08

### Bug

* Fix blocked spells regression from #3638 ([#3753](https://github.com/EQEmu/Server/pull/3753)) @joligario 2023-12-11
* PR 3638 Missed the blocked spells repository updates ([#3748](https://github.com/EQEmu/Server/pull/3748)) @fryguy503 2023-12-08

### CMake

* Update minimum version of CMake ([#3743](https://github.com/EQEmu/Server/pull/3743)) @joligario 2023-12-08

### Code

* Remove hard-coded Status Checks ([#3727](https://github.com/EQEmu/Server/pull/3727)) @Kinglykrab 2023-12-03

### Commands

* #guild set CharName 0 did not remove char from guild. ([#3717](https://github.com/EQEmu/Server/pull/3717)) @noudess 2023-11-25
* #petname changes PC to Nobody if selected. ([#3720](https://github.com/EQEmu/Server/pull/3720)) @noudess 2023-11-26
* Add #show aas Command ([#3710](https://github.com/EQEmu/Server/pull/3710)) @Kinglykrab 2023-11-26
* Add #task complete Command ([#3711](https://github.com/EQEmu/Server/pull/3711)) @Kinglykrab 2023-11-26
* Cleanup #acceptrules Command ([#3716](https://github.com/EQEmu/Server/pull/3716)) @Kinglykrab 2023-11-26
* Cleanup #disarmtrap Command ([#3713](https://github.com/EQEmu/Server/pull/3713)) @Kinglykrab 2023-11-26
* Cleanup #list Command ([#3714](https://github.com/EQEmu/Server/pull/3714)) @Kinglykrab 2023-11-26
* Cleanup #movement Command ([#3715](https://github.com/EQEmu/Server/pull/3715)) @Kinglykrab 2023-11-26
* Cleanup #object Command ([#3722](https://github.com/EQEmu/Server/pull/3722)) @Kinglykrab 2023-12-03
* Cleanup #zonebootup and #zoneshutdown Commands ([#3729](https://github.com/EQEmu/Server/pull/3729)) @Kinglykrab 2023-12-03
* Fix formatting of #wpinfo output. ([#3728](https://github.com/EQEmu/Server/pull/3728)) @noudess 2023-12-01

### Database

* Add primary key to keyring table ([#3746](https://github.com/EQEmu/Server/pull/3746)) @Kinglykrab 2023-12-08
* Consolidate Starting Items Table ([#3723](https://github.com/EQEmu/Server/pull/3723)) @Kinglykrab 2023-11-30
* Extra whitespace in #3723 ([#3730](https://github.com/EQEmu/Server/pull/3730)) @joligario 2023-12-02
* Minor adjustment to #3726 ([#3732](https://github.com/EQEmu/Server/pull/3732)) @joligario 2023-12-03
* Modify `updated` column in `items` table with proper default. ([#3726](https://github.com/EQEmu/Server/pull/3726)) @joligario 2023-12-02
* Pull Spell Group Cache from Content DB ([#3749](https://github.com/EQEmu/Server/pull/3749)) @fryguy503 2023-12-08

### Faction

* Alliance line is only allowed 1 faction change at a time. ([#3718](https://github.com/EQEmu/Server/pull/3718)) @noudess 2023-11-26

### Fixes

* Changing Group Leader Invalidated GetLeaderName() ([#3712](https://github.com/EQEmu/Server/pull/3712)) @Kinglykrab 2023-11-26
* Fix 9245 SQL ([#3740](https://github.com/EQEmu/Server/pull/3740)) @Kinglykrab 2023-12-05
* Fix Swarm Pets Requiring NPC Aggros Flag ([#3738](https://github.com/EQEmu/Server/pull/3738)) @Kinglykrab 2023-12-05
* Guild Message Limits ([#3724](https://github.com/EQEmu/Server/pull/3724)) @neckkola 2023-11-29

### Quest API

* Add EVENT_AA_GAIN to AddAAPoints() ([#3733](https://github.com/EQEmu/Server/pull/3733)) @Kinglykrab 2023-12-03
* Add GMMove Overloads to Perl/Lua ([#3719](https://github.com/EQEmu/Server/pull/3719)) @Kinglykrab 2023-11-25

### Scripts

* Import items into `items_new` table instead of writing directly to the existing `items` table. ([#3725](https://github.com/EQEmu/Server/pull/3725)) @joligario 2023-11-30
* Revert database engine change from #3702. ([#3736](https://github.com/EQEmu/Server/pull/3736)) @joligario 2023-12-03
* Update 13th Floor Import Tool ([#3702](https://github.com/EQEmu/Server/pull/3702)) @joligario 2023-11-26
v22.35.0
2023-12-10 22:07:09 -05:00
JJ
a222128599
[Bug] Fix blocked spells regression from #3638 (#3753)
Fixes #3747
2023-12-10 21:40:06 -05:00
JJ
45b249e33d
[CMake] Update minimum version of CMake (#3743)
```
CMake Deprecation Warning at client_files/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
```
2023-12-08 12:48:59 -08:00
Fryguy
c24834de5d
[Database] Pull Spell Group Cache from Content DB (#3749) 2023-12-08 15:41:09 -05:00
Fryguy
841d7f2700
[Bug] PR 3638 Missed the blocked spells repository updates (#3748)
Ran generator to update blocked_spells Repo
2023-12-08 15:19:54 -05:00
Alex King
56c29154f0
[Database] Add primary key to keyring table (#3746)
* [Database] Add primary key to keyring table

# Notes
- Adds a primary key of `id` to `keyring` table so we can use it with repositories.

* Update version.h

* Update client.cpp

* Update client.cpp
2023-12-07 23:12:01 -05:00
nytmyr
6466c2ff21
[Bots] Add BotHealOnLevel to fully heal/mana on level. (#3745)
Adds the rule ***Bots, BotHealOnLevel***, default false, to control whether or not bots will gain full health and mana when their owner levels.
2023-12-07 22:25:17 -05:00
nytmyr
16dc210cd8
[Bots] Fix bots learning spells on level (#3744)
Previously bots would need to be zoned or camped/spawned to begin using new spells for their level.
2023-12-07 21:19:21 -05:00
Alex King
77045f558e
[Bug Fix] Fix 9245 SQL (#3740)
* [Bug Fix] Fix 9245 SQL

# Notes
- Should be a `;` not `,`.

* Update database_update_manifest.cpp
2023-12-04 22:21:31 -05:00
Alex King
e1fa2d5bc5
[Bug Fix] Fix Swarm Pets Requiring NPC Aggros Flag (#3738)
# Notes
- https://github.com/EQEmu/Server/pull/3595 made swarm pets require the `npc_aggro` flag to be set to attack.
2023-12-04 19:05:16 -05:00
Alex King
b03f52de18
[Commands] Cleanup #object Command (#3722)
* [Commands] Cleanup #object Command

# Notes
- Cleanup messages and logic.
- Introduce enum for object types.
- Set ground work for object manipulation similar to door manipulation.

* Update object_manipulation.cpp

* Final push

* Update client_packet.cpp

* Update object_manipulation.cpp

* Update object_manipulation.cpp

* Update object.h

* Update client_packet.cpp

* Update client_packet.cpp

* Push.

* Update version.h

* Update database_update_manifest.cpp

* Update zone.cpp
2023-12-03 17:42:27 -05:00
JJ
226cc3d6cb
[Scripts] Revert database engine change from #3702. (#3736)
InnoDB doesn't like the lengths. Will need to address that in the future.
2023-12-03 14:17:58 -05:00
Alex King
7f54e26dec
[Quest API] Add EVENT_AA_GAIN to AddAAPoints() (#3733)
# Notes
- Using this method did not call `EVENT_AA_GAIN`.
2023-12-03 12:41:06 -05:00
Alex King
11a81d8e8a
[Commands] Cleanup #zonebootup and #zoneshutdown Commands (#3729)
# Notes
- Cleanup messages and logic.
2023-12-03 12:40:54 -05:00
Alex King
e719aa43cf
[Cleanup] Remove hard-coded Status Checks (#3727)
* [Cleanup] Remove hard-coded Status Checks

# Notes
- Removed the hard-coded GM status checks since if you have access to the command we can now limit access to subcommands if necessary.

* Update client_packet.cpp
2023-12-03 11:44:30 -05:00
JJ
22994e3264
[Database] Minor adjustment to #3726 (#3732) 2023-12-03 10:18:27 -05:00
JJ
cfbdecad19
[Database] Extra whitespace in #3723 (#3730) 2023-12-01 21:13:08 -05:00
JJ
2427f7e034
[Database] Modify updated column in items table with proper default. (#3726)
* [Database] Modify `updated` column in `items` table with proper default.
From https://mariadb.com/kb/en/datetime/, `datetime` can be ZERO_DATE (`0000-00-00` with no time component) or between `1000-01-01 00:00:00.000000` and `9999-12-31 23:59:59.999999`. Currently, `updated` is the only datetime field that is `NOT NULL` and improperly defaulted to `0000-00-00 00:00:00`. This change matches existing structures of the other `datetime` columns.

* Update items_repository.h

* Update base_items_repository.h

* Revert "Update items_repository.h"

This reverts commit 3599f26818f31bd8efd3a1e0d9cb9bf5d40785c5.
2023-12-01 21:10:52 -05:00
Paul Coene
9a6403b196
[Commands] Fix formatting of #wpinfo output. (#3728) 2023-12-01 15:28:24 -05:00
JJ
d8953c5156
[Scripts] Import items into items_new table instead of writing directly to the existing items table. (#3725) 2023-11-30 17:21:00 -05:00
Alex King
33b40e83b7
[Database] Consolidate Starting Items Table (#3723)
* [Database] Consolidate Starting Items Table

# Notes
- Convert `class`, `deityId`, `race`, and `zoneid` columns to `|` separated columns.
- Consolidates up to 15 rows per item down to a singular row.
- Allows ease of use for operators.
- Entire process is automated and creates a backup of pre-existing table.

* Update shareddb.cpp

* Unnecessary.
2023-11-30 14:37:08 -05:00
Mitch Freeman
e75c31d524
[Bug Fix] Guild Message Limits (#3724)
Mail to 'Guild' was failing after after 50ish members.
The buffer was set at 512, which cut truncated the message and caused the issue.
Refactored to adjust the size of the buffer based on the inbound message size.
2023-11-28 19:03:32 -05:00
Paul Coene
cf1f8d5460
[Commands] #petname changes PC to Nobody if selected. (#3720) 2023-11-26 14:50:44 -05:00
Paul Coene
690cacdaab
[Faction] Alliance line is only allowed 1 faction change at a time. (#3718) 2023-11-26 01:13:16 -05:00
Alex King
f9f45eedcd
[Commands] Cleanup #acceptrules Command (#3716)
# Note
- Cleanup messages and logic.
- Utilize repositories in database methods.
2023-11-26 01:13:08 -05:00
Alex King
93ddffa57f
[Commands] Cleanup #movement Command (#3715)
# Notes
- Cleanup messages and logic.
2023-11-26 01:13:03 -05:00
Alex King
c9993fb698
[Commands] Cleanup #list Command (#3714)
* [Commands] Cleanup #list Command

# Notes
- Cleanup messages and logic.
- Introduce a struct so we don't have to duplicate so much code.

* Update list.cpp
2023-11-26 01:12:58 -05:00
Alex King
aa0fbb8b45
[Commands] Cleanup #disarmtrap Command (#3713)
# Notes
- Cleanup messages and logic.
2023-11-26 00:27:22 -05:00