随机任务埋点
This commit is contained in:
parent
df08889bb8
commit
54e737fafe
@ -60,6 +60,8 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (code
|
|||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
//随机任务
|
||||||
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype62, 1)
|
||||||
break
|
break
|
||||||
case pb.ChatChannel_Union:
|
case pb.ChatChannel_Union:
|
||||||
msg.UnionId = req.TargetId
|
msg.UnionId = req.TargetId
|
||||||
|
@ -142,7 +142,12 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
|
|||||||
}
|
}
|
||||||
code = this.module.ModuleHero.UpdateEquipment(session, hero, equipments)
|
code = this.module.ModuleHero.UpdateEquipment(session, hero, equipments)
|
||||||
}
|
}
|
||||||
|
//随机任务触发
|
||||||
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype43, 1, equipment.Lv)
|
||||||
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype44, equipment.Lv)
|
||||||
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype47, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), "upgrade", &pb.EquipmentUpgradeResp{IsSucc: issucc, Equipment: modifyequipments})
|
session.SendMsg(string(this.module.GetType()), "upgrade", &pb.EquipmentUpgradeResp{IsSucc: issucc, Equipment: modifyequipments})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -75,13 +75,14 @@ func (this *modelEquipmentComp) QueryEquipmentAmount(uid string, equipmentId str
|
|||||||
}
|
}
|
||||||
|
|
||||||
//添加装备
|
//添加装备
|
||||||
func (this *modelEquipmentComp) AddEquipments(uId string, cIds map[string]uint32) (change []*pb.DB_Equipment, err error) {
|
func (this *modelEquipmentComp) AddEquipments(session comm.IUserSession, cIds map[string]uint32) (change []*pb.DB_Equipment, err error) {
|
||||||
var (
|
var (
|
||||||
configure *cfg.GameEquip
|
configure *cfg.GameEquip
|
||||||
equipments []*pb.DB_Equipment
|
equipments []*pb.DB_Equipment
|
||||||
iskeep bool
|
iskeep bool
|
||||||
add map[string]*pb.DB_Equipment
|
add map[string]*pb.DB_Equipment
|
||||||
update map[string]*pb.DB_Equipment
|
update map[string]*pb.DB_Equipment
|
||||||
|
uId string = session.GetUserId()
|
||||||
)
|
)
|
||||||
if configure, err = this.module.configure.GetEquipmentConfigure(); err != nil {
|
if configure, err = this.module.configure.GetEquipmentConfigure(); err != nil {
|
||||||
return
|
return
|
||||||
@ -108,6 +109,8 @@ func (this *modelEquipmentComp) AddEquipments(uId string, cIds map[string]uint32
|
|||||||
if equipment, err := this.newEquipment(uId, c, v); err != nil {
|
if equipment, err := this.newEquipment(uId, c, v); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
} else {
|
} else {
|
||||||
|
//随机任务
|
||||||
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype50, 1, c.Star)
|
||||||
add[equipment.Id] = equipment
|
add[equipment.Id] = equipment
|
||||||
change = append(change, equipment)
|
change = append(change, equipment)
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ func (this *Equipment) AddNewEquipments(source *comm.ModuleCallSource, session c
|
|||||||
err error
|
err error
|
||||||
change []*pb.DB_Equipment
|
change []*pb.DB_Equipment
|
||||||
)
|
)
|
||||||
if change, err = this.modelEquipment.AddEquipments(session.GetUserId(), cIds); err != nil {
|
if change, err = this.modelEquipment.AddEquipments(session, cIds); err != nil {
|
||||||
this.Errorf("err%v", err)
|
this.Errorf("err%v", err)
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
return
|
return
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
"go_dreamfactory/utils"
|
||||||
"math"
|
"math"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -85,6 +86,13 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (code pb
|
|||||||
"lastBuyTime": shopitem.LastBuyTime,
|
"lastBuyTime": shopitem.LastBuyTime,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//随机任务
|
||||||
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype64, 1)
|
||||||
|
for _, v := range give {
|
||||||
|
if v.A == comm.ItemType {
|
||||||
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype64, v.N, utils.ToInt32(v.T))
|
||||||
|
}
|
||||||
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), "buy", &pb.ShopBuyResp{IsSucc: true})
|
session.SendMsg(string(this.module.GetType()), "buy", &pb.ShopBuyResp{IsSucc: true})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user