replace hard tabs with 4 spaces to be consistant in the source.

Please adjust your editors to not use hard tabs.
0.6.0-stable
Sean Dague 2008-04-24 12:27:24 +00:00
parent aa8aee90a3
commit 2a2ef42e64
22 changed files with 768 additions and 768 deletions

View File

@ -35,7 +35,7 @@ namespace OpenSim.Framework
public int Version; public int Version;
public LLVector3 Position; public LLVector3 Position;
public LLUUID RegionID; public LLUUID RegionID;
public ulong RegionHandle; public ulong RegionHandle;
public AssetLandmark(AssetBase a) public AssetLandmark(AssetBase a)
{ {

View File

@ -68,9 +68,9 @@ namespace OpenSim.Framework
public int Count() public int Count()
{ {
lock(m_queueSync) lock(m_queueSync)
{ {
return m_queue.Count; return m_queue.Count;
} }
} }
public T[] GetQueueArray() public T[] GetQueueArray()

View File

@ -440,8 +440,8 @@ namespace OpenSim.Framework
public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID); public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID);
public delegate void ScriptAnswer(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, int answer); public delegate void ScriptAnswer(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, int answer);
public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID); public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID);
public interface IClientAPI public interface IClientAPI
{ {
@ -559,13 +559,13 @@ namespace OpenSim.Framework
event MoneyBalanceRequest OnMoneyBalanceRequest; event MoneyBalanceRequest OnMoneyBalanceRequest;
event UpdateAvatarProperties OnUpdateAvatarProperties; event UpdateAvatarProperties OnUpdateAvatarProperties;
event ParcelBuy OnParcelBuy; event ParcelBuy OnParcelBuy;
event RequestPayPrice OnRequestPayPrice ; event RequestPayPrice OnRequestPayPrice ;
event ObjectIncludeInSearch OnObjectIncludeInSearch; event ObjectIncludeInSearch OnObjectIncludeInSearch;
event UUIDNameRequest OnTeleportHomeRequest; event UUIDNameRequest OnTeleportHomeRequest;
event ScriptAnswer OnScriptAnswer; event ScriptAnswer OnScriptAnswer;
LLVector3 StartPos { get; set; } LLVector3 StartPos { get; set; }
@ -579,7 +579,7 @@ namespace OpenSim.Framework
string LastName { get; } string LastName { get; }
int NextAnimationSequenceNumber { get; } int NextAnimationSequenceNumber { get; }
/// <summary> /// <summary>
/// Returns the full name of the agent/avatar represented by this client /// Returns the full name of the agent/avatar represented by this client
@ -624,7 +624,7 @@ namespace OpenSim.Framework
void SendTeleportFailed(string reason); void SendTeleportFailed(string reason);
void SendTeleportLocationStart(); void SendTeleportLocationStart();
void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance); void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
void SendPayPrice(LLUUID objectID, int[] payPrice); void SendPayPrice(LLUUID objectID, int[] payPrice);
void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID,
LLVector3 Pos, byte[] textureEntry, uint parentID); LLVector3 Pos, byte[] textureEntry, uint parentID);
@ -703,7 +703,7 @@ namespace OpenSim.Framework
void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout,
uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID); uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);
void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question); void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question);
byte[] GetThrottlesPacked(float multiplier); byte[] GetThrottlesPacked(float multiplier);

View File

@ -67,57 +67,57 @@ namespace OpenSim.Framework
private ushort _version; private ushort _version;
public string Name { public string Name {
get { get {
return _name; return _name;
} }
set { set {
_name = value; _name = value;
} }
} }
public LLUUID Owner { public LLUUID Owner {
get { get {
return _owner; return _owner;
} }
set { set {
_owner = value; _owner = value;
} }
} }
public LLUUID ParentID { public LLUUID ParentID {
get { get {
return _parentID; return _parentID;
} }
set { set {
_parentID = value; _parentID = value;
} }
} }
public LLUUID ID { public LLUUID ID {
get { get {
return _id; return _id;
} }
set { set {
_id = value; _id = value;
} }
} }
public short Type { public short Type {
get { get {
return _type; return _type;
} }
set { set {
_type = value; _type = value;
} }
} }
public ushort Version { public ushort Version {
get { get {
return _version; return _version;
} }
set { set {
_version = value; _version = value;
} }
} }
} }
} }

View File

@ -100,120 +100,120 @@ namespace OpenSim.Framework
private uint _everyOnePermissions; private uint _everyOnePermissions;
public LLUUID ID { public LLUUID ID {
get { get {
return _id; return _id;
} }
set { set {
_id = value; _id = value;
} }
} }
public int InvType { public int InvType {
get { get {
return _invType; return _invType;
} }
set { set {
_invType = value; _invType = value;
} }
} }
public LLUUID Folder { public LLUUID Folder {
get { get {
return _folder; return _folder;
} }
set { set {
_folder = value; _folder = value;
} }
} }
public LLUUID Owner { public LLUUID Owner {
get { get {
return _owner; return _owner;
} }
set { set {
_owner = value; _owner = value;
} }
} }
public LLUUID Creator { public LLUUID Creator {
get { get {
return _creator; return _creator;
} }
set { set {
_creator = value; _creator = value;
} }
} }
public string Name { public string Name {
get { get {
return _name; return _name;
} }
set { set {
_name = value; _name = value;
} }
} }
public string Description { public string Description {
get { get {
return _description; return _description;
} }
set { set {
_description = value; _description = value;
} }
} }
public uint NextPermissions { public uint NextPermissions {
get { get {
return _nextPermissions; return _nextPermissions;
} }
set { set {
_nextPermissions = value; _nextPermissions = value;
} }
} }
public uint CurrentPermissions { public uint CurrentPermissions {
get { get {
return _currentPermissions; return _currentPermissions;
} }
set { set {
_currentPermissions = value; _currentPermissions = value;
} }
} }
public uint BasePermissions { public uint BasePermissions {
get { get {
return _basePermissions; return _basePermissions;
} }
set { set {
_basePermissions = value; _basePermissions = value;
} }
} }
public uint EveryOnePermissions { public uint EveryOnePermissions {
get { get {
return _everyOnePermissions; return _everyOnePermissions;
} }
set { set {
_everyOnePermissions = value; _everyOnePermissions = value;
} }
} }
public int AssetType { public int AssetType {
get { get {
return _assetType; return _assetType;
} }
set { set {
_assetType = value; _assetType = value;
} }
} }
public LLUUID AssetID { public LLUUID AssetID {
get { get {
return _assetID; return _assetID;
} }
set { set {
_assetID = value; _assetID = value;
} }
} }
} }
} }

View File

@ -154,14 +154,14 @@ namespace OpenSim.Framework
"lsl_text", "lsl_text",
String.Empty, String.Empty,
String.Empty, String.Empty,
"bodypart", "bodypart",
String.Empty, String.Empty,
"snapshot", "snapshot",
String.Empty, String.Empty,
String.Empty, String.Empty,
"wearable", "wearable",
"animation", "animation",
"gesture" "gesture"
}; };
@ -183,15 +183,15 @@ namespace OpenSim.Framework
"lsltext", "lsltext",
"lslbyte", "lslbyte",
"txtr_tga", "txtr_tga",
"bodypart", "bodypart",
"trash", "trash",
"snapshot", "snapshot",
"lstndfnd", "lstndfnd",
"snd_wav", "snd_wav",
"img_tga", "img_tga",
"jpeg", "jpeg",
"animatn", "animatn",
"gesture" "gesture"
}; };
public LLUUID ItemID = LLUUID.Zero; public LLUUID ItemID = LLUUID.Zero;
@ -214,8 +214,8 @@ namespace OpenSim.Framework
public string Name = String.Empty; public string Name = String.Empty;
public string Description = String.Empty; public string Description = String.Empty;
public uint CreationDate = 0; public uint CreationDate = 0;
public LLUUID PermsGranter; public LLUUID PermsGranter;
public int PermsMask; public int PermsMask;
public LLUUID ParentPartID = LLUUID.Zero; public LLUUID ParentPartID = LLUUID.Zero;

