Commit Graph

31 Commits

Author SHA1 Message Date
David Markowitz
f0b6ad89d9
chore: Player class removal (#1445)
* SystemAddress and destructor

* move respawn logic to character comp

Tested that respawn pos and rot can be set as per previously by crossing a respawn point and smashing to see if I would respawn at the new place.

* Move loot cheat checking

* Remove GetParentUser overload

Tested completing missions
control behaviors
collecting life crate
completing a bunch of missions using macros
loading into worlds
brick-by-brick
placing models
digging the x spot in gnarled forest
can still ban and mute players
cheat detection is still doing its thing
flags are still set (checked with flag 45)
claim codes still work (created new char, checked the lego club mail was there)

* Move player constructor logic

Its now at the bottom of Entity constructor.  Time to remove Player

* Remove Player class

Removes the Player class.  Tested that I can still login and see another player in Venture Explorer and logging out a few times still works as well as smashing enemies

* store ptr

* Update SlashCommandHandler.cpp
2024-02-04 06:29:05 -08:00
David Markowitz
c83ec8228c
chore: Move Player ghosting functionality to GhostComponent (#1413)
* Moving and organizing Player code

- Move code to CharacterComponent
- Remove extraneous interfaces
- Simplify some code greatly
- Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.)
- Update code to use CharacterComponent for sending to zone instead of Player*.

* Moving and organizing Player code

- Move code to CharacterComponent
- Remove extraneous interfaces
- Simplify some code greatly
- Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.)
- Update code to use CharacterComponent for sending to zone instead of Player*.
- Remove static storage container (static containers can be destroyed before exit/terminate handler executes)

* remove player cast

* Remove extra includes

* Add a player manager

Used for the static Player functions.  Further removes stuff from the Player class/file.

* chore: Move ghosting functionality to component

Tested that ghosting still works and players are still firing off the OnPlayerLeave and relevant handlers.

* move to unordered_set
2024-01-14 13:10:13 -06:00
David Markowitz
a62f6d63c6
chore: Move static Player functions and internal linkage to manager class (#1412)
* Moving and organizing Player code

- Move code to CharacterComponent
- Remove extraneous interfaces
- Simplify some code greatly
- Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.)
- Update code to use CharacterComponent for sending to zone instead of Player*.

* Moving and organizing Player code

- Move code to CharacterComponent
- Remove extraneous interfaces
- Simplify some code greatly
- Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.)
- Update code to use CharacterComponent for sending to zone instead of Player*.
- Remove static storage container (static containers can be destroyed before exit/terminate handler executes)

* remove player cast

* Remove extra includes

* Add a player manager

