보석이 부족한 경우 현금으로 사라고 팝업 노출 제외 상점 완료

This commit is contained in:
Ino 2025-04-25 06:26:10 +09:00
parent 7535f82092
commit a4fa4031b4
18 changed files with 572 additions and 108 deletions

View File

@ -92,6 +92,7 @@ messageinfo 엄청 느린 버그
-- 현금 (바로 구매)
-- 광고 (광고 시청 후 아이템 지급 처리)
-- 요구하는 재화로 구매
-- 보석이 부족한 경우 현금으로 사라고 팝업 노출
//- 예시 테이블 데이터
// - 메일 보상 받을 때 상점 아이템인 지 확인
// - 인앱 구매 플레이팹 연동 등

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -10,6 +10,7 @@ GameObject:
m_Component:
- component: {fileID: 1200175685615469374}
- component: {fileID: -7217776635536932958}
- component: {fileID: 7819245562566825659}
m_Layer: 5
m_Name: ShopCard
m_TagString: Untagged
@ -35,6 +36,7 @@ RectTransform:
- {fileID: 290950992642225545}
- {fileID: 1512552238113595276}
- {fileID: 4261365584699668539}
- {fileID: 6884112069732279351}
- {fileID: 842742296758777702}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -66,7 +68,20 @@ MonoBehaviour:
gos:
- {fileID: 2659955462460448357}
- {fileID: 9027545117159098613}
- {fileID: 2659955462460448357}
--- !u!114 &7819245562566825659
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 119862886949005768}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cf97c70471942f04b9822aefe86390cf, type: 3}
m_Name:
m_EditorClassIdentifier:
go_time: {fileID: 6239865082496074502}
t_time: {fileID: 2091005412688833824}
--- !u!1 &238730587393955628
GameObject:
m_ObjectHideFlags: 0
@ -863,6 +878,82 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_localtextKey: 389
--- !u!1 &6239865082496074502
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6884112069732279351}
- component: {fileID: 4319994841737970400}
- component: {fileID: 65449367410145132}
m_Layer: 5
m_Name: remaintime
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6884112069732279351
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6239865082496074502}
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
m_Children:
- {fileID: 6811366610169770867}
m_Father: {fileID: 1200175685615469374}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4319994841737970400
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6239865082496074502}
m_CullTransparentMesh: 1
--- !u!114 &65449367410145132
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6239865082496074502}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 65f581562538e304cbbfe8ee3beab09c, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7037000857001869168
GameObject:
m_ObjectHideFlags: 0
@ -1073,6 +1164,141 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &8158201471226369287
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6811366610169770867}
- component: {fileID: 5607216751927659837}
- component: {fileID: 2091005412688833824}
m_Layer: 5
m_Name: t_time
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6811366610169770867
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8158201471226369287}
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
m_Children: []
m_Father: {fileID: 6884112069732279351}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 150, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5607216751927659837
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8158201471226369287}
m_CullTransparentMesh: 1
--- !u!114 &2091005412688833824
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8158201471226369287}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 00:00
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: a387e325271126742ad15569dba1ac57, type: 2}
m_sharedMaterial: {fileID: -6459762427321423278, guid: a387e325271126742ad15569dba1ac57,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 30
m_fontSizeBase: 30
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 15
m_fontSizeMax: 60
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 4096
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &8930848740434290930
GameObject:
m_ObjectHideFlags: 0

View File

@ -8407,6 +8407,7 @@ RectTransform:
- {fileID: 4035540653015321908}
- {fileID: 5529109680728071320}
- {fileID: 4850036629121503910}
- {fileID: 7114073895020692950}
m_Father: {fileID: 7508907425988721624}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
@ -62662,6 +62663,7 @@ GameObject:
m_Component:
- component: {fileID: 7508907425988721624}
- component: {fileID: 8277929067037878694}
- component: {fileID: 1901451479172755947}
m_Layer: 5
m_Name: ShopPackagePopup
m_TagString: Untagged
@ -62712,6 +62714,20 @@ MonoBehaviour:
images:
- {fileID: 4194982615936323077}
- {fileID: 2841983363915717730}
--- !u!114 &1901451479172755947
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4327670431948493803}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cf97c70471942f04b9822aefe86390cf, type: 3}
m_Name:
m_EditorClassIdentifier:
go_time: {fileID: 7381049650143933387}
t_time: {fileID: 3055150141833070643}
--- !u!1 &4330060266111093610
GameObject:
m_ObjectHideFlags: 0
@ -101156,6 +101172,82 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_ShowMaskGraphic: 0
--- !u!1 &7381049650143933387
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7114073895020692950}
- component: {fileID: 7702379848400660693}
- component: {fileID: 8476533899316699644}
m_Layer: 5
m_Name: adtime
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7114073895020692950
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7381049650143933387}
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
m_Children:
- {fileID: 3859107311160119595}
m_Father: {fileID: 541947001271978964}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7702379848400660693
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7381049650143933387}
m_CullTransparentMesh: 1
--- !u!114 &8476533899316699644
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7381049650143933387}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 65f581562538e304cbbfe8ee3beab09c, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7386451365449643224
GameObject:
m_ObjectHideFlags: 0
@ -115751,6 +115843,141 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &8337585879457040973
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3859107311160119595}
- component: {fileID: 8417349212169214391}
- component: {fileID: 3055150141833070643}
m_Layer: 5
m_Name: t_adtime
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3859107311160119595
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8337585879457040973}
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
m_Children: []
m_Father: {fileID: 7114073895020692950}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 150, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8417349212169214391
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8337585879457040973}
m_CullTransparentMesh: 1
--- !u!114 &3055150141833070643
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8337585879457040973}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 00:00
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: a387e325271126742ad15569dba1ac57, type: 2}
m_sharedMaterial: {fileID: -6459762427321423278, guid: a387e325271126742ad15569dba1ac57,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 30
m_fontSizeBase: 30
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 15
m_fontSizeMax: 60
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 4096
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &8340856210967178129
GameObject:
m_ObjectHideFlags: 0

View File

@ -1267,6 +1267,7 @@ public partial class ServerData
public void Buy_ShopItem(ShopItemListTableData data, Action afterbuy)
{
if (isShopItemSoldOut(data)) return;
if (Get_ShopADTime(data.n_ShopItemID) > 0) return;
switch (data.n_PriceItemID)
{
@ -1280,26 +1281,39 @@ public partial class ServerData
case -1: // 광고
ADInfo.Ins.Show_AD(() =>
{
Add_ShopBuyCount(data.n_ShopItemID);
var bag = table_randombag.Ins.Get_DataList(data.n_RandomBagID);
var obtainlist = new List<ItemSimpleData>();
for (int j = 0; j < bag.Count; j++)
obtainlist.Add(new ItemSimpleData { itemid = bag[j].n_ItemId, amount = bag[j].n_DropCount });
ServerInfo.Ins.Write(() =>
{
ObtainItemUI.Ins.Set(obtainlist);
afterbuy?.Invoke();
});
});
Add_ShopADTime(data.n_ShopItemID, data.n_ADGapTime);
Add_ShopRandomBagItem(data.n_ShopItemID, data.n_RandomBagID, afterbuy); }
);
break;
default:
if (Check_ItemAmount(data.n_PriceItemID, data.n_Price))
if (Check_ItemAmount(data.n_PriceItemID, data.n_Price, data.n_PriceItemID != 3))
{
Use_Item(data.n_PriceItemID, data.n_Price);
Add_ShopRandomBagItem(data.n_ShopItemID, data.n_RandomBagID, afterbuy);
}
else
{ // 보석이 부족한 경우 현금으로 사라고 팝업 노출
}
break;
}
}
void Add_ShopRandomBagItem(int shopid, int bagid, Action afterbuy)
{
Add_ShopBuyCount(shopid);
var bag = table_randombag.Ins.Get_DataList(bagid);
var obtainlist = new List<ItemSimpleData>();
for (int j = 0; j < bag.Count; j++)
{
obtainlist.Add(new ItemSimpleData { itemid = bag[j].n_ItemId, amount = bag[j].n_DropCount });
Add_Item(bag[j].n_ItemId, bag[j].n_DropCount);
}
ServerInfo.Ins.Write(() =>
{
ObtainItemUI.Ins.Set(obtainlist);
afterbuy?.Invoke();
});
}
public int Get_ShopBuyCount(int _id)
{
var key = Get_Key(_id);
@ -1336,46 +1350,22 @@ public partial class ServerData
return "";
}
public bool CanShow_ShopAD(int _id)
// 상점 광고 관련
public int Get_ShopADTime(int _id)
{
var data = table_shop.Ins.Get_Data(_id);
//if (data.PriceType == ePriceType.AD)
//{
// var shopdata = Shop[_id.ToString()];
// return shopdata[2] < data.BuyLimit_Day && shopdata[0] <= 0;
//}
return false;
var key = Get_Key(_id);
return Shop.ContainsKey(key) ? Shop[key][2] : 0;
}
public bool CanShow_ShopAD(eShopTab _tab)
{
var lst = table_shop.Ins.Get_DataList(_tab);
for (int i = 0; i < lst.Count; i++)
{
var canshow = CanShow_ShopAD(lst[i].ID);
if (canshow) return canshow;
}
return false;
}
public bool CanShow_ShopAD()
{
var lst = table_shop.Ins.Get_AD_DataList();
for (int i = 0; i < lst.Count; i++)
{
var canshow = CanShow_ShopAD(lst[i].ID);
if (canshow) return canshow;
}
return false;
}
public int Get_ShopADTime(int _id) { return Shop[_id.ToString()][0]; }
public void Add_ShopADTime(int _id, int _sec = 1)
{
var shopdata = Shop[_id.ToString()];
shopdata[0] += _sec;
shopdata[0].RandomizeCryptoKey();
Check_ShopData(_id);
var key = Get_Key(_id);
Shop[key][2] = _sec;
Shop[key][2].RandomizeCryptoKey();
}
public void Sub_ShopADTime(int _id, int _sec = 1)
{
int index = 0;
int index = 2;
if (_id == -1)
{
foreach (var item in Shop)
@ -1387,38 +1377,13 @@ public partial class ServerData
}
else
{
var shopdata = Shop[_id.ToString()];
shopdata[index] -= _sec;
if (shopdata[index] < 0) shopdata[index] = 0;
shopdata[index].RandomizeCryptoKey();
}
}
public string Can_BuyShopItem(ShopTableData _std)
{
if (!string.IsNullOrEmpty(_std.BuyCondition))
{
if (ServerInfo.Ins.m_SC_ServerStatus.ContentsLock == 1)
var key = Get_Key(_id);
if (Shop.ContainsKey(key) && Shop[key][index] > 0)
{
switch (_std.BuyCondition)
{
case "Chapter14Clear":
//if (Get_Common(eCommon.MaxMapID) < 15)
// return "14챕터 클리어\n필요";
break;
}
Shop[key][index] -= _sec;
Shop[key][index].RandomizeCryptoKey();
}
}
//if (!ServerInfo.Ins.m_ServerData.Check_ItemAmount(_std.ObtainCheckItem, 1, _std.ObtainCheckItemID, false))
//{
// if (_std.BuyLimit > 0) return Get_ShopBuyCount(_std.ID, 1) < _std.BuyLimit ? "" : "구매 완료";
// else if (_std.BuyLimit_Day > 0) return Get_ShopBuyCount(_std.ID, 2) < _std.BuyLimit_Day ? "" : "구매 완료";
// else if (_std.BuyLimit_Week > 0) return Get_ShopBuyCount(_std.ID, 3) < _std.BuyLimit_Week ? "" : "구매 완료";
// else if (_std.BuyLimit_Month > 0) return Get_ShopBuyCount(_std.ID, 4) < _std.BuyLimit_Month ? "" : "구매 완료";
// return null;
//}
return "구매 완료";
}
#endregion

