本文整理汇总了C#中IClientAPI.SendAgentDataUpdate方法的典型用法代码示例。如果您正苦于以下问题:C# IClientAPI.SendAgentDataUpdate方法的具体用法?C# IClientAPI.SendAgentDataUpdate怎么用?C# IClientAPI.SendAgentDataUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IClientAPI
的用法示例。
在下文中一共展示了IClientAPI.SendAgentDataUpdate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendAgentDataUpdate
private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
{
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
// TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, dataForAgentID);
string firstname, lastname;
if (account != null)
{
firstname = account.FirstName;
lastname = account.LastName;
}
else
{
firstname = "Unknown";
lastname = "Unknown";
}
remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname,
lastname, activeGroupPowers, activeGroupName,
activeGroupTitle);
}
示例2: SendAgentDataUpdate
private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
{
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
// TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
string firstname = "Unknown", lastname = "Unknown";
string name = m_UserManagement.GetUserName(dataForAgentID);
if (!string.IsNullOrEmpty(name))
{
string[] parts = name.Split(new char[] { ' ' });
if (parts.Length >= 2)
{
firstname = parts[0];
lastname = parts[1];
}
}
remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname,
lastname, activeGroupPowers, activeGroupName,
activeGroupTitle);
}
示例3: SendAgentDataUpdate
private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
{
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
// TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, remoteClient.FirstName,
remoteClient.LastName, activeGroupPowers, activeGroupName,
activeGroupTitle);
}
示例4: OnAgentDataUpdateRequest
private void OnAgentDataUpdateRequest(IClientAPI remoteClient,
UUID AgentID, UUID SessionID)
{
UUID ActiveGroupID;
string ActiveGroupName;
ulong ActiveGroupPowers;
string firstname = remoteClient.FirstName;
string lastname = remoteClient.LastName;
string ActiveGroupTitle = "I IZ N0T";
ActiveGroupID = osGroup.GroupID;
ActiveGroupName = osGroup.GroupName;
ActiveGroupPowers = osGroup.GroupPowers;
remoteClient.SendAgentDataUpdate(AgentID, ActiveGroupID, firstname,
lastname, ActiveGroupPowers, ActiveGroupName,
ActiveGroupTitle);
}
示例5: SendDataUpdate
//tell remoteClient about its agent group info, and optionally send title to others
private void SendDataUpdate(IClientAPI remoteClient, bool tellOthers)
{
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
UUID activeGroupID = UUID.Zero;
string activeGroupTitle = string.Empty;
string activeGroupName = string.Empty;
ulong activeGroupPowers = (ulong)GroupPowers.None;
UUID agentID = GetRequestingAgentID(remoteClient);
GroupMembershipData membership = m_groupData.GetAgentActiveMembership(agentID.ToString(), agentID.ToString());
if (membership != null)
{
activeGroupID = membership.GroupID;
activeGroupTitle = membership.GroupTitle;
activeGroupPowers = membership.GroupPowers;
activeGroupName = membership.GroupName;
}
UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, agentID);
string firstname, lastname;
if (account != null)
{
firstname = account.FirstName;
lastname = account.LastName;
}
else
{
firstname = "Unknown";
lastname = "Unknown";
}
remoteClient.SendAgentDataUpdate(agentID, activeGroupID, firstname,
lastname, activeGroupPowers, activeGroupName,
activeGroupTitle);
if (tellOthers)
SendScenePresenceUpdate(agentID, activeGroupTitle);
ScenePresence sp = (ScenePresence)remoteClient.SceneAgent;
if (sp != null)
sp.Grouptitle = activeGroupTitle;
}
示例6: OnAgentDataUpdateRequest
private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID,
bool sendToAll)
{
if (m_debugEnabled)
MainConsole.Instance.DebugFormat("[GROUPS]: {0} called", MethodBase.GetCurrentMethod().Name);
UUID activeGroupID = UUID.Zero;
string activeGroupTitle = string.Empty;
string activeGroupName = string.Empty;
ulong activeGroupPowers = (ulong) GroupPowers.None;
GroupMembershipData membership = m_cachedGroupTitles.ContainsKey(dataForAgentID)
? m_cachedGroupTitles[dataForAgentID]
: m_groupData.GetGroupMembershipData(
GetRequestingAgentID(remoteClient),
UUID.Zero,
dataForAgentID);
m_cachedGroupTitles[dataForAgentID] = membership;
if (membership != null)
{
activeGroupID = membership.GroupID;
activeGroupTitle = membership.GroupTitle;
activeGroupPowers = membership.GroupPowers;
activeGroupName = membership.GroupName;
}
//Gotta tell the client about their groups
remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, remoteClient.Name, activeGroupPowers, activeGroupName,
activeGroupTitle);
if (sendToAll)
SendScenePresenceUpdate(dataForAgentID, activeGroupTitle);
}
示例7: OnAgentDataUpdateRequest
private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID, bool sendToAll)
{
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
UUID activeGroupID = UUID.Zero;
string activeGroupTitle = string.Empty;
string activeGroupName = string.Empty;
ulong activeGroupPowers = (ulong)GroupPowers.None;
GroupMembershipData membership = m_groupData.GetAgentActiveMembership(GetRequestingAgentID(remoteClient), dataForAgentID);
if (membership != null)
{
activeGroupID = membership.GroupID;
activeGroupTitle = membership.GroupTitle;
activeGroupPowers = membership.GroupPowers;
activeGroupName = membership.GroupName;
}
//Gotta tell the client about their groups
remoteClient.SendAgentDataUpdate (dataForAgentID, activeGroupID, remoteClient.FirstName,
remoteClient.LastName, activeGroupPowers, activeGroupName,
activeGroupTitle);
if(sendToAll)
SendScenePresenceUpdate(dataForAgentID, activeGroupTitle);
}