10252 Commits

Author SHA1 Message Date
Alex King
3335cacac1
[Bots] Cleanup and remove preprocessors. (#2757)
* [Bots] Cleanup and remove preprocessors.

- Removes every `#ifdef BOTS` we have and locks bots behind `Bots:AllowBots` rule.
- Bot updates are now done by default similar to regular database updates.
- Modify `CMakeLists.txt`, `.drone.yml`, and `BUILD.md` to match the removal of `EQEMU_ENABLE_BOTS`.

* Cleanup

- Add SQL for enabling bots for servers with bots.
- Add message that tells players/operators bots are disabled.

* Suggested changes.

* Bot injection stuff

* Change SQL to bot SQL.

* Tweaks

* Remove `is_bot`

* Update version.h

* Update main.cpp

* Update database.cpp

* Fix name availability crash

* Remove bots from update script

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-01-20 12:35:33 -06:00
Akkadius
1f0b2a8991 [Hotfix] Make sure we have a proper split size before assuming we can split it 2023-01-20 12:25:49 -06:00
Aeadoin
a16f21d6fe
[Bots] Add Support for AA bonuses that were missing. (#2764)
* [Bots] Add Support for AA bonuses that were missing.

* Fix GetFocusEffect, add virtual override to Bot to prevent using NPC
2023-01-19 22:45:09 -06:00
Chris Miles
900837f633
[Logging] Improvements to GM Say Logging (#2765) 2023-01-19 22:24:57 -06:00
Chris Miles
d3e756287e
[Logging] Remove function prefixes (#2766) 2023-01-19 22:24:50 -06:00
Vayle
7d0dd13d17
[Bug Fix] Add omitted function call in UCS (#2768) 2023-01-19 22:24:39 -06:00
Vayle
ba5b901c16
[Optimization] Handle channel name filter checks in memory (#2767)
* Handle channel name filter checks in memory

With this commit, name filters are loaded into memory when the server loads and new channels are compared against these memory values VS hitting the database each time.

* Minor formatting tweaks
2023-01-19 21:23:11 -06:00
Akkadius
3424ae2dde [Hotfix] Fix door click crash issue if destination zone doesn't exist 2023-01-19 19:06:58 -06:00
Chris Miles
9aad8ae54c
[Logging] Force crash logs to always be on regardless of setting (#2762) 2023-01-19 18:21:44 -06:00
JJ
7cd6b4b8ab
[SQL] Update 2023_01_15_merc_data.sql (#2763)
Odd spacing. Someone fell asleep on the keyboard.
2023-01-19 18:20:46 -06:00
Aeadoin
090019cf83
[Bot] Restrict Bot Groups from spawning while Feigned. (#2761) 2023-01-19 16:52:20 -06:00
Chris Miles
d93ea9ed86
[Zone Flags] Use database connection, not content connection (#2759) 2023-01-19 15:11:40 -06:00
Chris Miles
a7b35594f8
[Fix] Zone Flags Regression (#2760) 2023-01-19 15:11:32 -06:00
Vayle
29473aa7f5
[Rules] Add rule to allow players to permanently save chat channels to database, up to a limit. (#2706)
* Initial code

* Tweak

* Rule description tweak

* More channel work

* More adjustments

* Auto-join saved permanent player channels

* Fix UCS crash if player has no channels to load from table.

* Implemented channel blocking feature

* Update database when player channel's owner or password change

* First round of requested changes.

* Logic tweak to ensure player channels are sets to permanent when appropraite

* name_filter table integration and some refactoring

* Use new `reserved_channel_names` table to block specific channel names.

* Remove some legacy channel block code

* Setup required SQL update to create  `reserved_channel_names`  table.

* Update db_update_manifest.txt

* Update db_update_manifest.txt

* Update chatchannel.cpp

* Code review

* Database to UCSDatabase

* Repository SaveChatChannel

* CurrentPlayerChannelCount repository

* Cleanup name filter

* CreateChannel

* Update websocketpp

* Increment CURRENT_BINARY_DATABASE_VERSION

Set to 9216

* Minor tweaks to blocked channel name checks & other related areas.

- Enforce blocked channel names on channel creation.
- Also enforce blocked channel names on channel join.
- Add channel status check to Debug logging.
- Minor formatting adjustments.
- Add single quotes to column name value in query.

* Minor log change

* Increment DB Version

* Formatting Tweaks

- Made formatting adjustments consistent with KinglyKrab's recommended changes.
- This compiles successfully with these changes, but unable to test the changes until this weekend.

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-01-18 22:42:09 -06:00
Aeadoin
03a27b02ff
[Hotfix] Login Server failing to compile on Windows. (#2758) 2023-01-18 21:21:36 -05:00
Akkadius
f9ea7ddb62 [Logging] Reset stream so we don't bold the whole line 2023-01-17 21:39:18 -06:00
Chris Miles
40d1c33351
[Logging] Logging Improvements (#2755)
* Console logging improvements

* stderr handling

* Add origination information

* Formatting

* Update zoneserver.cpp

* Update eqemu_logsys.cpp

* Remove semicolon from MySQLQuery log output

* Remove IsRfc5424LogCategory

* Remove no longer used functions

* Remove definition BUILD_LOGGING

* Deprecate categories UCSServer & WorldServer

* Deprecate UCS / World Server / Zone Server categories

* Deprecate Status, QSServer, Normal

* Update login_server.cpp

* Deprecate Emergency, Alert, Critical, Notice

* Deprecate Alert

* Fix terminal color resetting

* Deprecate headless client

* Move LogAIModerate to Detail

* Deprecate moderate logging level for detail

* Update logs.cpp

* Logs list simplify

* Update logs.cpp

* Add discord to log command

* Remove unused headers

* Windows fix

* Error in world when zones fail to load

* Show warning color properly

* Keep loginserver thread log from colliding with other logs during startup

* Deprecate Loginserver category
2023-01-17 21:18:40 -06:00
Michael Cook (mackal)
ee2079ec35
[C++20] Arithmetic on different enums is deprecated (#2752)
Just do some casts and add some constants to make life easier
2023-01-17 15:21:01 -06:00
Xackery
a90c760186
[Code] Removed vscode setting (#2753) 2023-01-17 15:20:36 -06:00
Alex King
fbb36a3e75
[Mercs] Add Mercenary Support (#2745)
* [Mercs] Add Mercenary Support

# Notes
- Adds `--merc-tables` support to database dumper.
- Adds Mercenary-based repositories.
- Adds required SQL `2023_01_15_merc_data.sql` to insert the tables for those who don't already have them.
- Adds optional SQL `2023_01_15_merc_liaisons.sql` to change NPCs to the Mercenary Liaison class optionally.

* Inline.

* Trim tables_to_dump output

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-01-17 16:19:55 -05:00
Aeadoin
bd29f1c5bb
[Bug Fix] Handle_OP_AugmentItem could cause Zone crash (#2750) 2023-01-17 14:34:28 -05:00
Natedog2012
a99e0a4b2c
[Bug Fix] Move EVENT_SPAWN for adding NPCs back to original spot, also add NPCs… (#2749)
* Move EVENT_SPAWN for adding NPCs back to original spot, also add NPCs to npc/mob list before parsing

* Adjust bots EVENT_SPAWN before spawn packet
2023-01-16 22:32:19 -05:00
Aeadoin
be03628aa9
[Bug Fix] Fix Group XP not working. (#2748) 2023-01-16 19:10:19 -05:00
Aeadoin
f1a6006ee1
[Hotfix] Resolve Zone Crashing when grouped with Bots. (#2747)
* [Hotfix] Resolve Zone Crashing when grouped with Bots.

* Fixed SpawnBotGroupByName as well.

* rename variables
2023-01-16 16:50:38 -05:00
Aeadoin
dd40f2a0e6
[Bug Fix] Fix ST_TargetsTarget Spells with Restrictions (#2746) 2023-01-15 17:55:34 -05:00
Aeadoin
7fa421d848
[Bug Fix] HasPet() Zone Crashes (#2744)
* [Bug Fixes] Fix for HasPet() Zone Crashes

* HasPets const

* Remove checking This

* formatting
2023-01-15 17:16:17 -05:00
Alex King
00658632de
[Cleanup] Make use of std::abs where possible. (#2739)
# Notes
- Resolves https://github.com/EQEmu/Server/issues/338
2023-01-15 17:02:13 -05:00
Alex King
eed45e5250
[Quest API] Add SendPath() to Perl/Lua. (#2740)
* [Quest API] Add SendPath() to Perl/Lua.

# Perl
- Add `$client->SendPath(target)`.

# Lua
- Add `client:SendPath(target)`.

# Notes
- Allows operators to send a path to a target arbitrarily with a script.

* Update client.cpp
2023-01-15 17:02:06 -05:00
Alex King
64c62c4f0a
[Feature] Add Rule to Disable Group EXP Modifier. (#2741)
# Notes
- Adds `Character:EnableGroupEXPModifier`, defaults to `true`.
- Adds `Character:GroupMemberEXPModifier`, defaults to `0.2`.
- Adds `Character:FullGroupEXPModifier`, defaults to `2.16`.
- Allows operators to enable or disable the group experience modifier based on number of members.
- Allows operators to change the modifier per member in the group between `2` and `5`.
- Allows operators to change the full group experience modifier.
2023-01-15 17:01:59 -05:00
Paul Coene
ca0ae3cb98
[Rule] Add rule for NPC Level Based Buff Restrictions. (#2708)
* [Rule] Add rule for NPC Level Based Buff Restrictions.

* Erroneous whitespace

* Change prefix on log message

* Added log message when GM casts
2023-01-15 15:30:42 -06:00
Chris Miles
9e3539295b
[QS] Database class name change (#2743) 2023-01-15 14:37:39 -06:00
Chris Miles
7aa25f17f6
[UCS] Database class name change (#2742) 2023-01-15 14:16:23 -06:00
Chris Miles
e1c1d55ca5
[Websocket] Fix cpp20/gcc11 compile failure (#2737) 2023-01-15 11:00:24 -06:00
Aeadoin
403c54362e
[Bot/Merc] Cleanup methods, and virtual overrides. (#2734)
* [Bot] Cleanup methods, and virtual overrides.

* Remove Bot::CheckAggroAmount & Bot::CheckHealAggroAmount

* formatting
2023-01-14 23:32:19 -05:00
Alex King
a422484307
[Quest API] Add Client Augment Events to Perl/Lua. (#2735)
* [Quest API] Add Client Augment Events to Perl/Lua.

# Perl
- Add `EVENT_AUGMENT_INSERT_CLIENT`.
- Add `EVENT_AUGMENT_REMOVE_CLIENT`.

# Lua
- Add `event_augment_insert_client`.
- Add `event_augment_remove_client`.

# Notes
- Allows operators to use augment insert and augment remove events outside of an item script.
2023-01-14 23:23:48 -05:00
Alex King
c41f375129
[Bug Fix] Fix issue with Bot::LoadAndSpawnAllZonedBots. (#2733)
* [Bug Fix] Fix issue with Bot:;LoadAndSpawnAllZonedBots.

# Notes
- Bots could spawn beyond class/global limits due to being stuck in group limbo and spawning when you enter a zone properly.

* Debug messages.

* Remove unspawned bots from group.

* Update bot.cpp

* Update bot.cpp

* Update bot.cpp

* Update bot.cpp

* >= 0
2023-01-14 23:15:26 -05:00
Alex King
bd3e8b2afc
[Quest API] Add Bot Methods to Lua. (#2731)
# Perl
- Minor cleanup of variable types.

 # Lua
- Add `bot:GetAugmentAt(slot_id, augment_index)`.
- Add `bot:GetItemAt(slot_id)`.
- Add `bot:SendSpellAnim(target_id, spell_id)`.
- Properly implemented `bot:GetItemIDAt(slot_id)`.

# Notes
- `bot:GetItemIDAt` existed in Lua, but didn't have a bind definition, so was non-functional.
- This makes Perl/Lua bot methods 1:1 as Perl had 75 and Lua had 72, they now both have 75.
2023-01-14 09:16:11 -06:00
Alex King
f5523b40d2
[Quest API] Add CampAllBots() to Perl/Lua. (#2732)
# Perl
- Add `$client->CampAllBots()`.
- Add `$client->CampAllBots(class_id)`.

# Lua
- Add `client:CampAllBots()`.
- Add `client:CampAllBots(class_id)`.

# Notes
- Adds constants for `NO_CLASS` which is class `0` and uses `RACE_DOUG_0` for any spots that use race ID `0`.
- Cleans up magic number usage of race/class of `0`.
2023-01-14 09:14:50 -06:00
Alex King
095f4fb56c
[Quest API] Add SignalAllBotsByOwnerName() to Perl/Lua. (#2730)
# Perl
- Add `$entity_list->SignalAllBotsByOwnerName(owner_name)`.

# Lua
- Add `eq.get_entity_list():SignalAllBotsByOwnerName(owner_name)`.

# Notes
- Adds a way to signal all bots by owner name instead of only character ID.
2023-01-13 04:54:20 -06:00
Alex King
f8afadf0a9
[Cleanup] Remove unused basic_functions.h (#2729)
# Notes
- This file is unused and not included in any other files.
2023-01-13 04:52:32 -06:00
Alex King
9c23882d67
[Cleanup] Remove unused maxskill.h. (#2728)
# Notes
- This file is unused, noticed it when looking through source. Nothing calls this method or includes this file.
2023-01-13 04:52:08 -06:00
Aeadoin
3510ba2493
[Bug Fix] Fix Aug Clicks where item has no click effect. (#2725) 2023-01-12 12:46:42 -05:00
Chris Miles
db7ab7a3ef
[Diawind] Plus sign markdown fix (#2727) 2023-01-12 10:39:59 -06:00
Cole-SoD
6d13f46c40
[Bug Fix] Fix luamod GetExperienceForKill return value 2023-01-12 08:34:49 -05:00
Alex King
2f90f26351
[Quest API] Add Door Methods to Perl/Lua. (#2724)
# Perl
- Add `$door->ForceClose(sender)`.
- Add `$door->ForceClose(sender, alt_mode)`.
- Add `$door->ForceOpen(sender)`.
- Add `$door->ForceOpen(sender, alt_mode)`.
- Add `$door->GetDisableTimer()`.
- Add `$door->SetDisableTimer(disable_timer)`.

# Lua
- Add `door:GetID()`.

# Notes
- Makes Perl/Lua Door scripting capabilities 1:1.
2023-01-11 19:10:38 -05:00
Natedog2012
3341c0b7ab
[Luamod] Add CalcSpellEffectValue_formula to luamods (#2721)
* [Luamod] Add CalcSpellEffectValue_formula to luamods with example code in utils/mods/spell_formula.lua

* Fix typo

* Change formula down to uint32, fix format issues and remove debug on lua file
2023-01-11 17:49:35 -06:00
Aeadoin
2587a7fed5
out of bound (#2723) 2023-01-11 17:54:42 -05:00
Aeadoin
46fa2e589e
[Bug Fix] Add Complete Heal Spell back to IsCompleteHealSpell Method (#2722)
* [Bug Fix] Add Complete Heal Spell back to IsCompleteHealSpell Method

* Typo
2023-01-11 12:02:46 -05:00
Chris Miles
fc020b7580
[API] Reload API (#2716)
* [API] Reload API

* Update eqemu_api_world_data_service.cpp

* Add api get_reload_types

* Update eqemu_api_world_data_service.cpp
2023-01-11 07:45:48 -06:00
Alex King
933293098b
[Bug Fix] Fix Bot "Failed to Load" Messages. (#2719)
* [Bug Fix] Fix Bot "Failed to Load" Messages.

# Notes
- Bots were producing error messages for "failing to load" spells and inventory when the bot had no spells, like a Warrior, or when the bot was naked, like a newly created bot.

* Update botspellsai.cpp
2023-01-10 21:45:04 -05:00