View File

@ -123,15 +123,17 @@ public class ServerInfo : MyCoroutine
//m_ServerData.Sub_AllGambleADTime(OffLineReward.m_Sec); // 광고 뽑기
m_ServerData.Sub_ShopADTime(-1, OffLineReward.m_Sec); // 상점 광고
m_ServerData.Sub_Common(eCommon.CloverShopResetTime, OffLineReward.m_Sec); // 클로버 상점 초기화 시간
if (OffLineReward.m_Sec >= 300)
GameUI.Ins.LobbyUI.Get_OffLineReward().Set();
else
{
OffLineReward.m_Sec = 0;
OffLineReward.m_Sec.RandomizeCryptoKey();
}
//m_ServerData.Sub_Common(eCommon.CloverShopResetTime, OffLineReward.m_Sec); // 클로버 상점 초기화 시간
//if (OffLineReward.m_Sec >= 300)
// GameUI.Ins.LobbyUI.Get_OffLineReward().Set();
//else
//{
// OffLineReward.m_Sec = 0;
// OffLineReward.m_Sec.RandomizeCryptoKey();
//}
OffLineReward.m_Sec = 0; // 위 주석으로 인해 일단 넣어둠
}
public void Show_UpdateAppPopup()

View File

@ -89,8 +89,8 @@ public class ShopItemListTableData : TableDataBase
set { _BuyLimit_Month = value; _BuyLimit_Month.RandomizeCryptoKey(); }
}
protected ObscuredFloat _ADGapTime;
public float f_ADGapTime
protected ObscuredInt _ADGapTime;
public int n_ADGapTime
{
get { return _ADGapTime; }
set { _ADGapTime = value; _ADGapTime.RandomizeCryptoKey(); }

View File

@ -28,11 +28,7 @@ public class BuffCard : CardBase
if (sdata.Buff.isInfinity())
{
if (!DSUtil.CheckNull(m_Co_for1Sec))
{
StopCoroutine(m_Co_for1Sec);
m_Co_for1Sec = null;
}
Cancel_Repeat_forsec();
label_time.text = "";
}
else

View File

@ -41,7 +41,6 @@ public class Lobby_Bundle
gos_noti[1].SetActive(GameUI.Ins.ExistNewItem(eItem.Weapon) || GameUI.Ins.ExistNewItem(eItem.Ring) || GameUI.Ins.ExistNewItem(eItem.Necklace) || GameUI.Ins.ExistNewItem(eItem.Extra) || GameUI.Ins.ExistNewItem(eItem.Fairy));
gos_noti[2].SetActive(GameUI.Ins.ExistNewItem(eItem.Pet));
gos_noti[3].SetActive(sdata.ExistCanCompleteBook());
gos_noti[5].SetActive(sdata.CanShow_ShopAD());
gos_noti[7].SetActive(false);
gos_noti[10].SetActive(TitleGetUI.list_gettitle.Count > 0);
gos_noti[12].SetActive(sdata.ExistCanGetPass());

View File

@ -38,6 +38,7 @@ public class NewGameUI : MonoBehaviourSingletonTemplate<NewGameUI>
MailUI.Ins.Set(true);
Set_Noti();
ServerInfo.Ins.Check_OfflineReward();
}
#if UNITY_EDITOR

