Skip to content

Commit

Permalink
[CN UPDATE] Client:2.2.01 Data:24-01-29-16-06-39-df4e2d
Browse files Browse the repository at this point in the history
  • Loading branch information
MuelsyseBot_v1 committed Feb 1, 2024
1 parent 45dce49 commit 94cad13
Show file tree
Hide file tree
Showing 1,796 changed files with 1,346,750 additions and 218,760 deletions.
2 changes: 1 addition & 1 deletion zh_CN/gamedata/[uc]lua/GlobalConfig.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GlobalConfig =
{
CUR_FUNC_VER = "V045",
CUR_FUNC_VER = "V047",
}


Expand Down
5 changes: 5 additions & 0 deletions zh_CN/gamedata/[uc]lua/base/dialog/UIBase.lua
Original file line number Diff line number Diff line change
Expand Up @@ -421,4 +421,9 @@ end

function UIBase:LoadSpriteFromAutoPackHub(hubPath, spriteName)
return self.m_parent:LoadSpriteFromAutoPackHub(hubPath, spriteName);
end


function UIBase:LoadPrefab(path)
return self.m_parent:LoadPrefab(path);
end
2 changes: 2 additions & 0 deletions zh_CN/gamedata/[uc]lua/feature/AudioConsts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ AudioConsts =
ACT4FUN_END_FAILED = "ON_ACT4FUN_SCWARNING";
ACT1SIGNVS_BOAT_ENTER = "ON_ACT1SIGNVS_DRAGONBOATLOAD";
ACT1SIGNVS_BOAT_URGE = "ON_ACT1SIGNVS_DRAGONBOATURGE";
ACT1BLESSING_PACKET_ENTRY = "ON_ACT1BLESSING_SFSGNENTR";
ACT1BLESSING_OPEN_PACKET = "ON_ACT1BLESSING_SFSGNOPN";
}
AudioConsts = Readonly(AudioConsts);
4 changes: 4 additions & 0 deletions zh_CN/gamedata/[uc]lua/feature/FeatureModule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,7 @@ require "Feature/Activity/UniqueOnly/UniqueOnlyUtil"
require "Feature/Activity/MainlineBp/MainlineBpDefine";
require "Feature/Activity/MainlineBp/MainlineBpUtil";
require "Feature/Activity/MainlineBp/MainlineBpMainDlg";

require "Feature/Activity/BlessOnly/BlessOnlyDefine"
require "Feature/Activity/BlessOnly/BlessOnlyUtil"
require "Feature/Activity/BlessOnly/BlessOnlyMainDlg"
32 changes: 31 additions & 1 deletion zh_CN/gamedata/[uc]lua/feature/activity/LuaActivityUtil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ local HOME_WEIGHT_CHECKIN_ALLPLAYER = 550;
local HOME_WEIGHT_SWITCH_ONLY = 560;
local HOME_WEIGHT_CHECKIN_VS = 570;
local HOME_WEIGHT_UNIQUE_ONLY = 580;
local HOME_WEIGHT_BLESS_ONLY = 590;

local HOME_WEIGHT_MAIN_BUFF = 600;
local HOME_WEIGHT_MAINLINE_BP = 610;
Expand Down Expand Up @@ -199,6 +200,25 @@ function LuaActivityUtil:_FindValidUniqueOnly(validActs, uncompleteActs)
end
end




function LuaActivityUtil:_FindValidBlessOnly(validActs, uncompleteActs)
local actList = CS.Torappu.UI.ActivityUtil.FindValidActs(CS.Torappu.ActivityType.BLESS_ONLY);
if actList == nil then
return;
end

for i = 0, actList.Count - 1 do
local actId = actList[i];
local validAct = CS.Torappu.SortableString(actId, HOME_WEIGHT_BLESS_ONLY);
validActs:Add(validAct);
if self:_CheckIfBlessOnlyUncomplete(actId) then
uncompleteActs:Add(validAct);
end
end
end

