Commit graph

11 commits

Author SHA1 Message Date
Mag-nus
218f717c55
Move network/packet work from WorldManager to NetworkManager (#1929)
* Move network/packet work from WorldManager to NetworkManager

* merge fix
2019-06-02 21:04:15 -05:00
Mag-nus
5ffff13ad5
Catch and Log Exceptions in InboundMessageManager (#1926) 2019-05-22 08:04:36 -05:00
Mag-nus
126cfa1da7
Process inbound GameAction packets in order received (#1690)
* Process inbound GameAction packets in order received

This does not change the performance of ACE. It just shifts the processing to a different order in UpdateWorld()

It changes from an ActionQueue per session for these types of messages to a single action queue per world.

It also changes the order in which messages are processed.

Now, they are processed in the order in which they were received. Before, they were processed session by session, starting with the sessions with lower id's first.

Having two separate queues, one for ClientMessage and one for GameActions helps us measure performance metrics more finely. If we wanted to process both sets of these types of packets in order, we could combine these queues into one.

* Might as well just combine them to simplify things

This also better repsects packet order from the clients.
2019-04-12 06:34:22 -05:00
Mag-nus
cc94415dd0
Major Inventory Refactor (#1197)
* HandleActionStackableSplitTo3D cleanup

* Container: Remove duplicate TryRemoveFromInventoryWithoutClear()

* Always fix placement positions in Container SortWorldObjectsIntoInventory

* HandleActionStackableSplitToContainer cleanup

* Inventory cleanup

* Cleanup child object management (items held in hands)

* More player inventory progress

* Remove ActionChain.AddDelayTicks() (not used, we use time based)

* Fix opcode log warning in InboundMessageManager

* HandleActionDropItem looking good on the new system

* HandleActionDropItem comments

* Fix PlayerEnterWorld exception when player has null Location

* More inventory progress

* minor cleanups

* Remove IComparable from WorldObject

Only one WorldObject per ObjectGuid can exist at a time. The normal reference comparison is fine. IComparable gives the wrong impression that a WorldObject with the same ObjectGuid can be defined/instantiated by two different objects at the same time.

* Inventory Progress

* Fix stack size bug in Developer commands that use AddWeeniesToInventory

* more inventory progress

* More split progress

* more stack progress

* Use virtual MotionPickup

* Inventory improvements

* more inventory progress

* player/npc give refactored

* Convert some obsolete inventory functions over to TryConsumeFromInventoryWithNetworking

* All inventory functions converted

* Fix item decaying explosions

* Fix player trade

* More fixes

* Fix giving partial stacks

* Fix burden limitations when picking up items

* Fix selling items

* Inventory move to fixes

* Cleanup TrySetChild

* Don't decay IsStuck objects

* Don't allow pickup of IsStuck items

* Fix moving equipped items around

* Weapons now work

* Fix player location null restore

* Add back HeritageBonuses to Player_Skills

* Fix equipment spell/dispell on equip/dequip

* Fix non-selectable wielded items from showing on the player model

* Fix wield/unwield sound for equipped items that aren't childeren

* TrySetChild should ClearChild if it's not a valid child.

* Fix missile ammo as child

* Send DeleteObject instead of PickupEvent on Dequip. This fixes disappearing weapon on relog

* Couple notes where item recovieres should go

* Hopefully this fixes the ammo being displayed incorrectly

* Couple inventory fixes

Fix death items dropping properly
Fix giving equipped items appearing in targets inventory

* Allow close container that has no viewer

* Couple more log warnings for potential lost items

* Attuned check removed for GiveObjecttoNPC

* Don't consume unlimited use gems

* Fix HandleDestroyBonded

* Fix destroying equipped items when consumed
2019-01-03 19:58:13 -06:00
gmriggs
9d3c390036
Improved corpse system, added /corpse, /permit, /consent (#1156)
* Improved corpse system, added /corpse, /permit, /consent

* Setting AllowedActivator for corpses

* GetPlayer -> FindByGuid

* spacing

* Updating HandleActionRemoveFromPlayerConsentList() to handle all players, regardless of online status
2018-12-20 02:42:54 -05:00
gmriggs
d1374f754c
Fixing some bugs (#1148) 2018-12-17 15:23:47 -05:00
Mag-nus
daaac0e440
Handle logouts and session drops more gracefully (prevents null player exceptions) (#1134)
* ServerPacket.MaxPacketSize todo comment added

* Don't process enqueued WorldConnectioned inbound messages if player is null

* Handle logouts and session drops more gracefully (prevents null player exceptions)

* Add important comment
2018-12-11 19:59:44 -06:00
Mag-nus
0a37e95972
First round of updates toward new threading model and less ActionChain usage (#995)
* WorldManager and LandblockManager cleanup

* PlayerEnterWorld moved from LandblockManager to WorldManager

* Session.WaitForPlayer() removed

Sessions now have their own GameAction queues.

This allows us to process the incoming actions only when we know the player != null.

This removes the huge UpdateWorld delay we had prior from InboundMessageQueue blocking until a session loaded their player after an EnterWorld request.

* updateWorldLandblockLock no longer needed

* LoadAllLandblocks cleanup

* Landblock broadcastQueue is no longer used

We've switched to a different broadcasting method

* Landblock EnqueueBroadcast removal part 1

* EnqueueBroadcastMotion cleanup

* ServerManager cosmetic cleanup

* Landblock using cleanup
2018-09-03 07:23:09 -05:00
Mag-nus
c4f32f1484
Session class improvements (#937)
* Session.AccountCharacters renamed to Characters

* includedDeleted option added to Shard GetCharacters()

* change Shard GetCharacter includeDeleted parameter order

* Character pruning removed from GameMessageCharacterList

This class shouldn't be doing the pruning. It should be the caller.

This class should send the characters exaclty as they're passed. It's not good to have functions like this that are manipulating your data before sending it off when it's not obvious.

* Sorting characters by LastLoginTimestamp not needed

Client auto sorts first by isDeleted, then, by name.

* Logging off doesn't reload characters

No need to reload them from the database. The session already has all it's owned non-deleted characters.

We simply check the characters for deletion and remove them from the list if needed.

This reduces database overhead.

* using statement cleanups. Purely cosmetic

* CharacterHandler code reorder

I prefer top down.
Character create, enter world, log off, delete, restore

* AuthenticationHandler bug fix for characters that are marked deleted on initial login

* CharacterHandler Delete/Restore no longer reload entire character list

This improves DB efficiency

* Session code cleanup. Mostly just organization

* Remove IActor from Session and add InboundMessageQueue to WorldManager

* Improve WorldManager ActionQueue names

* Add back character sort on initial connect
2018-08-09 21:20:38 -05:00
Mag-nus
99fb8bcc55
All this does is cleanup a bunch of style issues that Resharper complains about (#629)
* Removed unused using statements

* Removed redudnant ToString()'s

* Removed some redundant type casts

* Removed redundant bool comparisons

* remove redundant initializers

* xml summary in invalid place switched to comments

* Use string interpolation

* use format separators

* Removed redundant parenths

* remove redundant else

* direct cast when safe

* redundant string interpolation

* xml summary fixes

* removed empty ctors

* fix modifier order

* Convert to auto property

* Convert some getters to method bodies

* use format separators

* changelog

* Auto-properties that can made to get-only

* fixed some references in XML comments

* remove redundant base()

* Revert "Auto-properties that can made to get-only"

This reverts commit 32a1225ce8.

* fix starter gear json

* Use collections count property

* simplify conditional ternary expression

* remove redundant return statements

* Constructors for abstract classes changed to protected

* Moved declarations to inner scopes

* Join declaration and assignments

* inline out variables

* Use enum extension methods instead of static methods

* inline out more variables

* more unused usings

* Remove specifying enums as ints
2018-02-09 06:46:49 -06:00
Mag-nus
7e256a7fb3
ACE prj to ACE.Server rename (#628)
* ACE.DatLoader renames PositionNew to Position

* Remove comment

* ACE.DatLoader DatDatabase I prefer this type instead.

* Unused references removed

* namespace fixes

* ACE prj to ACE.Server rename

* Appveyor fix I think

* Changelog

* appveyor fixes

* Update AccountTests.cs

* Update ConstructedStatementTests.cs

* Update WeenieSearchTests.cs

* ACE.Tests -> ACE.Server.Tests

* Appvyeor
2018-02-08 17:05:02 -06:00
Renamed from Source/ACE/Network/Managers/InboundMessageManager.cs (Browse further)