From 1b435f5c4b967029f749d76d8991a98caeb3135d Mon Sep 17 00:00:00 2001 From: Fang Date: Fri, 28 Jul 2023 17:58:21 +0800 Subject: [PATCH 1/8] =?UTF-8?q?1=E3=80=81=E6=8A=BD=E5=8D=A1=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=B8=8D=E5=B1=95=E7=A4=BA=E8=A3=85=E5=A4=87=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E7=BA=A2=E7=82=B92=E3=80=81=E8=8B=B1=E9=9B=84?= =?UTF-8?q?=E6=9C=AA=E8=A7=A3=E9=94=81=E6=97=B6=E6=98=BE=E7=A4=BA=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E6=95=B0=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/common/cell/hero_cell.lua | 9 ++++++++- lua/app/ui/hero/cell/attr_cell.lua | 24 ++++++++++++++++++++---- lua/app/ui/hero/hero_info_comp.lua | 4 ++-- lua/app/ui/shop/cell/box_hero_cell.lua | 1 + 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/lua/app/ui/common/cell/hero_cell.lua b/lua/app/ui/common/cell/hero_cell.lua index 3812df2e..2adc8302 100644 --- a/lua/app/ui/common/cell/hero_cell.lua +++ b/lua/app/ui/common/cell/hero_cell.lua @@ -99,13 +99,20 @@ function HeroCell:refreshRedPoint() return end - if DataManager.FormationData:heroInFormation(GConst.BattleConst.FORMATION_TYPE.STAGE, self.heroEntity:getCfgId()) and DataManager.EquipData:canUpgradeEquip(self.heroEntity:getCfgId()) then + if not self.notShowRedPoint and + DataManager.FormationData:heroInFormation(GConst.BattleConst.FORMATION_TYPE.STAGE, self.heroEntity:getCfgId()) and + DataManager.EquipData:canUpgradeEquip(self.heroEntity:getCfgId()) then self.selfNode:addRedPoint(55, -35, 0.64) else self.selfNode:removeRedPoint() end end +-- 设置是否展示红点 +function HeroCell:setShowRedPoint(show) + self.notShowRedPoint = not show +end + function HeroCell:getHeroId() if not self.heroEntity then return diff --git a/lua/app/ui/hero/cell/attr_cell.lua b/lua/app/ui/hero/cell/attr_cell.lua index 41c8dad2..ab441cde 100644 --- a/lua/app/ui/hero/cell/attr_cell.lua +++ b/lua/app/ui/hero/cell/attr_cell.lua @@ -49,9 +49,17 @@ function AttrCell:showHp() local value = 0 if self.nodeType == GConst.HeroConst.ATTR_SHOW_TOTAL then - value = self.heroEntity:getTotalAttrValue(self.attrName) + if self.heroEntity:isActived() then + value = self.heroEntity:getTotalAttrValue(self.attrName) + else + value = self.heroEntity:getCfgHp(self.heroEntity:getBeginLv()) + end elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_BASE then - value = self.heroEntity:getCfgHp(self.heroEntity:getLv()) + if self.heroEntity:isActived() then + value = self.heroEntity:getCfgHp(self.heroEntity:getLv()) + else + value = self.heroEntity:getCfgHp(self.heroEntity:getBeginLv()) + end elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_WEAPON then value = self.weaponEntity:getHp() elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_ARMOR then @@ -72,9 +80,17 @@ function AttrCell:showAtk() local value = 0 if self.nodeType == GConst.HeroConst.ATTR_SHOW_TOTAL then - value = self.heroEntity:getTotalAttrValue(self.attrName) + if self.heroEntity:isActived() then + value = self.heroEntity:getTotalAttrValue(self.attrName) + else + value = self.heroEntity:getCfgAtk(self.heroEntity:getBeginLv()) + end elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_BASE then - value = self.heroEntity:getCfgAtk(self.heroEntity:getLv()) + if self.heroEntity:isActived() then + value = self.heroEntity:getCfgAtk(self.heroEntity:getLv()) + else + value = self.heroEntity:getCfgAtk(self.heroEntity:getBeginLv()) + end elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_WEAPON then value = self.weaponEntity:getAttack() elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_ARMOR then diff --git a/lua/app/ui/hero/hero_info_comp.lua b/lua/app/ui/hero/hero_info_comp.lua index 86cd39a2..f80f7536 100644 --- a/lua/app/ui/hero/hero_info_comp.lua +++ b/lua/app/ui/hero/hero_info_comp.lua @@ -163,8 +163,8 @@ function HeroInfoComp:refresh(checkLevel) end else str = I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_5) - hpStr = self.heroEntity:getHp(self.heroEntity:getBeginLv()) // DEFAULT_FACTOR - atkStr = self.heroEntity:getAtk(self.heroEntity:getBeginLv()) // DEFAULT_FACTOR + hpStr = self.heroEntity:getCfgHp(self.heroEntity:getBeginLv()) // DEFAULT_FACTOR + atkStr = self.heroEntity:getCfgAtk(self.heroEntity:getBeginLv()) // DEFAULT_FACTOR end self.txUpdesc:setText(str) self.txUpNum:setText(materials[2]) diff --git a/lua/app/ui/shop/cell/box_hero_cell.lua b/lua/app/ui/shop/cell/box_hero_cell.lua index f244dfda..56caf032 100644 --- a/lua/app/ui/shop/cell/box_hero_cell.lua +++ b/lua/app/ui/shop/cell/box_hero_cell.lua @@ -15,6 +15,7 @@ function BoxHeroCell:refresh(data) self.data = data local id = data.id local num = data.count + self.heroCell:setShowRedPoint(false) local heroEntity = DataManager.HeroData:getHeroById(id) if heroEntity then From 7145fb758a5fd776a4c4d96ea782713089272c3d Mon Sep 17 00:00:00 2001 From: Fang Date: Fri, 28 Jul 2023 18:04:24 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=89=AF=E6=9C=AC?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/dungeon/dungeon_board_cell.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/app/ui/dungeon/dungeon_board_cell.lua b/lua/app/ui/dungeon/dungeon_board_cell.lua index 206e67b3..a8b672e6 100644 --- a/lua/app/ui/dungeon/dungeon_board_cell.lua +++ b/lua/app/ui/dungeon/dungeon_board_cell.lua @@ -30,6 +30,7 @@ end function DungeonBoardCell:refresh(moduleKey) self.moduleKey = moduleKey + self:getGameObject().name = self.moduleKey self:refreshInfo() self:refreshRewards() end From ef6969c4d98850cd82618c7e22f481a246debebb Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 28 Jul 2023 18:40:11 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=BC=95=E5=AF=BC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/config/tutorial.lua | 25 ++++++++++++++++--- .../ui/main_city/component/dungeon_comp.lua | 13 ++++++++-- lua/app/ui/main_city/component/main_comp.lua | 8 ++++++ lua/app/userdata/tutorial/tutorial_data.lua | 4 +++ 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/lua/app/config/tutorial.lua b/lua/app/config/tutorial.lua index 350de8d7..d05e0d87 100644 --- a/lua/app/config/tutorial.lua +++ b/lua/app/config/tutorial.lua @@ -619,6 +619,7 @@ local tutorial = { ["next_id"]=80010, ["type"]=2, ["target_name"]="main_ui(Clone)/bottom_node/bottom_btn_cell_2", + ["func_id"]="dungeon_weapon_open", ["arrow_direction"]=2, ["arrow_offset"]={ 0, @@ -639,6 +640,7 @@ local tutorial = { ["delay"]=0.5, ["type"]=2, ["target_name"]="main_ui(Clone)/sub_ui_node/hero_ui/formation/hero_3", + ["func_id"]="dungeon_weapon_open", ["arrow_direction"]=2, ["arrow_offset"]={ 0, @@ -650,6 +652,7 @@ local tutorial = { ["next_id"]=80030, ["type"]=2, ["target_name"]="hero_detail_ui(Clone)/common/btns/btn_weapon", + ["func_id"]="dungeon_weapon_open", ["arrow_direction"]=1, ["arrow_offset"]={ 0, @@ -663,7 +666,8 @@ local tutorial = { ["txt_offset"]={ 0, 200 - } + }, + ["func_id"]="dungeon_weapon_open" }, [80040]={ ["next_id"]=80050, @@ -674,6 +678,7 @@ local tutorial = { 200 }, ["target_name"]="hero_detail_ui(Clone)/common/btn_close", + ["func_id"]="dungeon_weapon_open", ["arrow_direction"]=1, ["arrow_offset"]={ 0, @@ -684,6 +689,7 @@ local tutorial = { ["next_id"]=80060, ["type"]=2, ["target_name"]="main_ui(Clone)/bottom_node/bottom_btn_cell_1", + ["func_id"]="dungeon_weapon_open", ["arrow_direction"]=1, ["arrow_offset"]={ 0, @@ -703,6 +709,7 @@ local tutorial = { ["next_id"]=80070, ["type"]=2, ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/right/dungeon", + ["func_id"]="dungeon_weapon_open", ["arrow_direction"]=1, ["arrow_offset"]={ 0, @@ -717,7 +724,8 @@ local tutorial = { }, [80070]={ ["type"]=2, - ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/dungeon_comp/scrollrect/viewport/content/scroll_cell_2/btn_start", + ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/dungeon_comp/scrollrect/viewport/content/dungeon_weapon_open/btn_start", + ["func_id"]="dungeon_weapon_open", ["arrow_direction"]=2, ["arrow_offset"]={ 0, @@ -728,6 +736,7 @@ local tutorial = { ["next_id"]=90010, ["type"]=2, ["target_name"]="main_ui(Clone)/bottom_node/bottom_btn_cell_2", + ["func_id"]="dungeon_armor_open", ["arrow_direction"]=2, ["arrow_offset"]={ 0, @@ -748,6 +757,7 @@ local tutorial = { ["delay"]=0.5, ["type"]=2, ["target_name"]="main_ui(Clone)/sub_ui_node/hero_ui/formation/hero_3", + ["func_id"]="dungeon_armor_open", ["arrow_direction"]=2, ["arrow_offset"]={ 0, @@ -759,6 +769,7 @@ local tutorial = { ["next_id"]=90030, ["type"]=2, ["target_name"]="hero_detail_ui(Clone)/common/btns/btn_armor", + ["func_id"]="dungeon_armor_open", ["arrow_direction"]=1, ["arrow_offset"]={ 0, @@ -772,7 +783,8 @@ local tutorial = { ["txt_offset"]={ 0, 200 - } + }, + ["func_id"]="dungeon_armor_open" }, [90040]={ ["next_id"]=90050, @@ -783,6 +795,7 @@ local tutorial = { 200 }, ["target_name"]="hero_detail_ui(Clone)/common/btn_close", + ["func_id"]="dungeon_armor_open", ["arrow_direction"]=1, ["arrow_offset"]={ 0, @@ -793,6 +806,7 @@ local tutorial = { ["next_id"]=90060, ["type"]=2, ["target_name"]="main_ui(Clone)/bottom_node/bottom_btn_cell_1", + ["func_id"]="dungeon_armor_open", ["arrow_direction"]=1, ["arrow_offset"]={ 0, @@ -812,6 +826,7 @@ local tutorial = { ["next_id"]=90070, ["type"]=2, ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/right/dungeon", + ["func_id"]="dungeon_armor_open", ["arrow_direction"]=1, ["arrow_offset"]={ 0, @@ -827,7 +842,8 @@ local tutorial = { [90070]={ ["next_id"]=90080, ["type"]=2, - ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/dungeon_comp/scrollrect/viewport/content/scroll_cell_3/btn_start", + ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/dungeon_comp/scrollrect/viewport/content/dungeon_armor_open/btn_start", + ["func_id"]="dungeon_armor_open", ["arrow_direction"]=2, ["arrow_offset"]={ 0, @@ -837,6 +853,7 @@ local tutorial = { [90080]={ ["type"]=2, ["target_name"]="dungeon_armor_main_ui(Clone)/scrollrect/viewport/content/scroll_cell_1/touch_node", + ["func_id"]="dungeon_armor_open", ["arrow_direction"]=4, ["arrow_offset"]={ 20, diff --git a/lua/app/ui/main_city/component/dungeon_comp.lua b/lua/app/ui/main_city/component/dungeon_comp.lua index 74c85f10..bd9de764 100644 --- a/lua/app/ui/main_city/component/dungeon_comp.lua +++ b/lua/app/ui/main_city/component/dungeon_comp.lua @@ -31,13 +31,22 @@ function DungeonComp:init() self:refreshShow() end -function DungeonComp:refreshShow() +function DungeonComp:refreshShow(targetMuduleKey) if EDITOR_MODE then Logger.logHighlight("更新副本显示."..tostring(Time:getTodaySurplusTime())) end self.openDungeons = DataManager.DungeonData:getOpenDungeons() + local targetIndex + if targetMuduleKey then + for index, dungeon in ipairs(self.openDungeons) do + if dungeon.module == targetMuduleKey then + targetIndex = index + break + end + end + end self.scrollRectComp:clearCells() - self.scrollRectComp:refillCells(#self.openDungeons) + self.scrollRectComp:refillCells(#self.openDungeons, nil, targetIndex) -- 跨天定时器 if self.countdownSid then diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index 9c167abc..99e93112 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -87,6 +87,14 @@ function MainComp:refreshModule(selectModule) if DataManager.ArenaData:needShowPopGift() and DataManager.ArenaData:getGiftId() then ModuleManager.ArenaManager:showGiftPopUI() end + elseif self.curModuleType == GConst.MainCityConst.MAIN_MODULE.DUNGEON then + if DataManager.TutorialData:getIsInTutorial() then + local moduleKey = DataManager.TutorialData:getTargetFuncId() + if moduleKey then + local dungeonComp = self.moduleMap[self.curModuleType] + dungeonComp:refreshShow(moduleKey) + end + end end for idx, cell in pairs(self.moduleMap) do diff --git a/lua/app/userdata/tutorial/tutorial_data.lua b/lua/app/userdata/tutorial/tutorial_data.lua index c47a17b1..6415d6e0 100644 --- a/lua/app/userdata/tutorial/tutorial_data.lua +++ b/lua/app/userdata/tutorial/tutorial_data.lua @@ -191,6 +191,10 @@ function TutorialData:getTargetName() return self.tutorialInfo.target_name end +function TutorialData:getTargetFuncId() + return self.tutorialInfo.func_id +end + function TutorialData:getTargetHeroId() return self.tutorialInfo.heroid end From 96c9cf8c18fca4da46fa62d799caf9e187f83624 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 28 Jul 2023 18:51:03 +0800 Subject: [PATCH 4/8] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/userdata/hero/hero_entity.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/app/userdata/hero/hero_entity.lua b/lua/app/userdata/hero/hero_entity.lua index b9aad3ae..adc57940 100644 --- a/lua/app/userdata/hero/hero_entity.lua +++ b/lua/app/userdata/hero/hero_entity.lua @@ -8,6 +8,10 @@ function HeroEntity:ctor(cfgId, lv, collectionLevel) self.data.collectionLevel = collectionLevel self.config = ConfigManager:getConfig("hero")[self.cfgId] self.beginLv = self.config.begin_lv -- 初始等级 + + self.baseAttrOriginal = {} + self.equipAttr = {} + self.allAttr = {} end function HeroEntity:initAttr() @@ -168,9 +172,10 @@ function HeroEntity:addTotalAttrValue(name, add) end function HeroEntity:getTotalAttrValue(name) - if self.allAttr == nil then + if table.nums(self.allAttr) <= 0 then self:initAttr() end + if not self.allAttr[name] then return 0 end From 23d9fec3ac188e895e3a9f761e4fbb0da28b3cc3 Mon Sep 17 00:00:00 2001 From: Fang Date: Mon, 31 Jul 2023 09:45:28 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=9F=BA=E9=87=91=E8=B4=AD=E4=B9=B0?= =?UTF-8?q?=E7=8A=B6=E6=80=81fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../userdata/dungeon/dungeon_armor_entity.lua | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lua/app/userdata/dungeon/dungeon_armor_entity.lua b/lua/app/userdata/dungeon/dungeon_armor_entity.lua index 82a5f306..0697e22e 100644 --- a/lua/app/userdata/dungeon/dungeon_armor_entity.lua +++ b/lua/app/userdata/dungeon/dungeon_armor_entity.lua @@ -410,25 +410,23 @@ end -- 基金阶段是否已购买 function DungeonArmorEntity:isBoughtFundStage(stage) - local bought = DataManager.ShopData:getActGiftMapByType(PayManager.PURCHARSE_TYPE.ACT_GIFT) - if not stage then return false end - if not self:getFundStageGiftId(stage) then - return + local giftId = self:getFundStageGiftId(stage) + + if not giftId then + return false end + local count = DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) + if EDITOR_MODE then - Logger.logHighlight("支线基金购买状态/"..self:getFundStageGiftId(stage)) - Logger.printTable(bought) - end - if bought then - return bought[self:getFundStageGiftId(stage)] + Logger.logHighlight("支线基金购买状态:"..giftId.."/"..count) end - return false + return count > 0 end -- 获取基金阶段标题 From 532feae309050f21306cdfc26fbdc61e4e3048c3 Mon Sep 17 00:00:00 2001 From: Fang Date: Mon, 31 Jul 2023 09:57:06 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=94=AF=E7=BA=BF=E5=9F=BA=E9=87=91?= =?UTF-8?q?=E5=A5=96=E5=8A=B1=E9=A2=86=E5=8F=96=E6=8C=89=E9=92=AE=E6=96=87?= =?UTF-8?q?=E6=A1=88=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/dungeon_armor/cell/armor_fund_reward_cell.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/app/ui/dungeon_armor/cell/armor_fund_reward_cell.lua b/lua/app/ui/dungeon_armor/cell/armor_fund_reward_cell.lua index 45a50267..49a6c155 100644 --- a/lua/app/ui/dungeon_armor/cell/armor_fund_reward_cell.lua +++ b/lua/app/ui/dungeon_armor/cell/armor_fund_reward_cell.lua @@ -62,7 +62,11 @@ function ArmorFundRewardCell:refresh(id) if not self.armorEntity:isMeetFundReward(self.rewardId) or self.armorEntity:isGotFundReward(self.rewardId) then -- 不满足条件 or 已领取 self.txBtn:setActive(true) - self.txBtn:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM)) + if self.armorEntity:isGotFundReward(self.rewardId) then + self.txBtn:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DONE)) + else + self.txBtn:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM)) + end self.btnGet:setTouchEnable(false) self.btnGet:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_2") self.baseObject:setSprite(GConst.ATLAS_PATH.UI_DUGEON_ARMOR, "dungeon_armor_bg_1") From bdd7aaaf267a298c031f3076320766e189c15a8b Mon Sep 17 00:00:00 2001 From: Fang Date: Mon, 31 Jul 2023 10:06:11 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E8=B6=85=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/dungeon_armor/armor_fund_ui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/app/ui/dungeon_armor/armor_fund_ui.lua b/lua/app/ui/dungeon_armor/armor_fund_ui.lua index e1f13df9..bc5315a9 100644 --- a/lua/app/ui/dungeon_armor/armor_fund_ui.lua +++ b/lua/app/ui/dungeon_armor/armor_fund_ui.lua @@ -76,7 +76,7 @@ end function ArmorFundUI:refreshBuy() local gift = DataManager.ShopData:getActGiftConfig()[self.curGiftId] - self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_16) .. " " .. gift.value .. "%") + self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_16) .. " " .. gift.value .. "%") if not self.armorEntity:isBoughtFundStage(self.curStage) then -- 可购买 self.txBuy:setText(GFunc.getFormatPrice(gift.recharge_id)) From d38ed4a99f7c2b1f3cc1b1e1c5d70b72d9cbc35c Mon Sep 17 00:00:00 2001 From: Fang Date: Mon, 31 Jul 2023 11:16:38 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=98=B5=E7=A7=B0=E4=B8=8D=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=A4=9A=E8=AF=AD=E8=A8=80=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/userdata/player/player_data.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/app/userdata/player/player_data.lua b/lua/app/userdata/player/player_data.lua index ffaafe8a..b6bc9827 100644 --- a/lua/app/userdata/player/player_data.lua +++ b/lua/app/userdata/player/player_data.lua @@ -251,7 +251,7 @@ end -- 获取玩家昵称 function PlayerData:getNickname() if self.data.playInfo.nickName == nil or #self.data.playInfo.nickName == 0 then - self.data.playInfo.nickName = I18N:getGlobalText(I18N.GlobalConst.NEW_PLAYER) + return I18N:getGlobalText(I18N.GlobalConst.NEW_PLAYER) end return self.data.playInfo.nickName end