1
This commit is contained in:
parent
8feb0e1050
commit
1f1400f101
@ -69,26 +69,6 @@ func (this *player) parseUserInfo(userInfo *common.UserInfo){
|
|||||||
q5.DuckToSimple(userInfo.VipExp, &this.vipExp)
|
q5.DuckToSimple(userInfo.VipExp, &this.vipExp)
|
||||||
q5.DuckToSimple(userInfo.HasVipLucky, &this.hasVipLucky)
|
q5.DuckToSimple(userInfo.HasVipLucky, &this.hasVipLucky)
|
||||||
q5.DuckToSimple(userInfo.HasLuckySymbol, &this.hasLuckySymbol)
|
q5.DuckToSimple(userInfo.HasLuckySymbol, &this.hasLuckySymbol)
|
||||||
{
|
|
||||||
found := false
|
|
||||||
index := 0
|
|
||||||
for _, val := range this.battleItems {
|
|
||||||
index++
|
|
||||||
if val.ItemId == constant.LUCKY_SYMBOL_ITEM_ID {
|
|
||||||
found = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if this.hasLuckySymbol != 0 {
|
|
||||||
if !found {
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if found {
|
|
||||||
copy(this.battleItems[index:], this.battleItems[index+1:])
|
|
||||||
this.battleItems = this.battleItems[:len(this.battleItems)-1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *player) parseHeroInfo(heroInfo *common.HeroInfo){
|
func (this *player) parseHeroInfo(heroInfo *common.HeroInfo){
|
||||||
@ -273,6 +253,13 @@ func (this *player) FillMFTeamMember(member_pb *cs.MFTeamMember) {
|
|||||||
item_pb.ItemNum = proto.Int32(p.ItemNum)
|
item_pb.ItemNum = proto.Int32(p.ItemNum)
|
||||||
q5.AppendSlice(&member_pb.BattleItems, item_pb)
|
q5.AppendSlice(&member_pb.BattleItems, item_pb)
|
||||||
}
|
}
|
||||||
|
if this.hasLuckySymbol != 0 &&
|
||||||
|
this.team.GetModeId() == 0{
|
||||||
|
item_pb := new(cs.MFBattleItem)
|
||||||
|
item_pb.ItemId = proto.Int32(constant.LUCKY_SYMBOL_ITEM_ID)
|
||||||
|
item_pb.ItemNum = proto.Int32(1)
|
||||||
|
q5.AppendSlice(&member_pb.BattleItems, item_pb)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *player) CMLeaveTeam(hdr *f5.MsgHdr, msg *cs.CMLeaveTeam) {
|
func (this *player) CMLeaveTeam(hdr *f5.MsgHdr, msg *cs.CMLeaveTeam) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user