public UserCurrency GetUserCurrency(UUID agentId)
{
if (m_doRemoteOnly) {
object remoteValue = DoRemoteByURL ("CurrencyServerURI", agentId);
return remoteValue != null ? (UserCurrency)remoteValue : new UserCurrency ();
}
Dictionary<string, object> where = new Dictionary<string, object> (1);
where ["PrincipalID"] = agentId;
List<string> query = GD.Query (new [] { "*" }, _REALM, new QueryFilter {
andFilters = where
}, null, null, null);
UserCurrency currency;
if ((query == null) || (query.Count == 0))
{
currency = new UserCurrency(agentId, 0, 0, 0, false, 0);
UserCurrencyCreate(agentId);
return currency;
}
return new UserCurrency(query);
}