Commit Graph

183 Commits

Author SHA1 Message Date
David Markowitz
aaf446fe6e
feat: Add Inventory Brick and Model groups (#1587)
* Added feature grouping logic

* Add saving of brick buckets

* Add edge case check for max group count

* Use vector for storing groups

* Update InventoryComponent.cpp

* Update InventoryComponent.h

* Update InventoryComponent.h

* fix string log format

* Update GameMessages.cpp
2024-08-01 23:38:21 -07:00
Gie "Max" Vanommeslaeghe
bcf1058759
Merge pull request #1595 from DarkflameUniverse/issue-462
fix: prevent moving items between inventories under cetain circumsances
2024-06-11 20:48:09 +02:00
Wincent Holm
1454fcd003
Fix g++ 14 (#1610)
* Fix g++ 14

* Update thirdparty/CMakeLists.txt

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>

---------

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
2024-06-06 04:00:44 -05:00
David Markowitz
01086d05c8
fix: use after free and uninitialized memory (#1603)
* fix use after free and uninitialized memory

* add if check for packet lengths

* move purge down further

Its used in the if check too...
2024-05-30 23:53:03 -05:00
Aaron Kimbre
86f335d64b fix type 2024-05-24 21:43:54 -05:00
Aaron Kimbre
8ca05241f2 fix: prevent moving items between inventories under cetain circumsances 2024-05-24 21:35:14 -05:00
David Markowitz
f0960d48b2
Add more modular saving of config data for items (#1591)
* stubbing for saving item extra data

* add declaration to header

* modularize loading for all possible extra data

* move logic to Item

* remove extra map
2024-05-22 17:06:52 -07:00
jadebenn
fafe2aefad
chore: Nitpicking-utils (#1549)
* nit

* GeneralUtils const-correctness and minor fixes

* use copy instead of reference for char iteration loops

* fix typo and reorganize some functions
2024-04-14 23:14:54 -07:00
David Markowitz
b8b2b687e2
inherit exception for CppSQLite3Exception (#1544)
catch any exception just in case exception isnt inherited from
2024-04-10 07:32:54 -05:00
David Markowitz
1ee45639af
Update GeneralUtils.h (#1541) 2024-04-09 00:20:25 -05:00
David Markowitz
3260a063cb
ignore whitespace in try parse (#1536) 2024-04-08 15:13:19 -05:00
Aaron Kimbrell
feeac2e041
feat: refactor slash commands system into more scalable system (#1510)
* WIP, but working

* Scaffolding

* testing and making it compile again

* move all commands to functions

* renaming to compile

* fix failing tests

idk how these werent failing before.  Seems to have been magic.

* move commandss into their namespace
make help command useful
fix mac error

TODO: remove the multiple not founds/ rework the structure to split into help and handling

* Just need to fill out the fields, but it's all there templated

* Add all aliases, register missing commands

* All help text

* remove test logs

* improvements

pass through added code for optimizations and cleanup as well as reduce the amount of scoping for readability and maintainability

* Update SlashCommandHandler.cpp

* only save command if it is a GM command

* simplify if checks

* remove broken delimiter

* Update SlashCommandHandler.cpp

* Update SlashCommandHandler.cpp

---------

Co-authored-by: David Markowitz <EmosewaMC@gmail.com>
2024-04-08 15:11:59 -05:00
David Markowitz
b340d7c8f9
replace white and blacklist (#1530) 2024-04-05 00:51:40 -05:00
David Markowitz
24de0e5fdb
Update GeneralUtils.cpp (#1528)
same check as the header
2024-04-03 19:06:29 -05:00
Aaron Kimbrell
20408d8dfe
chore: remove chat_internal and processes everything over chat connection (#1508)
* WIP

* get rid of redundent case and some formatting issues

* move some things around for cleaner diffs

* remove dead code that does nothing and add connection check

* fix whitespace

* address feedback
2024-03-31 22:27:50 -05:00
David Markowitz
c1c5db6593
update4 fp check (#1524) 2024-03-31 21:46:51 -05:00
David Markowitz
4bc4624bc9
feat: add further MovementAI skeleton (#1499)
* add movement ai skeleton

Zone loading code is tested to load and read the correct values using logs.  other ldf data is unaffected as I walked around crux and dragons/apes can still spawn and be killed.

* format
2024-03-08 19:29:01 -06:00
jadebenn
6e3b5acede
chore: Less verbose name for enum underlying type casts (#1494)
* Less verbose name for enum underlying type casts

* Remove redundant call
2024-03-06 23:45:04 -06:00
Daniel Seiler
554a9a6806
fix: Dissolve more CMake dependencies (#1387)
* fix: more include changes

* fix: remove dZoneManager from global include

* fix: dDatabase

* fix: dCommon

* fix: object libs

* fix: rebase

* fix: bcrypt

* wip: try simplified connector build

* fix: update dockerfile

* fix: mariadb C/C++ on apple

* feat: Move scripts to CMAKE_MODULE_PATH

* fix: dPropertyBehaviors

* fix: macos?

* fix: Dockerfile

* fix: macos?

* fix: macos?

* fix: macos?

* fix: macos?

* fix: macos?

* try: install_name_tool

* fix not building on unix

* fix include paths

* Remove code changes

Will fix in another PR.

* format pass

remove 2 more included directories.
remove commented out code
add status to messages

* comments and format

surround include directories with quotes
remove commented out code
remove debug messages

* Update CMakeLists.txt

---------

Co-authored-by: David Markowitz <EmosewaMC@gmail.com>
Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
2024-03-05 20:13:24 -06:00
David Markowitz
ef3fdba621
fix: FrameStats serialization (#1481)
* fix serialization

Was incorrect before.  The only flags are if any data in the FrameStats has changed, you write them again.  Velocities also do not use dirty flags for their values, they use a flag to determine if their velocity if zero or non-zero.  if any velocity changes, re-write FrameStats.

Tested that 2 players can see each other move as before, enemies move as before and players racing is identical as before.

* Update HavokVehiclePhysicsComponent.cpp
2024-02-27 23:40:26 -06:00
jadebenn
424d54b98c
squash commits (#1479) 2024-02-27 01:29:51 -06:00
jadebenn
75544e3eec
chore: Change dServer and related code to use BitStream references (#1476) 2024-02-26 23:43:33 -06:00
jadebenn
27d20dd8fa
Convert AMFSerialize to use bitstream references (#1466) 2024-02-26 23:11:56 -06:00
jadebenn
7235423c7b
Convert game message bit stream raw pointers to references (#1465) 2024-02-26 08:17:22 -06:00
jadebenn
94a467b361
chore: Change LDFFormat to use BitStream references (#1467) 2024-02-26 08:15:29 -06:00
Aaron Kimbrell
e729c7f846
feat: achievement vendor and vendor feedback (#1461)
* Groundwork

* movie buying logic out of gm handler
make transaction result more useful

* Full implementation
Cleanup and fix some calls in gamemessages

* Load the component in the entity
Patch Auth

* new line at eof

* cache lookups

* remove sort

* fix includes
2024-02-25 01:47:05 -06:00
jadebenn
721ea78bb4
Update Amf3.h member naming scheme (#1463) 2024-02-24 23:03:59 -06:00
jadebenn
5ae8fd8e0e
chore: Remove anonymous namespace from GeneralUtils.h (#1460)
* remove anonymous namespace from GeneralUtils.h

* Put helper functions in nested details namespace to hide from hinting

* rename implementation functions to use lower case, leading underscore and move definitions to source file
2024-02-24 04:30:02 -06:00
jadebenn
b6af92ef81
refactor: Rewrite BehaviorMessage classes to use member initialization, preferred member naming conventions, and const-ref getters (#1456)
* Split out BehaviorMessage class changes from PR #1452

* remove <string_view> inclusion in ActionContext.h

* add the arguments nullptr check back in

* remove redundant std::string constructor calls

* Update AddStripMessage.cpp - change push_back to emplace_back
2024-02-18 00:38:26 -06:00
jadebenn
29666a1ff7
chore: General cleanup roundup (#1444)
* Moved unrelated changes out of the TryParse PR branch

* const correctness and cstdint type usage

* removing a few "== nullptr"

* amf constexpr, const-correctness, and attrib tagging

* update to account for feedback

* Fixing accidentally included header and hopefully fixing the MacOS issue too

* try reordering the amf3 specializations to fix the MacOS issue again

* Amf3 template class member func instantiation fix

* try including only on macos

* Using if constexpr rather than specialization

* Trying a different solution for the instantiation problem

* Remove #include "dPlatforms.h"
2024-02-10 13:44:40 -06:00
jadebenn
0c1ee0513d
refactor: Change TryParse implementation (#1442)
* Changed how the TryParse function works (and also did some general cleanup along the way)

* Update noexcept attributes (verified these are correct)

* Add fp overload for MacOS functionality

* resolving some feedback

* Split out unrelated changes to CleanupRoundup branch

* Update in response to feedback

* the consequences of emo's member variable renaming request

* Revert "the consequences of emo's member variable renaming request"

This reverts commit bf318caeda.

* Fully revert renaming attempt

* Revert "the consequences of emo's member variable renaming request"

This reverts commit bf318caeda.

Fully revert renaming attempt

* Created ClientVersion.h and moved the client version defaults to it

* Fix partial parsing and MacOS floating point errors

* attempting fix to MacOS compiler error

* syntax pass (should be the last commit unless the CI fails)

* ah, wait, forgot to uncomment the preprocessor statements for MacOS. THIS should be the last commit pending CI

* Okay, one last thing I noticed: We were including C headers here. Now they're C++ headers. Pinky swear this is it!

* typo and I am OCD. please let this be the last

* hash is usally but not always noexcept, so the specifier should go

* Address MOST of the feedback

* address the claim codes issue
2024-02-10 05:05:25 -06:00
David Markowitz
62b670d283
remove sha512, move md5 to thirdparty (#1443)
title.

Tested that Auth runs and I can login still.
2024-02-09 09:15:28 -06:00
jadebenn
d78b50874c
chore: upgrade MacOS build settings for better C++20 compatibility (#1435)
* upgrade MacOS build settings for better C++20 compatibility

* add fixes I forgot

* 3rd try

* Update UserManager.cpp

* Update CMakeLists.txt

* End with newline

* Update CMakeLists.txt

* update to reflect feedback

* Update CMakeLists.txt to disable deprecation warnings on SHA512

* attempt to disable sqlite warnings

* revert last attempt (didn't work)

* disable sqlite deprecation warnings on MacOS
2024-01-29 21:45:50 -06:00
jadebenn
a0d51e21ca
refactor: allow usage of NiPoint3 and NiQuaternion in constexpr context (#1414)
* allow usage of NiPoint3 and NiQuaternion in constexpr context

* removed .cpp files entirely

* moving circular dependency circumvention stuff to an .inl file

* real world usage!!!!!

* reverting weird branch cross-pollination

* removing more weird branch cross-pollination

* remove comment

* added inverse header guard to inl file

* Update NiPoint3.inl

* trying different constructor syntax

* reorganize into .inl files for readability

* uncomment include

* moved non-constexpr definitions to cpp file

* moved static definitions back to inl files

* testing fix

* moved constants into seperate namespace

* Undo change in build-and-test.yml

* nodiscard
2024-01-29 01:53:12 -06:00
jadebenn
a1ac692b49
use reference syntax (#1430) 2024-01-20 17:22:56 -06:00
David Markowitz
ea5360cb99
fix: turn warnings into errors (#1425)
* Update PlayerContainer.cpp

fix: turn warnings into errors

for the few warnings we get, at least make sure we listen to them now on unix platforms.  Windows has too many right now to enable /WX

resolve warning

actually fix it

Update CMakeLists.txt

* detour pls

* Update CMakeLists.txt

* I HAVE 20 DOLLARS AND I NEED A WII GAME FOR MY KID

* I HAVE 0 DOLLARS NOW

* don't look don't look

* Revert "don't look don't look"

This reverts commit 5603eb5980.

* Revert "Revert "don't look don't look""

This reverts commit a334832a4d.

* could it be

* we found one (but its already reported)

not resolved yet though.

* Revert "don't look don't look"

This reverts commit 5603eb5980.

* ignore warning for file

* another one

* Update .gitmodules

* comments
2024-01-19 10:18:36 -06:00
David Markowitz
66cc582a9a
chore: update noninformative comments to be informative (#1407)
* better comments

* more comments
2024-01-10 20:57:41 -08:00
jadebenn
4a50c60559
chore: Assorted pet improvements (#1402)
* Assorted pet improvements

* remove unecessary include

* updates to address some feedback

* fixed database code for testing

* Removed reference member (for now)

* Removed cmake flag
2024-01-08 15:32:09 -08:00
David Markowitz
b683413a60
Remove deps from dNet (#1401) 2024-01-07 08:05:57 +01:00
David Markowitz
0dc6763a3c
chore: Remove pointer management in PlayerContainer (#1397)
* const

use cbegin, remove null checks

they are references now, they cant be null themselves

Change to reference instead of ptr

Remove getter

const

* allow duplicate request

without the reply you apparently need to re-log for some reason.

Update PlayerContainer.cpp
2024-01-05 22:42:30 -06:00
David Markowitz
2804dc3ec2
fix: make include paths consistent (#1390)
* fix: bad header includes

tests pass

* fix-up more include paths
2024-01-05 06:33:52 -06:00
David Markowitz
a84ca1f00d
crash and log fix (#1382) 2024-01-03 06:52:11 +00:00
Daniel Seiler
85672e060a
fix: signal handling (#1375)
* fix: signal handling

* fix: flush WorldServer logger before main loop

* fix: consolidate signal code
2024-01-01 21:50:00 -06:00
David Markowitz
e54faa3820
chore: organize build flags (#1371)
* chore: organize build flags

* Remove ambiguous include path

Don't be default incluyde bcrypt so you need to specify the folder.  Allows pre-processor to find the correct file.

* Revert settings

* working

f
2023-12-31 00:26:49 -06:00
Daniel Seiler
42a71bbeab
feat: add DLU_CONFIG_DIR env var (#1370)
* feat: add DLU_CONFIG_DIR env var

* fix: PascalCase
2023-12-30 07:07:49 -06:00
Daniel Seiler
98d2f25af2
feat: get & print std::current_exception (#1366) 2023-12-30 08:04:26 +01:00
Daniel Seiler
dd9d94f75f
feat: allow env var override for game config (#1367) 2023-12-30 08:04:09 +01:00
Aaron Kimbrell
15954413ae
chore: rename rebuild to quickbuild (#1364)
* rename rebuild to quickbuild

* fix includes
2023-12-28 22:24:30 -06:00
jadebenn
ef6f2f133e
chore: Eradicate C-style casts and further clean up some code (#1361)
* cast and code cleanup

* cast cleanup

* bug fixes and improvements

* no getBoolField method exists

* fixes

* unbroke sg cannon scoring

* removing comments

* Remove the c-style cast warning I added from CMakeLists now that they're gone (it triggers on 3rd party dependencies and slows down compilation)

* (Hopefully) fix MacOS compilation error

* partially-implemented feedback

* more updates to account for feedback

* change bool default

---------

Co-authored-by: jadebenn <jonahebenn@yahoo.com>
2023-12-27 22:18:20 -06:00
David Markowitz
ffa2f9986c
AssetManager: fix deleting no file (#1358) 2023-12-25 08:48:57 -06:00