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

Renamed MonStatRecord

This commit is contained in:
Intyre 2020-12-18 18:59:29 +01:00
parent af6a8272dd
commit 2dc490b152
5 changed files with 8 additions and 8 deletions

View File

@ -297,7 +297,7 @@ var skillDetails = map[int]*d2records.SkillRecord{
} }
// nolint:gochecknoglobals // just a test // nolint:gochecknoglobals // just a test
var monStats = map[string]*d2records.MonStatsRecord{ var monStats = map[string]*d2records.MonStatRecord{
"Specter": {NameString: "Specter", ID: 40}, "Specter": {NameString: "Specter", ID: 40},
} }

View File

@ -180,7 +180,7 @@ func (f *MapEntityFactory) NewItem(x, y int, codes ...string) (*Item, error) {
} }
// NewNPC creates a new NPC and returns a pointer to it. // NewNPC creates a new NPC and returns a pointer to it.
func (f *MapEntityFactory) NewNPC(x, y int, monstat *d2records.MonStatsRecord, direction int) (*NPC, error) { func (f *MapEntityFactory) NewNPC(x, y int, monstat *d2records.MonStatRecord, direction int) (*NPC, error) {
// https://github.com/OpenDiablo2/OpenDiablo2/issues/803 // https://github.com/OpenDiablo2/OpenDiablo2/issues/803
result := &NPC{ result := &NPC{
mapEntity: newMapEntity(x, y), mapEntity: newMapEntity(x, y),

View File

@ -22,8 +22,8 @@ type NPC struct {
action int action int
path int path int
repetitions int repetitions int
monstatRecord *d2records.MonStatsRecord
monstatEx *d2records.MonStats2Record monstatEx *d2records.MonStats2Record
monstatRecord *d2records.MonStatRecord
HasPaths bool HasPaths bool
isDone bool isDone bool
} }

View File

@ -10,7 +10,7 @@ func monsterStatsLoader(r *RecordManager, d *d2txt.DataDictionary) error {
records := make(MonStats) records := make(MonStats)
for d.Next() { for d.Next() {
record := &MonStatsRecord{ record := &MonStatRecord{
Key: d.String("Id"), Key: d.String("Id"),
ID: d.Number("hcIdx"), ID: d.Number("hcIdx"),
BaseKey: d.String("BaseId"), BaseKey: d.String("BaseId"),

View File

@ -4,13 +4,13 @@ import "github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
// https://d2mods.info/forum/kb/viewarticle?a=360 // https://d2mods.info/forum/kb/viewarticle?a=360
// MonStats stores all of the MonStat Records // MonStats stores all of the MonStatRecords
type MonStats map[string]*MonStatsRecord type MonStats map[string]*MonStatRecord
type ( type (
// MonStatsRecord represents a single row from `data/global/excel/monstats.txt` in the MPQ files. // MonStatRecord represents a single row from `data/global/excel/monstats.txt` in the MPQ files.
// These records are used for creating monsters. // These records are used for creating monsters.
MonStatsRecord struct { MonStatRecord struct {
// Key contains the pointer that will be used in other txt files // Key contains the pointer that will be used in other txt files
// such as levels.txt and superuniques.txt. // such as levels.txt and superuniques.txt.