From 8feb0e10504ed5de8f334cf6d4a778e66e6ef22f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 16 Oct 2024 10:21:52 +0800 Subject: [PATCH] 1 --- server/matchserver/constant/constant.go | 4 ++++ server/matchserver/player/player.go | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/matchserver/constant/constant.go b/server/matchserver/constant/constant.go index 1ecc36f4..a1ab9276 100644 --- a/server/matchserver/constant/constant.go +++ b/server/matchserver/constant/constant.go @@ -41,3 +41,7 @@ const ( HISTORY_MGR_MODULE_IDX MAX_MODULE_IDX ) + +const ( + LUCKY_SYMBOL_ITEM_ID = 900007 +) diff --git a/server/matchserver/player/player.go b/server/matchserver/player/player.go index 45b69ec6..19d2c7af 100644 --- a/server/matchserver/player/player.go +++ b/server/matchserver/player/player.go @@ -6,6 +6,7 @@ import ( "f5" "github.com/golang/protobuf/proto" "main/common" + "main/constant" . "main/global" "fmt" "encoding/json" @@ -73,14 +74,13 @@ func (this *player) parseUserInfo(userInfo *common.UserInfo){ index := 0 for _, val := range this.battleItems { index++ - if val.ItemId == 900007 { + if val.ItemId == constant.LUCKY_SYMBOL_ITEM_ID { found = true break } } if this.hasLuckySymbol != 0 { if !found { - } } else { if found {