上传公会信息

This commit is contained in:
liwei1dao 2024-01-23 10:28:05 +08:00
parent 0406fa38a1
commit 314ceb9f6c

View File

@ -80,6 +80,7 @@ func (this *ModelExpedition) getInfo(guildid string) (result *pb.DBExpedition, e
func (this *ModelExpedition) updateExpedition(data *pb.DBExpedition) (err error) {
if err = this.ChangeById(data.Guildid, map[string]interface{}{
"lv": data.Lv,
"indexboos": data.Indexboos,
"boos": data.Boos,
}); err != nil {
@ -105,6 +106,7 @@ func (this *ModelExpedition) refreshBoos(info *pb.DBExpedition) (conf *pb.DBGuil
Members: make(map[string]*pb.DBExpeditionMember),
})
}
info.Refresh = configure.Now().Unix()
info.Indexboos = 0
return
}
@ -121,8 +123,12 @@ func (this *ModelExpedition) settlementboos(info *pb.DBExpedition, boos *pb.DBEx
fightingValue += v.Totalpower
}
boos.Hp -= fightingValue
if boos.Hp < 0 && info.Indexboos < int32(len(info.Boos))-1 {
if boos.Hp < 0 {
if info.Indexboos < int32(len(info.Boos))-1 {
info.Indexboos++
} else {
info.Lv++
}
}
boos.Crusaded = true
changed = true