11686 Commits

Author SHA1 Message Date
Alex King
c13ec5a06d
[Repositories] Cleanup and Convert Character Creation to Repositories (#4053)
* [Repositories] Cleanup and Convert Character Creation to Repositories

# Notes
- Converts `Database::GetCharacterID()`, `Database::SaveCharacterCreate()`, and `Client::OPCharCreate` to repositories.
- Cleanup a spot we were doing a queries in a loop.

* Cleanup

* Update database.cpp

* Update database.cpp
2024-02-19 20:45:18 -06:00
Chris Miles
d182fc3613
[Expansions] Zone Expansion Version Routing (#4084)
* Expansion version routing

* CheckForImproperContentFiles rule

* Update world_content_service.cpp

* Update client.cpp

* Update client.cpp

* Update CheckForImproperContentFiles

* Remove nek pok check

* Remove file checking

* Remove

* Command and dev tools menu tweaks

* Update world_content_service.cpp

* Update world_content_service.cpp

* Update version path

* Update content_filter_criteria.h

* Update content_filter_criteria.h

* Update quest_parser_collection.cpp

* Update comments

* PR feedback

* Update client_packet.cpp

* Remove notes column for display cleanliness
2024-02-19 20:35:17 -06:00
Alex King
5a89fcfb78
[Quest API] Add Entity Variable Events to Perl/Lua (#4092)
* [Quest API] Add Entity Variable Events to Perl/Lua

- Add `EVENT_ENTITY_VARIABLE_DELETE`.
- Add `EVENT_ENTITY_VARIABLE_SET`.
- Add `EVENT_ENTITY_VARIABLE_UPDATE`.
- All export `$variable_name` and `$variable_value`.

- Add `event_entity_variable_delete`.
- Add `event_entity_variable_set`.
- Add `event_entity_variable_update`.
- All export `e.variable_name` and `e.variable_value`.

- Allows operators to perform operations when entity variables are cleared, deleted, set, or updated.

* Update mob.cpp

* Cleanup.

* Cleanup

* Update mob.cpp

* Update lua_general.cpp

* Update embparser_api.cpp
2024-02-19 20:34:33 -06:00
Alex King
db3601c25c
[Quest API] Add Timer Events to Perl/Lua (#4099)
* [Quest API] Add Timer Events to Perl/Lua

# DRAFT

* Cleanup
2024-02-19 03:51:16 -06:00
Alex King
137a9f835a
[Quest API] Add spell cast methods to Lua (#4096)
# Notes
- Add `eq.cast_spell(spell_id)` and `eq.self_cast(spell_id)` to Lua.
- Lua did not have a `quest::castspell(spell_id)` or `quest::selfcast(spell_id)` equivalent, so this adds them.
2024-02-19 02:35:30 -06:00
Alex King
4ad46b54df
[Bug Fix] Fix Sympathetic Procs for Bots/Mercenariess (#4086)
# Notes
- Bots and Mercenaries were being rejected at the top of this method despite us allowing them to use this method where it's called.
2024-02-19 02:21:47 -06:00
Alex King
3f46210639
[Bots] Cleanup empty bot_commands files (#4095)
* [Bots] Cleanup empty `bot_commands` files

# Notes
- These files were part of the conversion of bot commands to individual files, these commands are part of overarching commands and therefore do not have their own files.
- These were not removed when initially committed.

* Update bot_command.cpp

* Update bot_command.cpp
2024-02-19 02:19:56 -06:00
Alex King
6ec63969bb
[Bug Fix] Fix issue with IsEntOnHateList (#4097)
# Notes
- We were not validating pointer in `IsEntOnHateList()`.
2024-02-19 01:52:19 -06:00
JJ
767846f7e5
[Bug Fix] Aura effect spell id from #3964 (#4094)
Auras were trying to cast another aura spell vice the spell effect
2024-02-18 17:13:32 -05:00
Fryguy
04bb9bf39c
[Feature] Hot Zone Bonus XP Notice (#4091)
When in Hotzones, a bonus XP notice will let players know the hotzone is enabled.
2024-02-18 11:24:01 -05:00
Mitch Freeman
e6df5be1ed
[Bug Fix] Update database_schema to add guild_permissions (#4085)
* Update database_schema to add guild_permissions

* Reordered
2024-02-16 18:09:18 -05:00
hg
6bb2f97b74
[Code] Update fmt to 10.2.1 (#4071)
This fixes MSVC compile warnings for stdext::checked_array_iterator
which were deprecated in STL for VS 2022 17.8:

https://github.com/microsoft/STL/wiki/Changelog#vs-2022-178
2024-02-16 00:29:04 -06:00
hg
86f39743fc
[Quest API] Add tracebacks to Lua error messages (#4079)
This adds an error msg handler for lua calls to add a stack trace to
error messages. Lua 5.1 does not have luaL_traceback like luajit and lua
5.2+ so debug.traceback() is used directly as the msg handler.

The traceback will add more detail to errors than just logging package
and event names. Exceptions in C++ binds and luabind errors will now
show script context instead of just the error message.

e.g., for a luabind overload error:

  No matching overload found, candidates:
  void signal(int,int,int)
  void signal(int,int)
  stack traceback:
    [C]: in function 'signal'
    quests/arena/player.lua:10: in function 'somefn'
    quests/arena/player.lua:27: in function <quests/arena/player.lua:17>
2024-02-16 00:27:37 -06:00
Alex King
447fc026a8
[Repositories] Convert Zone Flags to Repositories (#4077)
# Notes
- Converts `ClearZoneFlag()`, `LoadZoneFlags()`, and `SetZoneFlag()` to repositories.
2024-02-16 00:27:08 -06:00
Chris Miles
7408df933c
[Database] Remove "item_tick" from database schema per https://github.com/EQEmu/Server/pull/3985 (#4083) 2024-02-16 00:23:23 -06:00
JJ
2f59e70c6b
[Bug Fix] Fix manifest check on base_data change (#4082) 2024-02-15 19:04:26 -05:00
Alex King
eb8514eea8
[Bug Fix] Fix fix_z Query (#4080)
# Notes
- This query was not working properly due to using backticks instead of single quotes.
2024-02-15 11:51:07 -05:00
Alex King
f498bac574
[Bug Fix] Fix ObjectContentsRepository using content_db (#4076)
# Notes
- `*this` was using content database, causing this not to work on servers using sharded databases.
2024-02-14 18:34:43 -05:00
Alex King
9a0b3a4c36
[Bug Fix] Fix #wpadd Query (#4078)
# Notes
- `GetNextWaypoint()` was getting a null value and crashing in `Strings::ToInt()`.
2024-02-14 18:28:31 -05:00
Chris Miles
34ea870717
[Opcodes] Fix opcode reloading (#4075) 2024-02-13 19:40:23 -05:00
Alex King
d68c1a7a6c
[Quest API] Add IsInAGuild() to Perl/Lua (#4066)
# Perl
- Add `$client->IsInAGuild()`.

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

# Notes
- Allows operators to more accurately tell if a player is in a group.
- `GuildID()` returns `uint32` max value if the player isn't in a guild so conditions using it must check for a value over a certain point, this is just a bool that simplifies that logic.
2024-02-13 19:27:43 -05:00
Akkadius
c50100fcdb [Hotfix] Fix issues where we're using the wrong database pointers v22.44.5 2024-02-12 21:41:52 -06:00
JJ
20cdc1e63d
[Release] 22.44.4 (#4074)
### Fixes

* Fix ClearSpawnTimers() ([#4073](https://github.com/EQEmu/Server/pull/4073)) @Kinglykrab 2024-02-13
v22.44.4
2024-02-12 20:34:40 -06:00
Alex King
43c7523ee1
[Hotfix] Fix ClearSpawnTimers() (#4073)
# Notes
- This wasn't a part of my other pull request.
- We were clearing `spawn2_list` before using it in `ClearSpawnTimers()`.
2024-02-12 21:12:30 -05:00
JJ
e060d97798
[Release] 22.44.3 (#4072)
### Fixes

* Fix Issue with ClearSpawnTimers() ([#4070](https://github.com/EQEmu/Server/pull/4070)) @Kinglykrab 2024-02-13
v22.44.3
2024-02-12 19:20:04 -06:00
Alex King
435b6142b8
[Bug Fix] Fix Issue with ClearSpawnTimers() (#4070)
# Notes
- We were using the improper ID for this and not checking if the vector was empty before using.
2024-02-12 20:00:45 -05:00
Chris Miles
508b37dc93
[Release] 22.44.2 (#4068) v22.44.2 2024-02-12 13:43:38 -06:00
Alex King
0adca46a73
[Bots] Remove Alt Combat Functionality (#4067)
* [Bots] Remove Alt Combat Functionality

# Notes
- This functionality needlessly complicates bot targeting logic and causes crashes and unintended behavior for players when accidentally enabled or enabled by default.

* Cleanup
2024-02-12 03:00:11 -06:00
hg
e920e35a5c
[Cleanup] Use explicit conversions for enum formatting (#4064)
This is prep for updating to fmt 10 which removed implicit conversions
for enums.
2024-02-12 02:58:48 -06:00
Mitch Freeman
20c01ef343
[Fix] Guard against crash condition (#4062) 2024-02-11 18:32:59 -05:00
JJ
1567141c19
[Database] Fix table name in manifest (#4063) 2024-02-11 18:29:05 -05:00
JJ
6bc9bcf15a
[Database] Proper default for droptime from object_contents (#4061) 2024-02-11 17:59:48 -05:00
JJ
86a2a86ba8
[Database] Fix default value for time_of_death in character_corpses (#4060)
* [Database] Fix default value for `time_of_death` in `character_corpses`

* Extra `NULL`

* Update repository

* Repositories with updated structure this time
2024-02-11 16:12:07 -05:00
JJ
3e6924d10e
[Guilds] Clean up GUILD_RANK_NONE references (#4059)
Should be exhaustive for guild rank values
Cleans up redefinition of `GUILD_RANK_NONE` by including `GUILD_RANK_NONE_TI`
Fixes #4057
2024-02-11 11:58:19 -05:00
Akkadius
a27a8adf1e [Release] 22.44.1 v22.44.1 2024-02-11 02:46:47 -06:00
Chris Miles
13994fb3e4
[File] Fix File::Exists(file_name) to be resilient to Chinese characters (#4058)
* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Update file.cpp

* Final fix
2024-02-11 02:42:25 -06:00
Chris Miles
78aa527bc7
[Release] 22.44.0 (#4056)
* [Release] 22.44.0

* Update CHANGELOG.md
v22.44.0
2024-02-10 05:02:33 -06:00
Chris Miles
58287b6539
[Crash Reporting] Update Spire to use SSL (#4055) 2024-02-10 04:43:37 -06:00
Akkadius
718a157c06 Revert "[Hotfix] fs::exists(fs::path{name}) does not work for Chinese characters in windows"
This reverts commit 801025c1663c6a077557f2c4cc446b9501f9ba18.
2024-02-10 04:01:00 -06:00
Akkadius
801025c166 [Hotfix] fs::exists(fs::path{name}) does not work for Chinese characters in windows 2024-02-10 03:57:50 -06:00
Mitch Freeman
91f5932c6d
[Feature] Add RoF2 Guild features (#3699)
* [Feature] Add additional Guild Features

This adds the following guild features and design pattern
- the existing guild system was used
- guild features are based on RoF2 within source with translaters used to converted between client differences
- backward compatible with Ti and UF, and allows for mixed client servers
- Guild Back for Ti and UF is based on RoF2 Permissions for banking if Guild Leader does not use Ti/UF
- Guild Ranks and Permissions are enabled.
- Guild Tributes are enabled.
- Event logging via rules for donating tribute items and plat
- Rules to limit Guild Tributes based on max level of server
- Rewrote guild communications to client using specific opcodes
-- Server no longer sends a guild member list on each zone
-- Guild window is updated when a member levels, rank changes, zone changes, banker/alt status using individual opcodes
-- When a member is removed or added to a guild, a single opcode is sent to each guild member
-- This reduces network traffic considerably

Known issues:
- Visual bug only. Guild Tributes window will display a 0 for level if tribute is above max level rule setting.
- Visual bug only. Guild Mgmt Window will not display an online member if the player has 'show offline' unchecked and a guild member zones within the Notes/Tribute tab.  This is resolved by selecting and de-selecting the 'Show Offline' checkbox.

* Updated RoF2 Guild Comms

Updated RoF2 Guild Comms
Update RoF2 Opcodes
Rewrote RoF2 Guild Communications using specific opcodes.
Added database changes - they are irreversible

* Formatting

* Update base_guild_members_repository.h

* Format GuildInfo

* Format GuildAction enum

* Formatting in clientlist

* quantity vs quantity

* desc vs description

* Format structs

* Inline struct values

* Formatting

* Formatting

* Formatting fixes

* Formatting items

* Formatting

* Formatting

* struct formatting updates

* Updated formatting

* Updated
- std:string items
- naming conventions
- magic numbers

* Repo refactors
Other formatting updates

* Remove test guild commands

* Updated #guild info command

* Add new repo methods for Neckolla ReplaceOne and ReplaceMany

* Fix guild_tributes repo

* Update database_update_manifest.cpp

* Phase 1 of final testing with RoF2 -> RoF2.
Next phase will be inter compatibility review

* Remove #guild testing commands

* Fix uf translator error
Rewrite LoadGuilds

* Use extended repository

* FIx guild window on member add

* LoadGuild Changes

* Update guild_base.cpp

* Few small fixes for display issue with UF

* Update guild_base.cpp

* Update guild_members_repository.h

* Update zoneserver.cpp

* Update guild.cpp

* Update entity.h

* Switch formatting

* Formatting

* Update worldserver.cpp

* Switch formatting

* Formatting switch statement

* Update guild.cpp

* Formatting in guild_base

* We don't need to validate m_db everywhere

* More formatting / spacing issues

* Switch format

* Update guild_base.cpp

* Fix an UF issue displaying incorrect guildtag as <>

* Updated several constants, fixed a few issues with Ti/UF and guild tributes not being removed or sent when a member is removed/disbands from a guild.

* Formatting and logging updates

* Fix for Loadguilds and permissions after repo updates.

* Cleanup unnecessary m_db checks

* Updated logging to use player_event_logs

* Updated to use the single opcodes for guild traffic for Ti/UF/RoF2.  Several enhancements for guild functionality for more reusable code and readability.

* Update to fix Demote Self and guild invites declining when option set to not accept guild invites

* Potential fix for guild notes/tribute display issues when client has 'Show Offline' unchecked.

* Updates to fox recent master changes

Updates to fix recent master changes

* Updates in response to comments

* Further Updates in response to comments

* Comment updates and refactor for SendAppearance functions

* Comment updates

* Update client spawn process for show guild name

Add show guild tag to default spawn process

* Update to use zone spawn packets for RoF2
Removed several unused functions as a result
Updated MemberRankUpdate to properly update guild_show on rank change.
Updated OP_GuildURLAndChannel opcode for UF/RoF2

* Cleanup of world changes
Created function for repetitive zonelist sendpackets to only booted zones
Re-Inserted accidental delete of scanclosemobs

* Fixes

* Further world cleanup

* Fix a few test guild bank cases for backward compat
Removed a duplicate db call
Fixed a fallthrough issue

* Update guild_mgr.cpp

* Cleanup

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-02-10 03:27:58 -06:00
Alex King
dacebca9dd
[Cleanup] Convert Quest Ornament Methods to Repositories (#4048)
# Notes
- Convert `Client::SetPrimaryWeaponOrnamentation` and `Client::SetSecondaryWeaponOrnamentation` to repositories.
2024-02-10 03:27:47 -06:00
hg
75539b4f89
[Tasks] Avoid removing client tasks from memory on load (#4052)
If a task was deleted or had new elements added to it without updating
character states to match changes, client state for the task was not
loaded into memory and a "contact a GM" warning was sent to the client.

This caused an issue if a client later accepted a new task because it
could be placed in the same client state slot as a non-loaded task. The
table does not have constraints so this was also inserted into the db.

The next time client task state was reloaded after zoning, the new task
would not be loaded since it occupied a used slot, even though that used
slot was also not being loaded. The client could not remove or reacquire
the original task without GM intervention and an entry was left in the
db for the new task.

This makes the following changes to client task state loading:

 - If a task id no longer exists it is deleted from client state tables
   instead of only being removed from memory.

 - If a task occupies the same client state slot as another task, it is
   deleted from client state tables instead of being ignored.

 - If new elements have been added to a task, client state will keep the
   task in memory. The new activity states will be inserted into the db
   when necessary for updates (may not be immediate).

These changes also fix two smaller bugs as a consequence:

 - If a character was at the 20 quest limit the last quest wasn't being
   processed for activity count changes. The task would continue to show
   to clients but any added new elements couldn't be completed.

 - Deleted tasks that occupied slot 0 in client state would fallback to
   loading it as a solo task of type 0. This prevented a client's real
   solo task from being loaded if the deleted task was processed first.

Note clients may receive or lose credit for completed elements if new
ones are added in the middle of tasks. Server ops will still need to
update character state tables manually on task changes to prevent this.
2024-02-10 03:25:03 -06:00
hg
804b798068
[Tasks] Send active elements in task select packet (#4051)
Only the first element was being serialized to show the start zone of
tasks. This was resulting in a blank description for tasks that only
have element descriptions.

Live sends all initial active elements for the task when sending this
packet. Any bracket text with these elements as a requirement will be
appended to the description.
2024-02-10 03:23:24 -06:00
Chris Miles
b280f50c99
[Deprecation] Remove eqemu_server.pl script and ties to server (#4049) 2024-02-10 03:22:18 -06:00
Fryguy
14d4a2610f
[Feature] Classic Taunt (Pre 2006) style of taunt (#3942)
* DRAFT - Classic Taunt (Pre 2006) style of taunt

RULE: ClassicTauntSystem

Completely seperate logic for each system. Could potentially be re-writte to be more inline but there are a good bit of minor differences.

* Consolidate Logic

Still needs in-game testing

* Feedback Request

* Updates per feedback
2024-02-10 03:22:08 -06:00
Alex King
26693992b6
[Bug Fix] Fix Froglok Starting Languages (#4050)
# Notes
- Switch was using the wrong race ID.
2024-02-09 13:30:14 -06:00
Fryguy
772fed5e30
[Feature] Corpse Overhaul (#3938)
# Corpse Overhaul

Changelog:

- Player corpses now have two timers, one specific to the rezability of the corpse and the other to cover the overall rot timer of the player corpse.
- The rezability timer is based on the online presence of the player/account and is not affected by being offline.
- The rot timer is not affected by offline/online status and will count to the rot status of the corpse.
- Corpses can be rezzed multiple times, however only the first rez that yeilds returned xp will be counted. Not other rez will return any xp. This allows for a "Poor mans COTH" as was used many times in the early eras.
- All Corpse class private/protected member variables are all now prefixed with m_
- Added Corpses logging category along with many debug logs
- Removed LoadCharacterCorpseData
- Removed LoadCharacterCorpseEntity
- Added LoadCharacterCorpse(const CharacterCorpsesRepository::CharacterCorpses, const glm::vec4 &position) which simplifies areas of consumption and reduces double queries from removing LoadCharacterCorpseData and replacing LoadCharacterCorpseEntity
- All parameters that were prefixed with in_ have been dropped
- Removed two queries from CheckIsOwnerOnline and have it query the world's CLE by account_id since that is how live works
- Regenerated repository character_corpses
- Cleaned up many list iterators to use range based for loops
- Rate limit Corpse::Process m_is_rezzable with a 1 second check timer
- General code cleanup
- Added a Server Up check to bury all corpses in instances to prevent lost corpses if an instance is released during server down. This facilitates player recovery via shadowrest or priests of luclin.


This PR also now fixes a long standing issue with HasItem performance in our script plugins. It is significantly faster, we will need to coordinate quest changes and comms with operators.

```lua
    if ($client->HasItemOnCorpse($item_id)) {
        return 1;
    }
```

```lua
    --corpse
    if self:HasItemOnCorpse(itemid) then
        return true
    end
```


Testing Completed:

- Create a Corpse
- Standard rezzing
- Ghetto Coth (No Extra XP)
- Rezzing after graveyard move
- Divine Rez works as intended
- No XP Rez (Corpse Call) does not give XP
- Corpse Burying
- Cross Instance Graveyard Corpse movement/Rezzing
- DZ End/Quit Corpse Movement/Rezzing
- Server Shutdown/Reinit DZ Corpse Movement/Rezzing


---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-02-07 23:02:30 -05:00
Alex King
331e04fbf8
[Quests] Cleanup Quest Parser Logic (#4025)
* [Quests] Cleanup Quest Parser Logic

# Notes
- Consolidate duplicated code into loops to make it easier to read and easier to add on to.

# Images

* Update quest_parser_collection.cpp

* Push

* Push

* Update embperl.cpp

* Push

* Additional cleanup, use File::Exists utility

* Range based loops

* Update embparser.cpp

* Cleanup

* Update embparser.cpp

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-02-05 19:53:16 -05:00
Chris Miles
9e2afd5571
[Database] Correct manifest migration entries that should be content (#4047) 2024-02-05 17:37:15 -06:00