96 Commits

Author SHA1 Message Date
Mitch Freeman
398ecbc8cf
[Bug Fix] Update FreeGuildID Routine (#4143)
Updates the routine to determine a free guild id on guild creation
2024-03-02 15:17:28 -06:00
JJ
dcfc54d408
[Logs] Fix log in BaseGuildManager::IsGuildLeader() (#4102)
Looks like typos created invalid escapes
2024-02-19 22:34:52 -06: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
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
Aeadoin
2e2c4d64fe
[Cleanup] Cleanup uses of Strings::ToInt to match correct type. (#3054)
* [Cleanup] Cleanup uses of Strings::ToInt to match correct type.

* cleanup
2023-03-22 12:22:03 -04:00
Alex King
2a6cf8c8e7
[Strings] Add more number formatters (#2873)
* [Strings] Add more number formatters

# Notes
- Adds `Strings::ToUnsignedInt` for `uint32` support.
- Adds `Strings::ToBigInt` for `int64` support.
- Adds `Strings::ToUnsignedBigInt` for `uint64` support.
- Adds `Strings::ToFloat` for `float` support.
- Replaces all `std::stoi` references with `Strings::ToInt`.
- Replaces all `atoi` references with `Strings::ToInt`.
- Replaces all `std::stoul` references with `Strings::ToUnsignedInt`.
- Replaces all `atoul` references with `Strings::ToUnsignedInt`.
- Replaces all `std::stoll` references with `Strings::ToBigInt`.
- Replaces all `atoll` references with `Strings::ToBigInt`.
- Replaces all `std::stoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `atoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `std::stof` references with `Strings::ToFloat`.

* [Strings] Add more number formatters

- Adds `Strings::ToUnsignedInt` for `uint32` support.
- Adds `Strings::ToBigInt` for `int64` support.
- Adds `Strings::ToUnsignedBigInt` for `uint64` support.
- Adds `Strings::ToFloat` for `float` support.
- Replaces all `std::stoi` references with `Strings::ToInt`.
- Replaces all `atoi` references with `Strings::ToInt`.
- Replaces all `std::stoul` references with `Strings::ToUnsignedInt`.
- Replaces all `atoul` references with `Strings::ToUnsignedInt`.
- Replaces all `std::stoll` references with `Strings::ToBigInt`.
- Replaces all `atoll` references with `Strings::ToBigInt`.
- Replaces all `std::stoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `atoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `std::stof` references with `Strings::ToFloat`.

* Rebase cleanup

* Changes/benchmarks/tests

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-03-04 17:01:19 -06:00
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
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
Chris Miles
dfd8f84cac
[Strings] Refactor Strings Usage (#2305)
* Initial commit checkpoint

* More functions converted

* Commify

* More functions

* Fin

* Sort declarations

* Split functions between files

* Bots

* Update strings.h

* Split

* Revert find replaces

* Repository template

* Money

* Misc function

* Update CMakeLists.txt

* Saylink

* Update strings.cpp

* Swap Strings::Saylink for Saylink::Create since saylink is coupled to zone database

* API casings
2022-07-14 02:10:52 -05:00
Kinglykrab
6a77764f8b
[Commands] Cleanup #guild Command. (#1880)
- Cleanup messages and logic.
- Adds GetGuildNameByID, GetGuildRankName, GetGuildIDByCharacterID, and IsCharacterInGuild helper methods for guild stuff.
- Convert #guild info message to a popup display to tidy it up and make it more legible.
2021-12-23 13:04:26 -05:00
mmcgarvey
feed584a41
[Database] Escape reserved mysql keyword rank w/ backticks (#1862)
Fixes #1567
2021-12-14 13:57:35 -05:00
Kinglykrab
293361a1f7
[Cleanup] Make use of AccountStatus constants wherever status is checked or used. (#1764)
* [Cleanup] Make use of AccountStatus constants wherever status is checked or used.
- Cleanup all instances of SendEmoteMessage.
- Cleanup all instances of SendEmoteMessageRaw.
- Cleanup all instances of MessageStatus.
- Convert Quest API method defaults to use constants.

* Cleanup constant names.
2021-11-14 21:01:13 -06:00
Alex
581d5b1289 Deleted characters will no longer show in the guild window. 2020-03-07 18:58:12 -05:00
Akkadius
2b1950d2e2 Logs::Guilds to LogGuilds 2019-09-02 02:24:34 -05:00
Akkadius
7aa1d243b0 [Performance] Reworked how all log calls are made in the source, see changelog.txt for more details 2017-04-01 03:51:46 -05:00
Michael Cook (mackal)
60da544d3a clang-tidy modernize-use-auto 2016-05-25 16:10:28 -04:00
Uleat
1c0192dce3 Fix for guild rank sql error when using bots (thanks N0ctrnl!) 2015-12-02 18:33:49 -05:00
Uleat
ecd695ff9b Script and server code query updates for bots_updater 2015-10-09 21:34:31 -04:00
Kinglykrab
61c9a07596 Fixed guild windows on bot-enabled servers. 2015-07-06 14:05:09 -04:00
Akkadius
f20ff5c6e3 Cleanup of some QueryDatabase references that no longer need auto results 2015-01-19 05:32:34 -06:00
Akkadius
e4200abc4f Remove Duplicative MySQL Error: Error executing query '%s': %s 2015-01-19 05:26:19 -06:00
Akkadius
7c52755eac Remove Duplicative MySQL Error: Error loading guild member '%s': %s 2015-01-19 05:26:18 -06:00
Akkadius
28285d6c59 Remove Duplicative MySQL Error: Error loading guild member '%s': %s 2015-01-19 05:26:16 -06:00
Akkadius
417777a6f1 Remove Duplicative MySQL Error: Error loading guild member list '%s': %s 2015-01-19 05:26:15 -06:00
Akkadius
315f5e0ca4 Remove Duplicative MySQL Error: Error %s: '%s': %s 2015-01-19 05:26:13 -06:00
Akkadius
85659dd200 Remove Duplicative MySQL Error: Error setting public note for char %d '%s': %s 2015-01-19 05:26:10 -06:00
Akkadius
3f3368e60c Remove Duplicative MySQL Error: Error retrieving alt flag '%s': %s 2015-01-19 05:26:08 -06:00
Akkadius
bf7c40d7a5 Remove Duplicative MySQL Error: Error retrieving banker flag '%s': %s 2015-01-19 05:26:07 -06:00
Akkadius
6ae05eef38 Remove Duplicative MySQL Error: Error removing char %d from guild '%s': %s 2015-01-19 05:26:06 -06:00
Akkadius
5df58973a8 Remove Duplicative MySQL Error: Error Changing char %d to guild %d '%s': %s 2015-01-19 05:26:05 -06:00
Akkadius
6753517bb1 Remove Duplicative MySQL Error: Error setting Channel for guild %d '%s': %s 2015-01-19 05:26:03 -06:00
Akkadius
e726c7356a Remove Duplicative MySQL Error: Error setting URL for guild %d '%s': %s 2015-01-19 05:26:02 -06:00
Akkadius
30b87fb2ea Remove Duplicative MySQL Error: Error setting MOTD for guild %d '%s': %s 2015-01-19 05:26:00 -06:00
Akkadius
ad70e4f051 Remove Duplicative MySQL Error: Error changing leader on guild %d '%s': %s 2015-01-19 05:25:58 -06:00
Akkadius
fa1e73fa03 Remove Duplicative MySQL Error: Error in _GetFreeGuildID query '%s': %s 2015-01-19 05:25:55 -06:00
Akkadius
ddae2f3d16 Remove Duplicative MySQL Error: Error inserting new guild rank record when storing %d for %d. Giving up. '%s': %s 2015-01-19 05:25:52 -06:00
Akkadius
233320330f Remove Duplicative MySQL Error: Error inserting new guild record when storing %d. Giving up. '%s': %s 2015-01-19 05:25:43 -06:00
Akkadius
7e4eedbebc Remove Duplicative MySQL Error: Error clearing old guild_ranks records when storing %d '%s': %s 2015-01-19 05:25:35 -06:00
Akkadius
48a43b0555 Remove Duplicative MySQL Error: Error clearing old guild record when storing %d '%s': %s 2015-01-19 05:25:31 -06:00
Akkadius
adf3a7ea0e Remove Duplicative MySQL Error: Error reloading guild ranks '%s': %s 2015-01-19 05:25:24 -06:00
Akkadius
5443e879a5 Remove Duplicative MySQL Error: Error reloading guilds '%s': %s 2015-01-19 05:25:20 -06:00
Akkadius
382fdc5d18 Remove Duplicative MySQL Error: Error loading guild ranks '%s': %s 2015-01-19 05:25:14 -06:00
Akkadius
3c02cc454d Remove Duplicative MySQL Error: Error loading guilds '%s': %s 2015-01-19 05:25:05 -06:00
Akkadius
b6587cc9e2 Removal of logsys.h from #include(s) 2015-01-18 04:03:45 -06:00
Akkadius
467b359d0c Moved all EQEmuLogSys:: enum references used in Log.Out to a namespace 'Logs' for shortening of syntax 2015-01-18 02:20:16 -06:00
Akkadius
c025765283 Renamed DoLog to Out as the aggregate logging function for simplicity of use and shortened syntax of Log.Out 2015-01-18 02:00:15 -06:00
Akkadius
1c048cb1d1 Renamed DebugCategory to DoLog as the aggregate logging function for simplicity of use and shortened syntax of Log.DoLog 2015-01-18 01:54:09 -06:00
Akkadius
e691735a2d Consolidate 'LogType' Error logs over to 'LogCategory' 2015-01-18 01:30:25 -06:00
Akkadius
7dbde36b03 Rename reference logger to Log 2015-01-18 00:41:18 -06:00
Akkadius
132fbbb0c6 Rename LogDebugType to DebugCategory 2015-01-16 03:09:02 -06:00