Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Commit

Permalink
d2core/d2records: rename some Ids to IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Jun 13, 2021
1 parent 9c87bd7 commit 6fb564a
Show file tree
Hide file tree
Showing 11 changed files with 7,944 additions and 7,948 deletions.
2 changes: 1 addition & 1 deletion d2core/d2map/d2mapstamp/stamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (mr *Stamp) Entities(tileOffsetX, tileOffsetY int) []d2interface.MapEntity
continue
}

objectRecord := mr.factory.asset.Records.Object.Details[lookup.ObjectsTxtId]
objectRecord := mr.factory.asset.Records.Object.Details[lookup.ObjectsTxtID]

if objectRecord != nil {
// nolint:gomnd // constant
Expand Down
4 changes: 2 additions & 2 deletions d2core/d2records/missiles_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func missilesLoader(r *RecordManager, d *d2txt.DataDictionary) error {
for d.Next() {
record := &MissileRecord{
Name: d.String("Missile"),
Id: d.Number("Id"),
ID: d.Number("Id"),

ClientMovementFunc: d.Number("pCltDoFunc"),
ClientCollisionFunc: d.Number("pCltHitFunc"),
Expand Down Expand Up @@ -296,7 +296,7 @@ func missilesLoader(r *RecordManager, d *d2txt.DataDictionary) error {
},
}

records[record.Id] = record
records[record.ID] = record
r.missilesByName[sanitizeMissilesKey(record.Name)] = record
}

Expand Down
2 changes: 1 addition & 1 deletion d2core/d2records/missiles_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ type MissileRecord struct {
ServerMovementFunc int
ClientMovementFunc int
ClientCollisionFunc int
Id int
ID int
ServerCollisionFunc int
ServerDamageFunc int
Velocity int
Expand Down
28 changes: 14 additions & 14 deletions d2core/d2records/monster_stats_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func monsterStatsLoader(r *RecordManager, d *d2txt.DataDictionary) error {
ID: d.Number("hcIdx"),
BaseKey: d.String("BaseId"),
NextKey: d.String("NextInClass"),
PaletteId: d.Number("TransLvl"),
PaletteID: d.Number("TransLvl"),
NameString: d.String("NameStr"),
ExtraDataKey: d.String("MonStatsEx"),
PropertiesKey: d.String("MonProp"),
Expand All @@ -30,8 +30,8 @@ func monsterStatsLoader(r *RecordManager, d *d2txt.DataDictionary) error {
SpawnOffsetX: d.Number("spawnx"),
SpawnOffsetY: d.Number("spawny"),
SpawnAnimationKey: d.String("spawnmode"),
MinionId1: d.String("minion1"),
MinionId2: d.String("minion2"),
MinionID1: d.String("minion1"),
MinionID2: d.String("minion2"),
IsLeader: d.Number("SetBoss") > 0,
TransferLeadership: d.Number("BossXfer") > 0,
MinionPartyMin: d.Number("PartyMin"),
Expand Down Expand Up @@ -108,14 +108,14 @@ func monsterStatsLoader(r *RecordManager, d *d2txt.DataDictionary) error {
IgnorePets: d.Number("petIgnore") > 0,
DealsDamageOnDeath: d.Number("deathDmg") > 0,
GenericSpawn: d.Number("genericSpawn") > 0,
SkillId1: d.String("Skill1"),
SkillId2: d.String("Skill2"),
SkillId3: d.String("Skill3"),
SkillId4: d.String("Skill4"),
SkillId5: d.String("Skill5"),
SkillId6: d.String("Skill6"),
SkillId7: d.String("Skill7"),
SkillId8: d.String("Skill8"),
SkillID1: d.String("Skill1"),
SkillID2: d.String("Skill2"),
SkillID3: d.String("Skill3"),
SkillID4: d.String("Skill4"),
SkillID5: d.String("Skill5"),
SkillID6: d.String("Skill6"),
SkillID7: d.String("Skill7"),
SkillID8: d.String("Skill8"),
SkillAnimation1: d.String("Sk1mode"),
SkillAnimation2: d.String("Sk2mode"),
SkillAnimation3: d.String("Sk3mode"),
Expand Down Expand Up @@ -157,7 +157,7 @@ func monsterStatsLoader(r *RecordManager, d *d2txt.DataDictionary) error {
ResistancePoisonNightmare: d.Number("ResPo(N)"),
ResistancePoisonHell: d.Number("ResPo(H)"),
HealthRegenPerFrame: d.Number("DamageRegen"),
DamageSkillId: d.String("SkillDamage"),
DamageSkillID: d.String("SkillDamage"),
IgnoreMonLevelTxt: d.Number("noRatio") > 0,
CanBlockWithoutShield: d.Number("NoShldBlock") > 0,
ChanceToBlockNormal: d.Number("ToBlock"),
Expand Down Expand Up @@ -257,8 +257,8 @@ func monsterStatsLoader(r *RecordManager, d *d2txt.DataDictionary) error {
TreasureClassQuestNormal: d.String("TreasureClass4"),
TreasureClassQuestNightmare: d.String("TreasureClass4(N)"),
TreasureClassQuestHell: d.String("TreasureClass4(H)"),
TreasureClassQuestTriggerId: d.String("TCQuestId"),
TreasureClassQuestCompleteId: d.String("TCQuestCP"),
TreasureClassQuestTriggerID: d.String("TCQuestId"),
TreasureClassQuestCompleteID: d.String("TCQuestCP"),
SpecialEndDeath: d.Number("SplEndDeath"),
SpecialGetModeChart: d.Number("SplGetModeChart") > 0,
SpecialEndGeneric: d.Number("SplEndGeneric") > 0,
Expand Down
28 changes: 14 additions & 14 deletions d2core/d2records/monster_stats_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type (
// MonStatRecord represents a single row from `data/global/excel/monstats.txt` in the MPQ files.
// These records are used for creating monsters.
MonStatRecord struct {
TreasureClassQuestCompleteId string
TreasureClassQuestCompleteID string
Key string
BaseKey string
NextKey string
Expand All @@ -24,8 +24,8 @@ type (
AnimationDirectoryToken string
SpawnKey string
SpawnAnimationKey string
MinionId1 string
MinionId2 string
MinionID1 string
MinionID2 string
SoundKeyNormal string
SoundKeySpecial string
MissileA1 string
Expand All @@ -36,14 +36,14 @@ type (
MissileS4 string
MissileC string
MissileSQ string
SkillId1 string
SkillId2 string
SkillId3 string
SkillId4 string
SkillId5 string
SkillId6 string
SkillId7 string
SkillId8 string
SkillID1 string
SkillID2 string
SkillID3 string
SkillID4 string
SkillID5 string
SkillID6 string
SkillID7 string
SkillID8 string
SkillAnimation1 string
SkillAnimation2 string
SkillAnimation3 string
Expand All @@ -52,7 +52,7 @@ type (
SkillAnimation6 string
SkillAnimation7 string
SkillAnimation8 string
DamageSkillId string
DamageSkillID string
ElementAttackMode1 string
ElementAttackMode2 string
ElementAttackMode3 string
Expand All @@ -71,9 +71,9 @@ type (
TreasureClassQuestNormal string
TreasureClassQuestNightmare string
TreasureClassQuestHell string
TreasureClassQuestTriggerId string
TreasureClassQuestTriggerID string
ResistanceMagicNightmare int
PaletteId int
PaletteID int
SpawnOffsetX int
SpawnOffsetY int
MinionPartyMin int
Expand Down
6 changes: 3 additions & 3 deletions d2core/d2records/object_lookup_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ type ObjectLookupRecord struct {
S3 string
Act int
Direction int
MonstatsTxtId int
ObjectsTxtId int
Id int
MonstatsTxtID int
ObjectsTxtID int
ID int
Type d2enum.ObjectType
Index int
}

0 comments on commit 6fb564a

Please sign in to comment.