In the note, "Happy NET Auxiliary program development notes", a simple record of how to log in happy, to obtain "Parking" related data: Players (parking) information, player vehicle parking information, players parking situation, such as private car. In this post, you will simply describe the player's buddy information and the player's private car parking. Say not much, enter the text.
First, get the player friend information
In fact, in the previous note, there are mentioned v_frienddata variables, in fact, the player friend information is stored in the JSON format in the variable, we need to write a good corresponding entity, and then use Json.NET to do a conversion on it. Since the previous article did not detail how to use Json.NET to convert JSON, here's how to add it.
Let's take a look at the tree structure of JSON in a variable:
Where the UID is 1, 2 is the default neighbor that the system adds to the player. The following are entity classes (see the source code that came with the previous note for EntityBase entities):
Using System;
Using System.Collections.Generic;
Using System.Text;
Namespace SNSHelper.Kaixin001.Entity
{
public class Parkerfriendinfo:entitybase
{
Public Parkerfriendinfo (Object obj)
: Base (obj)
{
}
public string UId
{
Get
{
return jsobj["UID"]. ToString ();
}
}
public string Realname
{
Get
{
Return Utility.unicode2character (jsobj["Real_name"). ToString ());
}
}
public string Ta
{
Get
{
Return Utility.unicode2character (jsobj["ta"). ToString ());
}
}
public string full
{
Get
{
Return jsobj[' full '. ToString ();
}
}
public string Scenemoney
{
Get
{
return jsobj["Scenemoney"]. ToString ();
}
}
public string Scenename
{
Get
{
Return Utility.unicode2character (jsobj["Scenename"). ToString ());
}
}
public string Neighbor
{
Get
{
return jsobj["neighbor"]. ToString ();
}
}
public string Online
{
Get
{
return jsobj["Online". ToString ();
}
}
}
}