diff options
author | Teravus Ovares | 2008-04-10 09:36:55 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-10 09:36:55 +0000 |
commit | 06967e230f50fbeee24176f3df8cda8a067544e4 (patch) | |
tree | d824f1a8834700d12a77159159094a6524a856bb /OpenSim/Region/ClientStack/ClientView.cs | |
parent | * Adds twist support for Cubes, Cylinders, and Prisms in the Meshmerizer (diff) | |
download | opensim-SC_OLD-06967e230f50fbeee24176f3df8cda8a067544e4.zip opensim-SC_OLD-06967e230f50fbeee24176f3df8cda8a067544e4.tar.gz opensim-SC_OLD-06967e230f50fbeee24176f3df8cda8a067544e4.tar.bz2 opensim-SC_OLD-06967e230f50fbeee24176f3df8cda8a067544e4.tar.xz |
* Updates BetaGridLikeMoneyModule
* Several people have asked for a way to limit uploads, so I've decided to show people how to do this in the BetaGridLikeMoneyModule.
* Configure it in OpenSim.ini using the [Economy] header. See the bottom of the OpenSim.ini.example for more information.
* This also fleshes out the Economy API a bit more.
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 75 |
1 files changed, 60 insertions, 15 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 25ea3c6..a91987f 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -214,6 +214,8 @@ namespace OpenSim.Region.ClientStack | |||
214 | private ViewerEffectEventHandler handlerViewerEffect = null; //OnViewerEffect; | 214 | private ViewerEffectEventHandler handlerViewerEffect = null; //OnViewerEffect; |
215 | private Action<IClientAPI> handlerLogout = null; //OnLogout; | 215 | private Action<IClientAPI> handlerLogout = null; //OnLogout; |
216 | private MoneyTransferRequest handlerMoneyTransferRequest = null; //OnMoneyTransferRequest; | 216 | private MoneyTransferRequest handlerMoneyTransferRequest = null; //OnMoneyTransferRequest; |
217 | private EconomyDataRequest handlerEconomoyDataRequest = null; | ||
218 | |||
217 | private UpdateVector handlerUpdatePrimSinglePosition = null; //OnUpdatePrimSinglePosition; | 219 | private UpdateVector handlerUpdatePrimSinglePosition = null; //OnUpdatePrimSinglePosition; |
218 | private UpdatePrimSingleRotation handlerUpdatePrimSingleRotation = null; //OnUpdatePrimSingleRotation; | 220 | private UpdatePrimSingleRotation handlerUpdatePrimSingleRotation = null; //OnUpdatePrimSingleRotation; |
219 | private UpdateVector handlerUpdatePrimScale = null; //OnUpdatePrimScale; | 221 | private UpdateVector handlerUpdatePrimScale = null; //OnUpdatePrimScale; |
@@ -223,6 +225,7 @@ namespace OpenSim.Region.ClientStack | |||
223 | private PacketStats handlerPacketStats = null; // OnPacketStats;# | 225 | private PacketStats handlerPacketStats = null; // OnPacketStats;# |
224 | private RequestAsset handlerRequestAsset = null; // OnRequestAsset; | 226 | private RequestAsset handlerRequestAsset = null; // OnRequestAsset; |
225 | 227 | ||
228 | |||
226 | /* Properties */ | 229 | /* Properties */ |
227 | 230 | ||
228 | public LLUUID SecureSessionId | 231 | public LLUUID SecureSessionId |
@@ -763,6 +766,7 @@ namespace OpenSim.Region.ClientStack | |||
763 | public event PacketStats OnPacketStats; | 766 | public event PacketStats OnPacketStats; |
764 | 767 | ||
765 | public event MoneyTransferRequest OnMoneyTransferRequest; | 768 | public event MoneyTransferRequest OnMoneyTransferRequest; |
769 | public event EconomyDataRequest OnEconomyDataRequest; | ||
766 | 770 | ||
767 | public event MoneyBalanceRequest OnMoneyBalanceRequest; | 771 | public event MoneyBalanceRequest OnMoneyBalanceRequest; |
768 | 772 | ||
@@ -1523,6 +1527,34 @@ namespace OpenSim.Region.ClientStack | |||
1523 | OutPacket(sendXfer, ThrottleOutPacketType.Task); | 1527 | OutPacket(sendXfer, ThrottleOutPacketType.Task); |
1524 | } | 1528 | } |
1525 | 1529 | ||
1530 | public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, | ||
1531 | int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, | ||
1532 | int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, | ||
1533 | int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) | ||
1534 | { | ||
1535 | EconomyDataPacket economyData = (EconomyDataPacket)PacketPool.Instance.GetPacket(PacketType.EconomyData); | ||
1536 | economyData.Info.EnergyEfficiency = EnergyEfficiency; | ||
1537 | economyData.Info.ObjectCapacity = ObjectCapacity; | ||
1538 | economyData.Info.ObjectCount = ObjectCount; | ||
1539 | economyData.Info.PriceEnergyUnit = PriceEnergyUnit; | ||
1540 | economyData.Info.PriceGroupCreate = PriceGroupCreate; | ||
1541 | economyData.Info.PriceObjectClaim = PriceObjectClaim; | ||
1542 | economyData.Info.PriceObjectRent = PriceObjectRent; | ||
1543 | economyData.Info.PriceObjectScaleFactor = PriceObjectScaleFactor; | ||
1544 | economyData.Info.PriceParcelClaim = PriceParcelClaim; | ||
1545 | economyData.Info.PriceParcelClaimFactor = PriceParcelClaimFactor; | ||
1546 | economyData.Info.PriceParcelRent = PriceParcelRent; | ||
1547 | economyData.Info.PricePublicObjectDecay = PricePublicObjectDecay; | ||
1548 | economyData.Info.PricePublicObjectDelete = PricePublicObjectDelete; | ||
1549 | economyData.Info.PriceRentLight = PriceRentLight; | ||
1550 | economyData.Info.PriceUpload = PriceUpload; | ||
1551 | economyData.Info.TeleportMinPrice = TeleportMinPrice; | ||
1552 | economyData.Info.TeleportPriceExponent = TeleportPriceExponent; | ||
1553 | economyData.Header.Reliable = true; | ||
1554 | OutPacket(economyData, ThrottleOutPacketType.Unknown); | ||
1555 | |||
1556 | } | ||
1557 | |||
1526 | public void SendAvatarPickerReply(AvatarPickerReplyPacket replyPacket) | 1558 | public void SendAvatarPickerReply(AvatarPickerReplyPacket replyPacket) |
1527 | { | 1559 | { |
1528 | OutPacket(replyPacket, ThrottleOutPacketType.Task); | 1560 | OutPacket(replyPacket, ThrottleOutPacketType.Task); |
@@ -4155,17 +4187,7 @@ namespace OpenSim.Region.ClientStack | |||
4155 | 4187 | ||
4156 | #endregion | 4188 | #endregion |
4157 | 4189 | ||
4158 | case PacketType.MoneyBalanceRequest: | 4190 | |
4159 | MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; | ||
4160 | |||
4161 | handlerMoneyBalanceRequest = OnMoneyBalanceRequest; | ||
4162 | |||
4163 | if (handlerMoneyBalanceRequest != null) | ||
4164 | { | ||
4165 | handlerMoneyBalanceRequest(this, moneybalancerequestpacket.AgentData.AgentID, moneybalancerequestpacket.AgentData.SessionID, moneybalancerequestpacket.MoneyData.TransactionID); | ||
4166 | } | ||
4167 | |||
4168 | break; | ||
4169 | case PacketType.UUIDNameRequest: | 4191 | case PacketType.UUIDNameRequest: |
4170 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; | 4192 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; |
4171 | foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock) | 4193 | foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock) |
@@ -4373,6 +4395,32 @@ namespace OpenSim.Region.ClientStack | |||
4373 | 4395 | ||
4374 | #endregion | 4396 | #endregion |
4375 | 4397 | ||
4398 | #region Economy/Transaction Packets | ||
4399 | |||
4400 | case PacketType.MoneyBalanceRequest: | ||
4401 | MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; | ||
4402 | |||
4403 | handlerMoneyBalanceRequest = OnMoneyBalanceRequest; | ||
4404 | |||
4405 | if (handlerMoneyBalanceRequest != null) | ||
4406 | { | ||
4407 | handlerMoneyBalanceRequest(this, moneybalancerequestpacket.AgentData.AgentID, moneybalancerequestpacket.AgentData.SessionID, moneybalancerequestpacket.MoneyData.TransactionID); | ||
4408 | } | ||
4409 | |||
4410 | break; | ||
4411 | case PacketType.EconomyDataRequest: | ||
4412 | |||
4413 | handlerEconomoyDataRequest = OnEconomyDataRequest; | ||
4414 | if (handlerEconomoyDataRequest != null) | ||
4415 | { | ||
4416 | handlerEconomoyDataRequest(AgentId); | ||
4417 | } | ||
4418 | // TODO: handle this packet | ||
4419 | //m_log.Warn("[CLIENT]: unhandled EconomyDataRequest packet"); | ||
4420 | break; | ||
4421 | |||
4422 | #endregion | ||
4423 | |||
4376 | #region unimplemented handlers | 4424 | #region unimplemented handlers |
4377 | 4425 | ||
4378 | case PacketType.StartPingCheck: | 4426 | case PacketType.StartPingCheck: |
@@ -4422,10 +4470,7 @@ namespace OpenSim.Region.ClientStack | |||
4422 | // TODO: Don't display this one, we handle it at a lower level | 4470 | // TODO: Don't display this one, we handle it at a lower level |
4423 | //m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet"); | 4471 | //m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet"); |
4424 | break; | 4472 | break; |
4425 | case PacketType.EconomyDataRequest: | 4473 | |
4426 | // TODO: handle this packet | ||
4427 | m_log.Warn("[CLIENT]: unhandled EconomyDataRequest packet"); | ||
4428 | break; | ||
4429 | case PacketType.AgentHeightWidth: | 4474 | case PacketType.AgentHeightWidth: |
4430 | // TODO: handle this packet | 4475 | // TODO: handle this packet |
4431 | m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); | 4476 | m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); |