1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-05 01:37:17 -05:00

Renamed CharStatRecord

This commit is contained in:
Intyre 2020-12-18 18:50:42 +01:00
parent c7288eec38
commit a62e21a572
6 changed files with 10 additions and 10 deletions

View File

@ -110,7 +110,7 @@ func (f *HeroStateFactory) GetAllHeroStates() ([]*HeroState, error) {
}
// CreateHeroSkillsState will assemble the hero skills from the class stats record.
func (f *HeroStateFactory) CreateHeroSkillsState(classStats *d2records.CharStatsRecord, heroType d2enum.Hero) (map[int]*HeroSkill, error) {
func (f *HeroStateFactory) CreateHeroSkillsState(classStats *d2records.CharStatRecord, heroType d2enum.Hero) (map[int]*HeroSkill, error) {
baseSkills := map[int]*HeroSkill{}
for idx := range classStats.BaseSkill {

View File

@ -30,7 +30,7 @@ type HeroStatsState struct {
}
// CreateHeroStatsState generates a running state from a hero stats.
func (f *HeroStateFactory) CreateHeroStatsState(heroClass d2enum.Hero, classStats *d2records.CharStatsRecord) *HeroStatsState {
func (f *HeroStateFactory) CreateHeroStatsState(heroClass d2enum.Hero, classStats *d2records.CharStatRecord) *HeroStatsState {
result := HeroStatsState{
Level: 1,
Experience: 0,

View File

@ -277,7 +277,7 @@ var itemStatCosts = map[string]*d2records.ItemStatCostRecord{
}
// nolint:gochecknoglobals // just a test
var charStats = map[d2enum.Hero]*d2records.CharStatsRecord{
var charStats = map[d2enum.Hero]*d2records.CharStatRecord{
d2enum.HeroPaladin: {
Class: d2enum.HeroPaladin,
SkillStrAll: "to Paladin Skill Levels",

View File

@ -38,7 +38,7 @@ func charStatsLoader(r *RecordManager, d *d2txt.DataDictionary) error {
}
for d.Next() {
record := &CharStatsRecord{
record := &CharStatRecord{
Class: stringMap[d.String("class")],
InitStr: d.Number("str"),

View File

@ -2,11 +2,11 @@ package d2records
import "github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
// CharStats holds all of the CharStatsRecords
type CharStats map[d2enum.Hero]*CharStatsRecord
// CharStats holds all of the CharStatRecords
type CharStats map[d2enum.Hero]*CharStatRecord
// CharStatsRecord is a struct that represents a single row from charstats.txt
type CharStatsRecord struct {
// CharStatRecord is a struct that represents a single row from charstats.txt
type CharStatRecord struct {
Class d2enum.Hero
// the initial stats at character level 1

View File

@ -238,12 +238,12 @@ var skillDetails = map[int]*d2records.SkillRecord{
}
// nolint:gochecknoglobals // just a test
var monStats = map[string]*d2records.MonStatsRecord{
var monStats = map[string]*d2records.MonStatRecord{
"Specter": {NameString: "Specter", ID: 40},
}
// nolint:gochecknoglobals // just a test
var charStats = map[d2enum.Hero]*d2records.CharStatsRecord{
var charStats = map[d2enum.Hero]*d2records.CharStatRecord{
d2enum.HeroPaladin: {
Class: d2enum.HeroPaladin,
SkillStrAll: "to Paladin Skill Levels",