Merge branch 'bs_2.0.6.28' of http://git.legu.cc/liwei_3d/go_dreamfactory into bs_2.0.6.28

This commit is contained in:
liwei1dao 2023-08-24 14:41:54 +08:00
commit 12db794394
10 changed files with 1269 additions and 672 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1651,7 +1651,7 @@
"main": [
{
"key": 1,
"param": 30
"param": 70
}
],
"wkqbx": 0,
@ -1659,7 +1659,7 @@
"img": "",
"prompt": {
"key": "opencond_opencond_prompt_72",
"text": "主角等级达到10开启"
"text": "主角等级达到70开启"
},
"uiid": 0,
"activateType": 2,

View File

@ -45,7 +45,7 @@
"text": "每日礼包2"
},
"packagetype": "day_1",
"buy_num": 2,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_2",
"text": "每日礼包2"
@ -77,7 +77,7 @@
"text": "每日礼包3"
},
"packagetype": "day_2",
"buy_num": 3,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_3",
"text": "每日礼包3"
@ -109,7 +109,7 @@
"text": "每日礼包4"
},
"packagetype": "day_3",
"buy_num": 3,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_4",
"text": "每日礼包4"
@ -141,7 +141,7 @@
"text": "每日礼包5"
},
"packagetype": "day_4",
"buy_num": 3,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_5",
"text": "每日礼包5"
@ -200,7 +200,7 @@
"text": "每周礼包2"
},
"packagetype": "week_2",
"buy_num": 2,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_7",
"text": "每周礼包2"
@ -232,7 +232,7 @@
"text": "每周礼包3"
},
"packagetype": "week_3",
"buy_num": 3,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_8",
"text": "每周礼包3"
@ -259,7 +259,7 @@
"text": "每周礼包4"
},
"packagetype": "week_4",
"buy_num": 4,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_9",
"text": "每周礼包4"
@ -291,7 +291,7 @@
"text": "每周礼包5"
},
"packagetype": "week_5",
"buy_num": 5,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_10",
"text": "每周礼包5"
@ -318,7 +318,7 @@
"text": "每周礼包6"
},
"packagetype": "week_6",
"buy_num": 999,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_11",
"text": "每周礼包6"
@ -345,7 +345,7 @@
"text": "每周礼包7"
},
"packagetype": "week_6",
"buy_num": 999,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_12",
"text": "每周礼包7"
@ -377,7 +377,7 @@
"text": "每月礼包1"
},
"packagetype": "month_2",
"buy_num": 5,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_13",
"text": "每月礼包1"
@ -404,7 +404,7 @@
"text": "每月礼包2"
},
"packagetype": "month_2",
"buy_num": 5,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_14",
"text": "每月礼包2"
@ -431,7 +431,7 @@
"text": "每月礼包3"
},
"packagetype": "month_2",
"buy_num": 5,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_15",
"text": "每月礼包3"
@ -458,7 +458,7 @@
"text": "每月礼包4"
},
"packagetype": "month_2",
"buy_num": 5,
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_16",
"text": "每月礼包4"

View File

@ -457,6 +457,8 @@ type (
ISmithy interface {
CheckActivateAtlasCollect(uid string, id string)
IGetReddot // 铁匠铺红点
GmProficiency(uid string)
GmSmithyAtlas(session IUserSession)
}
IPandaAtlas interface {

View File

@ -147,18 +147,23 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
}
}
// 发所有道具
item := this.configure.GetAllItemConfigure()
for _, v := range item {
res = append(res, &cfg.Gameatn{
A: "item",
T: v.Id,
N: 100,
})
_data := this.configure.GetAllItemConfigure()
var szRes []*cfg.Gameatn
for _, v := range _data {
if v.Gm != 1 {
res := &cfg.Gameatn{
A: "item",
T: v.Id,
N: 100,
}
szRes = append(szRes, res)
}
}
errdata = this.DispenseRes(session, res, true)
if errdata != nil {
this.Errorf("资源发放失败,%v", errdata)
if errdata = this.DispenseRes(session, szRes, true); errdata != nil {
this.Debugf("DispenseRes err :uid = %s,code = %d", datas[0], errdata)
}
this.Debug("使用bingo命令",
log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "param", Value: datas[0]},
@ -450,16 +455,21 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
// return
// }
_data := this.configure.GetAllItemConfigure()
var sz []*cfg.Gameatn
for _, v := range _data {
res := &cfg.Gameatn{
A: "item",
T: v.Id,
N: 100,
}
if errdata = this.DispenseRes(session, []*cfg.Gameatn{res}, true); errdata != nil {
this.Debugf("DispenseRes err :uid = %s,code = %d", datas[0], errdata)
if v.Gm != 1 {
res := &cfg.Gameatn{
A: "item",
T: v.Id,
N: 100,
}
sz = append(sz, res)
}
}
if errdata = this.DispenseRes(session, sz, true); errdata != nil {
this.Debugf("DispenseRes err :uid = %s,code = %d", datas[0], errdata)
}
this.Debug("使用bingo命令:uid = %s ",
log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "0", Value: datas[0]},
@ -526,6 +536,36 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
log.Field{Key: "param", Value: datas[0]},
log.Field{Key: "res", Value: res},
)
} else if len(datas) == 1 && (datas[0] == "smithyatlas") { // gm
var (
err error
)
module1, err := this.service.GetModule(comm.ModuleSmithy)
if err != nil {
return
}
module1.(comm.ISmithy).GmSmithyAtlas(session)
this.Debug("使用bingo命令:uid = %s ",
log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "0", Value: datas[0]},
)
} else if len(datas) == 1 && (datas[0] == "smithypro") { // gm
var (
err error
)
module1, err := this.service.GetModule(comm.ModuleSmithy)
if err != nil {
return
}
module1.(comm.ISmithy).GmProficiency(session.GetUserId())
this.Debug("使用bingo命令:uid = %s ",
log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "0", Value: datas[0]},
)
}
}
}

