Skip to content

Commit a4a7c8d

Browse files
authored
Merge pull request OpenDiablo2#988 from Intyre/log
Cleanup d2records logging
2 parents 7509a0d + ec91203 commit a4a7c8d

File tree

103 files changed

+159
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+159
-163
lines changed

d2core/d2audio/sound_engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const originalFPS float64 = 25
3131
// A Sound that can be started and stopped
3232
type Sound struct {
3333
effect d2interface.SoundEffect
34-
entry *d2records.SoundDetailsRecord
34+
entry *d2records.SoundDetailRecord
3535
volume float64
3636
vTarget float64
3737
vRate float64

d2core/d2hero/hero_state_factory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (f *HeroStateFactory) GetAllHeroStates() ([]*HeroState, error) {
110110
}
111111

112112
// CreateHeroSkillsState will assemble the hero skills from the class stats record.
113-
func (f *HeroStateFactory) CreateHeroSkillsState(classStats *d2records.CharStatsRecord, heroType d2enum.Hero) (map[int]*HeroSkill, error) {
113+
func (f *HeroStateFactory) CreateHeroSkillsState(classStats *d2records.CharStatRecord, heroType d2enum.Hero) (map[int]*HeroSkill, error) {
114114
baseSkills := map[int]*HeroSkill{}
115115

116116
for idx := range classStats.BaseSkill {

d2core/d2hero/hero_stats_state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type HeroStatsState struct {
3030
}
3131

3232
// CreateHeroStatsState generates a running state from a hero stats.
33-
func (f *HeroStateFactory) CreateHeroStatsState(heroClass d2enum.Hero, classStats *d2records.CharStatsRecord) *HeroStatsState {
33+
func (f *HeroStateFactory) CreateHeroStatsState(heroClass d2enum.Hero, classStats *d2records.CharStatRecord) *HeroStatsState {
3434
result := HeroStatsState{
3535
Level: 1,
3636
Experience: 0,

d2core/d2item/diablo2item/item_property_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ var itemStatCosts = map[string]*d2records.ItemStatCostRecord{
277277
}
278278

279279
// nolint:gochecknoglobals // just a test
280-
var charStats = map[d2enum.Hero]*d2records.CharStatsRecord{
280+
var charStats = map[d2enum.Hero]*d2records.CharStatRecord{
281281
d2enum.HeroPaladin: {
282282
Class: d2enum.HeroPaladin,
283283
SkillStrAll: "to Paladin Skill Levels",
@@ -297,7 +297,7 @@ var skillDetails = map[int]*d2records.SkillRecord{
297297
}
298298

299299
// nolint:gochecknoglobals // just a test
300-
var monStats = map[string]*d2records.MonStatsRecord{
300+
var monStats = map[string]*d2records.MonStatRecord{
301301
"Specter": {NameString: "Specter", ID: 40},
302302
}
303303

d2core/d2map/d2mapentity/factory.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func (f *MapEntityFactory) NewItem(x, y int, codes ...string) (*Item, error) {
180180
}
181181

182182
// NewNPC creates a new NPC and returns a pointer to it.
183-
func (f *MapEntityFactory) NewNPC(x, y int, monstat *d2records.MonStatsRecord, direction int) (*NPC, error) {
183+
func (f *MapEntityFactory) NewNPC(x, y int, monstat *d2records.MonStatRecord, direction int) (*NPC, error) {
184184
// https://github.com/OpenDiablo2/OpenDiablo2/issues/803
185185
result := &NPC{
186186
mapEntity: newMapEntity(x, y),
@@ -263,7 +263,7 @@ func (f *MapEntityFactory) NewCastOverlay(x, y int, overlayRecord *d2records.Ove
263263
}
264264

265265
// NewObject creates an instance of AnimatedComposite
266-
func (f *MapEntityFactory) NewObject(x, y int, objectRec *d2records.ObjectDetailsRecord,
266+
func (f *MapEntityFactory) NewObject(x, y int, objectRec *d2records.ObjectDetailRecord,
267267
palettePath string) (*Object, error) {
268268
locX, locY := float64(x), float64(y)
269269
entity := &Object{

d2core/d2map/d2mapentity/npc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ type NPC struct {
2222
action int
2323
path int
2424
repetitions int
25-
monstatRecord *d2records.MonStatsRecord
26-
monstatEx *d2records.MonStats2Record
25+
monstatRecord *d2records.MonStatRecord
26+
monstatEx *d2records.MonStat2Record
2727
HasPaths bool
2828
isDone bool
2929
}

d2core/d2map/d2mapentity/object.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type Object struct {
2020
composite *d2asset.Composite
2121
highlight bool
2222
// nameLabel d2ui.Label
23-
objectRecord *d2records.ObjectDetailsRecord
23+
objectRecord *d2records.ObjectDetailRecord
2424
drawLayer int
2525
name string
2626
}

d2core/d2records/armor_type_loader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func armorTypesLoader(r *RecordManager, d *d2txt.DataDictionary) error {
2222

2323
r.Animation.Token.Armor = records
2424

25-
r.Logger.Infof("Loaded %d ArmorType records", len(records))
25+
r.Debugf("Loaded %d ArmorType records", len(records))
2626

2727
return nil
2828
}

d2core/d2records/automagic_loader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func autoMagicLoader(r *RecordManager, d *d2txt.DataDictionary) error {
7979
return d.Err
8080
}
8181

82-
r.Logger.Infof("Loaded %d AutoMagic records", len(records))
82+
r.Debugf("Loaded %d AutoMagic records", len(records))
8383

8484
r.Item.AutoMagic = records
8585

d2core/d2records/automap_loader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func autoMapLoader(r *RecordManager, d *d2txt.DataDictionary) error {
3737
return d.Err
3838
}
3939

40-
r.Logger.Infof("Loaded %d AutoMapRecord records", len(records))
40+
r.Debugf("Loaded %d AutoMap records", len(records))
4141

4242
r.Level.AutoMaps = records
4343

0 commit comments

Comments
 (0)