mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-01-11 11:57:44 -05:00
removed string table singleton from d2common/d2fileformats/d2tbl/ (#900)
This commit is contained in:
parent
5ac03d6f49
commit
af1f0a0eda
@ -23,7 +23,6 @@ import (
|
||||
"golang.org/x/image/colornames"
|
||||
"gopkg.in/alecthomas/kingpin.v2"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2math"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2resource"
|
||||
@ -369,12 +368,10 @@ func (a *App) loadStrings() error {
|
||||
}
|
||||
|
||||
for _, tablePath := range tablePaths {
|
||||
data, err := a.asset.LoadFile(tablePath)
|
||||
_, err := a.asset.LoadStringTable(tablePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
d2tbl.LoadTextDictionary(data)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -19,29 +19,13 @@ type textDictionaryHashEntry struct {
|
||||
NameLength uint16
|
||||
}
|
||||
|
||||
var lookupTable TextDictionary //nolint:gochecknoglobals // currently global by design
|
||||
|
||||
const (
|
||||
crcByteCount = 2
|
||||
)
|
||||
|
||||
// TranslateString returns the translation of the given string
|
||||
func TranslateString(key string) string {
|
||||
result, ok := lookupTable[key]
|
||||
if !ok {
|
||||
// Fix to allow v.setDescLabels("#123") to be bypassed for a patch in issue #360. Reenable later.
|
||||
// log.Panicf("Could not find a string for the key '%s'", key)
|
||||
return key
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
// LoadTextDictionary loads the text dictionary from the given data
|
||||
func LoadTextDictionary(dictionaryData []byte) TextDictionary {
|
||||
if lookupTable == nil {
|
||||
lookupTable = make(TextDictionary)
|
||||
}
|
||||
lookupTable := make(TextDictionary)
|
||||
|
||||
br := d2datautils.CreateStreamReader(dictionaryData)
|
||||
|
||||
|
@ -37,7 +37,6 @@ const (
|
||||
const (
|
||||
animationBudget = 1024 * 1024 * 128
|
||||
fontBudget = 128
|
||||
tableBudget = 64
|
||||
paletteBudget = 64
|
||||
paletteTransformBudget = 64
|
||||
)
|
||||
@ -60,7 +59,7 @@ type AssetManager struct {
|
||||
config *d2config.Configuration
|
||||
logger *d2util.Logger
|
||||
loader *d2loader.Loader
|
||||
tables d2interface.Cache
|
||||
tables []d2tbl.TextDictionary
|
||||
animations d2interface.Cache
|
||||
fonts d2interface.Cache
|
||||
palettes d2interface.Cache
|
||||
@ -385,10 +384,6 @@ func (am *AssetManager) LoadPalette(palettePath string) (d2interface.Palette, er
|
||||
|
||||
// LoadStringTable loads a string table from the given path
|
||||
func (am *AssetManager) LoadStringTable(tablePath string) (d2tbl.TextDictionary, error) {
|
||||
if cached, found := am.tables.Retrieve(tablePath); found {
|
||||
return cached.(d2tbl.TextDictionary), nil
|
||||
}
|
||||
|
||||
data, err := am.LoadFile(tablePath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -401,11 +396,25 @@ func (am *AssetManager) LoadStringTable(tablePath string) (d2tbl.TextDictionary,
|
||||
|
||||
am.logger.Debug(fmt.Sprintf(fmtLoadStringTable, tablePath))
|
||||
|
||||
err = am.tables.Insert(tablePath, table, defaultCacheEntryWeight)
|
||||
am.tables = append(am.tables, table)
|
||||
|
||||
return table, err
|
||||
}
|
||||
|
||||
// TranslateString returns the translation of the given string. The string is retrieved from
|
||||
// the loaded string tables.
|
||||
func (am *AssetManager) TranslateString(key string) string {
|
||||
for idx := range am.tables {
|
||||
if value, found := am.tables[idx][key]; found {
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
// Fix to allow v.setDescLabels("#123") to be bypassed for a patch in issue #360. Reenable later.
|
||||
// log.Panicf("Could not find a string for the key '%s'", key)
|
||||
return key
|
||||
}
|
||||
|
||||
// LoadPaletteTransform loads a palette transform file
|
||||
func (am *AssetManager) LoadPaletteTransform(path string) (*d2pl2.PL2, error) {
|
||||
if pl2, found := am.transforms.Retrieve(path); found {
|
||||
|
@ -2,6 +2,7 @@ package d2asset
|
||||
|
||||
import (
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2cache"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2loader"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2util"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2records"
|
||||
@ -22,7 +23,7 @@ func NewAssetManager() (*AssetManager, error) {
|
||||
manager := &AssetManager{
|
||||
logger: d2util.NewLogger(),
|
||||
loader: loader,
|
||||
tables: d2cache.CreateCache(tableBudget),
|
||||
tables: make([]d2tbl.TextDictionary, 0),
|
||||
animations: d2cache.CreateCache(animationBudget),
|
||||
fonts: d2cache.CreateCache(fontBudget),
|
||||
palettes: d2cache.CreateCache(paletteBudget),
|
||||
|
@ -10,7 +10,6 @@ import (
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2records"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2item"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2stats"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2ui"
|
||||
@ -129,7 +128,7 @@ func (i *Item) Label() string {
|
||||
str := i.name
|
||||
|
||||
if !i.attributes.identitified {
|
||||
str = d2tbl.TranslateString(i.CommonRecord().NameString)
|
||||
str = i.factory.asset.TranslateString(i.CommonRecord().NameString)
|
||||
}
|
||||
|
||||
if i.attributes.crafted {
|
||||
@ -610,16 +609,16 @@ func (i *Item) generateItemProperties(properties []*d2records.PropertyDescriptor
|
||||
|
||||
func (i *Item) generateName() {
|
||||
if i.SetItemRecord() != nil {
|
||||
i.name = d2tbl.TranslateString(i.SetItemRecord().SetItemKey)
|
||||
i.name = i.factory.asset.TranslateString(i.SetItemRecord().SetItemKey)
|
||||
return
|
||||
}
|
||||
|
||||
if i.UniqueRecord() != nil {
|
||||
i.name = d2tbl.TranslateString(i.UniqueRecord().Name)
|
||||
i.name = i.factory.asset.TranslateString(i.UniqueRecord().Name)
|
||||
return
|
||||
}
|
||||
|
||||
name := d2tbl.TranslateString(i.CommonRecord().NameString)
|
||||
name := i.factory.asset.TranslateString(i.CommonRecord().NameString)
|
||||
|
||||
numAffixes := 0
|
||||
if prefixes := i.PrefixRecords(); prefixes != nil {
|
||||
@ -839,46 +838,52 @@ func (i *Item) GetItemDescription() []string {
|
||||
|
||||
if common.MinAC > 0 {
|
||||
min, max := common.MinAC, common.MaxAC
|
||||
str = fmt.Sprintf("%s %v %s %v", d2tbl.TranslateString(defense), min, d2tbl.TranslateString(to), max)
|
||||
str = fmt.Sprintf("%s %v %s %v", i.factory.asset.TranslateString(defense), min,
|
||||
i.factory.asset.TranslateString(to), max)
|
||||
str = d2ui.ColorTokenize(str, d2ui.ColorTokenWhite)
|
||||
lines = append(lines, str)
|
||||
}
|
||||
|
||||
if common.MinDamage > 0 {
|
||||
min, max := common.MinDamage, common.MaxDamage
|
||||
str = fmt.Sprintf("%s %v %s %v", d2tbl.TranslateString(damage1h), min, d2tbl.TranslateString(to), max)
|
||||
str = fmt.Sprintf("%s %v %s %v", i.factory.asset.TranslateString(damage1h), min,
|
||||
i.factory.asset.TranslateString(to), max)
|
||||
str = d2ui.ColorTokenize(str, d2ui.ColorTokenWhite)
|
||||
lines = append(lines, str)
|
||||
}
|
||||
|
||||
if common.Min2HandDamage > 0 {
|
||||
min, max := common.Min2HandDamage, common.Max2HandDamage
|
||||
str = fmt.Sprintf("%s %v %s %v", d2tbl.TranslateString(damage2h), min, d2tbl.TranslateString(to), max)
|
||||
str = fmt.Sprintf("%s %v %s %v", i.factory.asset.TranslateString(damage2h), min,
|
||||
i.factory.asset.TranslateString(to), max)
|
||||
str = d2ui.ColorTokenize(str, d2ui.ColorTokenWhite)
|
||||
lines = append(lines, str)
|
||||
}
|
||||
|
||||
if common.MinMissileDamage > 0 {
|
||||
min, max := common.MinMissileDamage, common.MaxMissileDamage
|
||||
str = fmt.Sprintf("%s %v %s %v", d2tbl.TranslateString(damageThrow), min, d2tbl.TranslateString(to), max)
|
||||
str = fmt.Sprintf("%s %v %s %v", i.factory.asset.TranslateString(damageThrow), min,
|
||||
i.factory.asset.TranslateString(to), max)
|
||||
str = d2ui.ColorTokenize(str, d2ui.ColorTokenWhite)
|
||||
lines = append(lines, str)
|
||||
}
|
||||
|
||||
if common.RequiredStrength > 1 {
|
||||
str = fmt.Sprintf("%s %v", d2tbl.TranslateString(reqStrength), common.RequiredStrength)
|
||||
str = fmt.Sprintf("%s %v", i.factory.asset.TranslateString(reqStrength),
|
||||
common.RequiredStrength)
|
||||
str = d2ui.ColorTokenize(str, d2ui.ColorTokenWhite)
|
||||
lines = append(lines, str)
|
||||
}
|
||||
|
||||
if common.RequiredDexterity > 1 {
|
||||
str = fmt.Sprintf("%s %v", d2tbl.TranslateString(reqDexterity), common.RequiredDexterity)
|
||||
str = fmt.Sprintf("%s %v", i.factory.asset.TranslateString(reqDexterity),
|
||||
common.RequiredDexterity)
|
||||
str = d2ui.ColorTokenize(str, d2ui.ColorTokenWhite)
|
||||
lines = append(lines, str)
|
||||
}
|
||||
|
||||
if common.RequiredLevel > 1 {
|
||||
str = fmt.Sprintf("%s %v", d2tbl.TranslateString(reqLevel), common.RequiredLevel)
|
||||
str = fmt.Sprintf("%s %v", i.factory.asset.TranslateString(reqLevel), common.RequiredLevel)
|
||||
str = d2ui.ColorTokenize(str, d2ui.ColorTokenWhite)
|
||||
lines = append(lines, str)
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import (
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2math/d2vector"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2resource"
|
||||
@ -218,7 +217,7 @@ func (f *MapEntityFactory) NewNPC(x, y int, monstat *d2records.MonStatsRecord, d
|
||||
result.composite.SetDirection(direction)
|
||||
|
||||
if result.monstatRecord != nil && result.monstatRecord.IsInteractable {
|
||||
result.name = d2tbl.TranslateString(result.monstatRecord.NameString)
|
||||
result.name = f.asset.TranslateString(result.monstatRecord.NameString)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
@ -269,7 +268,7 @@ func (f *MapEntityFactory) NewObject(x, y int, objectRec *d2records.ObjectDetail
|
||||
uuid: uuid.New().String(),
|
||||
objectRecord: objectRec,
|
||||
Position: d2vector.NewPosition(locX, locY),
|
||||
name: d2tbl.TranslateString(objectRec.Name),
|
||||
name: f.asset.TranslateString(objectRec.Name),
|
||||
}
|
||||
objectType := f.asset.Records.Object.Types[objectRec.Index]
|
||||
|
||||
|
@ -6,7 +6,6 @@ import (
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2records"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2stats"
|
||||
)
|
||||
|
||||
@ -217,7 +216,8 @@ func (s *diablo2Stat) SetValues(values ...d2stats.StatValue) {
|
||||
// Clone returns a deep copy of the diablo2Stat
|
||||
func (s *diablo2Stat) Clone() d2stats.Stat {
|
||||
clone := &diablo2Stat{
|
||||
record: s.record,
|
||||
factory: s.factory,
|
||||
record: s.record,
|
||||
}
|
||||
|
||||
clone.init()
|
||||
@ -400,7 +400,7 @@ func (s *diablo2Stat) descFn1() string {
|
||||
stringTableKey = s.record.DescStrPos
|
||||
}
|
||||
|
||||
stringTableString := d2tbl.TranslateString(stringTableKey)
|
||||
stringTableString := s.factory.asset.TranslateString(stringTableKey)
|
||||
|
||||
switch descValPosition(s.record.DescVal) {
|
||||
case descValPrefix:
|
||||
@ -429,8 +429,8 @@ func (s *diablo2Stat) descFn6() string {
|
||||
stringTableKey = s.record.DescStrPos
|
||||
}
|
||||
|
||||
str1 := d2tbl.TranslateString(stringTableKey)
|
||||
str2 := d2tbl.TranslateString(s.record.DescStr2)
|
||||
str1 := s.factory.asset.TranslateString(stringTableKey)
|
||||
str2 := s.factory.asset.TranslateString(s.record.DescStr2)
|
||||
|
||||
switch descValPosition(s.record.DescVal) {
|
||||
case descValPrefix:
|
||||
@ -460,8 +460,8 @@ func (s *diablo2Stat) descFn9() string {
|
||||
stringTableKey = s.record.DescStrPos
|
||||
}
|
||||
|
||||
str1 := d2tbl.TranslateString(stringTableKey)
|
||||
str2 := d2tbl.TranslateString(s.record.DescStr2)
|
||||
str1 := s.factory.asset.TranslateString(stringTableKey)
|
||||
str2 := s.factory.asset.TranslateString(s.record.DescStr2)
|
||||
|
||||
switch descValPosition(s.record.DescVal) {
|
||||
case descValPrefix:
|
||||
@ -488,7 +488,7 @@ func (s *diablo2Stat) descFn11() string {
|
||||
stringTableKey = s.record.DescStrPos
|
||||
}
|
||||
|
||||
str1 := d2tbl.TranslateString(stringTableKey)
|
||||
str1 := s.factory.asset.TranslateString(stringTableKey)
|
||||
|
||||
formatString := str1
|
||||
|
||||
@ -531,7 +531,7 @@ func (s *diablo2Stat) descFn14() string {
|
||||
|
||||
// `to Combat Skills`
|
||||
skillTabKey := classRecord.SkillStrTab[skillTabIndex]
|
||||
skillTabStr := d2tbl.TranslateString(skillTabKey)
|
||||
skillTabStr := s.factory.asset.TranslateString(skillTabKey)
|
||||
skillTabStr = strings.ReplaceAll(skillTabStr, "+%d ", "") // has a token we dont need
|
||||
|
||||
// `(Paladin Only)`
|
||||
@ -544,7 +544,7 @@ func (s *diablo2Stat) descFn15() string {
|
||||
chance, lvl, skill := s.values[0], s.values[1], s.values[2]
|
||||
|
||||
// Special case, `chance to cast` format is actually in the string table!
|
||||
chanceToCastStr := d2tbl.TranslateString(s.record.DescStrPos)
|
||||
chanceToCastStr := s.factory.asset.TranslateString(s.record.DescStrPos)
|
||||
|
||||
return fmt.Sprintf(chanceToCastStr, chance.Int(), lvl.Int(), skill)
|
||||
}
|
||||
@ -553,14 +553,14 @@ func (s *diablo2Stat) descFn16() string {
|
||||
skillLevel, skillIndex := s.values[0], s.values[1]
|
||||
|
||||
// Special case, `Level # XYZ Aura When Equipped`, format is actually in the string table!
|
||||
format := d2tbl.TranslateString(s.record.DescStrPos)
|
||||
format := s.factory.asset.TranslateString(s.record.DescStrPos)
|
||||
|
||||
return fmt.Sprintf(format, skillLevel.Int(), skillIndex)
|
||||
}
|
||||
|
||||
func (s *diablo2Stat) descFn22() string {
|
||||
arBonus, monsterIndex := s.values[0], s.values[1]
|
||||
arVersus := d2tbl.TranslateString(s.record.DescStrPos)
|
||||
arVersus := s.factory.asset.TranslateString(s.record.DescStrPos)
|
||||
|
||||
return fmt.Sprintf(threeComponentStr, arBonus, arVersus, monsterIndex)
|
||||
}
|
||||
@ -574,7 +574,7 @@ func (s *diablo2Stat) descFn24() string {
|
||||
s.values[2].Int(),
|
||||
s.values[3].Int()
|
||||
|
||||
chargeStr := d2tbl.TranslateString(s.record.DescStrPos)
|
||||
chargeStr := s.factory.asset.TranslateString(s.record.DescStrPos)
|
||||
chargeStr = fmt.Sprintf(chargeStr, chargeCurrent, chargeMax)
|
||||
|
||||
return fmt.Sprintf(format, lvl, skill, chargeStr)
|
||||
|
@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2stats"
|
||||
)
|
||||
@ -109,7 +108,7 @@ func (f *StatFactory) stringerClassAllSkills(sv d2stats.StatValue) string {
|
||||
heroMap := f.getHeroMap()
|
||||
classRecord := f.asset.Records.Character.Stats[heroMap[heroIndex]]
|
||||
|
||||
return d2tbl.TranslateString(classRecord.SkillStrAll)
|
||||
return f.asset.TranslateString(classRecord.SkillStrAll)
|
||||
}
|
||||
|
||||
func (f *StatFactory) stringerClassOnly(sv d2stats.StatValue) string {
|
||||
@ -118,7 +117,7 @@ func (f *StatFactory) stringerClassOnly(sv d2stats.StatValue) string {
|
||||
classRecord := f.asset.Records.Character.Stats[heroMap[heroIndex]]
|
||||
classOnlyKey := classRecord.SkillStrClassOnly
|
||||
|
||||
return d2tbl.TranslateString(classOnlyKey)
|
||||
return f.asset.TranslateString(classOnlyKey)
|
||||
}
|
||||
|
||||
func (f *StatFactory) stringerSkillName(sv d2stats.StatValue) string {
|
||||
|
@ -11,7 +11,6 @@ import (
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2hero"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2resource"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset"
|
||||
@ -324,7 +323,7 @@ func (v *MainMenu) createButtons(loading d2screen.LoadingState) {
|
||||
v.mapTestButton.OnActivated(func() { v.onMapTestClicked() })
|
||||
|
||||
v.btnTCPIPCancel = v.uiManager.NewButton(d2ui.ButtonTypeMedium,
|
||||
d2tbl.TranslateString("cancel"))
|
||||
v.asset.TranslateString("cancel"))
|
||||
v.btnTCPIPCancel.SetPosition(tcpBtnX, tcpBtnY)
|
||||
v.btnTCPIPCancel.OnActivated(func() { v.onTCPIPCancelClicked() })
|
||||
|
||||
@ -350,7 +349,7 @@ func (v *MainMenu) createMultiplayerMenuButtons() {
|
||||
v.networkTCPIPButton.OnActivated(func() { v.onNetworkTCPIPClicked() })
|
||||
|
||||
v.networkCancelButton = v.uiManager.NewButton(d2ui.ButtonTypeWide,
|
||||
d2tbl.TranslateString("cancel"))
|
||||
v.asset.TranslateString("cancel"))
|
||||
v.networkCancelButton.SetPosition(networkCancelBtnX, networkCancelBtnY)
|
||||
v.networkCancelButton.OnActivated(func() { v.onNetworkCancelClicked() })
|
||||
|
||||
|
@ -10,7 +10,6 @@ import (
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2inventory"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2resource"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2util"
|
||||
@ -683,25 +682,25 @@ func (v *SelectHeroClass) updateHeroText() {
|
||||
case d2enum.HeroNone:
|
||||
return
|
||||
case d2enum.HeroBarbarian:
|
||||
v.heroClassLabel.SetText(d2tbl.TranslateString("partycharbar"))
|
||||
v.heroClassLabel.SetText(v.asset.TranslateString("partycharbar"))
|
||||
v.setDescLabels("He is unequaled in close-quarters combat and mastery of weapons.")
|
||||
case d2enum.HeroNecromancer:
|
||||
v.heroClassLabel.SetText(d2tbl.TranslateString("partycharnec"))
|
||||
v.heroClassLabel.SetText(v.asset.TranslateString("partycharnec"))
|
||||
v.setDescLabels("Summoning undead minions and cursing his enemies are his specialties.")
|
||||
case d2enum.HeroPaladin:
|
||||
v.heroClassLabel.SetText(d2tbl.TranslateString("partycharpal"))
|
||||
v.heroClassLabel.SetText(v.asset.TranslateString("partycharpal"))
|
||||
v.setDescLabels("He is a natural party leader, holy man, and blessed warrior.")
|
||||
case d2enum.HeroAssassin:
|
||||
v.heroClassLabel.SetText(d2tbl.TranslateString("partycharass"))
|
||||
v.heroClassLabel.SetText(v.asset.TranslateString("partycharass"))
|
||||
v.setDescLabels("Schooled in the Martial Arts, her mind and body are deadly weapons.")
|
||||
case d2enum.HeroSorceress:
|
||||
v.heroClassLabel.SetText(d2tbl.TranslateString("partycharsor"))
|
||||
v.heroClassLabel.SetText(v.asset.TranslateString("partycharsor"))
|
||||
v.setDescLabels("She has mastered the elemental magicks -- fire, lightning, and ice.")
|
||||
case d2enum.HeroAmazon:
|
||||
v.heroClassLabel.SetText(d2tbl.TranslateString("partycharama"))
|
||||
v.heroClassLabel.SetText(v.asset.TranslateString("partycharama"))
|
||||
v.setDescLabels("Skilled with the spear and the bow, she is a very versatile fighter.")
|
||||
case d2enum.HeroDruid:
|
||||
v.heroClassLabel.SetText(d2tbl.TranslateString("partychardru"))
|
||||
v.heroClassLabel.SetText(v.asset.TranslateString("partychardru"))
|
||||
v.setDescLabels("Commanding the forces of nature, he summons wild beasts and raging storms to his side.")
|
||||
}
|
||||
}
|
||||
@ -712,7 +711,7 @@ const (
|
||||
)
|
||||
|
||||
func (v *SelectHeroClass) setDescLabels(descKey string) {
|
||||
heroDesc := d2tbl.TranslateString(descKey)
|
||||
heroDesc := v.asset.TranslateString(descKey)
|
||||
parts := d2util.SplitIntoLinesWithMaxWidth(heroDesc, heroDescCharWidth)
|
||||
|
||||
numLines := len(parts)
|
||||
|
@ -8,8 +8,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2geom"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2util"
|
||||
|
||||
@ -1257,7 +1255,7 @@ func (g *GameControls) renderMiniPanel(target d2interface.Surface) error {
|
||||
}
|
||||
|
||||
rect := &g.actionableRegions[miniPanelButton].rect
|
||||
g.nameLabel.SetText(d2tbl.TranslateString(stringTableKey))
|
||||
g.nameLabel.SetText(g.asset.TranslateString(stringTableKey))
|
||||
|
||||
halfButtonWidth := rect.Width >> 1
|
||||
halfButtonHeight := rect.Height >> 1
|
||||
@ -1363,7 +1361,7 @@ func (g *GameControls) renderHealthTooltip(target d2interface.Surface) {
|
||||
mx, my := g.lastMouseX, g.lastMouseY
|
||||
|
||||
// Create and format Health string from string lookup table.
|
||||
fmtHealth := d2tbl.TranslateString("panelhealth")
|
||||
fmtHealth := g.asset.TranslateString("panelhealth")
|
||||
healthCurr, healthMax := g.hero.Stats.Health, g.hero.Stats.MaxHealth
|
||||
strPanelHealth := fmt.Sprintf(fmtHealth, healthCurr, healthMax)
|
||||
|
||||
@ -1381,7 +1379,7 @@ func (g *GameControls) renderManaTooltip(target d2interface.Surface) {
|
||||
mx, my := g.lastMouseX, g.lastMouseY
|
||||
|
||||
// Create and format Mana string from string lookup table.
|
||||
fmtMana := d2tbl.TranslateString("panelmana")
|
||||
fmtMana := g.asset.TranslateString("panelmana")
|
||||
manaCurr, manaMax := g.hero.Stats.Mana, g.hero.Stats.MaxMana
|
||||
strPanelMana := fmt.Sprintf(fmtMana, manaCurr, manaMax)
|
||||
|
||||
@ -1415,7 +1413,7 @@ func (g *GameControls) renderRunWalkTooltip(target d2interface.Surface) {
|
||||
stringTableKey = "RunOn"
|
||||
}
|
||||
|
||||
g.nameLabel.SetText(d2tbl.TranslateString(stringTableKey))
|
||||
g.nameLabel.SetText(g.asset.TranslateString(stringTableKey))
|
||||
|
||||
rect := &g.actionableRegions[walkRun].rect
|
||||
|
||||
@ -1443,7 +1441,7 @@ func (g *GameControls) renderStaminaTooltip(target d2interface.Surface) {
|
||||
}
|
||||
|
||||
// Create and format Stamina string from string lookup table.
|
||||
fmtStamina := d2tbl.TranslateString("panelstamina")
|
||||
fmtStamina := g.asset.TranslateString("panelstamina")
|
||||
staminaCurr, staminaMax := int(g.hero.Stats.Stamina), g.hero.Stats.MaxStamina
|
||||
strPanelStamina := fmt.Sprintf(fmtStamina, staminaCurr, staminaMax)
|
||||
|
||||
@ -1473,7 +1471,7 @@ func (g *GameControls) renderExperienceTooltip(target d2interface.Surface) {
|
||||
}
|
||||
|
||||
// Create and format Experience string from string lookup table.
|
||||
fmtExp := d2tbl.TranslateString("panelexp")
|
||||
fmtExp := g.asset.TranslateString("panelexp")
|
||||
|
||||
// The English string for "panelexp" is "Experience: %u / %u", however %u doesn't
|
||||
// translate well. So we need to rewrite %u into a formatable Go verb. %d is used in other
|
||||
|
@ -6,7 +6,6 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2resource"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
||||
@ -310,7 +309,7 @@ func (h *HelpOverlay) setupOverlayFrame() {
|
||||
|
||||
func (h *HelpOverlay) setupTitleAndButton() {
|
||||
// Title
|
||||
text := d2tbl.TranslateString("Strhelp1") // "Diablo II Help"
|
||||
text := h.asset.TranslateString("Strhelp1") // "Diablo II Help"
|
||||
newLabel := h.uiManager.NewLabel(d2resource.Font16, d2resource.PaletteSky)
|
||||
newLabel.SetText(text)
|
||||
|
||||
@ -326,7 +325,7 @@ func (h *HelpOverlay) setupTitleAndButton() {
|
||||
h.closeButton.OnActivated(func() { h.Close() })
|
||||
|
||||
newLabel = h.uiManager.NewLabel(d2resource.Font16, d2resource.PaletteSky)
|
||||
newLabel.SetText(d2tbl.TranslateString("strClose")) // "Close"
|
||||
newLabel.SetText(h.asset.TranslateString("strClose")) // "Close"
|
||||
newLabel.SetPosition(closeButtonLabelX, closeButtonLabelY)
|
||||
h.text = append(h.text, newLabel)
|
||||
}
|
||||
@ -339,40 +338,40 @@ func (h *HelpOverlay) setupBulletedList() {
|
||||
callouts := []struct{ text string }{
|
||||
// "Ctrl" should be hotkey // "Hold Down <%s> to Run"
|
||||
{text: fmt.Sprintf(
|
||||
d2tbl.TranslateString("StrHelp2"),
|
||||
h.asset.TranslateString("StrHelp2"),
|
||||
h.keyMap.GetKeysForGameEvent(d2enum.HoldRun).Primary.GetString(),
|
||||
)},
|
||||
|
||||
// "Alt" should be hotkey // "Hold down <%s> to highlight items on the ground"
|
||||
{text: fmt.Sprintf(
|
||||
d2tbl.TranslateString("StrHelp3"),
|
||||
h.asset.TranslateString("StrHelp3"),
|
||||
h.keyMap.GetKeysForGameEvent(d2enum.HoldShowGroundItems).Primary.GetString(),
|
||||
)},
|
||||
|
||||
// "Shift" should be hotkey // "Hold down <%s> to attack while standing still"
|
||||
{text: fmt.Sprintf(
|
||||
d2tbl.TranslateString("StrHelp4"),
|
||||
h.asset.TranslateString("StrHelp4"),
|
||||
h.keyMap.GetKeysForGameEvent(d2enum.HoldStandStill).Primary.GetString(),
|
||||
)},
|
||||
|
||||
// "Tab" should be hotkey // "Hit <%s> to toggle the automap on and off"
|
||||
{text: fmt.Sprintf(
|
||||
d2tbl.TranslateString("StrHelp5"),
|
||||
h.asset.TranslateString("StrHelp5"),
|
||||
h.keyMap.GetKeysForGameEvent(d2enum.ToggleAutomap).Primary.GetString(),
|
||||
)},
|
||||
|
||||
// "Hit <Esc> to bring up the Game Menu"
|
||||
{text: d2tbl.TranslateString("StrHelp6")},
|
||||
{text: h.asset.TranslateString("StrHelp6")},
|
||||
|
||||
// "Hit <Enter> to go into chat mode"
|
||||
{text: d2tbl.TranslateString("StrHelp7")},
|
||||
{text: h.asset.TranslateString("StrHelp7")},
|
||||
|
||||
// "Hit F1-F8 to set your Left or Right Mouse Buttton Skills."
|
||||
{text: d2tbl.TranslateString("StrHelp8")},
|
||||
{text: h.asset.TranslateString("StrHelp8")},
|
||||
|
||||
// "H" should be hotkey,
|
||||
{text: fmt.Sprintf(
|
||||
d2tbl.TranslateString("StrHelp8a"),
|
||||
h.asset.TranslateString("StrHelp8a"),
|
||||
h.keyMap.GetKeysForGameEvent(d2enum.ToggleHelpScreen).Primary.GetString(),
|
||||
)},
|
||||
}
|
||||
@ -393,7 +392,7 @@ func (h *HelpOverlay) setupBulletedList() {
|
||||
// nolint:funlen // can't reduce
|
||||
func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("strlvlup"), // "New Stats"
|
||||
LabelText: h.asset.TranslateString("strlvlup"), // "New Stats"
|
||||
LabelX: newStatsLabelX,
|
||||
LabelY: newStatsLabelY,
|
||||
DotX: newStatsDotX,
|
||||
@ -401,7 +400,7 @@ func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
})
|
||||
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("strnewskl"), // "New Skill"
|
||||
LabelText: h.asset.TranslateString("strnewskl"), // "New Skill"
|
||||
LabelX: newSkillLabelX,
|
||||
LabelY: newSkillLabelY,
|
||||
DotX: newSkillDotX,
|
||||
@ -410,19 +409,19 @@ func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
|
||||
// Some of the help fonts require mulktiple lines.
|
||||
h.createLabel(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp10"), // "Left Mouse-"
|
||||
LabelText: h.asset.TranslateString("StrHelp10"), // "Left Mouse-"
|
||||
LabelX: leftMouseLabelX,
|
||||
LabelY: leftMouseLabelY,
|
||||
})
|
||||
|
||||
h.createLabel(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp11"), // "Button Skill"
|
||||
LabelText: h.asset.TranslateString("StrHelp11"), // "Button Skill"
|
||||
LabelX: leftButtonSkillLabelX,
|
||||
LabelY: leftButtonSkillLabelY,
|
||||
})
|
||||
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp12"), // "(Click to Change)"
|
||||
LabelText: h.asset.TranslateString("StrHelp12"), // "(Click to Change)"
|
||||
LabelX: leftSkillClickToChangeLabelX,
|
||||
LabelY: leftSkillClickToChangeLabelY,
|
||||
DotX: leftSkillClickToChangeDotX,
|
||||
@ -430,19 +429,19 @@ func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
})
|
||||
|
||||
h.createLabel(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp13"), // "Right Mouse"
|
||||
LabelText: h.asset.TranslateString("StrHelp13"), // "Right Mouse"
|
||||
LabelX: rightMouseLabelX,
|
||||
LabelY: rightMouseLabelY,
|
||||
})
|
||||
|
||||
h.createLabel(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp11"), // "Button Skill"
|
||||
LabelText: h.asset.TranslateString("StrHelp11"), // "Button Skill"
|
||||
LabelX: rightButtonSkillLabelX,
|
||||
LabelY: rightButtonSkillLabelY,
|
||||
})
|
||||
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp12"), // "(Click to Change)"
|
||||
LabelText: h.asset.TranslateString("StrHelp12"), // "(Click to Change)"
|
||||
LabelX: rightSkillClickToChangeLabelX,
|
||||
LabelY: rightSkillClickToChangeLabelY,
|
||||
DotX: rightSkillClickToChangeDotX,
|
||||
@ -450,25 +449,25 @@ func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
})
|
||||
|
||||
h.createLabel(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp17"), // "Mini-Panel"
|
||||
LabelText: h.asset.TranslateString("StrHelp17"), // "Mini-Panel"
|
||||
LabelX: miniPanelLabelX,
|
||||
LabelY: miniPanelLabelY,
|
||||
})
|
||||
|
||||
h.createLabel(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp18"), // "(Opens Character,"
|
||||
LabelText: h.asset.TranslateString("StrHelp18"), // "(Opens Character,"
|
||||
LabelX: characterLabelX,
|
||||
LabelY: characterLabelY,
|
||||
})
|
||||
|
||||
h.createLabel(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp19"), // "inventory, and"
|
||||
LabelText: h.asset.TranslateString("StrHelp19"), // "inventory, and"
|
||||
LabelX: inventoryLabelX,
|
||||
LabelY: inventoryLabelY,
|
||||
})
|
||||
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp20"), // "other screens)"
|
||||
LabelText: h.asset.TranslateString("StrHelp20"), // "other screens)"
|
||||
LabelX: otherScreensLabelX,
|
||||
LabelY: otherScreensLabelY,
|
||||
DotX: otherScreensDotX,
|
||||
@ -476,7 +475,7 @@ func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
})
|
||||
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp9"), // "Life Orb"
|
||||
LabelText: h.asset.TranslateString("StrHelp9"), // "Life Orb"
|
||||
LabelX: lifeOrbLabelX,
|
||||
LabelY: lifeOrbLabelY,
|
||||
DotX: lifeOrbDotX,
|
||||
@ -484,7 +483,7 @@ func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
})
|
||||
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp15"), // "Stamina Bar"
|
||||
LabelText: h.asset.TranslateString("StrHelp15"), // "Stamina Bar"
|
||||
LabelX: staminaBarLabelX,
|
||||
LabelY: staminaBarLabelY,
|
||||
DotX: staminaBarDotX,
|
||||
@ -492,7 +491,7 @@ func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
})
|
||||
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp22"), // "Mana Orb"
|
||||
LabelText: h.asset.TranslateString("StrHelp22"), // "Mana Orb"
|
||||
LabelX: manaOrbLabelX,
|
||||
LabelY: manaOrbLabelY,
|
||||
DotX: manaOrbDotX,
|
||||
@ -500,13 +499,13 @@ func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
})
|
||||
|
||||
h.createLabel(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp14"), // "Run/Walk"
|
||||
LabelText: h.asset.TranslateString("StrHelp14"), // "Run/Walk"
|
||||
LabelX: runWalkButtonLabelX,
|
||||
LabelY: runWalkButtonLabelY,
|
||||
})
|
||||
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp14a"), // "Toggle"
|
||||
LabelText: h.asset.TranslateString("StrHelp14a"), // "Toggle"
|
||||
LabelX: toggleLabelX,
|
||||
LabelY: toggleLabelY,
|
||||
DotX: toggleDotX,
|
||||
@ -514,13 +513,13 @@ func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
})
|
||||
|
||||
h.createLabel(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp16"), // "Experience"
|
||||
LabelText: h.asset.TranslateString("StrHelp16"), // "Experience"
|
||||
LabelX: experienceLabelX,
|
||||
LabelY: experienceLabelY,
|
||||
})
|
||||
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp16a"), // "Bar"
|
||||
LabelText: h.asset.TranslateString("StrHelp16a"), // "Bar"
|
||||
LabelX: barLabelX,
|
||||
LabelY: barLabelY,
|
||||
DotX: barDotX,
|
||||
@ -528,7 +527,7 @@ func (h *HelpOverlay) setupLabelsWithLines() {
|
||||
})
|
||||
|
||||
h.createCallout(callout{
|
||||
LabelText: d2tbl.TranslateString("StrHelp21"), // "Belt"
|
||||
LabelText: h.asset.TranslateString("StrHelp21"), // "Belt"
|
||||
LabelX: beltLabelX,
|
||||
LabelY: beltLabelY,
|
||||
DotX: beltDotX,
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"log"
|
||||
"sort"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2geom"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2resource"
|
||||
@ -320,7 +319,7 @@ func (s *SkillPanel) HandleMouseMove(x, y int) bool {
|
||||
s.hoveredSkill = s.getSkillAtPos(x, y)
|
||||
|
||||
if previousHovered != s.hoveredSkill && s.hoveredSkill != nil {
|
||||
skillDescription := d2tbl.TranslateString(s.hoveredSkill.ShortKey)
|
||||
skillDescription := s.asset.TranslateString(s.hoveredSkill.ShortKey)
|
||||
s.hoverTooltip.SetText(fmt.Sprintf("%s\n%s", s.hoveredSkill.Skill, skillDescription))
|
||||
|
||||
listRow := s.GetListRowByPos(x, y)
|
||||
|
@ -6,7 +6,6 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2tbl"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2resource"
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset"
|
||||
@ -183,7 +182,7 @@ func (s *skillTree) loadForHeroType() {
|
||||
s.availSPLabel = s.uiManager.NewLabel(d2resource.Font16, d2resource.PaletteSky)
|
||||
s.availSPLabel.SetPosition(availSPLabelX, availSPLabelY)
|
||||
s.availSPLabel.Alignment = d2gui.HorizontalAlignCenter
|
||||
s.availSPLabel.SetText(makeTabString("StrSklTree1", "StrSklTree2", "StrSklTree3"))
|
||||
s.availSPLabel.SetText(s.makeTabString("StrSklTree1", "StrSklTree2", "StrSklTree3"))
|
||||
}
|
||||
|
||||
type heroTabData struct {
|
||||
@ -192,7 +191,7 @@ type heroTabData struct {
|
||||
closeButtonPos [numTabs]int
|
||||
}
|
||||
|
||||
func makeTabString(keys ...interface{}) string {
|
||||
func (s *skillTree) makeTabString(keys ...interface{}) string {
|
||||
translations := make([]interface{}, len(keys))
|
||||
|
||||
token := "%s"
|
||||
@ -203,7 +202,7 @@ func makeTabString(keys ...interface{}) string {
|
||||
format += "\n" + token
|
||||
}
|
||||
|
||||
translations[idx] = d2tbl.TranslateString(key.(string))
|
||||
translations[idx] = s.asset.TranslateString(key.(string))
|
||||
}
|
||||
|
||||
return fmt.Sprintf(format, translations...)
|
||||
@ -220,9 +219,9 @@ func (s *skillTree) getTab(class d2enum.Hero) *heroTabData {
|
||||
skillPanelPath: d2resource.SkillsPanelBarbarian,
|
||||
skillIconPath: d2resource.BarbarianSkills,
|
||||
},
|
||||
makeTabString("StrSklTree21", "StrSklTree4"),
|
||||
makeTabString("StrSklTree21", "StrSklTree22"),
|
||||
makeTabString("StrSklTree20"),
|
||||
s.makeTabString("StrSklTree21", "StrSklTree4"),
|
||||
s.makeTabString("StrSklTree21", "StrSklTree22"),
|
||||
s.makeTabString("StrSklTree20"),
|
||||
makeCloseButtonPos(
|
||||
skillCloseButtonXRight,
|
||||
skillCloseButtonXLeft,
|
||||
@ -233,9 +232,9 @@ func (s *skillTree) getTab(class d2enum.Hero) *heroTabData {
|
||||
skillPanelPath: d2resource.SkillsPanelNecromancer,
|
||||
skillIconPath: d2resource.NecromancerSkills,
|
||||
},
|
||||
makeTabString("StrSklTree19"),
|
||||
makeTabString("StrSklTree17", "StrSklTree18", "StrSklTree5"),
|
||||
makeTabString("StrSklTree16", "StrSklTree5"),
|
||||
s.makeTabString("StrSklTree19"),
|
||||
s.makeTabString("StrSklTree17", "StrSklTree18", "StrSklTree5"),
|
||||
s.makeTabString("StrSklTree16", "StrSklTree5"),
|
||||
makeCloseButtonPos(
|
||||
skillCloseButtonXLeft,
|
||||
skillCloseButtonXRight,
|
||||
@ -246,9 +245,9 @@ func (s *skillTree) getTab(class d2enum.Hero) *heroTabData {
|
||||
skillPanelPath: d2resource.SkillsPanelPaladin,
|
||||
skillIconPath: d2resource.PaladinSkills,
|
||||
},
|
||||
makeTabString("StrSklTree15", "StrSklTree4"),
|
||||
makeTabString("StrSklTree14", "StrSklTree13"),
|
||||
makeTabString("StrSklTree12", "StrSklTree13"),
|
||||
s.makeTabString("StrSklTree15", "StrSklTree4"),
|
||||
s.makeTabString("StrSklTree14", "StrSklTree13"),
|
||||
s.makeTabString("StrSklTree12", "StrSklTree13"),
|
||||
makeCloseButtonPos(
|
||||
skillCloseButtonXLeft,
|
||||
skillCloseButtonXMiddle,
|
||||
@ -259,9 +258,9 @@ func (s *skillTree) getTab(class d2enum.Hero) *heroTabData {
|
||||
skillPanelPath: d2resource.SkillsPanelAssassin,
|
||||
skillIconPath: d2resource.AssassinSkills,
|
||||
},
|
||||
makeTabString("StrSklTree30"),
|
||||
makeTabString("StrSklTree31", "StrSklTree32"),
|
||||
makeTabString("StrSklTree33", "StrSklTree34"),
|
||||
s.makeTabString("StrSklTree30"),
|
||||
s.makeTabString("StrSklTree31", "StrSklTree32"),
|
||||
s.makeTabString("StrSklTree33", "StrSklTree34"),
|
||||
makeCloseButtonPos(
|
||||
skillCloseButtonXMiddle,
|
||||
skillCloseButtonXRight,
|
||||
@ -272,9 +271,9 @@ func (s *skillTree) getTab(class d2enum.Hero) *heroTabData {
|
||||
skillPanelPath: d2resource.SkillsPanelSorcerer,
|
||||
skillIconPath: d2resource.SorcererSkills,
|
||||
},
|
||||
makeTabString("StrSklTree25", "StrSklTree5"),
|
||||
makeTabString("StrSklTree24", "StrSklTree5"),
|
||||
makeTabString("StrSklTree23", "StrSklTree5"),
|
||||
s.makeTabString("StrSklTree25", "StrSklTree5"),
|
||||
s.makeTabString("StrSklTree24", "StrSklTree5"),
|
||||
s.makeTabString("StrSklTree23", "StrSklTree5"),
|
||||
makeCloseButtonPos(
|
||||
skillCloseButtonXLeft,
|
||||
skillCloseButtonXLeft,
|
||||
@ -285,9 +284,9 @@ func (s *skillTree) getTab(class d2enum.Hero) *heroTabData {
|
||||
skillPanelPath: d2resource.SkillsPanelAmazon,
|
||||
skillIconPath: d2resource.AmazonSkills,
|
||||
},
|
||||
makeTabString("StrSklTree10", "StrSklTree11", "StrSklTree4"),
|
||||
makeTabString("StrSklTree8", "StrSklTree9", "StrSklTree4"),
|
||||
makeTabString("StrSklTree6", "StrSklTree7", "StrSklTree4"),
|
||||
s.makeTabString("StrSklTree10", "StrSklTree11", "StrSklTree4"),
|
||||
s.makeTabString("StrSklTree8", "StrSklTree9", "StrSklTree4"),
|
||||
s.makeTabString("StrSklTree6", "StrSklTree7", "StrSklTree4"),
|
||||
makeCloseButtonPos(
|
||||
skillCloseButtonXRight,
|
||||
skillCloseButtonXMiddle,
|
||||
@ -298,9 +297,9 @@ func (s *skillTree) getTab(class d2enum.Hero) *heroTabData {
|
||||
skillPanelPath: d2resource.SkillsPanelDruid,
|
||||
skillIconPath: d2resource.DruidSkills,
|
||||
},
|
||||
makeTabString("StrSklTree26"),
|
||||
makeTabString("StrSklTree27", "StrSklTree28"),
|
||||
makeTabString("StrSklTree29"),
|
||||
s.makeTabString("StrSklTree26"),
|
||||
s.makeTabString("StrSklTree27", "StrSklTree28"),
|
||||
s.makeTabString("StrSklTree29"),
|
||||
makeCloseButtonPos(
|
||||
skillCloseButtonXRight,
|
||||
skillCloseButtonXRight,
|
||||
|
Loading…
Reference in New Issue
Block a user