46 Commits

Author SHA1 Message Date
Alex King
ff440e16b6
[Cleanup] Use .clear() and .empty() instead of comparing to empty string or setting to empty string in CheckDatabaseConvertPPBlob() (#3201)
# Notes
- Use these methods to increase performance.
2023-04-05 11:27:12 -04:00
Aeadoin
eb51550109
[Cleanup] Cleanup Strings::ToInt uses. (#3142)
* [Cleanup] Cleanup Strings::ToInt uses.

* fix for conversion

* remove != 0

* cleanup
2023-03-25 20:32:30 -04: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
Chris Miles
2b224d42ad
[Rules] Fix rule updates that affected bot booting checks (#2841) 2023-02-06 17:31:50 -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
f8e7576ae7
[File Paths] Implement Path Manager (#2440)
* Push up branch for testing

* Path manager

* Tweaks

* Changes

* More path work

* Update paths for eqemu_server.pl

* More path work

* Import and export client files

* Path remove

* More path work

* Update eqemu_config.h

* Fix tests

* Tests disable temp

* Update eqemu_config.h

* Update .drone.yml

* Hook tests back up

* Update main.cpp

* Platform tests

* Fix include

* Use std::filesystem on windows

* Fix IPCMutex name on windows

* std::filesystem changes

* Update path_manager.cpp

* Explicit string cast

* Explicit string cast

* Update path_manager.cpp

* Windows fixes

* Mapped files

* Relative fixes

* Use relative paths off of cwd

* Update Debian image to Debian 11 (updates GCC)

Co-authored-by: hg <4683435+hgtw@users.noreply.github.com>
2022-09-28 04:08:59 -05: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
KimLS
fa418172d6 What is this random semicoloned if, removed to silence warning 2022-02-12 22:04:30 -08:00
mmcgarvey
feed584a41
[Database] Escape reserved mysql keyword rank w/ backticks (#1862)
Fixes #1567
2021-12-14 13:57:35 -05:00
Alex
00fb9bc9f9
[Bug Fix] Zone Heading for Binds, Summons, Teleports, and Zoning. (#1328)
* For as long as I can remember people have had issues with zoning in, facing the wrong way, and walking through a zone line.

With this we will be able to set zone's safe heading as well as preserve heading on summon (NPC or GM) and teleports between zones.

This affects several pre-existing quest methods and extends their parameters to allow for the addition of heading.

The following functions have had heading added.
Lua
- client:SetBindPoint()
- client:SetStartZone()

Perl
- $client->SetBindPoint()
- $client->SetStartZone()
- quest::rebind()

SetStartZone parameter list was fixed also.

This converts some pre-existing methods from glm::vec3() to glm::vec4() and has an overload where necessary to use a glm::vec3() method versus glm::vec4() method.

This shouldn't affect any pre-existing servers and will allow PEQ and others to document safe headings for zones properly.

* Removed possible memory leaks.

* Fix SQL.

* Fix client message.

* Fix debug log.

* Fix log message.

* Fix call in rebind overload.

* Fix floats.

* Add default to column.
2021-04-22 22:49:44 -05:00
KimLS
2fbd5aaccc Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore) 2020-05-17 18:36:06 -07:00
Akkadius
57354579aa Unify chat constants usage 2019-08-11 00:00:55 -05:00
Uleat
585c6322bf Added 'spells' entry to EQDictionary 2019-01-20 08:24:21 -05:00
Uleat
c435a77813 Reintegration of inventory-based EQDictionary references 2018-07-05 21:05:26 -04:00
Akkadius
ec6b74aa7f Config XML to JSON conversion routines 2017-07-23 02:03:52 -05:00
Uleat
bfd07b1010 Added class EQEmu::InventorySlot 2016-10-16 21:36:39 -04:00
Akkadius
3f8ff1373c Fix script call issue [skip ci] 2016-08-26 15:02:12 -05:00
Akkadius
d5864aea3e Few more adjustments [skip ci] 2016-08-25 16:36:48 -05:00
Akkadius
2b2d6e1ef5 Less fail [skip ci] 2016-08-25 16:33:50 -05:00
Akkadius
f99523dc48 Migration to new EQEmu Server management script interface 2016-08-25 16:32:21 -05:00
Uleat
ea8f81feec Converted enumeration MaterialSlots to EQEmu::textures::TextureSlot 2016-05-31 22:07:02 -04:00
Uleat
1890d006a2 Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition 2016-04-22 07:34:55 -04:00
Uleat
8edb6e9595 Eliminated the nested class design of recent EQEmu work; Some more inv2 convergence work 2016-04-19 04:02:53 -04:00
Uleat
e75a53b775 Rework of eq_dictionary 2016-04-07 17:21:55 -04:00
Akkadius
2bf6c2788e eqemu_update.pl - Implement 14) [Remove Duplicate Rule Values] :: Looks for redundant rule_values entries and removes them 2015-12-29 05:40:34 -06:00
Uleat
6802f2a9e8 Conversion of 2015_09_30_bots.sql fail points to perl script; Added drop bots feature to eqemu_update.pl menu 2015-12-11 22:39:18 -05:00
Akkadius
549cabe7e8 Added Options 11) and 12) to eqemu_update.pl, updated to version 12
11) [Windows Server Build] :: Download Latest and Stable Server Build (Overwrites existing .exe's, includes .dll's)
12) [Windows Server .dll's] :: Download Pre-Requisite Server .dll's
2015-12-01 15:25:26 -06:00
Uleat
531cbf79f5 Merge branch 'master' of https://github.com/EQEmu/Server into bots_updater 2015-10-09 21:39:05 -04:00
Uleat
ecd695ff9b Script and server code query updates for bots_updater 2015-10-09 21:34:31 -04:00
Akkadius
658b6ba570 Adjustments to eqemu_update.pl menu (V11) 2015-10-03 20:23:39 -05:00
Akkadius
bcf2a5c852 eqemu_update.pl minor adjustment, v10 [skip ci] 2015-10-03 16:03:53 -05:00
Akkadius
625df2ad9b Forgot one part [skip ci] 2015-10-02 20:31:24 -05:00
Akkadius
13ba997589 Update eqemu_update.pl (v8) to use new AA data post AA rework for fresh AA table downloads [skip ci] 2015-09-20 15:21:38 -05:00
Akkadius
2bcb964326 [eqemu_update.pl V7] Add Option 9) LUA Modules - Download latest LUA Modules (Required for Lua) [skip ci] 2015-03-12 00:33:52 -05:00
Akkadius
b3a0370e71 [eqemu_update.pl] Linux compatibility adjustments [skip ci] 2015-03-12 00:08:10 -05:00
Akkadius
bcf8b1af8e [eqemu_update.pl] Add Option 7) Plugins - Download latest Perl plugins
[eqemu_update.pl] Add Option 8) Quests - Download latest PEQ quests and stage updates
[eqemu_update.pl] Set version 5 of script
[skip ci]
2015-03-11 21:01:43 -05:00
Akkadius
b36d9fe115 Update world binary with eqemu_update.pl script version [skip ci] 2015-03-10 22:44:30 -05:00
Uleat
5a3b10a11c Constant name re-alignments prior to extended bandolier/potion belt activation 2015-02-17 13:58:23 -05:00
Uleat
f1a25da065 Pre-purposed clean-up 2015-02-17 13:58:19 -05:00
Akkadius
a5b77981b7 Rename db_update.pl to eqemu_update.pl so that the script is more of a generic upgrade script for future add-ons as well as implementing versioning without waiting for everyone to download the copy of the script that successfully self-updates. [skip ci] 2015-01-25 21:23:50 -06:00
Akkadius
9d9df6931e Re-Implement file check for db_update.pl in Database::CheckDatabaseConversions() so when the file exists it isn't re-downloaded
Increment db_update.pl current version to version 2
Update Database::CheckDatabaseConversions() to check for version 2 of db_update.pl
2015-01-25 20:48:30 -06:00
Akkadius
4f19fe9f91 Travis compile fix for real? 2015-01-25 02:27:30 -06:00
Akkadius
5e107a9936 Help Travis figure out what time of day it is 2015-01-25 02:23:05 -06:00
Akkadius
60e17bbeaa Misc formatting changes 2015-01-24 23:49:29 -06:00
Akkadius
06b8ce6017 Cleanup database.h header and add database_conversions.cpp file 2015-01-24 23:43:00 -06:00