View File

@ -623,14 +623,14 @@ namespace OpenSim.Framework
return returnstring; return returnstring;
} }
static public XmlRpcResponse XmlRpcCommand(string url, string methodName, params object[] args) static public XmlRpcResponse XmlRpcCommand(string url, string methodName, params object[] args)
{ {
return SendXmlRpcCommand(url, methodName, args); return SendXmlRpcCommand(url, methodName, args);
} }
static public XmlRpcResponse SendXmlRpcCommand(string url, string methodName, object[] args) static public XmlRpcResponse SendXmlRpcCommand(string url, string methodName, object[] args)
{ {
XmlRpcRequest client = new XmlRpcRequest(methodName, args); XmlRpcRequest client = new XmlRpcRequest(methodName, args);
return client.Send(url, 6000); return client.Send(url, 6000);
} }

View File

@ -249,7 +249,7 @@ namespace OpenSim
config.Set("enabled", "false"); config.Set("enabled", "false");
} }
if (DefaultConfig.Configs["Voice"] == null) if (DefaultConfig.Configs["Voice"] == null)
DefaultConfig.AddConfig("Voice"); DefaultConfig.AddConfig("Voice");
config = DefaultConfig.Configs["Voice"]; config = DefaultConfig.Configs["Voice"];
if (config != null) if (config != null)
@ -522,8 +522,8 @@ namespace OpenSim
m_log.Info("[MODULES]: Loading Region's modules"); m_log.Info("[MODULES]: Loading Region's modules");
List<IRegionModule> modules = m_moduleLoader.PickupModules(scene, "."); List<IRegionModule> modules = m_moduleLoader.PickupModules(scene, ".");
// This needs to be ahead of the script engine load, so the // This needs to be ahead of the script engine load, so the
// script module can pick up events exposed by a module // script module can pick up events exposed by a module
m_moduleLoader.InitialiseSharedModules(scene); m_moduleLoader.InitialiseSharedModules(scene);
//m_moduleLoader.PickupModules(scene, "ScriptEngines"); //m_moduleLoader.PickupModules(scene, "ScriptEngines");

View File

@ -91,7 +91,7 @@ namespace OpenSim.Region.ClientStack
private readonly uint m_circuitCode; private readonly uint m_circuitCode;
private int m_moneyBalance; private int m_moneyBalance;
private int m_animationSequenceNumber = 1; private int m_animationSequenceNumber = 1;
private byte[] m_channelVersion = Helpers.StringToField("OpenSimulator 0.5"); // Dummy value needed by libSL private byte[] m_channelVersion = Helpers.StringToField("OpenSimulator 0.5"); // Dummy value needed by libSL
@ -233,8 +233,8 @@ namespace OpenSim.Region.ClientStack
private RequestAsset handlerRequestAsset = null; // OnRequestAsset; private RequestAsset handlerRequestAsset = null; // OnRequestAsset;
private UUIDNameRequest handlerTeleportHomeRequest = null; private UUIDNameRequest handlerTeleportHomeRequest = null;
private ScriptAnswer handlerScriptAnswer = null; private ScriptAnswer handlerScriptAnswer = null;
private RequestPayPrice handlerRequestPayPrice = null; private RequestPayPrice handlerRequestPayPrice = null;
private ObjectDeselect handlerObjectDetach = null; private ObjectDeselect handlerObjectDetach = null;
/* Properties */ /* Properties */
@ -307,10 +307,10 @@ namespace OpenSim.Region.ClientStack
get { return m_moneyBalance; } get { return m_moneyBalance; }
} }
public int NextAnimationSequenceNumber public int NextAnimationSequenceNumber
{ {
get { return m_animationSequenceNumber++; } get { return m_animationSequenceNumber++; }
} }
/* METHODS */ /* METHODS */
@ -793,8 +793,8 @@ namespace OpenSim.Region.ClientStack
public event UUIDNameRequest OnTeleportHomeRequest; public event UUIDNameRequest OnTeleportHomeRequest;
public event ScriptAnswer OnScriptAnswer; public event ScriptAnswer OnScriptAnswer;
public event RequestPayPrice OnRequestPayPrice; public event RequestPayPrice OnRequestPayPrice;
#region Scene/Avatar to Client #region Scene/Avatar to Client
@ -1171,28 +1171,28 @@ namespace OpenSim.Region.ClientStack
OutPacket(money, ThrottleOutPacketType.Task); OutPacket(money, ThrottleOutPacketType.Task);
} }
public void SendPayPrice(LLUUID objectID, int[] payPrice) public void SendPayPrice(LLUUID objectID, int[] payPrice)
{ {
if(payPrice[0] == 0 && if(payPrice[0] == 0 &&
payPrice[1] == 0 && payPrice[1] == 0 &&
payPrice[2] == 0 && payPrice[2] == 0 &&
payPrice[3] == 0 && payPrice[3] == 0 &&
payPrice[4] == 0) payPrice[4] == 0)
return; return;
PayPriceReplyPacket payPriceReply = (PayPriceReplyPacket)PacketPool.Instance.GetPacket(PacketType.PayPriceReply); PayPriceReplyPacket payPriceReply = (PayPriceReplyPacket)PacketPool.Instance.GetPacket(PacketType.PayPriceReply);
payPriceReply.ObjectData.ObjectID = objectID; payPriceReply.ObjectData.ObjectID = objectID;
payPriceReply.ObjectData.DefaultPayPrice = payPrice[0]; payPriceReply.ObjectData.DefaultPayPrice = payPrice[0];
payPriceReply.ButtonData=new PayPriceReplyPacket.ButtonDataBlock[4]; payPriceReply.ButtonData=new PayPriceReplyPacket.ButtonDataBlock[4];
payPriceReply.ButtonData[0]=new PayPriceReplyPacket.ButtonDataBlock(); payPriceReply.ButtonData[0]=new PayPriceReplyPacket.ButtonDataBlock();
payPriceReply.ButtonData[0].PayButton = payPrice[1]; payPriceReply.ButtonData[0].PayButton = payPrice[1];
payPriceReply.ButtonData[1]=new PayPriceReplyPacket.ButtonDataBlock(); payPriceReply.ButtonData[1]=new PayPriceReplyPacket.ButtonDataBlock();
payPriceReply.ButtonData[1].PayButton = payPrice[2]; payPriceReply.ButtonData[1].PayButton = payPrice[2];
payPriceReply.ButtonData[2]=new PayPriceReplyPacket.ButtonDataBlock(); payPriceReply.ButtonData[2]=new PayPriceReplyPacket.ButtonDataBlock();
payPriceReply.ButtonData[2].PayButton = payPrice[3]; payPriceReply.ButtonData[2].PayButton = payPrice[3];
payPriceReply.ButtonData[3]=new PayPriceReplyPacket.ButtonDataBlock(); payPriceReply.ButtonData[3]=new PayPriceReplyPacket.ButtonDataBlock();
payPriceReply.ButtonData[3].PayButton = payPrice[4]; payPriceReply.ButtonData[3].PayButton = payPrice[4];
OutPacket(payPriceReply, ThrottleOutPacketType.Task); OutPacket(payPriceReply, ThrottleOutPacketType.Task);
} }
@ -2530,8 +2530,8 @@ namespace OpenSim.Region.ClientStack
return true; return true;
} }
public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question)
{ {
ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion);
scriptQuestion.Data = new ScriptQuestionPacket.DataBlock(); scriptQuestion.Data = new ScriptQuestionPacket.DataBlock();
// TODO: don't create new blocks if recycling an old packet // TODO: don't create new blocks if recycling an old packet
@ -2542,7 +2542,7 @@ namespace OpenSim.Region.ClientStack
scriptQuestion.Data.ObjectOwner = Helpers.StringToField(ownerName); scriptQuestion.Data.ObjectOwner = Helpers.StringToField(ownerName);
OutPacket(scriptQuestion, ThrottleOutPacketType.Task); OutPacket(scriptQuestion, ThrottleOutPacketType.Task);
} }
protected virtual bool Logout(IClientAPI client, Packet packet) protected virtual bool Logout(IClientAPI client, Packet packet)
{ {
@ -3915,14 +3915,14 @@ namespace OpenSim.Region.ClientStack
} }
break; break;
case PacketType.ScriptAnswerYes: case PacketType.ScriptAnswerYes:
ScriptAnswerYesPacket scriptAnswer = (ScriptAnswerYesPacket)Pack; ScriptAnswerYesPacket scriptAnswer = (ScriptAnswerYesPacket)Pack;
handlerScriptAnswer = OnScriptAnswer; handlerScriptAnswer = OnScriptAnswer;
if (handlerScriptAnswer != null) if (handlerScriptAnswer != null)
{ {
handlerScriptAnswer(this, scriptAnswer.Data.TaskID, scriptAnswer.Data.ItemID, scriptAnswer.Data.Questions); handlerScriptAnswer(this, scriptAnswer.Data.TaskID, scriptAnswer.Data.ItemID, scriptAnswer.Data.Questions);
} }
break; break;
#endregion #endregion
@ -4613,14 +4613,14 @@ namespace OpenSim.Region.ClientStack
// TODO: handle this packet // TODO: handle this packet
//m_log.Warn("[CLIENT]: unhandled EconomyDataRequest packet"); //m_log.Warn("[CLIENT]: unhandled EconomyDataRequest packet");
break; break;
case PacketType.RequestPayPrice: case PacketType.RequestPayPrice:
RequestPayPricePacket requestPayPricePacket = (RequestPayPricePacket)Pack; RequestPayPricePacket requestPayPricePacket = (RequestPayPricePacket)Pack;
handlerRequestPayPrice = OnRequestPayPrice; handlerRequestPayPrice = OnRequestPayPrice;
if (handlerRequestPayPrice != null) if (handlerRequestPayPrice != null)
{ {
handlerRequestPayPrice(this, requestPayPricePacket.ObjectData.ObjectID); handlerRequestPayPrice(this, requestPayPricePacket.ObjectData.ObjectID);
} }
break; break;
#endregion #endregion

