THAI: Add Coconut reward out of stock
This commit is contained in:
parent
3eb39e1363
commit
52ae355a96
25 changed files with 612 additions and 221 deletions
|
|
@ -91,6 +91,7 @@
|
|||
|
||||
Var OpunMediumTTF = "ROOT/taobin_project/font/Opun/Opun-Medium.ttf"
|
||||
Var OpunThinTTF = "ROOT/taobin_project/font/Opun/Opun-Thin.ttf"
|
||||
Var OpunBoldTTF = "ROOT/taobin_project/font/Opun/Opun-Bold.ttf"
|
||||
|
||||
Var KanitSemiBoldTTF = "ROOT/taobin_project/font/Kanit/Kanit-Medium.ttf"
|
||||
|
||||
|
|
@ -1020,10 +1021,19 @@
|
|||
Var SlientRefreshEnable = 0
|
||||
|
||||
Var ShouldShowNamHomCoconutRemainReward = 0
|
||||
Var ShowNamHomCoconutRemainReward = "Invisible"
|
||||
Var GetNamHomCoconutRemainReward = 0
|
||||
Var NamHomCoconutRemainReward_Y = 1071
|
||||
Var NamHomCoconutRemainRewardNumber_Y = 1130
|
||||
DEBUGVAR NamHomCoconutPro
|
||||
DEBUGVAR CurrentMainVideo
|
||||
If NamHomCoconutPro = 1 Then
|
||||
If CurrentMainVideo = 0 Then
|
||||
If CurrentMainVideo = 2 Then
|
||||
Var ShouldShowNamHomCoconutRemainReward = 1
|
||||
EndIf
|
||||
Var GetNamHomCoconutRemainReward = 1
|
||||
Var dummy_phone = "089999999"
|
||||
GETACCEXT dummy_phone 34
|
||||
EndIf
|
||||
|
||||
If EnergyDrink1BathPro = 1 Then
|
||||
|
|
@ -1048,6 +1058,62 @@
|
|||
|
||||
</EventOpen>
|
||||
|
||||
<EventActionOk>
|
||||
If GetNamHomCoconutRemainReward = 1 Then
|
||||
If Ext1a = "" Then
|
||||
SAVELOG "Get Nam hom coconut remain reward error Ext1a is empty."
|
||||
Else
|
||||
DEBUGVAR Ext1a
|
||||
|
||||
SPLIT2 Ext1a "/" RemainRewardSpl
|
||||
|
||||
Var SuperSetRemain = RemainRewardSpl[0]
|
||||
Var BalanceEssenceTonerRemain = RemainRewardSpl[1]
|
||||
Var CleansingGalRemain = RemainRewardSpl[2]
|
||||
Var TumbleBottleRemain = RemainRewardSpl[3]
|
||||
Var ClearGalRemain = RemainRewardSpl[4]
|
||||
|
||||
INT SuperSetRemain
|
||||
INT BalanceEssenceTonerRemain
|
||||
INT CleansingGalRemain
|
||||
INT TumbleBottleRemain
|
||||
INT ClearGalRemain
|
||||
|
||||
Var SumNamHomCoconutRemainReward = SuperSetRemain
|
||||
Var SumNamHomCoconutRemainReward = SumNamHomCoconutRemainReward + BalanceEssenceTonerRemain
|
||||
Var SumNamHomCoconutRemainReward = SumNamHomCoconutRemainReward + CleansingGalRemain
|
||||
Var SumNamHomCoconutRemainReward = SumNamHomCoconutRemainReward + TumbleBottleRemain
|
||||
Var SumNamHomCoconutRemainReward = SumNamHomCoconutRemainReward + ClearGalRemain
|
||||
|
||||
If ShouldShowNamHomCoconutRemainReward = 1 Then
|
||||
Var ShowNamHomCoconutRemainReward = "Enable"
|
||||
EndIf
|
||||
|
||||
;DEBUG
|
||||
;Var SumNamHomCoconutRemainReward = 200
|
||||
|
||||
If SumNamHomCoconutRemainReward > 500 Then
|
||||
Var ShowNamHomCoconutRemainReward = "Invisible"
|
||||
Else
|
||||
If SumNamHomCoconutRemainReward = 0 Then
|
||||
SAVELOG "NamHomCoconutPro: All reward out of stock"
|
||||
|
||||
WRITE_FILE "/mnt/sdcard/nam_hom_coconut_reward_out_of_stock" "1"
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
Var NamHomCoconutRemainReward = SumNamHomCoconutRemainReward
|
||||
DEBUGVAR NamHomCoconutRemainReward
|
||||
EndIf
|
||||
EndIf
|
||||
</EventActionOk>
|
||||
|
||||
<EventActionError>
|
||||
If GetNamHomCoconutRemainReward = 1 Then
|
||||
SAVELOG "Get Nam hom coconut remain reward requet error."
|
||||
EndIf
|
||||
</EventActionError>
|
||||
|
||||
<EventUnitTest1>
|
||||
Var XMLProfile = "AllPriceUp05"
|
||||
Open CurrentXMLFileName0
|
||||
|
|
@ -1458,6 +1524,27 @@
|
|||
</Video>
|
||||
|
||||
|
||||
<Image>
|
||||
<X> 224 </X>
|
||||
<Y> NamHomCoconutRemainReward_Y </Y>
|
||||
<State> ShowNamHomCoconutRemainReward </State>
|
||||
<Filename> "ROOT/taobin_project/image/event/nam_hom_coconut/reward_remain.png" </Filename>
|
||||
</Image>
|
||||
|
||||
<Text>
|
||||
<X> 379 </X>
|
||||
<Y> NamHomCoconutRemainRewardNumber_Y </Y>
|
||||
<State> ShowNamHomCoconutRemainReward </State>
|
||||
<Width> 224 </Width>
|
||||
<Height> 112 </Height>
|
||||
<Font> OpunBoldTTF </Font>
|
||||
<Size> 100 </Size>
|
||||
<Color> 0xFF0000 </Color>
|
||||
<Align> center-vertical-horizontal </Align>
|
||||
<Value> NamHomCoconutRemainReward </Value>
|
||||
</Text>
|
||||
|
||||
|
||||
|
||||
|
||||
<Button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue