Beispiel #1
0
 /// <summary>
 /// 게스트유저에서 페이스북 유저로 전환되었다.. 기존 데이터 정리
 /// </summary>
 public void ResetReConnect()
 {
     SaleType                  = eSaleType.normal;
     _PKLogin                  = null;
     _PKUserInfo               = null;
     _PKGamesInfo              = null;
     _PKGiftsCount             = null;
     _PKListGifts              = null;
     _PKAppFriends             = null;
     _PKSendGiftChallengeItems = null;
     _PKInvitChallengeCheck    = null;
     _PKInvitChallengeStatus   = null;
     // coins , deal
     _PKCheckDeal            = null;
     _PKGetPurchaseItems     = null;
     _PKGetUserPromotionList = null;
     // collect bounus
     _PKCollectBonus = null;
     _PKBonusInfo    = null;
     // pig bank
     //_PKPurchaseVault = null;
     //_PKVaultInfo = null;
     //_PKGetVaultShop = null;
     // News
     _PKNews      = null;
     oldUserLevel = 0;
 }
Beispiel #2
0
    public void PKReciveSetAppFriends(string msg)
    {
        _PKAppFriends = JsonConvert.DeserializeObject <PK.AppFriends.RECEIVE>(msg);
        for (int i = 0; i < _PKAppFriends.data.Length; i++)
        {
            _PKAppFriends.data[i].me = false;
            _AppFriendsList.Add(_PKAppFriends.data[i]);
        }

        // Add my information
        PK.AppFriends.REData myInfo = new PK.AppFriends.REData();
        myInfo.balance    = _PKUserInfo.GetBalance();
        myInfo.giftable   = false;
        myInfo.first_name = _PKUserInfo.GetFirstName();
        myInfo.last_name  = _PKUserInfo.GetLastName();
        myInfo.picture    = _PKUserInfo.GetUserPhotoURL();
        myInfo.id         = _PKUserInfo.data.id.ToString();
        myInfo.uid        = _PKUserInfo.data.uid.ToString();
        myInfo.me         = true;
        _AppFriendsList.Add(myInfo);

        _AppFriendsList.Sort((x, y) => y.balance.CompareTo(x.balance));
        for (int i = 0; i < _AppFriendsList.Count; i++)
        {
            _AppFriendsList[i].ranking = i + 1;
        }
    }