Commit Graph

819 Commits

Author SHA1 Message Date
Collin Smith
b1a3411073 Created Metrics class and moved metric fields to it
Metrics will have more metric fields added as we go
2020-06-10 00:32:14 -07:00
Collin Smith
3c08bfbf04 Added RTT field to Pinger 2020-06-09 22:36:48 -07:00
Collin Smith
3390b544a6 Improved accuracy of ping calculation #77 2020-06-07 15:55:28 -07:00
Collin Smith
cdc73e12d6 Added support for Ping packet
Added Ping to Networking fbs
Created Riiablo.ping long to store current ping in ms
Changed Client draw fps to draw Riiablo.ping below fps
Created Pinger system which manages Riiablo.ping and sending and receiving Ping packets
Riiablo.ping is really more like RTT+frame_time and should be ironed out better
Created issue #77 related to the work done in this commit and deficiencies to be addressed
2020-06-07 00:23:00 -07:00
Collin Smith
da152ff5c6 Created constants for Client.Display.DrawFPS values 2020-06-06 22:53:28 -07:00
Collin Smith
da53dabad6 Aggregated Connection and Disconnect fbs into Networking fbs
Removed old individual fbs for Connection and Disconnect
Reordered D2GSData to group Networking packets
2020-06-06 18:17:21 -07:00
Collin Smith
ff34dea994 Created PlayerController flatbuffer spec file
Removed individual fbs for player movement packet definitions
Changed (Walk|Run)ToEntity packets from id to entityId
2020-06-06 18:06:16 -07:00
Collin Smith
d6e973f2f2 Fixed GroundToCursor code to use client-side entity id and pass along server-side entity id 2020-06-05 13:28:38 -07:00
Collin Smith
ae00373f8a Added ServerItemManager which will handle item wrapper entity creation/deletion 2020-06-05 13:25:37 -07:00
Collin Smith
013b22a169 Added local and server entity id to entity debug info 2020-06-05 13:16:58 -07:00
Collin Smith
4bef27052c Disabled optimize imports on the fly for the specified classes
Flatbuffers files were being modified by IntelliJ before committing
2020-06-04 20:16:02 -07:00
Collin Smith
83a95e35fc Removed deprecated DropItem and PickupItem packets and related code 2020-06-04 19:46:42 -07:00
Collin Smith
e472514179 Rolled Deleted component implementation into a Flags component
Removed Deleted component and associated flatbuffers classes
Created Flags component along with added a bitflags field to EntitySync flatbuffers table
It seems plausible more flags will be needed in the future aside from marking an entity as deleted
2020-06-04 19:41:55 -07:00
Collin Smith
7301c483ca Posting Deleted component 2020-06-04 19:24:33 -07:00
Collin Smith
ffda38c9fd Fixed issue where packets might be sent to a disconnected client 2020-06-04 19:14:08 -07:00
Collin Smith
804e8373d5 Improved logging for D2GS packets
Added ability to disable logging for specified packet types (EntitySync was cluttering the log)
2020-06-04 17:05:15 -07:00
Collin Smith
7404ea63a6 First iteration of deleting networked entities
This iteration assumes removing Networked component implies deletion
Deletion is managed as a flag within the EntitySync packet header
2020-06-03 20:58:58 -07:00
Collin Smith
7aa3f448ee Removed extra logging 2020-06-03 20:29:21 -07:00
Collin Smith
faf8743a75 Fixed an issue where picking up networked item wasn't loading assets
ClientEntityFactory#createItem now calls Item#load()
Cursor will run Item#checkLoaded on cursor item and attempt setting cursor when loaded
2020-06-03 17:35:59 -07:00
Collin Smith
907688a1d2 Improved support for picking up and dropping items
ItemController interface changed to be an engine-operable interface
Removed ItemController interface from CharData
Changed ItemController#groundToCursor(Item) to #groundToCursor(int) to pick up an item wrapper entity
ItemManager now handles item entity creation/deletion (may change)
ClientItemManager changed to operate upon Riiablo.charData and is for clients
CursorMovementSystem now uses ItemController instead of handling item drop and packeting directly
Item wrapper entity deletion remains unhandled in multiplayer until support for networking entity deletion is added
2020-06-02 20:55:03 -07:00
Collin Smith
edb6de8df9 Added support to D2GS for a majority of ItemManager functions
Added support to D2GS for a majority of ItemManager functions
GroundToCursor remains unimplemented in this commit due to entity creation
2020-06-02 15:30:18 -07:00
Collin Smith
8f437ab037 Added ItemManager system to D2GS engine 2020-06-01 17:47:37 -07:00
Collin Smith
829eb608a7 Workaround for #75 2020-06-01 17:24:44 -07:00
Collin Smith
970073296c Created NetworkedClientItemManager subclass of ClientItemManager
Changed ClientItemManager to delegate to Riiablo.charData
NetworkedClientItemManager posts item management requests to the client's socket
2020-05-31 23:55:33 -07:00
Collin Smith
be70756aeb Added prototypes for item management packets 2020-05-31 21:30:53 -07:00
Collin Smith
3723e4dc2e Created packets for item management (DropItem and PickupItem are now deprecated and will be removed eventually) 2020-05-31 03:49:00 -07:00
Collin Smith
921fdfd2e2 Changed ClientItemManager to delegate to a certain ItemController 2020-05-31 03:22:39 -07:00
Collin Smith
206875d2a0 Introduced ItemController interface and ClientItemManager
ItemController created to allow swappable interfacing between CharData and ClientItemManager
ClientItemManager engine system added (defers to Riiablo.charData temporarily)
Added dependency injection for ItemController to allow wiring
Changed item management panels to use ItemController injection instead of Riiablo.charData directly
2020-05-31 01:00:46 -07:00
Collin Smith
94e2b379e7 Removed unneeded annotation 2020-05-30 20:36:39 -07:00
Collin Smith
2cecdccdd9 Added additional debug logging for CharData item management calls 2020-05-30 20:21:35 -07:00
Collin Smith
b798645f02 Fixed issue where dropping an item wasn't removing it from ItemData 2020-05-30 20:15:08 -07:00
Collin Smith
46581d11e1 Renamed item pickup and drop functions to more closely match other item functions
pickup -> groundToCursor
drop -> cursorToGround
2020-05-30 16:49:40 -07:00
Collin Smith
24d0a07cea Added support for picking up items from ground 2020-05-30 16:46:49 -07:00
Collin Smith
7336c2a3b0 Moved ItemData#drop and added ItemManager#dropCursor 2020-05-30 16:35:37 -07:00
Collin Smith
6280e89d8b Added support for dropping cursor item to ground 2020-05-30 16:30:02 -07:00
Collin Smith
d910a6026a Removed qualification from INVALID_ITEM within ItemData 2020-05-30 16:22:01 -07:00
Collin Smith
c6468eb788 Created ItemManager system to interface char data item events with engine 2020-05-30 16:17:50 -07:00
Collin Smith
e1443d0acf Renamed ItemManager to ItemEffectManager 2020-05-30 16:16:51 -07:00
Collin Smith
6860d8cba1 Implemented improved CharData class
CharData has been fully replaced with a version that doesn't just wrap a D2S file
Added support for a more event-based action approach with the UI
Event systems still need to be added to engine to perform CharData item operations
Decoupled com.riiablo.Cursor from D2S cursor item management -- defers to Riiablo.charData instance
2020-05-28 13:07:24 -07:00
Collin Smith
c4d2bc58a5 Extended new char data API
Added some additional load methods and util functions
Added some backwards compat functions to grab item index, etc
D2S#copyTo(CharData) calls D2S#loadRemaining automatically
Added CharData#obtain to return an uninitialized (possibly dirty) CharData
Added CharData#preloadItems which loads player and merc items
CharData#load(D2S) will set CharData to managed
2020-02-03 15:25:00 -08:00
Collin Smith
63c46de6bf Added notification to subscribers when skills changed via item update 2020-01-18 19:19:15 -08:00
Collin Smith
caef08f56a Refactored line order 2020-01-18 19:15:41 -08:00
Collin Smith
2d4b2a72a9 Added support for updating stats
Implemented support for updating items, item stats, and applying stats to ItemData attributes field
Added reference to CharStats.Entry to ItemData -- this may be removed when hireling stats are implemented more thoroughly
Added clear method in CharData to support chaining CharData reset methods clear().load(D2S)
Added empty base stats for hireling -- fixes issues with applying hireling stats to their own Attributes
2020-01-18 15:10:44 -08:00
Collin Smith
f5552947dc Added sets parameter to Item#update
Passed sets map should correspond to any set-counting entity (player or hireling)
Added fix to ignore CharStats.Entry field in Attributes#op if null (for hirelings)
2020-01-18 15:03:54 -08:00
Collin Smith
b5303828a9 Changed Item#update(CharData) to Item#update(Attributes,CharStats.Entry)
This is intended to decouple CharData from Attributes application for hirelings
2020-01-18 02:54:24 -08:00
Collin Smith
a8999db873 Fixes crash when opening HirelingPanel before items have finished loading 2020-01-18 02:52:39 -08:00
Collin Smith
d8ff97e4a5 Added LocationListener to subscribe to item location changes (specifically for belt and possibly cursor as well) 2020-01-17 03:16:35 -08:00
Collin Smith
1465af857c Set compileOptions compat for android build to java 1.8 to support flatbuffers 1.11 bytecode 2020-01-16 16:34:36 -08:00
Collin Smith
57589f7312 Moved pickup and store methods to ItemData
Added support for store listeners
CharData store methods are now simple calls up to player ItemData reference
2020-01-16 16:17:54 -08:00
Collin Smith
d20f8fcab4 Renamed location methods to store since they are placing items in store locations 2020-01-16 15:58:45 -08:00