Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
13ec6c520c
@ -231,7 +231,7 @@
|
|||||||
"friend_peize": [
|
"friend_peize": [
|
||||||
{
|
{
|
||||||
"a": "attr",
|
"a": "attr",
|
||||||
"t": "friend",
|
"t": "friendPoint",
|
||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -63,11 +63,8 @@ func (this *apiComp) Assisthero(session comm.IUserSession, req *pb.FriendAssisth
|
|||||||
"assistHeroId": req.HeroObjId,
|
"assistHeroId": req.HeroObjId,
|
||||||
"hero": hero,
|
"hero": hero,
|
||||||
}
|
}
|
||||||
|
self.Received = 1
|
||||||
received := self.Received
|
update["received"] = self.Received //设置可领取状态
|
||||||
if received == 0 {
|
|
||||||
update["received"] = 1 //设置可领取状态
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := this.module.modelFriend.Change(self.Uid, update); err != nil {
|
if err := this.module.modelFriend.Change(self.Uid, update); err != nil {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
@ -82,7 +79,7 @@ func (this *apiComp) Assisthero(session comm.IUserSession, req *pb.FriendAssisth
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
rsp := &pb.FriendAssistheroResp{HeroObjId: req.HeroObjId, Received: received}
|
rsp := &pb.FriendAssistheroResp{HeroObjId: req.HeroObjId, Received: self.Received}
|
||||||
if err := session.SendMsg(string(this.module.GetType()), FriendSubTypeAssistHero, rsp); err != nil {
|
if err := session.SendMsg(string(this.module.GetType()), FriendSubTypeAssistHero, rsp); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -34,9 +34,9 @@ func (this *apiComp) Getreward(session comm.IUserSession, req *pb.FriendGetrewar
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
received := 2 //已领
|
self.Received = 2 //已领
|
||||||
update := map[string]interface{}{
|
update := map[string]interface{}{
|
||||||
"received": received,
|
"received": self.Received,
|
||||||
}
|
}
|
||||||
if err := this.module.modelFriend.Change(self.Uid, update); err != nil {
|
if err := this.module.modelFriend.Change(self.Uid, update); err != nil {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
@ -60,7 +60,7 @@ func (this *apiComp) Getreward(session comm.IUserSession, req *pb.FriendGetrewar
|
|||||||
}
|
}
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), "getreward", &pb.FriendGetrewardResp{
|
session.SendMsg(string(this.module.GetType()), "getreward", &pb.FriendGetrewardResp{
|
||||||
Received: int32(received),
|
Received: int32(self.Received),
|
||||||
Atno: atno,
|
Atno: atno,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
|
|||||||
add []*pb.DBHero
|
add []*pb.DBHero
|
||||||
allres []*cfg.Gameatn
|
allres []*cfg.Gameatn
|
||||||
)
|
)
|
||||||
if res, add, err = this.module.modelHero.ImitateHeros(session, szCards); err == nil {
|
if res, add, err = this.module.modelHero.ImitateHeros(session, szCards, req.DrawType); err == nil {
|
||||||
for _, v := range res {
|
for _, v := range res {
|
||||||
var atno []*pb.UserAtno
|
var atno []*pb.UserAtno
|
||||||
for _, v1 := range v {
|
for _, v1 := range v {
|
||||||
|
@ -60,7 +60,7 @@ func (this *apiComp) SelectCard(session comm.IUserSession, req *pb.HeroSelectCar
|
|||||||
add []*pb.DBHero
|
add []*pb.DBHero
|
||||||
allres []*cfg.Gameatn
|
allres []*cfg.Gameatn
|
||||||
)
|
)
|
||||||
if res, add, err = this.module.modelHero.ImitateHeros(session, curSzCard); err == nil {
|
if res, add, err = this.module.modelHero.ImitateHeros(session, curSzCard, 2); err == nil {
|
||||||
for _, v := range res {
|
for _, v := range res {
|
||||||
var atno []*pb.UserAtno
|
var atno []*pb.UserAtno
|
||||||
for _, v1 := range v {
|
for _, v1 := range v {
|
||||||
|
@ -1117,7 +1117,7 @@ func (this *ModelHero) drawcardcreateHero(session comm.IUserSession, ids []strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 模拟获得英雄
|
// 模拟获得英雄
|
||||||
func (this *ModelHero) ImitateHeros(session comm.IUserSession, cids []string) (addres [][]*cfg.Gameatn, add []*pb.DBHero, err error) {
|
func (this *ModelHero) ImitateHeros(session comm.IUserSession, cids []string, itype int32) (addres [][]*cfg.Gameatn, add []*pb.DBHero, err error) {
|
||||||
|
|
||||||
heros := make([]*pb.DBHero, 0)
|
heros := make([]*pb.DBHero, 0)
|
||||||
uid := session.GetUserId()
|
uid := session.GetUserId()
|
||||||
@ -1165,7 +1165,12 @@ func (this *ModelHero) ImitateHeros(session comm.IUserSession, cids []string) (a
|
|||||||
}
|
}
|
||||||
|
|
||||||
if bFirst { // 没有当前英雄
|
if bFirst { // 没有当前英雄
|
||||||
|
if itype == 1 {
|
||||||
|
hero = this.InitHero(uid, heroCfgId)
|
||||||
|
} else {
|
||||||
hero, err = this.initHeroOverlying(uid, heroCfgId, 1)
|
hero, err = this.initHeroOverlying(uid, heroCfgId, 1)
|
||||||
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ func (this *MCompConfigure) GetGroupDataByLottery(lotteryId int32, vipLv int32,
|
|||||||
defer this.hlock.RUnlock()
|
defer this.hlock.RUnlock()
|
||||||
if _, ok := this._lotteryType1[lotteryId]; !ok {
|
if _, ok := this._lotteryType1[lotteryId]; !ok {
|
||||||
if _, ok := this._lotteryType2[lotteryId]; !ok {
|
if _, ok := this._lotteryType2[lotteryId]; !ok {
|
||||||
this.module.Errorf("not found config lotterId:%d", lotteryId)
|
this.module.Debugf("not found config lotterId:%d", lotteryId)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user