Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development' into feature/issue-…
Browse files Browse the repository at this point in the history
…6658
  • Loading branch information
eugene-doobu committed Jan 8, 2025
2 parents 3cded08 + 4511194 commit 12049ed
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8424740541899140375}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
Expand Down Expand Up @@ -1503,7 +1503,19 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 0}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: Nekoyume.UI.LobbyMenu, Nekoyume
m_MethodName: EventRewardClick
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!225 &4504065429188180606
CanvasGroup:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2513,7 +2513,7 @@ PrefabInstance:
- target: {fileID: 8771800652996405473, guid: 4aeb2a2c0a0fed24ea51d6a49c3d17d2,
type: 3}
propertyPath: m_Name
value: UI_patrolreward_000102 (3)
value: UI_seasonPassParticlePremiumPlus
objectReference: {fileID: 0}
- target: {fileID: 8771800652996405473, guid: 4aeb2a2c0a0fed24ea51d6a49c3d17d2,
type: 3}
Expand Down Expand Up @@ -2938,7 +2938,7 @@ PrefabInstance:
- target: {fileID: 8771800652996405473, guid: 4aeb2a2c0a0fed24ea51d6a49c3d17d2,
type: 3}
propertyPath: m_Name
value: UI_patrolreward_000102 (2)
value: UI_seasonPassParticle
objectReference: {fileID: 0}
- target: {fileID: 8771800652996405473, guid: 4aeb2a2c0a0fed24ea51d6a49c3d17d2,
type: 3}
Expand Down Expand Up @@ -3173,7 +3173,7 @@ PrefabInstance:
- target: {fileID: 8771800652996405473, guid: 4aeb2a2c0a0fed24ea51d6a49c3d17d2,
type: 3}
propertyPath: m_Name
value: UI_patrolreward_000102 (1)
value: UI_seasonPassParticle
objectReference: {fileID: 0}
- target: {fileID: 8771800652996405473, guid: 4aeb2a2c0a0fed24ea51d6a49c3d17d2,
type: 3}
Expand Down
82 changes: 11 additions & 71 deletions nekoyume/Assets/Resources/UI/Prefabs/UI_LobbyMenu.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -10917,41 +10917,11 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 1929002957489927283}
m_Modifications:
- target: {fileID: 820924648165040388, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 820924648165040388, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 820924648165040388, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 4575422773675835264}
- target: {fileID: 820924648165040388, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 820924648165040388, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: EventRewardClick
objectReference: {fileID: 0}
- target: {fileID: 820924648165040388, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: Nekoyume.UI.LobbyMenu, Nekoyume
objectReference: {fileID: 0}
- target: {fileID: 820924648165040388, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 3344316989101963230, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_AnchorMax.y
Expand Down Expand Up @@ -11067,11 +11037,6 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5421218301455103924, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_SortingLayer
value: 32709
objectReference: {fileID: 0}
- target: {fileID: 5460571289484421555, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_Pivot.x
Expand Down Expand Up @@ -11177,56 +11142,31 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6165238753354208754, guid: 2946413b16dd45d479f36d87a099ed32,
- target: {fileID: 5815577113758240514, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_SortingLayer
value: 32709
objectReference: {fileID: 0}
- target: {fileID: 6867932833240397727, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6867932833240397727, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_SortingLayer
value: 32709
objectReference: {fileID: 0}
- target: {fileID: 7344523505993257652, guid: 2946413b16dd45d479f36d87a099ed32,
- target: {fileID: 6977969588221364292, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_SortingLayer
value: 32709
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7753112939384058779, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: speechBubble
value:
objectReference: {fileID: 5726702647442793415}
- target: {fileID: 8010885907698905305, guid: 2946413b16dd45d479f36d87a099ed32,
- target: {fileID: 8424740541899140375, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_Enabled
value: 0
propertyPath: m_Name
value: EventRewardBtn
objectReference: {fileID: 0}
- target: {fileID: 8010885907698905305, guid: 2946413b16dd45d479f36d87a099ed32,
- target: {fileID: 9107933173464721922, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_SortingLayer
value: 32709
objectReference: {fileID: 0}
- target: {fileID: 8011200472140009427, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8011200472140009427, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_SortingLayer
value: 32709
objectReference: {fileID: 0}
- target: {fileID: 8424740541899140375, guid: 2946413b16dd45d479f36d87a099ed32,
type: 3}
propertyPath: m_Name
value: EventRewardBtn
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2946413b16dd45d479f36d87a099ed32, type: 3}
--- !u!114 &5123494899628494551 stripped
Expand Down Expand Up @@ -15668,22 +15608,22 @@ PrefabInstance:
- target: {fileID: 8273195141794249301, guid: 1ffb848deec53694c97c3f01ed7a5b4c,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8273195141794249301, guid: 1ffb848deec53694c97c3f01ed7a5b4c,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8273195141794249301, guid: 1ffb848deec53694c97c3f01ed7a5b4c,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 29.56
objectReference: {fileID: 0}
- target: {fileID: 8273195141794249301, guid: 1ffb848deec53694c97c3f01ed7a5b4c,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -10
objectReference: {fileID: 0}
- target: {fileID: 8316174926513112879, guid: 1ffb848deec53694c97c3f01ed7a5b4c,
type: 3}
Expand Down
3 changes: 3 additions & 0 deletions nekoyume/Assets/_Scripts/UI/Model/EventRewardPopupData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ public class Content
public ShortcutHelper.PlaceType[] ShortcutTypes { get; set; }
}

public bool EnableEventRewardPopup { get; set; }
public string TitleL10NKey { get; set; }
public EventReward[] EventRewards { get; set; }

public Content EnabledThorChainContent { get; set; }
public Content DisabledThorChainContent { get; set; }

public bool HasEvent => EnableEventRewardPopup && (EventRewards?.Length ?? 0) > 0;
}
}
4 changes: 2 additions & 2 deletions nekoyume/Assets/_Scripts/UI/Tutorial/TutorialController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private static int GetCheckPoint(int clearedStageId)
if (checkPoint is 100000 or 101000)
{
// if check point is in patrol reward tutorial, play patrol reward tutorial for event condition
return !LiveAssetManager.instance.EventRewardPopupData.EventRewards.Any()
return !LiveAssetManager.instance.EventRewardPopupData.HasEvent
? 100000
: 101000;
}
Expand All @@ -253,7 +253,7 @@ void Check(int stageIdForTutorial) // ex) 5, 10
// Skip tutorial 7 (portal reward) in K version
}
else if (clearedStageId == 10 &&
LiveAssetManager.instance.EventRewardPopupData.EventRewards.Any())
LiveAssetManager.instance.EventRewardPopupData.HasEvent)
{
// if there is event reward data, play other patrol reward tutorial for event
checkPoint = 101000;
Expand Down
2 changes: 1 addition & 1 deletion nekoyume/Assets/_Scripts/UI/Widget/LobbyMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ public override void Show(bool ignoreShowAnimation = false)
var thorSchedule = LiveAssetManager.instance.ThorSchedule;
thorSeasonButton.gameObject.SetActive(thorSchedule?.IsOpened == true);

var isInEventDate = LiveAssetManager.instance.EventRewardPopupData.EventRewards.Any();
var isInEventDate = LiveAssetManager.instance.EventRewardPopupData.HasEvent;
btnPatrolReward.gameObject.SetActive(!isInEventDate);
btnEventReward.gameObject.SetActive(isInEventDate);
}
Expand Down
17 changes: 10 additions & 7 deletions nekoyume/Assets/_Scripts/UI/Widget/Popup/EventRewardPopup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public bool HasEvent
}

var eventRewardPopupData = liveAssetManager.EventRewardPopupData;
return eventRewardPopupData.EventRewards.Length > 0;
return eventRewardPopupData.HasEvent;
}
}

Expand Down Expand Up @@ -154,8 +154,9 @@ public override void Initialize()

public override void Show(bool ignoreShowAnimation = false)
{
var eventRewards = LiveAssetManager.instance.EventRewardPopupData.EventRewards;
if (eventRewards.Length == 0)
var eventRewardData = LiveAssetManager.instance.EventRewardPopupData;
var eventRewards = eventRewardData.EventRewards;
if (!eventRewardData.HasEvent)
{
NcDebug.LogError("No event rewards.");
return;
Expand Down Expand Up @@ -189,8 +190,9 @@ public override void Show(bool ignoreShowAnimation = false)

public void ShowAsThorChain()
{
var eventRewards = LiveAssetManager.instance.EventRewardPopupData.EventRewards;
if (eventRewards.Length == 0)
var eventRewardData = LiveAssetManager.instance.EventRewardPopupData;
var eventRewards = eventRewardData.EventRewards;
if (!eventRewardData.HasEvent)
{
NcDebug.LogError("No event rewards.");
return;
Expand All @@ -205,8 +207,9 @@ public void ShowAsThorChain()

public void ShowAsPatrolReward()
{
var eventRewards = LiveAssetManager.instance.EventRewardPopupData.EventRewards;
if (eventRewards.Length == 0)
var eventRewardData = LiveAssetManager.instance.EventRewardPopupData;
var eventRewards = eventRewardData.EventRewards;
if (!eventRewardData.HasEvent)
{
NcDebug.LogError("No event rewards.");
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public void ShowCurrency(CostType costType)

Lobby.Enter(true);
Find<HeaderMenuStatic>().UpdateAssets(HeaderMenuStatic.AssetVisibleState.Main);
var isInEventDate = LiveAssetManager.instance.EventRewardPopupData.EventRewards.Any();
var isInEventDate = LiveAssetManager.instance.EventRewardPopupData.HasEvent;
if (isInEventDate)
{
Find<EventRewardPopup>().Show();
Expand Down

0 comments on commit 12049ed

Please sign in to comment.