View File

@ -122,6 +122,9 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
}
}
}
if likeStates == 0 {
addExp = int32(math.Floor(float64(addExp / 1000)))
}
res = append(res, &cfg.Gameatn{
A: "item",

View File

@ -332,3 +332,30 @@ func (this *configureComp) GetSmithyMake(cid int32) (data *cfg.GameSmithyMakeDat
err = comm.NewNotFoundConfErr(moduleName, game_smithymake, cid)
return
}
// gm 查询 不管性能
func (this *configureComp) GmGetProficileData() (conf map[int32]int32) {
conf = make(map[int32]int32, 0)
if v, err := this.GetConfigure(game_smproficiency); err == nil {
if configure, ok := v.(*cfg.GameSmithyProficiency); ok {
for _, v := range configure.GetDataList() {
if _, ok := conf[v.ReelId]; !ok {
conf[v.ReelId] = v.ProficiencyLv
}
conf[v.ReelId] = v.ProficiencyLv
}
return
}
}
return
}
func (this *configureComp) GmGetAllAtlasConf() (data []*cfg.GameSmithyAtlasData) {
if v, err := this.GetConfigure(game_smithyatlas); err == nil {
if configure, ok := v.(*cfg.GameSmithyAtlas); ok {
data = configure.GetDataList()
}
}
return
}

View File

@ -12,6 +12,7 @@ import (
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
@ -149,3 +150,68 @@ func (this *Smithy) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (r
}
return
}
// gm 不管性能
func (this *Smithy) GmProficiency(uid string) {
stove, err := this.modelStove.getSmithyStoveList(uid)
if err != nil {
return
}
conf := this.configure.GmGetProficileData()
for k, v := range conf {
if c := this.configure.GetSmithyProficileData(k, v); c != nil {
stove.Data[k] = &pb.Mastery{
Lv: v,
Value: c.Proficiency,
}
}
}
update := make(map[string]interface{})
update["data"] = stove.Data
this.modelStove.updateSmithyStove(uid, update)
}
// gm 新增图鉴信息
func (this *Smithy) GmSmithyAtlas(session comm.IUserSession) {
var (
res []*cfg.Gameatn
szLibrary []string
)
conf := this.configure.GmGetAllAtlasConf()
for _, v := range conf {
if v.TypeId == 1 {
for _, v1 := range this.configure.GetAllEquipmentConfigure() {
if v1.AtlasId == v.Id {
res = append(res, &cfg.Gameatn{
A: "equi",
T: v1.Id,
N: 1,
})
break
}
}
} else if v.TypeId == 2 {
szLibrary = append(szLibrary, v.Id)
}
}
if errdata, atno := this.DispenseAtno(session, res, true); errdata == nil {
ids := make([]string, 0)
for _, v := range atno {
ids = append(ids, v.O)
if equip, errdata := this.ModuleEquipment.QueryEquipment(session.GetUserId(), v.O); errdata == nil {
this.modelAtlas.CheckActivateEquipAtlas(session.GetUserId(), []*pb.DB_Equipment{equip}, 1)
}
}
}
if len(szLibrary) > 0 {
for _, v := range szLibrary {
this.CheckActivateAtlasCollect(session.GetUserId(), v)
}
}
}

View File

@ -9,7 +9,7 @@ import (
// 修改签名
func (this *apiComp) ModifysignCheck(session comm.IUserSession, req *pb.UserModifysignReq) (errdata *pb.ErrorData) {
if req.Sign == "" || len(req.Sign) > 200 {
if req.Sign == "" {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),

View File

@ -34,6 +34,7 @@ type GameItemData struct {
Img string
Intr string
Sale []*Gameatn
Gm int32
}
const TypeId_GameItemData = -984700967
@ -144,6 +145,7 @@ func (_v *GameItemData)Deserialize(_buf map[string]interface{}) (err error) {
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["gm"].(float64); !_ok_ { err = errors.New("gm error"); return }; _v.Gm = int32(_tempNum_) }
return
}