Exemple #1
0
Json::Value GameItem::toJson()
{
	Json::Value json;
	json["name"] = m_name;
	json["type"] = itemTypeToString( m_type );
	json["abilities"] = m_abilities;

	return json;
}
void AudioPlayer::playItem(int type, string id)
{
    string cmd = "audio " + params["num"] + " playlist play ";
    if (type == DB_ITEM_DIRECTURL)
        cmd += id;
    else
        cmd += itemTypeToString(type) + ":" + id;

    connection->SendCommand(cmd);
}