Commit Graph

1312 Commits

Author SHA1 Message Date
Collin Smith
de8f81db47 Made AttributesUpdater#update on non-AggregateAttributes to be a no-op 2020-09-05 14:57:42 -07:00
Collin Smith
77e58a72b1 Generated StatList for gems is now frozen 2020-09-05 14:56:29 -07:00
Collin Smith
03484882d3 Added more tests 2020-09-05 14:49:21 -07:00
Collin Smith
37ea64921c Fixed incorrect stat assignment 2020-09-05 14:48:01 -07:00
Collin Smith
1734b90bf9 Implemented structured logging 2020-09-05 14:43:33 -07:00
Collin Smith
e81af4dece Added assertion validations to GemGenerator
Added assertion validations to GemGenerator to make sure property list indexes are correct
Renamed StatListBuilder#index() to #listIndex() to clarify
2020-09-05 14:38:45 -07:00
Collin Smith
273b434c7c Renamed GemUtils to GemGenerator 2020-09-05 14:33:17 -07:00
Collin Smith
d5b6f74a61 Made params final 2020-09-05 14:32:00 -07:00
Collin Smith
f61af7414e Added AttributesUpdater#add to append StatList lists to an aggregate 2020-09-05 14:30:10 -07:00
Collin Smith
d59dcd625b Added some placeholder documentation 2020-09-05 14:25:26 -07:00
Collin Smith
8cfcc2195d Fixed spelling error 2020-09-05 02:37:29 -07:00
Collin Smith
e9b3d69c81 Fixed cache not clearing after consecutive calls 2020-09-05 02:34:34 -07:00
Collin Smith
554553888c Created PropertiesGenerator, GemUtils and tests
GemUtils may be rolled into PropertiesGenerator
PropertiesGenerator may belong with item generation
More validation for behavior on a larger variety of items required
Disabled an assertion in StatListLabeler which prevented creating labels for Attributes#list()
Above assertion only necessary to enforce label creation only works for Attribute collections
2020-09-05 02:20:03 -07:00
Collin Smith
f1246f5aea Added getter for ItemStatCost entry using String stat code 2020-09-05 02:15:10 -07:00
Collin Smith
82d08989d1 Added type-safe version of Item#getBase 2020-09-04 21:54:40 -07:00
Collin Smith
e0f977f8a0 Replaced comment to reference Item#data repurpose 2020-09-04 21:54:13 -07:00
Collin Smith
0548514a9e Added improved support for injection during tests 2020-09-04 21:48:26 -07:00
Collin Smith
b7dcf0f4fe Modified logging parameters to show only StatListLabeler trace 2020-09-04 20:44:31 -07:00
Collin Smith
030564a5a6 Created StatListLabeler and tests
Encoded stats may require StatGetter#asString instead of value
Changed visibility of StatList#MAX_LISTS and StatList#MAX_STATS to package-private
2020-09-04 20:42:23 -07:00
Collin Smith
7c54483e12 Created AttributesUpdater and tests to fold attributes into each other 2020-09-04 20:40:43 -07:00
Collin Smith
3b34642c0d Created StatFormatter#formatEncoded to format encoded stats 2020-09-04 20:39:14 -07:00
Collin Smith
2bd5f217a4 Changed return type for StatFormatter methods to String from CharSequence 2020-09-04 20:38:39 -07:00
Collin Smith
2fd51347bf Fixed issues with StatList#add and StatList#ensureCapacity
Add functions now validate they are adding to same stat, else they put a new one
Moved arraycopy copies into static function
StatList#ensureCapacity will correctly copy arrays
Moved any offsets modification operations into StatList#ensureCapacity
2020-09-04 18:29:48 -07:00
Collin Smith
db04f49fba Added support for StatListGetter#get(int) index 2020-09-04 15:54:40 -07:00
Collin Smith
a839560e6a Implemented StatListBuilder#toString() 2020-09-04 15:53:01 -07:00
Collin Smith
b45f770478 Changed StatList.IndexIterator to support pushback(int)
StatList.IndexIterator can now pushback n indexes (up to list start index)
2020-09-04 15:52:41 -07:00
Collin Smith
79a9409a75 Fixed and issue where StatList#ensureCapacity(int,int) was only shifting next list
Added int index to StatList#ensureCapacity so that it shifts after index
Added additional validation within StatList#ensureCapacity
Added assertion that clearList does not result in a negative size
StatList#copy(int,StatList,int) now copies #maxLists as well
Added additional logging for StatList#copy
2020-09-04 15:51:49 -07:00
Collin Smith
e892970ef8 Added constants and getters for encoded and grouped stats 2020-09-04 15:47:47 -07:00
Collin Smith
ecd6946ffe Fixed StatList#add where stat did not exist 2020-09-03 21:20:53 -07:00
Collin Smith
61ba1248e1 Fixed bug where adding stat that didn't exist resulted in an IOOBE 2020-09-03 20:52:14 -07:00
Collin Smith
04b9ed785c Created StatFormatter and tests, testing as-needed 2020-09-03 20:43:28 -07:00
Collin Smith
8b06f92f54 Added getter and checker for stat ids 2020-09-03 18:53:13 -07:00
Collin Smith
fa7e066ee1 Created StatList#isEmpty() to check if there are any stats in any list 2020-09-03 18:37:30 -07:00
Collin Smith
948f1a189c Added static getter Stat#index(String) to get stat id from String name 2020-09-03 18:34:34 -07:00
Collin Smith
a3b3840b20 Added support for iterating over StatList lists 2020-09-03 18:33:55 -07:00
Collin Smith
b17f528611 Changed signatures for StatListBuilder#add(StatGetter) and #addAll(StatListGetter)
Changed signatures for StatListBuilder#add(StatGetter) and #addAll(StatListGetter) to match sibling methods
Changed StatList#addAll(int,StatList,int) to return the last index added
Above change is so that StatListBuilder index remains valid and calling #addAll does not result in undefined behavior
2020-09-03 18:02:05 -07:00
Collin Smith
bf5b0677cc Moved modification functions #add(StatGetter) and #addAll(StatListGetter)
Moved modification functions #add(StatGetter) and #addAll(StatListGetter) from StatListGetter to StatListBuilder
StatListGetter should contain read-only operations
2020-09-03 17:57:20 -07:00
Collin Smith
4c96af70d3 Changed Attriutes#remaining() to return StatListGetter instead of StatList
Changed Attriutes#remaining() to return StatListGetter instead of StatList
Unsure if this will change, but all calls require #first()
Attribute returns are all asserted to be StatLists of numLists = 1
Creation of StatList delegated, or in the case of AggregateAttributes, lazily initialized
2020-09-03 17:54:24 -07:00
Collin Smith
bd278e3c82 Changed Attriutes#base() to return StatListGetter instead of StatList
Changed Attriutes#base() to return StatListGetter instead of StatList
Unsure if this will change, but all calls require #first()
Attribute returns are all asserted to be StatLists of numLists = 1
StatList is by default delegated, or in the case of AggregatedAttributes, lazily initialized
Added support for retrieving StatListGetter parent StatList
Added support for creating a StatListBuilder from StatListGetter
Added support for clearing a StatList list from StatListGetter
2020-09-03 17:52:36 -07:00
Collin Smith
5d9420a659 Moved aggregate list creation to Attributes#aggregate() to lazily init 2020-09-03 17:47:57 -07:00
Collin Smith
e26b22c1ba Changed Attriutes#aggregate() to return StatListGetter instead of StatList
Changed Attriutes#aggregate() to return StatListGetter instead of StatList
Unsure if this will change, but all calls require #first()
Attribute returns are all asserted to be StatLists of numLists = 1
2020-09-03 17:32:58 -07:00
Collin Smith
eddd0e9b0a Created StatList#add(int,StatGetter) to add stats 2020-09-03 17:14:11 -07:00
Collin Smith
cac5236225 Added support for using StatGetter on StatListGetter operations
Added support for using StatGetter on StatListGetter operations
Created StatList#contains(int,short,int) to check a specific stat with param
2020-09-03 14:26:35 -07:00
Collin Smith
07ad2d4af2 Created package-private StatList#forceClear() to allow clearing frozen list
StatList#clear() did not allow clearing when frozen for external APIs
Attributes re-uses stat lists, and requires the ability to force clear
Renamed Attributes#resetToBase() to #reset() (functionality is documented)
Attributes#reset() no longer clears Attributes#list
2020-09-03 14:08:17 -07:00
Collin Smith
2b07fcc3d0 Added logged warning when StatListGetter#get(short) returns null 2020-09-03 03:12:04 -07:00
Collin Smith
61eca6070f Changed return type of Attributes#resetToBase() to support chaining 2020-09-03 03:11:22 -07:00
Collin Smith
534df98623 Renamed StatListBuilder#list() to #build() 2020-09-03 02:16:38 -07:00
Collin Smith
f929a99ab4 Renamed StatListBuilder#build() to #index() 2020-09-03 02:16:06 -07:00
Collin Smith
5313629f27 Committing item writer test cases 2020-09-02 20:34:15 -07:00
Collin Smith
2193040a6d Added println to help differentiate between hex dumps 2020-09-02 20:33:43 -07:00
Collin Smith
f0ea202ff3 Implemented character save writing and tests 2020-09-02 20:31:21 -07:00
Collin Smith
3e5a49943c Additional tests to validate StatListWriter
Validation that a reasonable number of item stat lists write correctly
2020-09-02 20:13:51 -07:00
Collin Smith
e8601ec692 Fixed case where item prop lists was empty (stat termination required) 2020-09-02 20:11:09 -07:00
Collin Smith
6b9a97949a Changed access to static package from public local 2020-09-02 20:10:37 -07:00
Collin Smith
d3cbca6b6f Added boolean parameter to read/write StatList functions
entry.Saved was not appropriate for determining this feature
Implemented prop list flags into StatListWriterTest tests
Added additional logging to help with organizing encoded stats
2020-09-02 19:47:05 -07:00
Collin Smith
57c12bd781 Renamed StatListFlags constants and added getter for gem property list names 2020-09-02 19:29:49 -07:00
Collin Smith
ddd7b7d07f Implemented MDC property for propList name 2020-09-02 18:57:55 -07:00
Collin Smith
da9acd5977 Created StatListFlags to store stat list flags (copied from Item) 2020-09-02 18:55:35 -07:00
Collin Smith
ca829a4025 Created StatListWriter and tests
Additional testing required, but workable code
2020-09-02 18:20:30 -07:00
Collin Smith
e6f4a8b222 Changed to skip bits only (bytes included) 2020-09-02 18:19:22 -07:00
Collin Smith
4ed61438db Added bit mask for Long#Size
Reverted previous change
writeRaw performs logical-and with bit mask to ensure cache correctness
2020-09-02 18:18:26 -07:00
Collin Smith
63e3cc0e8b Fixed issue where flush would write more bits than cached 2020-09-02 18:03:15 -07:00
Collin Smith
4ccce1dabf StatListGetter now implements iterator to iterate over stat list 2020-09-02 17:30:48 -07:00
Collin Smith
c3693a8761 Added put method in StatList to put a stat with all fields filled 2020-09-02 17:30:01 -07:00
Collin Smith
9bcf4e2693 Added util for encoding stat params and values 2020-09-02 17:29:23 -07:00
Collin Smith
1932c0fcd2 Added getter for StatGetter stat entry 2020-09-02 17:28:00 -07:00
Collin Smith
4397ee742a Removed extra test case 2020-09-02 17:09:28 -07:00
Collin Smith
0daa272752 Fixed formatting 2020-09-02 17:08:35 -07:00
Collin Smith
8cbcb814d1 inlined NUM_GEMPROPS so Item can remain unchanged for the time being 2020-09-02 16:27:55 -07:00
Collin Smith
d4102d7fa7 Removed specific stat value getters (should use #get(short) instead) 2020-09-02 16:25:55 -07:00
Collin Smith
1872c3e00c Documented parent methods 2020-09-02 16:25:02 -07:00
Collin Smith
a5b90dc868 Added test case for decoding grief stat list 2020-09-02 16:20:34 -07:00
Collin Smith
1a6a522d37 Additional logging 2020-09-02 16:20:11 -07:00
Collin Smith
ca170f7cfb Added documentation regarding method intended use-case 2020-09-02 16:19:58 -07:00
Collin Smith
251a691bd5 Added support for retrieving first entry of a stat regardless of params 2020-09-02 16:18:59 -07:00
Collin Smith
03503a8f79 Added basic check for if stat required params 2020-09-02 16:13:14 -07:00
Collin Smith
294d69ddc9 Removed unused params 2020-09-02 16:04:57 -07:00
Collin Smith
0338325b26 Improved logging 2020-09-02 02:22:32 -07:00
Collin Smith
a9cdd18309 Created StatListReader 2020-09-02 02:16:40 -07:00
Collin Smith
74055272dc Created StatList#maxLists getter 2020-09-02 02:16:01 -07:00
Collin Smith
daf2314bac Changed return type of StatList#clear to support chaining 2020-09-02 02:15:38 -07:00
Collin Smith
4cc595da29 Renamed static factory method to match return type 2020-09-02 01:41:03 -07:00
Collin Smith
28a219d5cd Added support within StatListBuilder to retrieve previously put stat 2020-09-02 01:29:24 -07:00
Collin Smith
294bb1ea61 Moved stat entry query methods to Stat 2020-09-02 00:47:54 -07:00
Collin Smith
fc01a7dea9 First iteration of attributes revision 2020-09-01 23:47:16 -07:00
Collin Smith
b1ddb912fe Added tracef variant of traceEntry 2020-08-30 19:09:36 -07:00
Collin Smith
8fb6bb5fa5 Added support for assigning float to stat
Created Stat#encodeFloat(float,int) to encode floats into fixed point int
Added maxhp stat to monster attributes
Changed debugging to output float stat
2020-08-30 15:51:44 -07:00
Collin Smith
b4a77e02a2 Added debugging for attack action 2020-08-30 02:37:13 -07:00
Collin Smith
2557ba2458 Created AttributesWrapper component to wrap an entities attributes
Player attributes (already existing) are assigned to the wrapper
Monster attributes are created in-engine and assigned to the wrapper
Added basic code to set a monster's health attribute
2020-08-30 02:36:36 -07:00
Collin Smith
d3c06188a7 Combined stand still and right click casting into one block
Combined stand still and right click casting into one block
Moved vars into final fields to improve readability
Implemented getHovered(int) to get targetId (if any)
2020-08-29 02:08:19 -07:00
Collin Smith
45825b8a3d Removed hovered target id code into getHovered(int) 2020-08-29 02:06:52 -07:00
Collin Smith
d7c4d478a8 Implemented target entity id and Vector2 into casting events 2020-08-29 01:47:08 -07:00
Collin Smith
51de82df58 Removed unnecessary code
Can only load from existing preference keys
2020-08-28 22:45:24 -07:00
Collin Smith
872f2e732e Loading now loads existing contexts as well
Loading now loads contexts created before manager created
Added additional trace logging
2020-08-28 21:33:25 -07:00
Collin Smith
6012bee436 Use local logs instead of Riiablo.logs 2020-08-28 21:25:34 -07:00
Collin Smith
9af239eab9 Created GdxLoggerManager to manage logger contexts
Decorates a LoggerRegistry
Handles loading and saving of logger contexts
Created commands for getting contexts, loggers, and changing contexts
2020-08-28 21:25:00 -07:00
Collin Smith
533db1ff50 Added accessors to contexts and loggers via an unmodifiable trie 2020-08-28 21:20:16 -07:00
Collin Smith
090edf78e2 Changed trace logging to traceEntry and improved message formats 2020-08-28 04:41:48 -07:00
Collin Smith
16cf4a9572 Defined AbstractLogger#traceEntry() and #traceEntry(String,Object...) 2020-08-28 04:28:23 -07:00
Collin Smith
055c2173e4 Added check because Reflections api doesn't work on android (see todo) 2020-08-28 01:19:18 -07:00
Collin Smith
05be705363 Added temporary check to prevent attacking interactable entities 2020-08-28 00:44:01 -07:00
Collin Smith
c12ea88b6e Added Reflections library to LoggerSuggester 2020-08-28 00:16:26 -07:00
Collin Smith
8f2037a874 Configured default log level for root logger correctly 2020-08-28 00:14:59 -07:00
Collin Smith
685349fe01 Replaced Log4j2 with com.riiablo.logger (see #105)
Log4j2 removed as a dependency
2020-08-27 23:21:24 -07:00
Collin Smith
216b1ed6df Removed constraint on appender being null 2020-08-27 23:12:35 -07:00
Collin Smith
2c2f9f9109 Created static valueOf overload to return default value if one doesn't exist 2020-08-27 23:11:52 -07:00
Collin Smith
4db52a5e39 Renamed INSTANCE to DEFAULT_REGISTRY 2020-08-27 22:57:49 -07:00
Collin Smith
05d4c935c5 Added accessor for default registry 2020-08-27 22:57:13 -07:00
Collin Smith
14f78e0ca3 Added support for automatically flushing MDC after each entry
Riiablo's console was not written to handle multiline -- this seems easier
2020-08-27 22:45:36 -07:00
Collin Smith
ba78d5d487 MDC different prints up one level only if depths not equal 2020-08-27 21:37:52 -07:00
Collin Smith
f28e9b9f3f Implemented MDC difference checking to reduce printing as many non-dirty entries 2020-08-27 21:23:23 -07:00
Collin Smith
a10f124803 Immutable copy only cleared if a mutation takes place 2020-08-27 04:52:14 -07:00
Collin Smith
3939aee4c3 Introduced concept of dirty depth
`dirty depth` used to track earliest tree divergence for children
2020-08-27 04:40:08 -07:00
Collin Smith
42d0b7ab4e Cleaned up logic slightly to improve readability 2020-08-27 04:34:09 -07:00
Collin Smith
9f8bd1d612 Added invariants that StringMap#put key and value must be non-null 2020-08-27 04:33:17 -07:00
Collin Smith
28bb1c2ae5 Filled remaining methods and reduced visibility of INSTANCE to private 2020-08-27 04:30:40 -07:00
Collin Smith
7f79bbbc9a Refactored LogManager instance methods into LoggerRegistry
LogManager was having method name conflicts
LogManager delegates static methods to a LoggerRegistry instance
2020-08-27 04:28:04 -07:00
Collin Smith
c4839f5e7e Simplified logIfEnabled calls 2020-08-27 01:39:09 -07:00
Collin Smith
e7f225f887 Flipped enabled level check result 2020-08-27 01:34:12 -07:00
Collin Smith
e142308112 Added Logger#fatal* methods 2020-08-27 01:33:28 -07:00
Collin Smith
4214696808 Added Logger#error* methods 2020-08-27 01:32:44 -07:00
Collin Smith
2b457e3c3a Added Logger#info* methods 2020-08-27 01:31:51 -07:00
Collin Smith
4101724d3d Reorganized code 2020-08-27 01:30:36 -07:00
Collin Smith
a3c99b6e66 Added warn methods 2020-08-27 01:29:16 -07:00
Collin Smith
834d44ca3b Code formatting adjustment 2020-08-27 01:18:24 -07:00
Collin Smith
d9232b3593 Created StringMap class to manage thread context
Created StringMap class to manage thread context
StringMap is ordered and optimized for my use-case
Engineered compact encoding mode to track thread context
2020-08-27 01:17:25 -07:00
Collin Smith
60d50fa15d Added support for compact mdc output 2020-08-26 12:14:01 -07:00
Collin Smith
5e3ecbe8d5 Added support for encoding stack traces 2020-08-26 11:52:15 -07:00
Collin Smith
4d0ea7188f Implemented API for controlling full vs compact encoder modes 2020-08-26 11:46:28 -07:00
Collin Smith
ddae4b9f75 Implemented basic MDC encoding 2020-08-26 11:40:43 -07:00
Collin Smith
290160d93d Implemented thread context map 2020-08-26 11:39:34 -07:00
Collin Smith
8bb866d3b3 Changed design slightly to only defer message contents encoding 2020-08-26 11:31:22 -07:00
Collin Smith
2c9ca02f27 Changed responsibility chain s.t. RiiabloEncoder defers to SimpleEncoder for message content 2020-08-26 11:20:28 -07:00
Collin Smith
85b57a7ed0 Renamed Layouter to Encoder 2020-08-26 11:17:29 -07:00
Collin Smith
39cfd57368 Committing experimental code of logger package implementation (see #105) 2020-08-26 03:17:51 -07:00
Collin Smith
5868465bb6 Added placeholder code to allow casting using mobile controls 2020-08-24 00:59:58 -07:00
Collin Smith
579476df2f Added targetted left click casting
Left clicking a non-interactable entity will cast left action
Changed target clear calls to setTarget(src, INVALID_ENTITY)
2020-08-24 00:51:15 -07:00
Collin Smith
25ef0918f0 Added jump table entries for attack function 2020-08-24 00:40:36 -07:00
Collin Smith
7ccc32b9c7 Added cast(int,int,int) to cast on entity 2020-08-24 00:39:47 -07:00
Collin Smith
b404e9eb40 Made null cltstfunc case a no-op 2020-08-23 20:17:01 -07:00
Collin Smith
42378cf3be Removed comments 2020-08-23 20:08:06 -07:00
Collin Smith
b56eec0dda Fixed barbarian stomp sound playing for nova
Implemented client-side callbacks for srvstfunc and srvdofunc
Changed stomp sound to play for client-side srvdofunc callback
2020-08-23 19:23:24 -07:00
Collin Smith
25885b46fe Added additional trace logging 2020-08-23 19:16:21 -07:00
Collin Smith
a0fbf52690 Disabled pathing when casting 2020-08-23 19:12:24 -07:00
Collin Smith
97f5707100 Added comment for playing stsoundclass when implementing becomes possible 2020-08-23 17:22:54 -07:00
Collin Smith
d30593cc9b Implemented skill dosound and added stsoundclass 2020-08-23 17:18:48 -07:00
Collin Smith
92ac85ee8f Created event dispatching for skill stfunc and dofunc
Implemented cltstfunc and cltdofunc into client SkillCastHandler
Added shout skill sound trigger
2020-08-23 17:03:14 -07:00
Collin Smith
3a8d49534f Key mappings now clear when skills changed 2020-08-23 17:00:31 -07:00
Collin Smith
8032b65077 Casting a spell will make caster look at target 2020-08-23 13:13:35 -07:00
Collin Smith
55cae9cc8b Added teleport spell code
Spells may require encapsulation to allow easier management
2020-08-23 02:27:03 -07:00
Collin Smith
7a1c32105e Appended target Vector2 to cast function parameters and Casting component 2020-08-23 02:21:57 -07:00
Collin Smith
f93b44fb9c Created constants for invalid component and mode
These values will never be set internally and are used as return checks
2020-08-22 16:55:01 -07:00
Collin Smith
6a904f7131 Renamed event callback functions closer to their event data types 2020-08-22 16:44:18 -07:00
Collin Smith
f91fd2d4ac Created Casting component
Created Casting component to track casted spell and events
Actioneer manages Casting component
Implemented AnimDataFinishedEvent handler into Actioneer
2020-08-22 16:42:58 -07:00
Collin Smith
a51e4f0b47 Created AnimDataKeyframeEvent
AnimStepper will generate Keyframe events for non-zero keyframes
Created constants for keyframe values and debug toString method
Added logging to AnimStepper
2020-08-22 14:54:04 -07:00
Collin Smith
37a4df94d9 Assigned class type to variable 2020-08-22 14:43:43 -07:00
Collin Smith
66d1427a9e Added stubs for srvstfunc and srvdofunc 2020-08-21 18:33:51 -07:00
Collin Smith
ee62188c91 Added additional fields to Skills excel 2020-08-21 18:33:06 -07:00
Collin Smith
28dffc917f Removed resolved comment 2020-08-21 15:07:31 -07:00
Collin Smith
9b874036b8 Made clicking a button in quickpanel assign it to the correct action id 2020-08-21 14:59:47 -07:00
Collin Smith
46bdd1f94a Created CharData#setAction(int,int) which passes current alternate id
Created CharData#setAction(int,int) which passes current alternate id
Created SpellsQuickPanel#buttonId field to store Input.Buttons.LEFT or Input.Buttons.RIGHT
2020-08-21 14:58:20 -07:00
Collin Smith
5061c10b69 Move skill consts to com.riiablo.skill.SkillCodes 2020-08-21 12:43:42 -07:00
Collin Smith
c155b7bacb Renamed Spellcast to SkillCast to be consistent 2020-08-21 12:37:16 -07:00
Collin Smith
a1bc6c48fb Decoupled client-side code from Actioneer
Created SpellcastEvent and SpellcastHandler to handle client-side effects
2020-08-21 01:42:08 -07:00
Collin Smith
e42288f8f6 Added rudimentary support for animation overlays 2020-08-21 01:14:17 -07:00
Collin Smith
cf410fc64d Added audio playback of spell cast 2020-08-20 22:48:10 -07:00
Collin Smith
0159615dba Added workaround for invalid spell cast modes
SQ defaults to SC when encountered until implemented
SpellsQuickPanel changes CharData actions for the time being
2020-08-20 22:47:26 -07:00
Collin Smith
8a820effc8 Created Actioneer system to manage entity actions such as spell casting 2020-08-20 22:39:02 -07:00
Collin Smith
885df8f4e2 Updated comment to clarify what I think I meant when I wrote it 2020-08-20 22:05:10 -07:00
Collin Smith
8d7677cf50 Replaced ControlPanel specific code with an observer copy 2020-08-20 22:03:34 -07:00
Collin Smith
392889b030 Replace ControlPanel specific code with an observer copy 2020-08-20 22:02:57 -07:00
Collin Smith
dee6066306 Switching weapons will now change control panel skills to active skills 2020-08-20 21:54:50 -07:00
Collin Smith
57107ea0d1 Moved command suggesters into com.riiablo.suggesters package 2020-08-20 12:25:26 -07:00
Collin Smith
320ea8d28f Implemented structured logging into gem props 2020-08-19 22:23:24 -07:00
Collin Smith
e0da8aaa02 Improved logging of stat values 2020-08-19 22:19:43 -07:00
Collin Smith
3b6c1f81dc Fixed bug where reqdex was indexed as reqstr id 2020-08-19 22:19:01 -07:00
Collin Smith
6c5269c61e Greatly improved logging of property lists and attributes for items 2020-08-19 22:00:02 -07:00
Collin Smith
0c883a9bc8 Created synthetic stats for reqstr and reqdex 2020-08-19 21:48:53 -07:00
Collin Smith
ddb4351fb7 Deprecated serialized item data fields until they are refactored 2020-08-19 21:20:06 -07:00
Collin Smith
2beecb35a8 Implemented ItemReader and ItemWriter into Item component serializer 2020-08-19 21:16:52 -07:00
Collin Smith
1bd32e777d Created ByteInput#wrap(ByteBuf) 2020-08-19 21:15:45 -07:00
Collin Smith
c7123a63f4 Workaround for #99 2020-08-19 21:14:58 -07:00
Collin Smith
56e6eb4802 Replaced com.riiablo.save.D2S with com.riiablo.save.d2s package contents
Removed dangling byte[] data refs within CharData for serialization
Removed dangling FileHandle file refs within CharData and D2S
Removed some methods within D2S which should not be required anymore
Reduced visibility of D2SReader96#readD2S -- should be package-private
Created D2SWriter with D2SWriterStub to temp hold D2S data refs until serialization is finished
D2SWriter will eventually contain code to serialize CharData to byte[]
Changed D2S.MercData int xp to long experience (is really a uint32)
Created some public accessor fields within D2S to grab basic version agnostic info
Created some deprecated public accessor fields within D2S until CharacterPreview is fixed
2020-08-19 20:43:14 -07:00
Collin Smith
8c3c304dcd Created ByteOutput#writeString(CharSequence,int)
writeString writes a string and either truncates or pads it with zeros to len
2020-08-19 20:27:05 -07:00
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
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
Collin Smith
efce34ef8a Renamed len to maxLen 2020-08-11 00:55:04 -07:00
Collin Smith
8b31ee02a1 Bugfix 2020-08-11 00:28:59 -07:00
Collin Smith
e7ab37c01c Added methods to safely read unsigned values in their java signed limits 2020-08-11 00:24:53 -07:00
Collin Smith
871cadaa2b Moved BitConstraints#isUnsigned to BitUtils 2020-08-10 21:22:26 -07:00
Collin Smith
90564f39a3 Committing JUnit tests for BitOutput and interoperability 2020-08-10 18:43:01 -07:00
Collin Smith
9b0a3cf498 Filled remaining methods and changed write methods to support chaining 2020-08-10 18:35:45 -07:00
Collin Smith
8941ceee6e Implemented BitOutput#skipBits(long) and ByteOutput#skipBytes(int) 2020-08-10 18:34:54 -07:00
Collin Smith
984a0864ea Implemented writeString(CharSequence,int) 2020-08-10 18:34:12 -07:00
Collin Smith
2433fac1fe Implemented writeBoolean(boolean) and write1(int) methods to write a single bit 2020-08-10 18:33:40 -07:00
Collin Smith
4a00f0207f Relaxed requirements to allow writing 0 bits (a no-op) 2020-08-10 18:32:57 -07:00
Collin Smith
043e032ec5 Added getter for ByteInput ByteBuf for testing 2020-08-10 18:32:13 -07:00
Collin Smith
43b2eda1c6 Added method chaining support 2020-08-10 17:35:22 -07:00
Collin Smith
74d980319a Cleaned up flush and align methods
flush write cache and then erases it
align performs a flush and returns ByteOutput view
Reduced visibility of writeSigned and writeUnsigned
Implemented write signed methods
Implemented writeRaw method
Added getters for bitsCached and cache fields with package visibility
2020-08-10 01:49:36 -07:00
Collin Smith
66840f94d7 Refactored _writeUnsigned with _writeRaw with unsigned bit limits 2020-08-09 23:11:48 -07:00
Collin Smith
f901989e14 Implemented _writeRaw(long,int) 2020-08-09 23:05:38 -07:00
Collin Smith
11555397e3 Created ByteOutput and BitOutput 2020-08-09 20:06:06 -07:00
Collin Smith
4e2cd665cd Made bitsToAdd final 2020-08-09 20:05:44 -07:00