368 Commits

Author SHA1 Message Date
Chris Miles
bc59882a65
[Hotfix] Fix database loading routines (#4030) 2024-01-29 00:14:33 -06:00
Alex King
a38fd8f986
[Alternate Currency] Convert Load of Alternate Currencies to Repositories (#3993)
# Notes
- Convert `LoadAlternateCurrencies()` to repositories.
2024-01-28 22:36:26 -06:00
Alex King
b4414d3052
[Merchants] Convert Merchant Load to Repositories (#4007)
* [Merchants] Convert Merchant Load to Repositories

# Notes
- Convert `GetMerchantDataForZoneLoad()` to repositories.

# Images
## Load

* Change to LoadMerchants()
2024-01-28 21:55:59 -06:00
Paul Coene
5b43bf4a5e
[Quests] Use separate variable for quest idle override. (#4026)
* [Quests] Use separate variable for quest idle override.

* Fix missing zone->
2024-01-27 14:09:00 -05:00
Paul Coene
7fed8fc8c8
[Bug Fix] Fixes to zone idle while empty changes. (#4006) 2024-01-22 19:33:00 -05:00
Alex King
742b437f2c
[Zones] Convert IDLE_WHEN_EMPTY to a Zone Column (#3891)
* [Rules] Convert IDLE_WHEN_EMPTY to a rule

# Notes
- Converts `IDLE_WHEN_EMPTY` to `Zone:ZonesIdleWhenEmpty` so that we can change this on the fly or on a zone-by-zone basis instead of having to recompile to do this.
- Especially helpful for those using release binaries that do not compile their own source.

* Convert to zone column.

* Update ruletypes.h

* Update ruletypes.h

* Update entity.cpp

* Update entity.cpp

* Rename.

* Update database_update_manifest.cpp

* Update base_zone_repository.h

* Update zone.cpp

* seconds_before_idle

* Update database_update_manifest.cpp

* Getter/Setters/Private

* Update base_zone_repository.h

* IsIdle()/SetIsIdle()

* Update entity.cpp
2024-01-13 01:21:40 -06:00
Alex King
d41bd8f963
[Zones] Convert Get/Set of Zone Timezone to Repositories (#3946)
* [Zones] Convert Get/Set of Zone Timezone to Repositories

- Convert `GetZoneTimezone()` and `SetZoneTimeZone()` to repositories.

* Update time_zone.cpp
2024-01-13 00:10:14 -06:00
Alex King
73a099c5ea
[Character] Character EXP Modifiers in Memory (#3934)
* Cleanup

* Final push.

* Update zonedb.cpp

* Update zone.h

* Update exp.cpp

* Update zonedb.cpp

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2024-01-13 00:03:36 -06:00
Alex King
d7dc717249
[Mercenaries] Convert Mercenaries to Repositories (#3947)
* [Mercenaries] Convert Mercenaries to Repositories

- Convert all Mercenary methods to repositories aside from inner join queries that cannot be converted.

* Update base_merc_subtypes_repository.h

* Update base_merc_subtypes_repository.h

* Regenerate repositories
2024-01-12 23:40:26 -06:00
Alex King
fc627ed52d
[NPCs] Convert Load of NPC Emotes to Repositories (#3954)
* [NPCs] Convert Load of NPC Emotes to Repositories

- Convert `LoadNPCEmotes()` to repositories.

* Cleanup
2024-01-12 23:33:11 -06:00
Alex King
f1d5e3eedf
[Zones] Convert SaveZoneCFG to Repositories (#3950)
* [Zones] Convert SaveZoneCFG to Repositories

# Notes
- Convert `SaveZoneCFG()` to repositories.

* Comment

* safe_heading

* Update zone_data.cpp
2024-01-12 23:28:16 -06:00
Alex King
d59531b16f
[Item Ticks] Remove Item Ticks Code (#3955)
* [Items] Convert Load of Item Ticks to Repositories

- Convert `LoadItemTicks()` to repositories.

* Remove item tick code.

* Remove repository references.

* Update zone.h
2024-01-12 23:17:00 -06:00
Alex King
eb33e5a064
[Ground Spawns] Convert Ground Spawns to Repositories (#3967)
# Notes
- Convert `LoadGroundSpawns()` to repositories.
2024-01-12 22:41:08 -06:00
Alex King
71f78b757e
[Respawns] Convert Respawn Times to Repositories (#3949)
* [Respawns] Convert Respawn Times to Repositories

- Convert `respawn_times` based methods to repositories.

* Missed some.

* Comments
2024-01-12 22:38:31 -06:00
Alex King
1238a6ca68
[Traps] Convert Load of LDoN Traps/Trap Entries to Repositories (#3953)
- Convert `LoadLDoNTraps()` and `LoadLDoNTrapEntries()` to repositories.
2024-01-12 20:05:00 -05:00
Alex King
24eb40d231
[Experience Modifiers] Convert Load of Level Experience Modifiers to Repositories (#3952)
# Notes
- Convert `LoadLevelEXPMods()` to repositories.
2024-01-12 02:46:33 -06:00
Fryguy
9b72c07a54
[Bug Fix] Add locations where melee can be bound outside of a city. (#3887)
* [Bug Fix] Add locations where melee can be bound outside of a city.

* new line
2024-01-07 15:01:54 -05:00
Chris Miles
473c5096f6
[Objects] Remove "No objects to load for zone" error message (#3807) 2023-12-27 21:03:08 -05:00
regneq
25872203ff
[NPC] Support for multiple emotes per type, emote variables (#3801)
* [forage rule feature] add a rule to disabled using common_food_ids from the list in forage.cpp.  currently set to enabled.

* NPC database emotes now supports basic variables. More than one variable can be used at a time.

* Format manifest

* Formatting

* Formatting

* Formatting

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-12-24 23:28:57 -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
nytmyr
940abfaf7a
[Logging] Change empty object loading to warning (#3759) 2023-12-11 17:06:29 -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
Chris Miles
b027edd21e
[API] Implement Zone Sidecar (#3635)
* Zone sidecar work

* Process management work

* Merge

* Sidecar work

* API config option

* Request proxy work

* Proxy headers and params

* Change port

* Remove code

* Sim work

* Sidecar work

* Update loot_simulator_controller.cpp

* Update loot_simulator_controller.cpp

* Formatting

* Post merge change

* Windows compile fix

* Update sidecar_api.cpp

* Update strings.cpp
2023-10-23 22:39:37 -05:00
Alex King
52d64781b5
[Feature] Add Expansion and Content Flag support to Blocked Spells (#3638)
* [Feature] Add Expansion and Content Flag support to Blocked Spells

# Notes
- Allows operators to filter blocked spells behind expansions or content flags.
- Requested in https://github.com/EQEmu/Server/issues/3582

* [Tradeskills] Add learned_by_item_id field (#3637)

* [Feature] Add Expansion and Content Flag support to Blocked Spells

- Allows operators to filter blocked spells behind expansions or content flags.
- Requested in https://github.com/EQEmu/Server/issues/3582

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2023-10-20 17:45:58 -05:00
Chris Miles
7122ac33b2
[Quest API] Reload content flags globally when a content flag is set (#3564) 2023-08-20 20:56:40 -05:00
Alex King
cd82bd8472
[Cleanup] Remove DumpMerchantList() from zone.cpp/zone.h (#3343)
# Notes
- This is unused.
2023-05-17 09:02:14 -04:00
Alex King
9d6a7ad743
[Cleanup] Remove SetGraveyard() from zone.cpp/zone.h (#3354)
# Notes
- This is unused.
2023-05-17 08:58:02 -04:00
Akkadius
434f270f68 Revert "[Bug Fix] ReloadQuests() on Zone::Init() to avoid cached global quests/plugins (#3333)"
This reverts commit 8c23eee42a452be0bc13c7e37a19480bfffd7652.
2023-05-07 23:33:43 -05:00
Alex King
8c23eee42a
[Bug Fix] ReloadQuests() on Zone::Init() to avoid cached global quests/plugins (#3333)
# Notes
- Before this, quests/plugins would be cached in an old state, so you'd have to either enter the zone and `#reload quest` or `#reload world` to get them to update.
2023-05-07 14:41:57 -04:00
Aeadoin
7f7ba2e6c2
[Cleanup] Remove unused Includes under zone files (#3162) 2023-04-01 22:55:28 -04:00
Alex King
407b003f7d
[Cleanup] Add client pointer validation to Zone::GetClosestZonePoint() (#3173)
# Notes
- We were not validating pointer here, could cause issues.
2023-04-01 14:22:52 -04:00
Alex King
b6d315d803
[Cleanup] Remove unnecessary validation check in Zone::ClearBlockedSpells() (#3172)
# Notes
- This is unnecessary, since `safe_delete_array` checks for validity.
2023-04-01 13:59:03 -04:00
Aeadoin
31ede355a8
[Cleanup] Cleanup excessive type casting: string -> char * -> string (#3169)
* [Cleanup] Cleanup excessive type casting: string -> char * -> string

* [Cleanup] Cleanup excessive type casting: string -> char * -> string
2023-04-01 12:45:16 -04:00
Aeadoin
0d509a7f3a
[Crash] Add Checks for valid pointers or fix existing. (#3164) 2023-04-01 12:44:00 -04:00
Alex King
e9c63c7d94
[Rules] Remove Guild Bank Zone ID Rule (#3156)
# notes
- This rule is useless as guild bank zone ID is hard-coded into the client.
2023-03-28 21:58:58 -04:00
Aeadoin
59ad91a140
[Feature] Add Data Bucket support for scaling of Heroic Stats. (#3058)
* [Feature] Add Data Bucket support for scaling of Heroic Stats.

* update

* fixes, still reworking logic

* fixes, still reworking logic

* logic done

* logic done

* fixes

* Cleanup

* Cleanup

* Cleanup naming, verify behaviors

* formatting

* formatting

* fix issue with endurance and mana.

* update rule desc

* cleanup

* DataBucket Struct

* Cleanup data_bucket.cpp and add constants

* cleanup

* changes

* formatting

* fix from merge

* escape keyword `key`

* Add `key` to generator, run repository-generator.pl

* fix for change to key

* cleanup

* formatting

* formatting

* typo
2023-03-23 21:42:13 -04:00
Alex King
c21d47f450
[Scaling] Add support for pipe-separated zone IDs and versions (#3015)
* [Scaling] Add support for pipe-separated zone IDs and versions

# Notes
- Allows `|` separated zone IDs and instance versions within the scaling data.
- Loads scaling data on zone bootup as well, without needing to repop for it to initialize.

* Cleanup
2023-03-04 17:24:16 -06: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
85f7b10f90
[Cleanup] Remove Unused Mod Hooks (#2856)
- Removes old `mod_` hooks that have gone unused for years in favor of Lua mods.
2023-02-13 00:24:23 -06:00
Natedog2012
2e575652f6
[Bug fix]#reload static should now properly fill the entity_lists for… (#2815)
* [Bug fix]#reload static should now properly fill the entity_lists for objects / doors / groundspawns
The individual #reload commands WILL still have issues when trying to use #list afterwards!

* Point ReloadDoors, ReloadGroundSpawns, ReloadObjects all to reload static to avoid entity_list data missing
2023-01-31 16:32:25 -06:00
Alex King
0fef46a6c1
[Feature] Add Min/Max Status to Merchants (#2806)
# Notes
- Allows operators to set a minimum and maximum status that an item will show for players.
- Allows operators to have items on a merchant that only a GM can see.
- Some servers may use status for different things, so having a minimum and a maximum will allow for more functionality.
- Default of `min_status` is `0` (Player) and default of `max_status` is `255` (Max).
2023-01-29 15:03:41 -05:00
Alex King
0a11eaa092
[Bug Fix] Fix #findaa and GetAAName(). (#2774)
# Notes
- These were not properly checking every possible AA ID.
2023-01-22 12:56:49 -05:00
Chris Miles
d3e756287e
[Logging] Remove function prefixes (#2766) 2023-01-19 22:24:50 -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
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
af4ee9f8d8
[Rules] Add LDoN Loot Count Modifier Rule (#2694)
# Notes
- Adds a rule for LDoN Adventure Loot.
2023-01-03 14:32:13 -05: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
Aeadoin
7e7358e9b6
[Bots] Add Data Bucket support to Bot Spell Entries. (#2505)
* [Bots] Add Data Bucket support to Bot Spell Entries.

* Cleanup Formatting and Functions

* Consolidated "CheckDataBucket" Functions

* Remove unneeded CastToClient

* Add choice to format data buckets as either "character-id" or "bot-id" to Bot spells

* Fix Formatting

* Clean up.

* Update npc.h

* Fix Bot Casting issues

* Formatting

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
Co-authored-by: Kinglykrab <89047260+Kinglykrab@users.noreply.github.com>
2022-11-06 17:06:01 -05:00
Kinglykrab
f6dbdf5db8
[Quest API] Add EVENT_AA_BUY and EVENT_AA_GAIN to Perl/Lua. (#2504)
# Perl
- Add EVENT_AA_BUY to Perl.
  - Exports `$aa_cost`, `$aa_id`, `$aa_previous_id`, and `$aa_next_id`
- Add EVENT_AA_GAIN to Perl.
  - Exports `$aa_gained`
- Add quest::getaaname(aa_id) to Perl.

# Lua
- Add event_aa_buy to Lua.
  - Exports `e.aa_cost`, `e.aa_id`, `e.aa_previous_id`, and `e.aa_next_id`
- Add event_aa_gain to Lua.
  - Exports `e.aa_gained`
- Add eq.get_aa_name(aa_id) to Lua.
2022-11-05 11:09:47 -04:00
Aeadoin
bf43bda1e2
[Bots] Cleanup Bot Spell Functions, reduce reliance on NPC Functions/Attributes (#2495)
* [Bots] Initial Cleanup of Functions, moved Bot Casting out of mob_ai.cpp

* Moved Bots off NPC AI_Spells Struct, and AI_Spells private attribute.

* Formatting Fixes, fixed LogAI entries, Added LogAIModerate Alias

* Add Constants.

* Added Bot DB Struct, fixed some potential casting issues

* Formatting

* Formatting
2022-10-29 16:38:15 -04:00