* logger for d2audio & d2map
* logger for d2ui e.t.c
* d2inventory now passes on error messages
* no more importing log in d2core
* implemented #925
* added logger to part of d2networking & fixed "need to be changed" comments
* fixed lints
* fixed errors
Co-authored-by: M. Sz <mszeptuch@protonmail.com>
* suppressing the magic number lint errors in mapgen, it will get a heavy refactor soon, hopefully...
* adding string token constants for SkillClass
* adding panic on error to left/right skill select render
* fixed cuddle lint error
* fixed unnecessary conversion, unused func param lint errors in dcc_animation.go
* adding comment for skill class tokens
* fixed typo in comment
* removed unused parameter in dcc/dc6 animations
* supress warning about Object.setMode always being passed direction value of 0
* fixed all invalid golint directives
* fixed a couple gocritic lint errors
* Casting a skill now plays the corresponding overlay(if any).
* Prevent a crash caused by nil pointer in HeroSkill deserialization, happening when
unmarshalling HeroSkill from packets as a remote client.
* Add PlayerAnimationModeNone to handle some of the Skills(e.g.
Paladin auras) having "" as animation mode.
* Joining a game as remote client now waits for map generation to finish
before rendering map or processing map entities. This is temporary hack to prevent the game from
crashing due to concurrent map read & write exception.
* Send CastSkill packet to other clients.
Co-authored-by: Presiyan Ivanov <presiyan-ivanov@users.noreply.github.com>
* Remove weapons, armor, misc, itemCommon, itemTyps datadict singletons
- removed loader calls from d2app
- removed the HeroObjects singleton from `d2core/d2inventory`
- added an InventoryItemFactory in d2inventory
- package-level functions that use data records are now methods of the InventoryItemFactory
- renamed ItemGenerator in d2item to ItemFactory
- package-level functions that use records are now methods of ItemFactory
- d2map.MapEntityFactory now has an item factory instance for creating items
- fixed a bug in unique item record loader where it loaded an empty record
- added a PlayerStateFactory for creating a player state (uses the asset manager)
- updated the test inventory/equipment code in d2player to handle errors from the ItemFactory
- character select and character creation screens have a player state and inventory item factory
- updated item tests to use the item factory
* minor edit
* Removed d2datadict.Experience singleton
added a HeroStatsFactory, much like the other factories. The factory gets an
asset manager reference in order to use data records.
* removed d2datadict.AutoMagic singleton
* removed d2datadict.AutoMap singleton
* removed d2datadict.BodyLocations singleton
* removed d2datadict.Books singleton
* Removed singletons for level records
- removed loader calls in d2app
- changed type references from d2datadict to d2records
- added a `MapGenerator` in d2mapgen which uses thew asset manager and map engine
- package-level map generation functions are now MapGenerator methods
- `d2datadict.GetLevelDetails(id int)` is now a method of the RecordManager
* remove SkillCalc and MissileCalc singletons
* Removed CharStats and ItemStatCost singletons
- added an ItemStatFactory which uses the asset manager to create stats
- package-level functions for stats in d2item are now StatFactory methods
- changed type references from d2datadict to d2records
- `d2player.GetAllPlayerStates` is now a method of the `PlayerStateFactory`
* Removed DkillDesc and Skills singletons from d2datadict
- removed loader calls from d2app
- diablo2stats.Stat instances are given a reference to the factory for doing record lookups
* update the stats test to use mock a asset manager and stat factory
* fixed diablo2stats tests and diablo2item tests
* removed CompCodes singleton from d2datadict
* remove cubemain singleton from d2datadict
* removed DifficultyLevels singleton from d2datadict
* removed ElemTypes singleton from d2datadict
* removed events.go loader from d2datadict (was unused)
* removed Gems singleton from d2datadict
* removed Hireling and Inventory singletons from d2datadict
* removed MagicPrefix and MagicSuffix singletons from d2datadict
* removed ItemRatios singleton from d2datadict
* removed Missiles singleton from d2datadict
* removed MonModes singleton
* Removed all monster and npc singletons from d2datadict
- MapStamp instances now get a reference to their factory for doing record lookups
* removed SoundEntry and SoundEnviron singletons from d2datadict
* Initial player Left skill and Right skill handling
* Handle empty skill names in charStats.BaseSkils + add Attack skill for all classes.
Co-authored-by: Presiyan Ivanov <presiyan-ivanov@users.noreply.github.com>