function LuaActivityUtil:_FindValidMainlineBpAct(validActs, uncompleteActs)
local actList = CS.Torappu.UI.ActivityUtil.FindValidActs(CS.Torappu.ActivityType.MAINLINE_BP);
if actList == nil then
Expand Down Expand Up @@ -229,6 +249,7 @@ function LuaActivityUtil:FindValidHomeActs(validActs, uncompleteActs)
self:_FindValidCheckinVsActs(validActs, uncompleteActs);
self:_FindValidSwitchOnly(validActs,uncompleteActs);
self:_FindValidUniqueOnly(validActs,uncompleteActs);
self:_FindValidBlessOnly(validActs,uncompleteActs);
self:_FindValidMainlineBpAct(validActs, uncompleteActs);
end

Expand Down Expand Up @@ -271,7 +292,10 @@ local DEFINE_CLS_FUNCS = {
DlgMgr.DefineDialog(clsName, config.dlgPath, UniqueOnlyDlg)
end,
MAINLINE_BP = function(clsName, config)
DlgMgr.DefineDialog(clsName, config.dlgPath, MainlineBpMainDlg);
DlgMgr.DefineDialog(clsName, config.dlgPath, MainlineBpMainDlg)
end,
BLESS_ONLY = function(clsName, config)
DlgMgr.DefineDialog(clsName, config.dlgPath, BlessOnlyMainDlg)
end,
}

Expand Down Expand Up @@ -341,6 +365,8 @@ function LuaActivityUtil:CheckIfActivityUncomplete(type, actId)
return self:_CheckIfSwitchOnlyUncomplete(actId);
elseif type == CS.Torappu.ActivityType.UNIQUE_ONLY then
return self:_CheckIfUniqueOnlyUncomplete(actId);
elseif type == CS.Torappu.ActivityType.BLESS_ONLY then
return self:_CheckIfBlessOnlyUncomplete(actId);
elseif type == CS.Torappu.ActivityType.MAINLINE_BP then
return self:_CheckIfMainlineBpUncomplete(actId);
else
Expand Down Expand Up @@ -482,6 +508,10 @@ function LuaActivityUtil:_CheckIfUniqueOnlyUncomplete(actId)
return false;
end

function LuaActivityUtil:_CheckIfBlessOnlyUncomplete(actId)
return BlessOnlyUtil.CheckBlessActIsUncomplete(actId);
end



function LuaActivityUtil:_CheckIfMainlineBpUncomplete(actId)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
local FadeSwitchTween = CS.Torappu.UI.FadeSwitchTween
local luaUtils = CS.Torappu.Lua.Util;
























local BlessOnlyBlessCollectionView = Class("BlessOnlyBlessCollectionView", UIPanel);

function BlessOnlyBlessCollectionView:OnInit()
self:AddButtonClickListener(self._closeBtn, self._OnClickCloseBtn);
self:AddButtonClickListener(self._fullScreenBtn, self._OnClickCloseBtn);
self:AddButtonClickListener(self._shareBtn, self._OnClickShareBtn);
CS.Torappu.Lua.LuaUIUtil.BindBackPressToButton(self._closeBtn);

self.m_switchTween = FadeSwitchTween(self._canvasGroup)
self.m_switchTween:Reset(false)

local avatarPrefab = CS.Torappu.UI.PlayerAvatarUtil.GetAvatarViewPrefab();
if avatarPrefab ~= nil then
self.m_avatarView = CS.UnityEngine.GameObject.Instantiate(avatarPrefab, self._avatarContainer):GetComponent("PlayerAvatarView");
end
end


function BlessOnlyBlessCollectionView:OnViewModelUpdate(data)
if data == nil then
return;
end
self.m_switchTween.isShow = data.panelState == BlessOnlyPanelState.BLESS_COLLECTION;
if data.panelState ~= BlessOnlyPanelState.BLESS_COLLECTION then
return;
end

local avatarSprite = luaUtils.GetPlayerAvatarSprite(data.avatarInfo);
self.m_avatarView:Render(avatarSprite);

if self._crossAppShareAvatarContent ~= nil then
local avatarModel = CS.Torappu.UI.CrossAppShare.CrossAppShareAvatarModel();
avatarModel:InitModel(true, avatarSprite);
self._crossAppShareAvatarContent.dynAssetModel = avatarModel;
end

self._playerIdText.text = CS.Torappu.Lua.Util.Format(StringRes.BLESSONLY_UID_FORMAT, data.playerId);
self._playerNameText.text = CS.Torappu.Lua.Util.Format(StringRes.BLESSONLY_NAME_FORMAT, data.playerName, data.playerNameId);
self._playerLvText.text = tostring(data.playerLevel);

