当装饰品订单完成之后,将自动发射器产物重新纳入自动订单

This commit is contained in:
hahwu 2025-09-23 10:50:08 +08:00
parent 153493bd40
commit 3b9eba9a48
2 changed files with 17 additions and 0 deletions

View File

@ -160,6 +160,17 @@ func PopElemSlice(s []int, Id int) ([]int, bool) {
return s, false
}
func PopStringElemSlice(s0 []string, Id string) ([]string, bool) {
s := make([]string, len(s0))
copy(s, s0)
for k, v := range s {
if v == Id {
return append(s[0:k], s[k+1:]...), true
}
}
return s, false
}
func ElemInSlice(s []int, Id int) bool {
for _, v := range s {
if v == Id {

View File

@ -124,6 +124,12 @@ func (o *OrderMod) RewardOrder(id int) ([]*item.Item, []int, int, int, error) {
return nil, v.MergeId, v.Type, 0, nil
}
if v.Type == Fixed_type || v.Type == Playroom_type {
if id == 78 {
o.AutoEmit, _ = GoUtil.PopStringElemSlice(o.AutoEmit, "D")
}
if id == 79 {
o.AutoEmit, _ = GoUtil.PopStringElemSlice(o.AutoEmit, "I")
}
o.FinishOrder = append(o.FinishOrder, id)
}
return ItemList, v.MergeId, v.Type, Star, nil