View File

@ -24,7 +24,6 @@ public class ShopCard : CardBase
texts[0].text = m_Data.Get_Name();
texts[1].text = sdata.Get_ShopLimitText(m_Data);
texts[2].text = sdata.Get_ShopPriceText(m_Data);
texts[3].text = DSUtil.Format(390, m_Data.n_FirstBonus);
images[0].sprite = m_Data.Get_Icon();
@ -33,6 +32,8 @@ public class ShopCard : CardBase
gos[0].SetActive(m_Data.n_FirstBonus > 0);
gos[1].SetActive(sdata.isShopItemSoldOut(m_Data)); // 품절 여부
GetComponent<CardTimeUI>().Set_ShopADTime(m_Data.n_ShopItemID, gos[1].activeSelf);
}
public void OnClick_Buy()

View File

@ -30,10 +30,16 @@ public class ShopPackagePopup : uScrollViewMgr
var sdata = ServerInfo.Ins.m_ServerData;
texts[1].text = sdata.Get_ShopLimitText(m_Data);
texts[2].text = sdata.Get_ShopPriceText(m_Data);
GetComponent<CardTimeUI>().Set_ShopADTime(m_Data.n_ShopItemID, sdata.isShopItemSoldOut(m_Data));
}
public void OnClick_Buy()
{
ServerInfo.Ins.m_ServerData.Buy_ShopItem(m_Data, Set);
ServerInfo.Ins.m_ServerData.Buy_ShopItem(m_Data, () =>
{
Set();
NewGameUI.Ins.m_ShopUI.OnClick_SubTab();
});
}
}