SetGameObjectActive(self._shareBtn.gameObject, CS.Torappu.UI.CrossAppShare.CrossAppShareUtil.CheckBtnInTimeByMissionId(data.shareMissionId, false));
self.m_cachedShareMissionId = data.shareMissionId;

local fesModel1 = data:GetPacketByOrder(1);
if fesModel1 ~= nil then
self:_RenderFesDisplay(fesModel1, self._blessText1, self._charAvatar1);
end
local fesModel2 = data:GetPacketByOrder(2);
if fesModel2 ~= nil then
self:_RenderFesDisplay(fesModel2, self._blessText2, self._charAvatar2);
end
local fesModel3 = data:GetPacketByOrder(3);
if fesModel3 ~= nil then
self:_RenderFesDisplay(fesModel3, self._blessText3, self._charAvatar3);
end
local fesModel4 = data:GetPacketByOrder(4);
if fesModel4 ~= nil then
self:_RenderFesDisplay(fesModel4, self._blessText4, self._charAvatar4);
end
end




function BlessOnlyBlessCollectionView:_RenderFesDisplay(fesModel, blessTextImg, charAvatar)
blessTextImg:SetSprite(self._atlasObject:GetSpriteByName(fesModel.fesBlessingText1));
local hubPath = CS.Torappu.ResourceUrls.GetCharAvatarHubPath();
charAvatar.sprite = self:LoadSpriteFromAutoPackHub(hubPath, fesModel.defaultFesCharAvatarId);
end

function BlessOnlyBlessCollectionView:_OnClickCloseBtn()
if self.onClickCloseBtn == nil then
return
end
Event.Call(self.onClickCloseBtn);
end

function BlessOnlyBlessCollectionView:_CreateBlessCollectionCollector()
local param = CS.Torappu.UI.Act1Blessing.Act1BlessingBlessCollectionModelCollector.CollectParam();
param.blessTextImage1 = self._blessText1;
param.charAvatar1 = self._charAvatar1;
param.blessTextImage2 = self._blessText2;
param.charAvatar2 = self._charAvatar2;
param.blessTextImage3 = self._blessText3;
param.charAvatar3 = self._charAvatar3;
param.blessTextImage4 = self._blessText4;
param.charAvatar4 = self._charAvatar4;
param.playerIdText = self._playerIdText;
param.playerNameText = self._playerNameText;
param.playerLvText = self._playerLvText;
param.avatarContent = self._crossAppShareAvatarContent;

local collector = CS.Torappu.UI.Act1Blessing.Act1BlessingBlessCollectionModelCollector();
collector:InitCollector(param);
collector:CollectModel();
return collector;
end

function BlessOnlyBlessCollectionView:_OnClickShareBtn()
if self.m_switchTween ~= nil and self.m_switchTween.isTweening then
return;
end
if CS.Torappu.UI.UISyncDataUtil.instance:CheckCrossDaysAndResync() then
return;
end
if CS.Torappu.UI.UIPageController.isTransiting then
return;
end
local prefabPath = CS.Torappu.ResourceUrls.GetAct1BlessingRemakeBlessCollectionPath();
local collector = self:_CreateBlessCollectionCollector();
local remakeController = self:LoadPrefab(prefabPath):GetComponent("Torappu.UI.CrossAppShare.CrossAppShareRemakeController");

local option = CS.Torappu.UI.UIPageOption();
local inputParam = CS.Torappu.UI.CrossAppShare.CrossAppSharePage.InputParam();
inputParam.remakePrefab = remakeController;
inputParam.additionModel = nil;
inputParam.modelCollector = collector;
inputParam.shareMissionId = self.m_cachedShareMissionId;
inputParam.effectType = CS.Torappu.UI.CrossAppShare.CrossAppShareDisplayEffects.EffectType.CAMERA_SIZE_TWEEN;
option.args = inputParam;

self:OpenPage3(CS.Torappu.UI.UIPageNames.CROSS_APP_SHARE_PAGE, option);
end

return BlessOnlyBlessCollectionView
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
local eutil = CS.Torappu.Lua.Util;




















