fix(logic/service/fight/input/nodemanger.go): 修正技能、属性、伤害和状态效果的ID偏移量计算
移除了多余的 `-1` 操作,使ID映射逻辑更加准确。 涉及的函数包括:InitSkillEffect、InitPropEffect、InitDamageEffect 和 InitStatusEffect。
This commit is contained in:
@@ -79,7 +79,7 @@ var NodeM = make(map[int]Effect, 0)
|
||||
|
||||
func InitSkillEffect(id int, t Effect) {
|
||||
|
||||
NodeM[id+1000000-1] = t
|
||||
NodeM[id+1000000] = t
|
||||
}
|
||||
func Geteffect(id int) (Effect, bool) {
|
||||
|
||||
@@ -95,7 +95,7 @@ func Geteffect(id int) (Effect, bool) {
|
||||
|
||||
func InitPropEffect(id int, t Effect) {
|
||||
|
||||
NodeM[id+2000000-1] = t
|
||||
NodeM[id+2000000] = t
|
||||
}
|
||||
|
||||
// * battle_lv: atk(0), def(1), sp_atk(2), sp_def(3), spd(4), accuracy(5)
|
||||
@@ -125,7 +125,7 @@ func (c *Input) GetProp(id int, istue bool) int {
|
||||
}
|
||||
func InitDamageEffect(id int, t Effect) {
|
||||
|
||||
NodeM[id+4000000-1] = t
|
||||
NodeM[id+4000000] = t
|
||||
}
|
||||
|
||||
// 1为红伤
|
||||
@@ -183,7 +183,7 @@ func GetPropEffect(id int) Effect {
|
||||
}
|
||||
func InitStatusEffect(id int, t Effect) {
|
||||
|
||||
NodeM[id+3000000-1] = t
|
||||
NodeM[id+3000000] = t
|
||||
}
|
||||
|
||||
func GetStatusEffect(id int) (Effect, bool) {
|
||||
|
||||
Reference in New Issue
Block a user