View File

@ -81,7 +81,7 @@ namespace OpenSim.Region.DataSnapshot
m_configLoaded = true; m_configLoaded = true;
m_log.Info("[DATASNAPSHOT]: Loading configuration"); m_log.Info("[DATASNAPSHOT]: Loading configuration");
//Read from the config for options //Read from the config for options
lock (m_syncInit) { lock (m_syncInit) {
try { try {
m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled); m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled);
if (config.Configs["Startup"].GetBoolean("gridmode", true)) if (config.Configs["Startup"].GetBoolean("gridmode", true))
@ -152,7 +152,7 @@ namespace OpenSim.Region.DataSnapshot
public string Name public string Name
{ {
get { return "External Data Generator"; } get { return "External Data Generator"; }
} }
public void PostInitialise() public void PostInitialise()

View File

@ -54,20 +54,20 @@ namespace OpenSim.Region.Environment.Modules
/// svn co https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux /// svn co https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux
/// </summary> /// </summary>
public delegate void ObjectPaid(LLUUID objectID, LLUUID agentID, int amount); public delegate void ObjectPaid(LLUUID objectID, LLUUID agentID, int amount);
public interface IMoneyModule : IRegionModule public interface IMoneyModule : IRegionModule
{ {
bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount); bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount);
event ObjectPaid OnObjectPaid; event ObjectPaid OnObjectPaid;
} }
public class BetaGridLikeMoneyModule: IMoneyModule public class BetaGridLikeMoneyModule: IMoneyModule
{ {
public event ObjectPaid OnObjectPaid; public event ObjectPaid OnObjectPaid;
private ObjectPaid handerOnObjectPaid; private ObjectPaid handerOnObjectPaid;
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules
IConfig startupConfig = m_gConfig.Configs["Startup"]; IConfig startupConfig = m_gConfig.Configs["Startup"];
IConfig economyConfig = m_gConfig.Configs["Economy"]; IConfig economyConfig = m_gConfig.Configs["Economy"];
scene.RegisterModuleInterface<IMoneyModule>(this); scene.RegisterModuleInterface<IMoneyModule>(this);
ReadConfigAndPopulate(scene, startupConfig, "Startup"); ReadConfigAndPopulate(scene, startupConfig, "Startup");
ReadConfigAndPopulate(scene, economyConfig, "Economy"); ReadConfigAndPopulate(scene, economyConfig, "Economy");
@ -320,7 +320,7 @@ namespace OpenSim.Region.Environment.Modules
// Subscribe to Money messages // Subscribe to Money messages
client.OnEconomyDataRequest += EconomyDataRequestHandler; client.OnEconomyDataRequest += EconomyDataRequestHandler;
client.OnMoneyBalanceRequest += SendMoneyBalance; client.OnMoneyBalanceRequest += SendMoneyBalance;
client.OnRequestPayPrice += requestPayPrice; client.OnRequestPayPrice += requestPayPrice;
client.OnLogout += ClientClosed; client.OnLogout += ClientClosed;
@ -328,20 +328,20 @@ namespace OpenSim.Region.Environment.Modules
#region event Handlers #region event Handlers
public void requestPayPrice(IClientAPI client, LLUUID objectID) public void requestPayPrice(IClientAPI client, LLUUID objectID)
{ {
Scene scene=LocateSceneClientIn(client.AgentId); Scene scene=LocateSceneClientIn(client.AgentId);
if(scene == null) if(scene == null)
return; return;
SceneObjectPart task=scene.GetSceneObjectPart(objectID); SceneObjectPart task=scene.GetSceneObjectPart(objectID);
if(task == null) if(task == null)
return; return;
SceneObjectGroup group=task.ParentGroup; SceneObjectGroup group=task.ParentGroup;
SceneObjectPart root=group.RootPart; SceneObjectPart root=group.RootPart;
client.SendPayPrice(objectID, root.PayPrice); client.SendPayPrice(objectID, root.PayPrice);
} }
/// <summary> /// <summary>
/// When the client closes the connection we remove their accounting info from memory to free up resources. /// When the client closes the connection we remove their accounting info from memory to free up resources.
@ -380,52 +380,52 @@ namespace OpenSim.Region.Environment.Modules
private void ValidateLandBuy (Object osender, EventManager.LandBuyArgs e) private void ValidateLandBuy (Object osender, EventManager.LandBuyArgs e)
{ {
if (m_MoneyAddress.Length == 0) if (m_MoneyAddress.Length == 0)
{ {
lock (m_KnownClientFunds) lock (m_KnownClientFunds)
{ {
if (m_KnownClientFunds.ContainsKey(e.agentId)) if (m_KnownClientFunds.ContainsKey(e.agentId))
{ {
// Does the sender have enough funds to give? // Does the sender have enough funds to give?
if (m_KnownClientFunds[e.agentId] >= e.parcelPrice) if (m_KnownClientFunds[e.agentId] >= e.parcelPrice)
{ {
lock(e) lock(e)
{ {
e.economyValidated=true; e.economyValidated=true;
} }
} }
} }
} }
} }
else else
{ {
if(GetRemoteBalance(e.agentId) >= e.parcelPrice) if(GetRemoteBalance(e.agentId) >= e.parcelPrice)
{ {
lock(e) lock(e)
{ {
e.economyValidated=true; e.economyValidated=true;
} }
} }
} }
} }
private void processLandBuy(Object osender, EventManager.LandBuyArgs e) private void processLandBuy(Object osender, EventManager.LandBuyArgs e)
{ {
lock(e) lock(e)
{ {
if(e.economyValidated == true && e.transactionID == 0) if(e.economyValidated == true && e.transactionID == 0)
{ {
e.transactionID=Util.UnixTimeSinceEpoch(); e.transactionID=Util.UnixTimeSinceEpoch();
if(doMoneyTransfer(e.agentId, e.parcelOwnerID, e.parcelPrice, 0, "Land purchase")) if(doMoneyTransfer(e.agentId, e.parcelOwnerID, e.parcelPrice, 0, "Land purchase"))
{ {
lock (e) lock (e)
{ {
e.amountDebited = e.parcelPrice; e.amountDebited = e.parcelPrice;
} }
} }
} }
} }
} }
/// <summary> /// <summary>
@ -438,47 +438,47 @@ namespace OpenSim.Region.Environment.Modules
IClientAPI sender = null; IClientAPI sender = null;
IClientAPI receiver = null; IClientAPI receiver = null;
if(m_MoneyAddress.Length > 0) // Handled on server if(m_MoneyAddress.Length > 0) // Handled on server
e.description=String.Empty; e.description=String.Empty;
if(e.transactiontype == 5008) // Object gets paid if(e.transactiontype == 5008) // Object gets paid
{ {
sender = LocateClientObject(e.sender); sender = LocateClientObject(e.sender);
if (sender != null) if (sender != null)
{ {
SceneObjectPart part=findPrim(e.receiver); SceneObjectPart part=findPrim(e.receiver);
if(part == null) if(part == null)
return; return;
string name=resolveAgentName(part.OwnerID); string name=resolveAgentName(part.OwnerID);
if(name == String.Empty) if(name == String.Empty)
name="(hippos)"; name="(hippos)";
receiver = LocateClientObject(part.OwnerID); receiver = LocateClientObject(part.OwnerID);
string description=String.Format("Paid {0} via object {1}", name, e.description); string description=String.Format("Paid {0} via object {1}", name, e.description);
bool transactionresult = doMoneyTransfer(e.sender, part.OwnerID, e.amount, e.transactiontype, description); bool transactionresult = doMoneyTransfer(e.sender, part.OwnerID, e.amount, e.transactiontype, description);
if(transactionresult) if(transactionresult)
{ {
ObjectPaid handlerOnObjectPaid = OnObjectPaid; ObjectPaid handlerOnObjectPaid = OnObjectPaid;
if(handlerOnObjectPaid != null) if(handlerOnObjectPaid != null)
{ {
handlerOnObjectPaid(e.receiver, e.sender, e.amount); handlerOnObjectPaid(e.receiver, e.sender, e.amount);
} }
} }
if (e.sender != e.receiver) if (e.sender != e.receiver)
{ {
sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender));
} }
if(receiver != null) if(receiver != null)
{ {
receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(part.OwnerID)); receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(part.OwnerID));
} }
} }
return; return;
} }
sender = LocateClientObject(e.sender); sender = LocateClientObject(e.sender);
if (sender != null) if (sender != null)
@ -652,45 +652,45 @@ namespace OpenSim.Region.Environment.Modules
{ {
// If we don't know about the sender, then the sender can't // If we don't know about the sender, then the sender can't
// actually be here and therefore this is likely fraud or outdated. // actually be here and therefore this is likely fraud or outdated.
if (m_MoneyAddress.Length == 0) if (m_MoneyAddress.Length == 0)
{ {
if (m_KnownClientFunds.ContainsKey(Sender)) if (m_KnownClientFunds.ContainsKey(Sender))
{ {
// Does the sender have enough funds to give? // Does the sender have enough funds to give?
if (m_KnownClientFunds[Sender] >= amount) if (m_KnownClientFunds[Sender] >= amount)
{ {
// Subtract the funds from the senders account // Subtract the funds from the senders account
m_KnownClientFunds[Sender] -= amount; m_KnownClientFunds[Sender] -= amount;
// do we know about the receiver? // do we know about the receiver?
if (!m_KnownClientFunds.ContainsKey(Receiver)) if (!m_KnownClientFunds.ContainsKey(Receiver))
{ {
// Make a record for them so they get the updated balance when they login // Make a record for them so they get the updated balance when they login
CheckExistAndRefreshFunds(Receiver); CheckExistAndRefreshFunds(Receiver);
} }
if (m_enabled) if (m_enabled)
{ {
//Add the amount to the Receiver's funds //Add the amount to the Receiver's funds
m_KnownClientFunds[Receiver] += amount; m_KnownClientFunds[Receiver] += amount;
result = true; result = true;
} }
} }
else else
{ {
// These below are redundant to make this clearer to read // These below are redundant to make this clearer to read
result = false; result = false;
} }
} }
else else
{ {
result = false; result = false;
} }
} }
else else
{ {
result = TransferMoneyonMoneyServer(Sender, Receiver, amount, transactiontype, description); result = TransferMoneyonMoneyServer(Sender, Receiver, amount, transactiontype, description);
} }
} }
} }
return result; return result;
} }
@ -1003,50 +1003,50 @@ namespace OpenSim.Region.Environment.Modules
return MoneyRespData; return MoneyRespData;
} }
private SceneObjectPart findPrim(LLUUID objectID) private SceneObjectPart findPrim(LLUUID objectID)
{ {
lock (m_scenel) lock (m_scenel)
{ {
foreach (Scene s in m_scenel.Values) foreach (Scene s in m_scenel.Values)
{ {
SceneObjectPart part=s.GetSceneObjectPart(objectID); SceneObjectPart part=s.GetSceneObjectPart(objectID);
if(part != null) if(part != null)
{ {
return part; return part;
} }
} }
} }
return null; return null;
} }
private string resolveObjectName(LLUUID objectID) private string resolveObjectName(LLUUID objectID)
{ {
SceneObjectPart part=findPrim(objectID); SceneObjectPart part=findPrim(objectID);
if(part != null) if(part != null)
{ {
return part.Name; return part.Name;
} }
return String.Empty; return String.Empty;
} }
private string resolveAgentName(LLUUID agentID) private string resolveAgentName(LLUUID agentID)
{ {
// try avatar username surname // try avatar username surname
Scene scene=GetRandomScene(); Scene scene=GetRandomScene();
UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(agentID); UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(agentID);
if (profile != null) if (profile != null)
{ {
string avatarname = profile.FirstName + " " + profile.SurName; string avatarname = profile.FirstName + " " + profile.SurName;
return avatarname; return avatarname;
} }
return String.Empty; return String.Empty;
} }
public bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount) public bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount)
{ {
string description=String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); string description=String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
return doMoneyTransfer(fromID, toID, amount, 2, description); return doMoneyTransfer(fromID, toID, amount, 2, description);
} }
/// <summary> /// <summary>
/// Informs the Money Grid Server of a transfer. /// Informs the Money Grid Server of a transfer.
@ -1134,63 +1134,63 @@ namespace OpenSim.Region.Environment.Modules
} }
public int GetRemoteBalance(LLUUID agentId) public int GetRemoteBalance(LLUUID agentId)
{ {
int funds = 0; int funds = 0;
IClientAPI aClient = LocateClientObject(agentId); IClientAPI aClient = LocateClientObject(agentId);
if (aClient != null) if (aClient != null)
{ {
Scene s = LocateSceneClientIn(agentId); Scene s = LocateSceneClientIn(agentId);
if (s != null) if (s != null)
{ {
if (m_MoneyAddress.Length > 0) if (m_MoneyAddress.Length > 0)
{ {
Hashtable hbinfo = GetBalanceForUserFromMoneyServer(aClient.AgentId, aClient.SecureSessionId, s.RegionInfo.originRegionID.ToString(), s.RegionInfo.regionSecret); Hashtable hbinfo = GetBalanceForUserFromMoneyServer(aClient.AgentId, aClient.SecureSessionId, s.RegionInfo.originRegionID.ToString(), s.RegionInfo.regionSecret);
if ((bool)hbinfo["success"] == true) if ((bool)hbinfo["success"] == true)
{ {
try try
{ {
funds = (Int32)hbinfo["funds"]; funds = (Int32)hbinfo["funds"];
} }
catch (ArgumentException) catch (ArgumentException)
{ {
} }
catch (FormatException) catch (FormatException)
{ {
} }
catch (OverflowException) catch (OverflowException)
{ {
m_log.ErrorFormat("[MONEY]: While getting the Currency for user {0}, the return funds overflowed.", agentId); m_log.ErrorFormat("[MONEY]: While getting the Currency for user {0}, the return funds overflowed.", agentId);
aClient.SendAlertMessage("Unable to get your money balance, money operations will be unavailable"); aClient.SendAlertMessage("Unable to get your money balance, money operations will be unavailable");
} }
catch (InvalidCastException) catch (InvalidCastException)
{ {
funds = 0; funds = 0;
} }
} }
else else
{ {
m_log.WarnFormat("[MONEY]: Getting Money for user {0} failed with the following message:{1}", agentId, (string)hbinfo["errorMessage"]); m_log.WarnFormat("[MONEY]: Getting Money for user {0} failed with the following message:{1}", agentId, (string)hbinfo["errorMessage"]);
aClient.SendAlertMessage((string)hbinfo["errorMessage"]); aClient.SendAlertMessage((string)hbinfo["errorMessage"]);
} }
} }
SetLocalFundsForAgentID(agentId, funds); SetLocalFundsForAgentID(agentId, funds);
SendMoneyBalance(aClient, agentId, aClient.SessionId, LLUUID.Zero); SendMoneyBalance(aClient, agentId, aClient.SessionId, LLUUID.Zero);
} }
else else
{ {
m_log.Debug("[MONEY]: Got balance request update for agent that is here, but couldn't find which scene."); m_log.Debug("[MONEY]: Got balance request update for agent that is here, but couldn't find which scene.");
} }
} }
else else
{ {
m_log.Debug("[MONEY]: Got balance request update for agent that isn't here."); m_log.Debug("[MONEY]: Got balance request update for agent that isn't here.");
} }
return funds; return funds;
} }
public XmlRpcResponse GridMoneyUpdate(XmlRpcRequest request) public XmlRpcResponse GridMoneyUpdate(XmlRpcRequest request)
{ {
@ -1204,7 +1204,7 @@ namespace OpenSim.Region.Environment.Modules
Helpers.TryParse((string)requestData["agentId"], out agentId); Helpers.TryParse((string)requestData["agentId"], out agentId);
if (agentId != LLUUID.Zero) if (agentId != LLUUID.Zero)
{ {
GetRemoteBalance(agentId); GetRemoteBalance(agentId);
} }
else else
@ -1228,7 +1228,7 @@ namespace OpenSim.Region.Environment.Modules
/// XMLRPC handler to send alert message and sound to client /// XMLRPC handler to send alert message and sound to client
/// </summary> /// </summary>
public XmlRpcResponse UserAlert(XmlRpcRequest request) public XmlRpcResponse UserAlert(XmlRpcRequest request)
{ {
XmlRpcResponse ret = new XmlRpcResponse(); XmlRpcResponse ret = new XmlRpcResponse();
Hashtable retparam = new Hashtable(); Hashtable retparam = new Hashtable();
Hashtable requestData = (Hashtable)request.Params[0]; Hashtable requestData = (Hashtable)request.Params[0];
@ -1236,36 +1236,36 @@ namespace OpenSim.Region.Environment.Modules
LLUUID agentId = LLUUID.Zero; LLUUID agentId = LLUUID.Zero;
LLUUID soundId = LLUUID.Zero; LLUUID soundId = LLUUID.Zero;
Helpers.TryParse((string)requestData["agentId"], out agentId); Helpers.TryParse((string)requestData["agentId"], out agentId);
Helpers.TryParse((string)requestData["soundId"], out soundId); Helpers.TryParse((string)requestData["soundId"], out soundId);
string text=(string)requestData["text"]; string text=(string)requestData["text"];
string secret=(string)requestData["secret"]; string secret=(string)requestData["secret"];
Scene userScene = GetRandomScene(); Scene userScene = GetRandomScene();
if(userScene.RegionInfo.regionSecret.ToString() == secret) if(userScene.RegionInfo.regionSecret.ToString() == secret)
{ {
IClientAPI client = LocateClientObject(agentId); IClientAPI client = LocateClientObject(agentId);
if (client != null) if (client != null)
{ {
if(soundId != LLUUID.Zero) if(soundId != LLUUID.Zero)
client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0); client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0);
client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text); client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text);
retparam.Add("success", true); retparam.Add("success", true);
} }
else else
{ {
retparam.Add("success", false); retparam.Add("success", false);
} }
} }
else else
{ {
retparam.Add("success", false); retparam.Add("success", false);
} }
ret.Value = retparam; ret.Value = retparam;
return ret; return ret;
} }
# region Standalone box enablers only # region Standalone box enablers only

