10
10
using System . Text ;
11
11
using NetworkLibrary . HTTP ;
12
12
using static WebAPIService . OHS . UserCounter ;
13
+ using NetworkLibrary . Extension ;
13
14
14
15
namespace WebAPIService . OHS
15
16
{
@@ -465,8 +466,12 @@ public static string Get(byte[] PostData, string ContentType, string directorypa
465
466
466
467
if ( ! string . IsNullOrEmpty ( ohsUserName ) )
467
468
{
469
+ bool keyFound = false ;
470
+
468
471
if ( directorypath . EndsWith ( "/SCEA/WorldDomination" ) )
469
472
{
473
+ keyFound = true ;
474
+
470
475
string leaderboardPath = directorypath + $ "/Leaderboards/{ ohsKey } .luatable";
471
476
472
477
if ( File . Exists ( leaderboardPath ) )
@@ -491,14 +496,25 @@ public static string Get(byte[] PostData, string ContentType, string directorypa
491
496
if ( jsonObject . TryGetValue ( "key" , out JToken keyValueToken ) && keyValueToken . Type == JTokenType . Object )
492
497
{
493
498
if ( ( ( JObject ) keyValueToken ) . TryGetValue ( ohsKey , out JToken wishlistToken ) )
499
+ {
500
+ keyFound = true ;
494
501
output = LuaUtils . ConvertJTokenToLuaTable ( wishlistToken , true ) ;
502
+ }
495
503
}
496
504
}
497
505
}
498
- else
506
+ if ( ! keyFound )
499
507
{
500
508
switch ( ohsKey )
501
509
{
510
+ case "last_logon" :
511
+ if ( directorypath . Contains ( "sodium_blimp" ) )
512
+ output = "\" " + DateTimeUtils . GetCurrentUnixTimestampAsString ( ) + "\" " ;
513
+ break ;
514
+ case "reward_count" :
515
+ if ( directorypath . Contains ( "sodium_blimp" ) )
516
+ output = "0" ;
517
+ break ;
502
518
case "timestamp" :
503
519
if ( directorypath . Contains ( "Ooblag" ) )
504
520
output = DateTime . Now . ToString ( "yyyyMMdd" ) ;
@@ -562,6 +578,10 @@ public static string Get(byte[] PostData, string ContentType, string directorypa
562
578
{
563
579
switch ( ohsKey )
564
580
{
581
+ case "cp_urls" :
582
+ if ( directorypath . Contains ( "sodium_blimp" ) )
583
+ output = "{SCEA='Lockwood_Showcase_6663_C388/A/CPALOCKSHOW00.xml',SCEE='Lockwood_Showcase_6663_C388/E/CPELockwood00.xml',SCEJ='Sodium_Main_1864_A357/J/CPJSodium00.xml',SCEAsia='Sodium_Main_1864_A357/H/CPHSodium00.xml'}" ;
584
+ break ;
565
585
case "vickie_version" :
566
586
output = "7" ;
567
587
break ;
0 commit comments