1
This commit is contained in:
parent
1f1400f101
commit
baa20f27a2
@ -45,3 +45,9 @@ const (
|
||||
const (
|
||||
LUCKY_SYMBOL_ITEM_ID = 900007
|
||||
)
|
||||
|
||||
const (
|
||||
FUNC_TYPE_ITEM_TYPE = 9
|
||||
|
||||
LUCKY_SYMBOL_ITEM_SUB_TYPE = 8
|
||||
)
|
||||
|
@ -209,7 +209,16 @@ func (this *player) GenNextCopy() common.Player {
|
||||
}
|
||||
|
||||
func (this *player) GetBattleItems() []*common.BattleItem {
|
||||
return this.battleItems
|
||||
var result = this.battleItems[0:]
|
||||
if this.isLuckySymbolMap() {
|
||||
p := new(common.BattleItem)
|
||||
p.ItemId = constant.LUCKY_SYMBOL_ITEM_ID
|
||||
p.ItemNum = 1
|
||||
p.ItemType = constant.FUNC_TYPE_ITEM_TYPE
|
||||
p.ItemSubType = constant.LUCKY_SYMBOL_ITEM_SUB_TYPE
|
||||
q5.AppendSlice(&result, p)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func (this *player) FillMFTeamMember(member_pb *cs.MFTeamMember) {
|
||||
@ -253,8 +262,7 @@ func (this *player) FillMFTeamMember(member_pb *cs.MFTeamMember) {
|
||||
item_pb.ItemNum = proto.Int32(p.ItemNum)
|
||||
q5.AppendSlice(&member_pb.BattleItems, item_pb)
|
||||
}
|
||||
if this.hasLuckySymbol != 0 &&
|
||||
this.team.GetModeId() == 0{
|
||||
if this.hasLuckySymbol != 0 && this.isLuckySymbolMap() {
|
||||
item_pb := new(cs.MFBattleItem)
|
||||
item_pb.ItemId = proto.Int32(constant.LUCKY_SYMBOL_ITEM_ID)
|
||||
item_pb.ItemNum = proto.Int32(1)
|
||||
@ -647,6 +655,10 @@ func (this *player) SetBattling(state bool) {
|
||||
this.battling = state
|
||||
}
|
||||
|
||||
func (this *player) isLuckySymbolMap() bool {
|
||||
return this.GetTeam().GetModeId() == 501
|
||||
}
|
||||
|
||||
func newPlayer() *player {
|
||||
hum := new(player)
|
||||
q5.NewSlice(&hum.battleItems, 0, 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user