Commit Graph

1130 Commits

Author SHA1 Message Date
Collin Smith
8506cc4324 Fixed bug specific to socketed misc items
Custom Tome of TP I have that has socket flag set and game still works
This fix allows socketing of non armor or weapon items (as in original game)
2020-08-19 18:13:04 -07:00
Collin Smith
3c56558e9c Fixed bug reading string where null characters were included within content 2020-08-18 01:57:18 -07:00
Collin Smith
7667cfdff2 Fixed bug where readSafe64u was reading 32u 2020-08-18 01:41:46 -07:00
Collin Smith
00caad594c Added log message for deserialized item object 2020-08-17 20:39:51 -07:00
Collin Smith
d4a4c87b38 Added assertion to validate item list includes expected number of entries (even if some errored) 2020-08-17 20:38:24 -07:00
Collin Smith
447fc70ad2 Stubbed out D2SReader#copyTo(D2S,CharData) 2020-08-17 20:31:28 -07:00
Collin Smith
daaf6773c2 Disallows rendering of empty content within console (log4j messages were outputting extra blank lines) 2020-08-17 20:05:34 -07:00
Collin Smith
575ba39b2d Updated API calls to not cast raw int types 2020-08-17 19:26:25 -07:00
Collin Smith
28fbed711b Renamed Riiablo#MAX_ACTS to Riiablo#NUM_ACTS and Riiablo#MAX_CLASSES to Riiablo#NUM_CLASSES 2020-08-17 19:19:57 -07:00
Collin Smith
a5e83ede40 Renamed Riiablo#MAX_ACTS to Riiablo#NUM_ACTS 2020-08-17 19:19:10 -07:00
Collin Smith
6ccb2a5d02 Renamed Riiablo#MAX_DIFFS to Riiablo#NUM_DIFFS 2020-08-17 19:18:09 -07:00
Collin Smith
91f0971f79 Created const for num classes 2020-08-17 19:15:51 -07:00
Collin Smith
0e71f0b635 Created consts for act indexes 2020-08-17 19:15:11 -07:00
Collin Smith
6e01e4d11b Changed WS to raw bytes 2020-08-16 20:33:02 -07:00
Collin Smith
938fea3375 Improved readability and added recovery for items list 2020-08-16 20:06:55 -07:00
Collin Smith
41d484217b Created recover method 2020-08-16 19:27:12 -07:00
Collin Smith
3c53303d1b Added support for reading corpse item list 2020-08-16 13:40:43 -07:00
Collin Smith
506773d25c Added missing assertions 2020-08-16 02:33:47 -07:00
Collin Smith
2eb773633a Added D2S#getTownsString() and implemented it into D2S Reader logging 2020-08-16 01:18:21 -07:00
Collin Smith
c85f1b9e44 Added comment 2020-08-16 01:14:50 -07:00
Collin Smith
97a3265e05 Changed D2SReader into a singleton 2020-08-16 01:04:52 -07:00
Collin Smith
4af5aac494 Improved comment regarding why a check is made 2020-08-16 01:02:24 -07:00
Collin Smith
1d173c605f Moved Riiablo#getDifficultyString to DebugUtils and created DebugUtils#getClassString
These methods are meant for debugging and quick lookups
2020-08-16 00:59:01 -07:00
Collin Smith
37a17bf323 Created name constants for character classes 2020-08-16 00:51:01 -07:00
Collin Smith
3f9ebfb57c Added progression methods 2020-08-16 00:42:17 -07:00
Collin Smith
28086714b4 Added extension field 2020-08-16 00:36:00 -07:00
Collin Smith
ee0110125c Added flag check methods 2020-08-16 00:35:43 -07:00
Collin Smith
52a5508167 Added more robust logging for item reader and writer bytes read and written 2020-08-16 00:27:53 -07:00
Collin Smith
bebd4dc3ff Added getter for written bytes 2020-08-16 00:10:23 -07:00
Collin Smith
7d908b1e6c Committing logger console commands and Riiablo.logs within Client 2020-08-15 20:59:36 -07:00
Collin Smith
962938bcb3 Replaced log context int to string conversions with int
Log#put(String,String) refactored to Log#put(String,int)
2020-08-15 20:54:39 -07:00
Collin Smith
44a704a4bc Committing experimental D2S Reader and D2S
Will deprecate and replace some com.riiablo.save classes eventually
D2S acts only as a tuple
D2SReader has significantly more robust debugging tools than com.riiablo.save.D2S
Added Riiablo#getDifficultyString(int) to get the debug difficulty string
Added D2SReaderTool used to debug D2S files and diagnose format issues
2020-08-15 20:52:10 -07:00
Collin Smith
7691fb323c Added convenience method to put thread context int 2020-08-15 20:02:23 -07:00
Collin Smith
1adc468d6e Changed root log level, reduced netty logging, added log specifier for com.riiablo.save 2020-08-15 18:29:26 -07:00
Collin Smith
b573bd4fa7 Added programmic loading of log4j2 configuration file
Committing log4j2.xml with default settings (to be ammended)
2020-08-15 13:34:11 -07:00
Collin Smith
39227995a2 Added ItemWriter and item serialization support (see #93)
Created ItemWriter Item serialization class
Removed skipping of property lists for BOOK item types
Added support for serializing PropertyList values
Added support for serializing RareQualityData values
Added support for serializing Stat values
2020-08-14 00:12:08 -07:00
Collin Smith
886c24cdfd Improved API
writing 0 bits with _writeUnsigned is a no-op
write unsigned methods changed from byte and short to int types
added writeString(CharSequence,int,boolean) to write an optional null char
2020-08-14 00:08:07 -07:00
Collin Smith
fda76aad7a Exposed ByteBuf for ByteInput and ByteOutput as a read-only view with doc 2020-08-13 18:06:54 -07:00
Collin Smith
1fcd8b7a4d Renamed ItemSerializer to ItemReader to allow room for ItemWriter counterpart 2020-08-13 17:43:55 -07:00
Collin Smith
a3073167a6 Fixed bug where readSafe operations were incrementing bits erroneously 2020-08-13 17:40:25 -07:00
Collin Smith
322b94bc8c Added item name along with item code for clarity 2020-08-13 00:22:05 -07:00
Collin Smith
a2d8157987 Created SignatureMismatch exception to better describe that case 2020-08-13 00:10:10 -07:00
Collin Smith
5560eb2b3f Moved BitUtils#readSignature to ByteInput
ByteInput#readSignature behaves similarly, except mismatch will reset position to before reading
2020-08-12 23:59:25 -07:00
Collin Smith
5dd29339fc Implemented ByteInput#realign 2020-08-12 23:58:03 -07:00
Collin Smith
c0ef2dcb8a Refactored com.riiablo.item to use com.riiablo.io for data streams
Temp workarounds implemented for Item#loadFromStream and ItemSerializer#readSingleItem
2020-08-12 23:23:40 -07:00
Collin Smith
cafe8679b4 Added support for marking read position for debugging 2020-08-12 17:22:55 -07:00
Collin Smith
d70668d11d Added InvalidFormat
Added deprecated constructor for InvalidFormat with a null ByteInput for temp back compat
2020-08-12 15:05:10 -07:00
Collin Smith
088cde3b9e Ranamed SafeUnsigned to UnsafeNarrowing 2020-08-11 17:56:40 -07:00
Collin Smith
d8679e34e1 Committing BitUtils and SafeUnsigned 2020-08-11 01:07:35 -07:00
Collin Smith
e3fc03f240 Adjusted documentation and added ByteInput#readString(int,boolean) 2020-08-11 01:03:05 -07:00