View File

@ -949,12 +949,12 @@ namespace OpenSim.Region.Environment.Modules.LandManagement
} }
} }
// If the economy has been validated by the economy module, // If the economy has been validated by the economy module,
// and land has been validated as well, this method transfers // and land has been validated as well, this method transfers
// the land ownership // the land ownership
public void handleLandBuyRequest(Object o, EventManager.LandBuyArgs e) public void handleLandBuyRequest(Object o, EventManager.LandBuyArgs e)
{ {
if (e.economyValidated && e.landValidated) if (e.economyValidated && e.landValidated)
{ {
lock (landList) lock (landList)
@ -966,11 +966,11 @@ namespace OpenSim.Region.Environment.Modules.LandManagement
} }
} }
} }
} }
// After receiving a land buy packet, first the data needs to // After receiving a land buy packet, first the data needs to
// be validated. This method validates the right to buy the // be validated. This method validates the right to buy the
// parcel // parcel
public void handleLandValidationRequest(Object o, EventManager.LandBuyArgs e) public void handleLandValidationRequest(Object o, EventManager.LandBuyArgs e)
{ {

View File

@ -73,20 +73,20 @@ namespace OpenSim.Region.Environment.Modules.LandManagement
public LandData landData public LandData landData
{ {
get get
{ {
return m_landData; return m_landData;
} }
set set
{ {
m_landData = value; m_landData = value;
} }
} }
public LLUUID regionUUID public LLUUID regionUUID
{ {
get { return m_scene.RegionInfo.RegionID; } get { return m_scene.RegionInfo.RegionID; }
} }
#endregion #endregion

View File

@ -730,11 +730,11 @@ namespace OpenSim.Region.Environment.Scenes
if (item != null) if (item != null)
{ {
group.AddInventoryItem(remoteClient, primLocalID, item, copyID); group.AddInventoryItem(remoteClient, primLocalID, item, copyID);
m_log.InfoFormat( m_log.InfoFormat(
"[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
item.Name, primLocalID, remoteClient.Name); item.Name, primLocalID, remoteClient.Name);
group.GetProperties(remoteClient); group.GetProperties(remoteClient);
} }
else else
{ {

View File

@ -134,10 +134,10 @@ namespace OpenSim.Region.Environment.Scenes
EventManager.LandBuyArgs args = new EventManager.LandBuyArgs( EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(
agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated); agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated);
// First, allow all validators a stab at it // First, allow all validators a stab at it
m_eventManager.TriggerValidateLandBuy(this, args); m_eventManager.TriggerValidateLandBuy(this, args);
// Then, check validation and transfer // Then, check validation and transfer
m_eventManager.TriggerLandBuy(this, args); m_eventManager.TriggerLandBuy(this, args);
} }

View File

@ -258,32 +258,32 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
// Assumes a lock is held on the inventory // Assumes a lock is held on the inventory
private bool InventoryContainsName(string name) private bool InventoryContainsName(string name)
{ {
foreach (TaskInventoryItem item in m_taskInventory.Values) foreach (TaskInventoryItem item in m_taskInventory.Values)
{ {
if(item.Name == name) if(item.Name == name)
return true; return true;
} }
return false; return false;
} }
private string FindAvailableInventoryName(string name) private string FindAvailableInventoryName(string name)
{ {
if(!InventoryContainsName(name)) if(!InventoryContainsName(name))
return name; return name;
int suffix=1; int suffix=1;
while(suffix < 256) while(suffix < 256)
{ {
string tryName=String.Format("{0} {1}", name, suffix); string tryName=String.Format("{0} {1}", name, suffix);
if(!InventoryContainsName(tryName)) if(!InventoryContainsName(tryName))
return tryName; return tryName;
suffix++; suffix++;
} }
return String.Empty; return String.Empty;
} }
/// <summary> /// <summary>
/// Add an item to this prim's inventory. /// Add an item to this prim's inventory.
@ -295,11 +295,11 @@ namespace OpenSim.Region.Environment.Scenes
item.CreationDate = 1000; item.CreationDate = 1000;
item.ParentPartID = UUID; item.ParentPartID = UUID;
string name=FindAvailableInventoryName(item.Name); string name=FindAvailableInventoryName(item.Name);
if(name == String.Empty) if(name == String.Empty)
return; return;
item.Name=name; item.Name=name;
lock (m_taskInventory) lock (m_taskInventory)
{ {

View File

@ -97,7 +97,7 @@ namespace OpenSim.Region.Environment.Scenes
public uint Category; public uint Category;
// TODO: This needs to be persisted in next XML version update! // TODO: This needs to be persisted in next XML version update!
[XmlIgnore] public int[] PayPrice = {0,0,0,0,0}; [XmlIgnore] public int[] PayPrice = {0,0,0,0,0};
[XmlIgnore] public bool m_IsAttachment = false; [XmlIgnore] public bool m_IsAttachment = false;
@ -2038,18 +2038,18 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
if(soundID == LLUUID.Zero) if(soundID == LLUUID.Zero)
return; return;
List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars(); List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars();
foreach (ScenePresence p in avatarts) foreach (ScenePresence p in avatarts)
{ {
double dis=Util.GetDistanceTo(p.AbsolutePosition, position); double dis=Util.GetDistanceTo(p.AbsolutePosition, position);
if(dis > 100.0) // Max audio distance if(dis > 100.0) // Max audio distance
continue; continue;
// Scale by distance // Scale by distance
volume*=((100.0-dis)/100.0); volume*=((100.0-dis)/100.0);
if (triggered) if (triggered)
{ {

View File

@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
m_pos = value; m_pos = value;
m_parentPosition=new LLVector3(0, 0, 0); m_parentPosition=new LLVector3(0, 0, 0);
} }
} }
@ -362,7 +362,7 @@ namespace OpenSim.Region.Environment.Scenes
// Move them into an object to (hopefully) avoid threading issues. // Move them into an object to (hopefully) avoid threading issues.
try try
{ {
SetMovementAnimation(Animations.AnimsLLUUID["STAND"]); SetMovementAnimation(Animations.AnimsLLUUID["STAND"]);
} }
catch (KeyNotFoundException) catch (KeyNotFoundException)
{ {
@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Scenes
AddToPhysicalScene(); AddToPhysicalScene();
m_physicsActor.Flying = isFlying; m_physicsActor.Flying = isFlying;
SendAnimPack(); SendAnimPack();
m_scene.SwapRootAgentCount(false); m_scene.SwapRootAgentCount(false);
m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid); m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid);
@ -570,15 +570,15 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
public void MakeChildAgent() public void MakeChildAgent()
{ {
if(m_animations.Count > 0) if(m_animations.Count > 0)
{ {
LLUUID movement=m_animations[0]; LLUUID movement=m_animations[0];
m_animations.Clear(); m_animations.Clear();
m_animationSeqs.Clear(); m_animationSeqs.Clear();
SetMovementAnimation(movement); SetMovementAnimation(movement);
} }
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}", // "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}",
// Name, UUID, m_scene.RegionInfo.RegionName); // Name, UUID, m_scene.RegionInfo.RegionName);
@ -611,10 +611,10 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="pos"></param> /// <param name="pos"></param>
public void Teleport(LLVector3 pos) public void Teleport(LLVector3 pos)
{ {
RemoveFromPhysicalScene(); RemoveFromPhysicalScene();
Velocity = new LLVector3(0, 0, 0); Velocity = new LLVector3(0, 0, 0);
AbsolutePosition = pos; AbsolutePosition = pos;
AddToPhysicalScene(); AddToPhysicalScene();
SendTerseUpdateToAllClients(); SendTerseUpdateToAllClients();
} }
@ -1055,12 +1055,12 @@ namespace OpenSim.Region.Environment.Scenes
public void AddAnimation(LLUUID animID) public void AddAnimation(LLUUID animID)
{ {
if(m_isChildAgent) if(m_isChildAgent)
return; return;
// Don't let this animation become the movement animation // Don't let this animation become the movement animation
if(m_animations.Count < 1) if(m_animations.Count < 1)
SetMovementAnimation(Animations.AnimsLLUUID["STAND"]); SetMovementAnimation(Animations.AnimsLLUUID["STAND"]);
if (!m_animations.Contains(animID)) if (!m_animations.Contains(animID))
{ {
@ -1072,8 +1072,8 @@ namespace OpenSim.Region.Environment.Scenes
public void RemoveAnimation(LLUUID animID) public void RemoveAnimation(LLUUID animID)
{ {
if(m_isChildAgent) if(m_isChildAgent)
return; return;
if (m_animations.Contains(animID)) if (m_animations.Contains(animID))
{ {
@ -1083,21 +1083,21 @@ namespace OpenSim.Region.Environment.Scenes
} }
else else
{ {
// What a HACK!! Anim list really needs to be an object! // What a HACK!! Anim list really needs to be an object!
int idx; int idx;
for(idx=0;idx < m_animations.Count;idx++) for(idx=0;idx < m_animations.Count;idx++)
{ {
if(m_animations[idx] == animID) if(m_animations[idx] == animID)
{ {
int seq=m_animationSeqs[idx]; int seq=m_animationSeqs[idx];
m_animations.Remove(animID); m_animations.Remove(animID);
m_animationSeqs.Remove(seq); m_animationSeqs.Remove(seq);
SendAnimPack(); SendAnimPack();
break; break;
} }
} }
} }
} }
} }
@ -1119,33 +1119,33 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
protected void SetMovementAnimation(LLUUID anim) protected void SetMovementAnimation(LLUUID anim)
{ {
if(m_animations.Count < 1) if(m_animations.Count < 1)
{ {
m_animations.Add(Animations.AnimsLLUUID["STAND"]); m_animations.Add(Animations.AnimsLLUUID["STAND"]);
m_animationSeqs.Add(1); m_animationSeqs.Add(1);
SendAnimPack(); SendAnimPack();
} }
else else
{ {
try try
{ {
if (m_animations[0] != anim) if (m_animations[0] != anim)
{ {
m_animations[0] = anim; m_animations[0] = anim;
m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber; m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber;
} }
SendAnimPack(); SendAnimPack();
} }
catch catch
{ {
m_log.Warn("[AVATAR]: SetMovementAnimation for avatar failed. Attempting recovery..."); m_log.Warn("[AVATAR]: SetMovementAnimation for avatar failed. Attempting recovery...");
m_animations[0] = anim; m_animations[0] = anim;
m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber; m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber;
SendAnimPack(); SendAnimPack();
} }
} }
} }
/// <summary> /// <summary>
/// This method handles agent movement related animations /// This method handles agent movement related animations
@ -1536,8 +1536,8 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="seqs"></param> /// <param name="seqs"></param>
public void SendAnimPack(LLUUID[] animations, int[] seqs) public void SendAnimPack(LLUUID[] animations, int[] seqs)
{ {
if(m_isChildAgent) if(m_isChildAgent)
return; return;
m_scene.Broadcast( m_scene.Broadcast(
delegate(IClientAPI client) { client.SendAnimations(animations, seqs, m_controllingClient.AgentId); }); delegate(IClientAPI client) { client.SendAnimations(animations, seqs, m_controllingClient.AgentId); });

View File

@ -167,8 +167,8 @@ namespace OpenSim.Region.Examples.SimpleModule
public event ObjectIncludeInSearch OnObjectIncludeInSearch; public event ObjectIncludeInSearch OnObjectIncludeInSearch;
public event UUIDNameRequest OnTeleportHomeRequest; public event UUIDNameRequest OnTeleportHomeRequest;
public event ScriptAnswer OnScriptAnswer; public event ScriptAnswer OnScriptAnswer;
public event RequestPayPrice OnRequestPayPrice; public event RequestPayPrice OnRequestPayPrice;
#pragma warning restore 67 #pragma warning restore 67
@ -221,10 +221,10 @@ namespace OpenSim.Region.Examples.SimpleModule
get { return FirstName + LastName; } get { return FirstName + LastName; }
} }
public virtual int NextAnimationSequenceNumber public virtual int NextAnimationSequenceNumber
{ {
get { return 1; } get { return 1; }
} }
public virtual void OutPacket(Packet newPack, ThrottleOutPacketType packType) public virtual void OutPacket(Packet newPack, ThrottleOutPacketType packType)
{ {
@ -344,9 +344,9 @@ namespace OpenSim.Region.Examples.SimpleModule
{ {
} }
public virtual void SendPayPrice(LLUUID objectID, int[] payPrice) public virtual void SendPayPrice(LLUUID objectID, int[] payPrice)
{ {
} }
public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID,
uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID) uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID)
@ -603,8 +603,8 @@ namespace OpenSim.Region.Examples.SimpleModule
{ {
} }
public void SendScriptQuestion(LLUUID objectID, string taskName, string ownerName, LLUUID itemID, int question) public void SendScriptQuestion(LLUUID objectID, string taskName, string ownerName, LLUUID itemID, int question)
{ {
} }
} }
} }

View File

@ -70,7 +70,7 @@ namespace OpenSim.Region.ScriptEngine.Common
private DateTime m_timer = DateTime.Now; private DateTime m_timer = DateTime.Now;
private string m_state = "default"; private string m_state = "default";
private bool m_waitingForScriptAnswer=false; private bool m_waitingForScriptAnswer=false;
public string State public string State
@ -121,50 +121,50 @@ namespace OpenSim.Region.ScriptEngine.Common
return World.GetCommander(name); return World.GetCommander(name);
} }
private LLUUID InventorySelf() private LLUUID InventorySelf()
{ {
LLUUID invItemID=new LLUUID(); LLUUID invItemID=new LLUUID();
foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
{ {
if(inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) if(inv.Value.Type == 10 && inv.Value.ItemID == m_itemID)
{ {
invItemID=inv.Key; invItemID=inv.Key;
break; break;
} }
} }
return invItemID; return invItemID;
} }
private LLUUID InventoryKey(string name, int type) private LLUUID InventoryKey(string name, int type)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
{ {
if(inv.Value.Name == name) if(inv.Value.Name == name)
{ {
if(inv.Value.Type != type) if(inv.Value.Type != type)
return LLUUID.Zero; return LLUUID.Zero;
return inv.Value.AssetID.ToString(); return inv.Value.AssetID.ToString();
} }
} }
return LLUUID.Zero; return LLUUID.Zero;
} }
private LLUUID InventoryKey(string name) private LLUUID InventoryKey(string name)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
{ {
if(inv.Value.Name == name) if(inv.Value.Name == name)
{ {
return inv.Value.AssetID.ToString(); return inv.Value.AssetID.ToString();
} }
} }
return LLUUID.Zero; return LLUUID.Zero;
} }
//These are the implementations of the various ll-functions used by the LSL scripts. //These are the implementations of the various ll-functions used by the LSL scripts.
//starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07
@ -947,15 +947,15 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
LLUUID textureID=new LLUUID(); LLUUID textureID=new LLUUID();
if(!LLUUID.TryParse(texture, out textureID)) if(!LLUUID.TryParse(texture, out textureID))
{ {
textureID=InventoryKey(texture, (int)AssetType.Texture); textureID=InventoryKey(texture, (int)AssetType.Texture);
} }
if(textureID == LLUUID.Zero) if(textureID == LLUUID.Zero)
return; return;
LLObject.TextureEntry tex = m_host.Shape.Textures; LLObject.TextureEntry tex = m_host.Shape.Textures;
@ -1610,41 +1610,41 @@ namespace OpenSim.Region.ScriptEngine.Common
public int llGiveMoney(string destination, int amount) public int llGiveMoney(string destination, int amount)
{ {
LLUUID invItemID=InventorySelf(); LLUUID invItemID=InventorySelf();
if(invItemID == LLUUID.Zero) if(invItemID == LLUUID.Zero)
return 0; return 0;
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if(m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) if(m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero)
return 0; return 0;
if((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_DEBIT) == 0) if((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_DEBIT) == 0)
{ {
LSLError("No permissions to give money"); LSLError("No permissions to give money");
return 0; return 0;
} }
LLUUID toID=new LLUUID(); LLUUID toID=new LLUUID();
if(!LLUUID.TryParse(destination, out toID)) if(!LLUUID.TryParse(destination, out toID))
{ {
LSLError("Bad key in llGiveMoney"); LSLError("Bad key in llGiveMoney");
return 0; return 0;
} }
IMoneyModule money=World.RequestModuleInterface<IMoneyModule>(); IMoneyModule money=World.RequestModuleInterface<IMoneyModule>();
if(money == null) if(money == null)
{ {
NotImplemented("llGiveMoney"); NotImplemented("llGiveMoney");
return 0; return 0;
} }
bool result=money.ObjectGiveMoney(m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount); bool result=money.ObjectGiveMoney(m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount);
if(result) if(result)
return 1; return 1;
return 0; return 0;
} }
@ -1883,57 +1883,57 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
LLUUID invItemID=InventorySelf(); LLUUID invItemID=InventorySelf();
if(invItemID == LLUUID.Zero) if(invItemID == LLUUID.Zero)
return; return;
if(m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) if(m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero)
return; return;
if((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) if((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
{ {
// Do NOT try to parse LLUUID, animations cannot be triggered by ID // Do NOT try to parse LLUUID, animations cannot be triggered by ID
LLUUID animID=InventoryKey(anim, (int)AssetType.Animation); LLUUID animID=InventoryKey(anim, (int)AssetType.Animation);
if(animID == LLUUID.Zero) if(animID == LLUUID.Zero)
return; return;
if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter)) if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter))
{ {
ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter]; ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter];
presence.AddAnimation(animID); presence.AddAnimation(animID);
} }
} }
} }
public void llStopAnimation(string anim) public void llStopAnimation(string anim)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
LLUUID invItemID=InventorySelf(); LLUUID invItemID=InventorySelf();
if(invItemID == LLUUID.Zero) if(invItemID == LLUUID.Zero)
return; return;
if(m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) if(m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero)
return; return;
if((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) if((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
{ {
LLUUID animID = new LLUUID(); LLUUID animID = new LLUUID();
if(!LLUUID.TryParse(anim, out animID)) if(!LLUUID.TryParse(anim, out animID))
{ {
animID=InventoryKey(anim); animID=InventoryKey(anim);
} }
if(animID == LLUUID.Zero) if(animID == LLUUID.Zero)
return; return;
if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter)) if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter))
{ {
ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter]; ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter];
presence.RemoveAnimation(animID); presence.RemoveAnimation(animID);
} }
} }
} }
public void llPointAt() public void llPointAt()
@ -1972,108 +1972,108 @@ namespace OpenSim.Region.ScriptEngine.Common
public void llRequestPermissions(string agent, int perm) public void llRequestPermissions(string agent, int perm)
{ {
LLUUID agentID=new LLUUID(); LLUUID agentID=new LLUUID();
if(!LLUUID.TryParse(agent, out agentID)) if(!LLUUID.TryParse(agent, out agentID))
return; return;
LLUUID invItemID=InventorySelf(); LLUUID invItemID=InventorySelf();
if(invItemID == LLUUID.Zero) if(invItemID == LLUUID.Zero)
return; // Not in a prim? How?? return; // Not in a prim? How??
if(agentID == LLUUID.Zero || perm == 0) // Releasing permissions if(agentID == LLUUID.Zero || perm == 0) // Releasing permissions
{ {
m_host.TaskInventory[invItemID].PermsGranter=LLUUID.Zero; m_host.TaskInventory[invItemID].PermsGranter=LLUUID.Zero;
m_host.TaskInventory[invItemID].PermsMask=0; m_host.TaskInventory[invItemID].PermsMask=0;
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {(int)0}); m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {(int)0});
return; return;
} }
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
bool attachment=false; // Attachments not implemented yet. TODO: reflect real attachemnt state bool attachment=false; // Attachments not implemented yet. TODO: reflect real attachemnt state
if(attachment && agent == m_host.OwnerID) if(attachment && agent == m_host.OwnerID)
{ {
// When attached, certain permissions are implicit if requested from owner // When attached, certain permissions are implicit if requested from owner
int implicitPerms = BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS | int implicitPerms = BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS |
BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION | BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION |
BuiltIn_Commands_BaseClass.PERMISSION_ATTACH; BuiltIn_Commands_BaseClass.PERMISSION_ATTACH;
if((perm & (~implicitPerms)) == 0) // Requested only implicit perms if((perm & (~implicitPerms)) == 0) // Requested only implicit perms
{ {
m_host.TaskInventory[invItemID].PermsGranter=agentID; m_host.TaskInventory[invItemID].PermsGranter=agentID;
m_host.TaskInventory[invItemID].PermsMask=perm; m_host.TaskInventory[invItemID].PermsMask=perm;
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {(int)perm}); m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {(int)perm});
return; return;
} }
} }
else if(m_host.m_sitTargetAvatar == agentID) // Sitting avatar else if(m_host.m_sitTargetAvatar == agentID) // Sitting avatar
{ {
// When agent is sitting, certain permissions are implicit if requested from sitting agent // When agent is sitting, certain permissions are implicit if requested from sitting agent
int implicitPerms = BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION | int implicitPerms = BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION |
BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA; BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA;
if((perm & (~implicitPerms)) == 0) // Requested only implicit perms if((perm & (~implicitPerms)) == 0) // Requested only implicit perms
{ {
m_host.TaskInventory[invItemID].PermsGranter=agentID; m_host.TaskInventory[invItemID].PermsGranter=agentID;
m_host.TaskInventory[invItemID].PermsMask=perm; m_host.TaskInventory[invItemID].PermsMask=perm;
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {(int)perm}); m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {(int)perm});
return; return;
} }
} }
if (World.m_innerScene.ScenePresences.ContainsKey(agentID)) if (World.m_innerScene.ScenePresences.ContainsKey(agentID))
{ {
string ownerName=resolveName(m_host.ParentGroup.RootPart.OwnerID); string ownerName=resolveName(m_host.ParentGroup.RootPart.OwnerID);
if(ownerName == String.Empty) if(ownerName == String.Empty)
ownerName="(hippos)"; ownerName="(hippos)";
ScenePresence presence = World.m_innerScene.ScenePresences[agentID]; ScenePresence presence = World.m_innerScene.ScenePresences[agentID];
if(!m_waitingForScriptAnswer) if(!m_waitingForScriptAnswer)
{ {
m_host.TaskInventory[invItemID].PermsGranter=agentID; m_host.TaskInventory[invItemID].PermsGranter=agentID;
m_host.TaskInventory[invItemID].PermsMask=0; m_host.TaskInventory[invItemID].PermsMask=0;
presence.ControllingClient.OnScriptAnswer+=handleScriptAnswer; presence.ControllingClient.OnScriptAnswer+=handleScriptAnswer;
m_waitingForScriptAnswer=true; m_waitingForScriptAnswer=true;
} }
presence.ControllingClient.SendScriptQuestion(m_host.UUID, m_host.ParentGroup.RootPart.Name, ownerName, invItemID, perm); presence.ControllingClient.SendScriptQuestion(m_host.UUID, m_host.ParentGroup.RootPart.Name, ownerName, invItemID, perm);
return; return;
} }
// Requested agent is not in range, refuse perms // Requested agent is not in range, refuse perms
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {(int)0}); m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {(int)0});
} }
void handleScriptAnswer(IClientAPI client, LLUUID taskID, LLUUID itemID, int answer) void handleScriptAnswer(IClientAPI client, LLUUID taskID, LLUUID itemID, int answer)
{ {
if(taskID != m_host.UUID) if(taskID != m_host.UUID)
return; return;
LLUUID invItemID=InventorySelf(); LLUUID invItemID=InventorySelf();
if(invItemID == LLUUID.Zero) if(invItemID == LLUUID.Zero)
return; return;
client.OnScriptAnswer-=handleScriptAnswer; client.OnScriptAnswer-=handleScriptAnswer;
m_waitingForScriptAnswer=false; m_waitingForScriptAnswer=false;
m_host.TaskInventory[invItemID].PermsMask=answer; m_host.TaskInventory[invItemID].PermsMask=answer;
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {(int)answer}); m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {(int)answer});
} }
public string llGetPermissionsKey() public string llGetPermissionsKey()
{ {
@ -2083,7 +2083,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
if(item.Type == 10 && item.ItemID == m_itemID) if(item.Type == 10 && item.ItemID == m_itemID)
{ {
return item.PermsGranter.ToString(); return item.PermsGranter.ToString();
} }
} }
@ -2098,7 +2098,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
if(item.Type == 10 && item.ItemID == m_itemID) if(item.Type == 10 && item.ItemID == m_itemID)
{ {
return item.PermsMask; return item.PermsMask;
} }
} }
@ -3997,24 +3997,24 @@ namespace OpenSim.Region.ScriptEngine.Common
LSLError("First parameter to llDialog needs to be a key"); LSLError("First parameter to llDialog needs to be a key");
return; return;
} }
if(buttons.Length > 12) if(buttons.Length > 12)
{ {
LSLError("No more than 12 buttons can be shown"); LSLError("No more than 12 buttons can be shown");
return; return;
} }
string[] buts = new string[buttons.Length]; string[] buts = new string[buttons.Length];
for(int i = 0; i < buttons.Length; i++) for(int i = 0; i < buttons.Length; i++)
{ {
if(buttons.Data[i].ToString() == String.Empty) if(buttons.Data[i].ToString() == String.Empty)
{ {
LSLError("button label cannot be blank"); LSLError("button label cannot be blank");
return; return;
} }
if(buttons.Data[i].ToString().Length > 24) if(buttons.Data[i].ToString().Length > 24)
{ {
LSLError("button label cannot be longer than 24 characters"); LSLError("button label cannot be longer than 24 characters");
return; return;
} }
buts[i] = buttons.Data[i].ToString(); buts[i] = buttons.Data[i].ToString();
} }
World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new LLUUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new LLUUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
@ -5137,16 +5137,16 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if(quick_pay_buttons.Data.Length != 4) if(quick_pay_buttons.Data.Length != 4)
{ {
LSLError("List must have 4 elements"); LSLError("List must have 4 elements");
return; return;
} }
m_host.ParentGroup.RootPart.PayPrice[0]=price; m_host.ParentGroup.RootPart.PayPrice[0]=price;
m_host.ParentGroup.RootPart.PayPrice[1]=(int)quick_pay_buttons.Data[0]; m_host.ParentGroup.RootPart.PayPrice[1]=(int)quick_pay_buttons.Data[0];
m_host.ParentGroup.RootPart.PayPrice[2]=(int)quick_pay_buttons.Data[1]; m_host.ParentGroup.RootPart.PayPrice[2]=(int)quick_pay_buttons.Data[1];
m_host.ParentGroup.RootPart.PayPrice[3]=(int)quick_pay_buttons.Data[2]; m_host.ParentGroup.RootPart.PayPrice[3]=(int)quick_pay_buttons.Data[2];
m_host.ParentGroup.RootPart.PayPrice[4]=(int)quick_pay_buttons.Data[3]; m_host.ParentGroup.RootPart.PayPrice[4]=(int)quick_pay_buttons.Data[3];
} }
public LSL_Types.Vector3 llGetCameraPos() public LSL_Types.Vector3 llGetCameraPos()

View File

@ -71,11 +71,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript;
myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; myScriptEngine.World.EventManager.OnScriptChangedEvent += changed;
// TODO: HOOK ALL EVENTS UP TO SERVER! // TODO: HOOK ALL EVENTS UP TO SERVER!
IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>();
if(money != null) if(money != null)
{ {
money.OnObjectPaid+=HandleObjectPaid; money.OnObjectPaid+=HandleObjectPaid;
} }
} }
} }