mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-05 01:37:17 -05:00
Renamed CharStatRecord
This commit is contained in:
parent
c7288eec38
commit
a62e21a572
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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",
|
||||
|
@ -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"),
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user