Used for the static Player functions.  Further removes stuff from the Player class/file.
2024-01-13 03:40:56 -06:00
Aaron Kimbrell
dbe4a0ced3
chore: continue work on removing raw packet reading (#1404)
* chore: continue work on removing raw packet reading
tested that logging in, deleted a char, renaming a char, and transfeering to a zone all work still

* Address Feedback
2024-01-07 02:02:27 -06:00
David Markowitz
870b56fe02
chore: cleanup objectIdManager overloading and classes (#1391)
* objectIdManager fixes

* Remove debug log
2024-01-05 06:31:22 -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
c1e8546d48
fix: add Nexus Tower missing scripts (#1349)
add final missing scripts for nt

also fix the turnin for the breadcrumb missions not showing the completion window.

Fix another missing script

Add another script

fix include guards

Fix dirt clouds not appearing on mission accept
2023-12-22 23:53:21 -08:00
David Markowitz
5ea06f9bda
EntityManager: Fix iterator invalidation (#1234)
Tested that servers still start up, and that zones like bons no longer hard crash when all players have left the world.
2023-10-23 08:55:38 -05:00
David Markowitz
5942182486
feat: Abstract Logger and simplify code (#1207)
* Logger: Rename logger to Logger from dLogger

* Logger: Add compile time filename

Fix include issues
Add writers
Add macros
Add macro to force compilation

* Logger: Replace calls with macros

Allows for filename and line number to be logged

* Logger: Add comments

and remove extra define

Logger: Replace with unique_ptr

also flush console at exit. regular file writer should be flushed on file close.

Logger: Remove constexpr on variable

* Logger: Simplify code

* Update Logger.cpp
2023-10-21 16:31:55 -07:00
Aaron Kimbrell
d8ac148cee
refactor: re-write AOE, add FilterTargets, Update TacArc Reading (#1035)
* Re-write AOE behavior for new filter targets
Update Tacarc to use new filter targets
Added dev commands for skill and attack debugging

* Get all entities by detroyable
rather than controllable physics
Since destroyables are what can be hit

* Re-work filter targets to be 100% live accurate
reduce memory usage by only using one vector and removing invalid entries
get entities in the proximity rather than all entities with des comps in the instance, as was done in live

* remove debuging longs and remove oopsie

* address feedback

* make log more useful

* make filter more flat

* Add some more checks to filter targets
add pvp checks to isenemy

* fix typing

* Add filter target to TacArc and update filter target

* fix double declaration

* Some debugging logs

* Update TacArc reading

* make log clearer

* logs

* Update TacArcBehavior.cpp

* banana

* fix max targets

* remove extreanous parenthesesuuesdsds

* make behavior slot use a real type

---------

Co-authored-by: David Markowitz <EmosewaMC@gmail.com>
2023-10-09 15:18:51 -05:00
David Markowitz
2cc13c6499
chore: Make serialize actually virtual (#1156)
* Make serialize actually virtual

* fix serialize and make update virutal

* Update VendorComponent.h

* Remove flag var

* Update SoundTriggerComponent.h

---------

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
2023-08-10 14:33:15 -07:00
David Markowitz
3e3148e910
Move dZoneManager to game namespace (#1143)
* convert zone manager to game namespace

* Destroy logger last
2023-07-17 17:55:33 -05:00
David Markowitz
455f9470a5
Move EntityManager to Game namespace (#1140)
* Move EntityManager to Game namespace

* move initialization to later

Need to wait for dZoneManager to be initialized.

* Fix bugs

- Cannot delete from a RandomAccessIterator while in a range based for loop.

Touchup zone manager initialize

replace magic numbers with better named constants
replace magic zonecontrol id with a more readable hex alternative
condense stack variables
move initializers closer to their use
initialize entity manager with zone control

change initialize timings

If zone is not zero we expect to initialize the entity manager during zone manager initialization

Add constexpr for zone control LOT

* Add proper error handling

* revert vanity changes

* Update WorldServer.cpp

* Update dZoneManager.cpp
2023-07-15 13:56:33 -07:00
David Markowitz
df3265c82e Add more null checks and split out code
Makes crash logs more apparent for what stage they crashed in for the engine updating.
2023-05-05 23:31:30 -07:00
Aaron Kimbrell
6aa90ad5b2
Breakout rest of the enums from dCommonVars and clean it up (#1061)
* Breakout rest of the enums from dcommonvars
so we don't have to deal with merge conflicts
ePlayerFlags is not a scoped enum, yet, due to it's complexity

* address feedback

* make player flag types consistent

* fix typo
2023-05-02 17:39:21 -05:00
Aaron Kimbrell
4976701f37
breakout object bits into scoped enum (#997)
* breakout object bits into enum class
tested that things still work as expected
use the inplace set bits where appropiate

* add inline
2023-04-25 13:17:40 -05:00
Aaron Kimbrell
c415d0520a
Implement some more trigger event calls and command handlers (#989)
* Implement some trigger event calls
and command handlers

* add zone summary dimissed GM

* break and remove log

* some cleanup in Gather Targets
and blocking out

* fix default value of unlock for play cinematic

* Log on errors
add enum for physics effect type
simplify nipoint3 logic
check arg count
add enum for End behavior

* tryparse for nipoint3

* totally didn't forget to include it

* bleh c++ is blah

* ???

* address feedback

* Fix for #1028
2023-03-25 05:26:39 -05:00
Aaron Kimbrell
72ca0f13ff
breakout gmlevel into a scoped enum (#996)
* breakout gmlevel enum and make it a class
tested that things still work
slash command,
chat restrictions,
packets and serializations

* fix GM level for some slash commands

* fix new use of this enum
2023-03-24 18:16:45 -05:00
Aaron Kimbrell
e524b86e12
breakout the component types into a scoped enum (#1002)
* breakout the component types into a scoped enum

tested that things are the same as they were before

* fix missed rename

* fix brick-by-brick name to be crafting
because that's what it is
2023-03-04 01:16:37 -06:00
Aaron Kimbrell
91c0c1fcfb
Split out LUTriggers into it's own component (#986)
* Split out LUTriggers into it's own component

* some cleanup

* fix debug log

* use emplace and tryParse

* slight refactor to make the work on startup
rather than at runtime
Also TODO's for getting targets via all the possible methods

* address feedback
2023-02-10 02:29:53 -06:00
Aaron Kimbrell
6fd80e3117
Don't enable HC on minigame worlds (#959)
* Fix max's ouchi

* use smarter logic

* fix whitespace

* clone
2023-01-20 01:50:46 -06:00
Aaron Kimbrell
872270704c
Hardmode cleanups (#954)
* load values once
so that it doesn't check every time
don't return, just skip
don't realod char

* address feedback

* don't drop the only item you can't get again

* address most feedback

* move settings for HC mode

* fix comment

* claenup whitespace
2023-01-12 13:16:24 -06:00
David Markowitz
fc75d6048f
dGame Precompiled header improvements (#876)
* moving branch

* Add deleteinven slash command

* Change name of BRICKS_IN_BBB

* Use string_view instead of strcmp

* Clean up include tree

* Remove unneeded headers from PCH files

Removes unneeded headers from pre-compiled headers.  This increases compile time, however reduces development time for most files.

* Update Entity.h

* Update EntityManager.h

* Update GameMessages.cpp

* There it compiles now

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
2023-01-06 23:17:05 -06:00
aronwk-aaron
19e77a38d8 format codebase 2022-07-28 08:39:57 -05:00
Aaron Kimbrell
5523b6aafc
Refactor UpdateEntities to not lose items if we add them while processing (#664)
* if we are deleting entities, and we add an entity
to delete, dont throw it out

* made it all uniform

* change update back to how it was
since it's an unordere map and
wouldn't be guaranteed to update even in this secnario
2022-07-21 21:09:25 -05:00
David Markowitz
24dbd3944d
Friends List Overhaul (#630) v103
* Add friends list migration

* Change friends to use charID

Update friends table to use charID and not LWOOBJID variant.

* Fix remove friend

Fix remove friend and make the query more readable at a glance.

* Add and remove friends in the container

Properly add and remove friends in the player container

* add enums

* Add best friends and basic GM support V1

* Add more features

* not online / doesnt exist implementation

Implements the not online and invalid character response codes

* Address players not being removed

Fix an issue where players would not be marked as offline in the friends list due to the message not being sent in all circumstances.

Tested changes on 3 clients, switching characters, logging out from character select, switching characters, world transfer and my friends list looked as it was supposed to.

* Implement proper friends system

Remove debug logs

Track count of best friends

Add best friends list cap of 5

Add config option and best friend update

Add a config option and implement the last missing best friend serialization

Added comments and fixed remove best friend bug

Added some comments and addressed an issue where removing best friends would not remove them from your internal count of friends.

properties and logs fixes

whoops, had an issue

send reply if already BFFs

Send the correct objectID

I really need to rename these

Fix white space

goon

* Replace queries with unique ptrs

* remove user from player container on deletion

Remove the user from the player container when they delete their character.
2022-07-12 20:36:06 -07:00
EmosewaMC
968114199b The shooting Gallery now properly ends when a player leaves the instance
The shooting Gallery now properly ends when a player leaves the instance

Frakjaw player update

Update the Frakjaw battle instance script to remove players when they leave the instance

Simplify comparison

Simplify comparison for entity pointer to be implicit
2022-06-19 01:40:16 -07:00
EmosewaMC
9cf534dc0a Move to new branch
Added comments

Added some comments and changed a variable name to be less ambiguous.
2022-06-19 00:14:33 -07:00
Aaron Kimbre
4c7034648b Exclude space blizzard from Zone ghosting 2022-05-08 22:07:07 -05:00
David Markowitz
c6f220ee31
Implementing and Fixing All Racing Achievements (#366)
* Grammatical changes in comments

* Grammatical fixes in comments

Small grammatical fixes found in comments throughout the code.

* Added descriptions to functions

Added descriptions to functions that didn't have them to keep the code well documented

* Created RacingTaskParam.h

Created RacingTaskParam so eliminate magic numbers in the original implementation of completing racing missions.

* Updated magic numbers in Mission.cpp

Updated magic numbers in Mission.cpp to a meaningful name.

* Implemented racing smashable task progression

Previously, races did not progress tasks for smashing Entities.  Now all achievements tracking smashables track them correctly.  This has been implemented in the three Entities that can be smashed in a race (imagination boxes, track specific smashables, Forbidden Valley dragon eggs).

* Updated race imagination task progression

Race imagination now no longer uses a magic number when passed to missionComponent.  Instead we use a number defined in an enum located in RacingTaskParam.h

* Updated Race task checks

Racing tasks for completing races without smashing now no longer auto complete the whole chain of missions.  Tasks that track placing on tracks and races overall now properly complete.  Tasks that count how many missions in a zone are completed now function.  Tasks that track race completions in multiple areas now function.

* Updated RacingControlComponent.cpp

Fixed any tasks that required 3 players to now require 3 or more players in a race to progress.  This restriction is ignored if the world config opted in for solo racing to allow progression in solo worlds.  Updated magic numbers sent into missionComponent->Progress to an enum created in this PR.  Fixed some indentation.

* Fixed a grammatical error in variable name

Fixed a grammatical error in the enum for task params
2022-02-05 12:28:17 +01:00
Unknown
0545adfac3 Public release of the DLU server code!
Have fun!
2021-12-05 18:54:36 +01:00