View File

@ -31,7 +31,7 @@ public class ShopUI : BotMenuBase
OnClick_SubTab();
}
void OnClick_SubTab()
public void OnClick_SubTab()
{
//for (int i = 0; i < shopContents.Length; i++) shopContents[i].gameObject.SetActive(false);

View File

@ -22,8 +22,7 @@ public class ShopCardBase : CardBase
{
if (!DSUtil.CheckNull(_base))
{
StopCoroutine(m_Co_for1Sec);
m_Co_for1Sec = null;
Cancel_Repeat_forsec();
}
DSUtil.InActivateGameObjects(gos);
return;
@ -67,7 +66,6 @@ public class ShopCardBase : CardBase
sprites[1].spriteName = Get_MoneyIcon();
gos[0].SetActive(sdata.CanShow_ShopAD(m_ShopTableData.ID));
if (gos.Length > 4) gos[4].SetActive(m_ShopTableData.IsRocket);
//if (go_guidearrow) go_guidearrow.SetActive(m_ShopTableData.PriceType == ePriceType.AD && m_ShopTableData.BuyLimit_Day == 1 && NewGameUI.Ins.m_GuideQuestUI.Get_Purpose() == ePurpose.FreePackage && sdata.Get_Common(eCommon.GuideClear) == 0);
}
@ -96,13 +94,6 @@ public class ShopCardBase : CardBase
// 게임 조건에 따른 구매 체크
if (!gos[3].activeSelf)
{
var buycondition = sdata.Can_BuyShopItem(m_ShopTableData);
if (!string.IsNullOrEmpty(buycondition))
{
gos[3].SetActive(true);
if (labels.Length > 6) labels[6].text = buycondition;
else gos[3].GetComponentInChildren<UILabel>().text = buycondition;
}
}
else
{
@ -221,7 +212,6 @@ public class ShopCardBase : CardBase
sdata.Sub_ShopADTime(m_ShopTableData.ID, -m_ShopTableData.ADGapTime);
GetItemUI.Ins.Set(sdata.Add_Item(new ItemData(m_ShopTableData.Item, m_ShopTableData.ItemID, m_ShopTableData.Amount, "shop ad", eUICardType.GetItem)));
GetItemUI.Ins.Show_Items();
gos[0].SetActive(sdata.CanShow_ShopAD(m_ShopTableData.ID));
Set_ADTime();
Set_Limit();
}

View File

@ -0,0 +1,31 @@
using TMPro;
using UnityEngine;
public class CardTimeUI : MyCoroutine
{
public GameObject go_time;
public TextMeshProUGUI t_time;
int m_ShopID;
public void Set_ShopADTime(int shopid, bool issoldout)
{
m_ShopID = shopid;
var sdata = ServerInfo.Ins.m_ServerData;
go_time.SetActive(!issoldout && sdata.Get_ShopADTime(m_ShopID) > 0);
if (go_time.activeSelf)
{
Set_Time();
if (DSUtil.CheckNull(m_Co_for1Sec))
Set_Repeat_for1sec(Set_Time);
}
else
Cancel_Repeat_forsec();
}
void Set_Time()
{
t_time.text = DSUtil.Get_TimeText_MS(ServerInfo.Ins.m_ServerData.Get_ShopADTime(m_ShopID));
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cf97c70471942f04b9822aefe86390cf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -18,6 +18,14 @@ public class MyCoroutine : MonoBehaviour
act();
}
}
protected void Cancel_Repeat_forsec()
{
if (!DSUtil.CheckNull(m_Co_for1Sec))
{
StopCoroutine(m_Co_for1Sec);
m_Co_for1Sec = null;
}
}
protected void Set_Coroutine(Action _act, float _time)
{