本文整理汇总了C#中Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString类的典型用法代码示例。如果您正苦于以下问题:C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString类的具体用法?C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString怎么用?C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString类属于命名空间,在下文中一共展示了Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: aaQueryDatabase
public LSL_List aaQueryDatabase(LSL_String key, LSL_String token)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "AAQueryDatabase", m_host, "AA", m_itemID))
return new LSL_List();
List<string> query = AssetConnector.FindLSLData(token.m_string, key.m_string);
LSL_List list = new LSL_List(query.ToArray());
return list;
}
示例2: osEjectFromGroup
/// <summary>
/// Eject user from the group this object is set to
/// </summary>
/// <param name="agentId"></param>
/// <returns></returns>
public LSL_Integer osEjectFromGroup(LSL_Key agentId)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.VeryLow, "osInviteToGroup", m_host, "OSSL", m_itemID))
return new LSL_Integer();
UUID agent = new UUID((string) agentId);
// groups module is required
IGroupsModule groupsModule = World.RequestModuleInterface<IGroupsModule>();
if (groupsModule == null) return ScriptBaseClass.FALSE;
// object has to be set to a group, but not group owned
if (m_host.GroupID == UUID.Zero || m_host.GroupID == m_host.OwnerID) return ScriptBaseClass.FALSE;
// object owner has to be in that group and required permissions
GroupMembershipData member = groupsModule.GetMembershipData(m_host.GroupID, m_host.OwnerID);
if (member == null || (member.GroupPowers & (ulong) GroupPowers.Eject) == 0) return ScriptBaseClass.FALSE;
// agent has to be in that group
//member = groupsModule.GetMembershipData(agent, m_host.GroupID, agent);
//if (member == null) return ScriptBaseClass.FALSE;
// ejectee can be offline
groupsModule.EjectGroupMember(null, m_host.OwnerID, m_host.GroupID, agent);
return ScriptBaseClass.TRUE;
}
示例3: AADeserializeXMLValues
public LSL_List AADeserializeXMLValues(LSL_String xmlFile)
{
return m_AA_Functions.AADeserializeXMLValues(xmlFile);
}
示例4: AAUpdateDatabase
public void AAUpdateDatabase(LSL_String key, LSL_String value, LSL_String token)
{
m_AA_Functions.AAUpdateDatabase(key, value, token);
}
示例5: aaSetEnv
public void aaSetEnv(LSL_String name, LSL_List value)
{
if (name == ScriptBaseClass.ENABLE_GRAVITY)
{
LSL_Integer enabled = value.GetLSLIntegerItem(0);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.SetGravityForce(enabled == 1, grav[0], grav[1], grav[2]);
}
else if (name == ScriptBaseClass.GRAVITY_FORCE_X)
{
LSL_Float f = value.GetLSLFloatItem(0);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.SetGravityForce(true, (float) f.value, grav[1], grav[2]);
}
else if (name == ScriptBaseClass.GRAVITY_FORCE_Y)
{
LSL_Float f = value.GetLSLFloatItem(0);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.SetGravityForce(true, grav[0], (float) f.value, grav[2]);
}
else if (name == ScriptBaseClass.GRAVITY_FORCE_Z)
{
LSL_Float f = value.GetLSLFloatItem(0);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.SetGravityForce(true, grav[0], grav[1], (float) f.value);
}
else if (name == ScriptBaseClass.ADD_GRAVITY_POINT)
{
LSL_Vector pos = value.GetVector3Item(0);
LSL_Float gravForce = value.GetLSLFloatItem(1);
LSL_Float radius = value.GetLSLFloatItem(2);
LSL_Integer ident = value.GetLSLIntegerItem(3);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.AddGravityPoint(false,
new Vector3((float) pos.x, (float) pos.y,
(float) pos.z),
0, 0, 0, (float) gravForce.value,
(float) radius.value, ident.value);
}
else if (name == ScriptBaseClass.ADD_GRAVITY_FORCE)
{
LSL_Vector pos = value.GetVector3Item(0);
LSL_Float xForce = value.GetLSLFloatItem(1);
LSL_Float yForce = value.GetLSLFloatItem(2);
LSL_Float zForce = value.GetLSLFloatItem(3);
LSL_Float radius = value.GetLSLFloatItem(4);
LSL_Integer ident = value.GetLSLIntegerItem(5);
float[] grav = m_host.ParentEntity.Scene.PhysicsScene.GetGravityForce();
m_host.ParentEntity.Scene.PhysicsScene.AddGravityPoint(true,
new Vector3((float) pos.x, (float) pos.y,
(float) pos.z),
(float) xForce, (float) yForce, (float) zForce, 0,
(float) radius.value, ident.value);
}
else if (name == ScriptBaseClass.START_TIME_REVERSAL_SAVING)
{
IPhysicsStateModule physicsState = World.RequestModuleInterface<IPhysicsStateModule>();
if (physicsState != null)
physicsState.StartSavingPhysicsTimeReversalStates();
}
else if (name == ScriptBaseClass.STOP_TIME_REVERSAL_SAVING)
{
IPhysicsStateModule physicsState = World.RequestModuleInterface<IPhysicsStateModule>();
if (physicsState != null)
physicsState.StopSavingPhysicsTimeReversalStates();
}
else if (name == ScriptBaseClass.START_TIME_REVERSAL)
{
IPhysicsStateModule physicsState = World.RequestModuleInterface<IPhysicsStateModule>();
if (physicsState != null)
physicsState.StartPhysicsTimeReversal();
}
else if (name == ScriptBaseClass.STOP_TIME_REVERSAL)
{
IPhysicsStateModule physicsState = World.RequestModuleInterface<IPhysicsStateModule>();
if (physicsState != null)
physicsState.StopPhysicsTimeReversal();
}
}
示例6: aaGetHealth
public LSL_Float aaGetHealth(LSL_Key uuid)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "AAGetHealth", m_host, "AA", m_itemID))
return new LSL_Float();
UUID avID;
if (UUID.TryParse(uuid, out avID))
{
IScenePresence SP = World.GetScenePresence(avID);
if (SP != null)
{
ICombatPresence cp = SP.RequestModuleInterface<ICombatPresence>();
return new LSL_Float(cp.Health);
}
}
return new LSL_Float(-1);
}
示例7: aaGetTeamMembers
public LSL_List aaGetTeamMembers(LSL_String team)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "AAGetTeamMembers", m_host, "AA", m_itemID))
return new LSL_List();
List<UUID> Members = new List<UUID>();
ICombatModule module = World.RequestModuleInterface<ICombatModule>();
if (module != null)
{
Members = module.GetTeammates(team);
}
LSL_List members = new LSL_List();
foreach (UUID member in Members)
members.Add(new LSL_Key(member.ToString()));
return members;
}
示例8: AADeserializeXMLKeys
public LSL_List AADeserializeXMLKeys(LSL_String xmlFile)
{
ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "AADeserializeXMLKeys", m_host, "AA");
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlFile.m_string);
XmlNodeList children = doc.ChildNodes;
LSL_List keys = new LSL_Types.list();
foreach (XmlNode node in children)
{
keys.Add(node.Name);
}
return keys;
}
示例9: AAJoinCombatTeam
public void AAJoinCombatTeam(LSL_String team)
{
ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "AAJoinCombatTeam", m_host, "AA");
ScenePresence SP = World.GetScenePresence(m_host.OwnerID);
if (SP != null)
{
ICombatPresence CP = SP.RequestModuleInterface<ICombatPresence>();
if (CP != null)
{
if (team.m_string == "No Team")
{
SP.ControllingClient.SendAlertMessage("You cannot join this team.");
return;
}
CP.Team = team.m_string;
}
}
}
示例10: llRequestDisplayName
public LSL_Key llRequestDisplayName(LSL_Key uuid)
{
UUID userID = UUID.Zero;
if (!UUID.TryParse(uuid, out userID))
{
// => complain loudly, as specified by the LSL docs
ShoutError("Failed to parse uuid for avatar.");
return (LSL_Key)UUID.Zero.ToString();
}
DataserverPlugin dataserverPlugin = (DataserverPlugin)m_ScriptEngine.GetScriptPlugin("Dataserver");
UUID tid = dataserverPlugin.RegisterRequest(m_host.UUID, m_itemID, uuid.ToString());
Util.FireAndForget(delegate(object o)
{
string name = "";
IProfileConnector connector = Aurora.DataManager.DataManager.RequestPlugin<IProfileConnector>();
if (connector != null)
{
IUserProfileInfo info = connector.GetUserProfile(userID);
if (info != null)
name = info.DisplayName;
}
dataserverPlugin.AddReply(uuid.ToString(),
name, 100);
});
ScriptSleep(100);
return (LSL_Key)tid.ToString();
}
示例11: llGetEnv
public LSL_String llGetEnv(LSL_String name)
{
ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL");
if (name == "sim_channel")
return "Aurora-Sim Server";
else if (name == "sim_version")
return World.RequestModuleInterface<ISimulationBase>().Version;
return "";
}
示例12: llRequestUsername
public LSL_Key llRequestUsername(LSL_Key uuid)
{
UUID userID = UUID.Zero;
if (!UUID.TryParse(uuid, out userID))
{
// => complain loudly, as specified by the LSL docs
ShoutError("Failed to parse uuid for avatar.");
return (LSL_Key)UUID.Zero.ToString();
}
DataserverPlugin dataserverPlugin = (DataserverPlugin)m_ScriptEngine.GetScriptPlugin("Dataserver");
UUID tid = dataserverPlugin.RegisterRequest(m_host.UUID, m_itemID, uuid.ToString());
Util.FireAndForget(delegate(object o)
{
string name = "";
UserAccount info = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, userID);
if (info != null)
name = info.Name;
dataserverPlugin.AddReply(uuid.ToString(),
name, 100);
});
ScriptSleep(100);
return (LSL_Key)tid.ToString();
}
示例13: llRegionSayTo
public void llRegionSayTo (LSL_Key toID, int channelID, string text)
{
ScriptProtection.CheckThreatLevel (ThreatLevel.None, "LSL", m_host, "LSL");
IChatModule chatModule = World.RequestModuleInterface<IChatModule> ();
if (text.Length > 1023)
text = text.Substring (0, 1023);
if (channelID == 0)
{
IScenePresence presence = World.GetScenePresence (UUID.Parse (toID.m_string));
if (presence != null)
{
if (chatModule != null)
chatModule.TrySendChatMessage (presence, m_host.AbsolutePosition, m_host.AbsolutePosition,
m_host.UUID, m_host.Name, ChatTypeEnum.Say, text, ChatSourceType.Object, 10000);
}
}
if (m_comms != null)
m_comms.DeliverMessage (ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, UUID.Parse (toID.m_string), text);
}
示例14: osGetPrimitiveParams
public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams", m_host, "OSSL", m_itemID))
return new LSL_List();
InitLSL();
return m_LSL_Api.GetLinkPrimitiveParamsEx(prim, rules);
}
示例15: aaJoinCombatTeam
public void aaJoinCombatTeam(LSL_Key uuid, LSL_String team)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "AAJoinCombatTeam", m_host, "AA", m_itemID)) return;
UUID avID;
if (UUID.TryParse(uuid, out avID))
{
IScenePresence SP = World.GetScenePresence(avID);
if (SP != null)
{
ICombatPresence CP = SP.RequestModuleInterface<ICombatPresence>();
if (CP != null)
{
if (team.m_string == "No Team")
{
SP.ControllingClient.SendAlertMessage("You cannot join this team.");
return;
}
CP.Team = team.m_string;
}
}
}
}