local BlessOnlyBlessListHorizontalItem = Class("BlessOnlyBlessListHorizontalItem", UIPanel);


function BlessOnlyBlessListHorizontalItem:OnInit()
local avatarPrefab = CS.Torappu.UI.PlayerAvatarUtil.GetAvatarViewPrefab();
if avatarPrefab ~= nil then
self.m_avatarView = CS.UnityEngine.GameObject.Instantiate(avatarPrefab, self._avatarContainer):GetComponent("PlayerAvatarView");
end
end



function BlessOnlyBlessListHorizontalItem:Render(data, illustLoader)
if data == nil or data.openPacketModel == nil or data.openPacketModel.curBlessItemModel == nil then
return;
end

local curBlessItemModel = data.openPacketModel.curBlessItemModel;
self._charNameText.text = curBlessItemModel.charName;
local blessingGroupRenderData = self._blessingAtlasObject:GetSpriteByName(data.openPacketModel.blessingGroup);
self._blessingGroupImg:SetSprite(blessingGroupRenderData);

local avatarSprite = eutil.GetPlayerAvatarSprite(data.avatarInfo);
self.m_avatarView:Render(avatarSprite);

if self._crossAppShareAvatarContent ~= nil then
local avatarModel = CS.Torappu.UI.CrossAppShare.CrossAppShareAvatarModel();
avatarModel:InitModel(true, avatarSprite);
self._crossAppShareAvatarContent.dynAssetModel = avatarModel;
end

local blessingText = data.openPacketModel.curBlessItemModel.charBlessing;
self._charBlessingText.text = blessingText;
self._charBlessingShadow.text = blessingText;
self._playerIdText.text = CS.Torappu.Lua.Util.Format(StringRes.BLESSONLY_UID_FORMAT, data.playerId);
self._playerNameText.text = CS.Torappu.Lua.Util.Format(StringRes.BLESSONLY_NAME_FORMAT, data.playerName, data.playerNameId);
self._playerLvText.text = tostring(data.playerLevel);

if self.m_cachedBlessItemModel ~= curBlessItemModel and illustLoader ~= nil then
self.m_cachedBlessItemModel = curBlessItemModel;

local skin = CS.Torappu.CharUISkinStruct(curBlessItemModel.charId, curBlessItemModel.charSkinId);
local scale = tonumber(self._illustScale);
if self._crossAppShareIllustContent ~= nil then
local illustModel = CS.Torappu.UI.CrossAppShare.CrossAppShareIllustModel();
illustModel:InitModel(true, skin, scale);
self._crossAppShareIllustContent.dynAssetModel = illustModel;
end

eutil.ClearAllChildren(self._illustContainer);
local illust = eutil.LoadStaticChrIllust(illustLoader, skin, self._illustContainer);

if illust ~= nil then
illust.rectTransform.sizeDelta = illust.rectTransform.sizeDelta * scale;
end
end
end


function BlessOnlyBlessListHorizontalItem:CreateRemakeCollector()
local param = CS.Torappu.Activity.Act1Blessing.Act1BlessingHorizontalItemModelCollector.CollectParam();

param.charNameText = self._charNameText;
param.blessingGroupImg = self._blessingGroupImg;
param.charBlessingText = self._charBlessingText;
param.charBlessingShadow = self._charBlessingShadow;
param.playerIdText = self._playerIdText;
param.playerNameText = self._playerNameText;
param.playerLvText = self._playerLvText;
param.avatarContent = self._crossAppShareAvatarContent;
param.illustContent = self._crossAppShareIllustContent;

local collector = CS.Torappu.Activity.Act1Blessing.Act1BlessingHorizontalItemModelCollector();
collector:InitCollector(param);
collector:CollectModel();
return collector;
end

return BlessOnlyBlessListHorizontalItem;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@




local BlessOnlyBlessListSliderItemView = Class("BlessOnlyBlessListSliderItemView", UIPanel);


function BlessOnlyBlessListSliderItemView:Render(isSelect)
SetGameObjectActive(self._darkState, not(isSelect));
SetGameObjectActive(self._lightState, isSelect);
end

return BlessOnlyBlessListSliderItemView;
Loading

0 comments on commit 94cad13

Please sign in to comment.