1
This commit is contained in:
parent
a66806a724
commit
e57b3051f5
@ -605,6 +605,7 @@ func (this *player) CMChooseBattleItem(hdr *f5.MsgHdr, msg *cs.CMChooseBattleIte
|
||||
ItemNum interface{} `json:"item_num"`
|
||||
ItemType interface{} `json:"item_type"`
|
||||
ItemSubType interface{} `json:"item_sub_type"`
|
||||
HasLuckySymbol interface{} `json:"has_lucky_symbol"`
|
||||
}{}
|
||||
err := json.Unmarshal([]byte(rsp.GetRawData()), &rspObj)
|
||||
if err != nil || rspObj.Errcode != 0 {
|
||||
@ -621,6 +622,7 @@ func (this *player) CMChooseBattleItem(hdr *f5.MsgHdr, msg *cs.CMChooseBattleIte
|
||||
q5.DuckToSimple(rspObj.ItemNum, &itemNum)
|
||||
q5.DuckToSimple(rspObj.ItemType, &itemType)
|
||||
q5.DuckToSimple(rspObj.ItemSubType, &itemSubType)
|
||||
q5.DuckToSimple(rspObj.HasLuckySymbol, &this.hasLuckySymbol)
|
||||
if itemNum > 0 {
|
||||
found := false
|
||||
for _, p := range(this.battleItems) {
|
||||
@ -633,7 +635,7 @@ func (this *player) CMChooseBattleItem(hdr *f5.MsgHdr, msg *cs.CMChooseBattleIte
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
if !found && itemId != constant.LUCKY_SYMBOL_ITEM_ID {
|
||||
p := new(common.BattleItem)
|
||||
p.ItemId = itemId
|
||||
p.ItemNum = itemNum
|
||||
@ -656,7 +658,7 @@ func (this *player) SetBattling(state bool) {
|
||||
}
|
||||
|
||||
func (this *player) isLuckySymbolMap() bool {
|
||||
return this.GetTeam().GetModeId() == 501
|
||||
return this.GetTeam().GetModeId() == 4
|
||||
}
|
||||
|
||||
func newPlayer() *player {
|
||||
|
Loading…
x
Reference in New Issue
Block a user