武器强化以及返还材料功能

This commit is contained in:
UnKownOwO
2023-02-04 23:52:40 +08:00
parent 67821ba780
commit cfb001c18a
13 changed files with 614 additions and 33 deletions

View File

@@ -2,10 +2,11 @@ package gdconf
import (
"fmt"
"github.com/hjson/hjson-go/v4"
"hk4e/pkg/logger"
"os"
"github.com/hjson/hjson-go/v4"
"github.com/jszwec/csvutil"
)
@@ -44,9 +45,10 @@ func (g *GameDataConfig) loadGCGSkillData() {
}
for _, gcgSkillData := range gcgSkillDataList {
// 技能消耗整合进CostMap
gcgSkillData.CostMap = make(map[uint32]uint32, 2)
gcgSkillData.CostMap[uint32(gcgSkillData.CostType1)] = uint32(gcgSkillData.CostValue1)
gcgSkillData.CostMap[uint32(gcgSkillData.CostType2)] = uint32(gcgSkillData.CostValue2)
gcgSkillData.CostMap = map[uint32]uint32{
uint32(gcgSkillData.CostType1): uint32(gcgSkillData.CostValue1),
uint32(gcgSkillData.CostType2): uint32(gcgSkillData.CostValue2),
}
for costType, costValue := range gcgSkillData.CostMap {
// 两个值都不能为0
if costType == 0 || costValue == 0 {