Events and delegate functions †[edit]
- 略号
- MM -> Money Module, MS -> Money Server, VW -> Viewer
- RS -> Region(Robust) Server, US -> User(Robust) Server, SC -> External Script
- AS -> Aurora Server
MoneyTransferRequest †[edit]
- 他のアバターへの直接的な支払い,ギフト (Gift: 5001)
- event MoneyTransferRequest OnMoneyTransferRequest; (IClientAPI.cs)
- MM.MoneyTransferRequest() は MoneyTransferArgs と Scene を生成して MM.MoneyTransferAction() を起動している.
MM.MoneyTransferRequest() -> MM.MoneyTransferAction() -> MM.TransferMoney() => XML RPC to MS ("TransferMoney")
- オブジェクトを経由した,他のアバターへの間接的な支払い (PayObject: 5008)
- LSL の money イベントが発生する
MM.MoneyTransferRequest() -> MM.MoneyTransferAction() -> MM.TransferMoney() => XML RPC to MS ("TransferMoney")
EconomyDataRequest †[edit]
- event EconomyDataRequest OnEconomyDataRequest; (IClientAPI.cs)
MoneyBalanceRequest †[edit]
- event MoneyBalanceRequest OnMoneyBalanceRequest; (IClientAPI.cs)
ParcelBuy †[edit]
- event ParcelBuy OnParcelBuy; (IClientAPI.cs)
ParcelBuyPass †[edit]
- event ParcelBuyPass OnParcelBuyPass; (IClientAPI.cs)
RequestPayPrice †[edit]
- event RequestPayPrice OnRequestPayPrice; (IClientAPI.cs)
OnObjectBuy †[edit]
- オブジェクト購入時に発生 (コピー,オリジナル,コンテンツ) (PayObject: 5008)
- event ObjectBuy OnObjectBuy; (IClientAPI.cs)
- ObjectBuy(), BuyObject() は Aurora/Modules/World/Entities/BuySell/BuySellModule.cs で定義
ObjectBuy() -> MM.Transfer() => XML RPC to MS ("TransferMoney")
-> BuyObject()
BuyObjectInventory †[edit]
- event BuyObjectInventory OnBuyObjectInventory; (IClientAPI.cs)
- event LandBuy OnValidateBuyLan; (ISceneEntity.cs)
Calling Sequence of Functions †[edit]
llGiveMoney() †[edit]
MM.ObjectGiveMoney() -> MM.TransferMoney() => XML RPC to MS ("TransferMoney")
-> MM.ForceTransferMoney() => XML RPC to MS ("ForceTransferMoney")
Buy Money from System †[edit]
1. VW => XML RPC to helper SC ("getCurrencyQuote") => Response to VW
2. VW => XML RPC to helper SC ("buyCurrency") -> SC.add_money() => XML RPC("AddBankerMoney") => MM => XML RPC("AddBankerMoney") => MS
=> Response to VW
Buy Land †[edit]
- Code: LandSale (5002)
- OnParcelBuy event, ProcessParcelBuy() は Aurora の Land/ParcelManagementModule.cs で定義
1. VW => XML RPC to helper SC ("preflightBuyLandPrep") => Response to VW
2. OnParcelBuy event -> ProcessParcelBuy() -> MM.TransferMoney() => XML RPC to MS ("TransferMoney")
Upload Inventory †[edit]
1. event -> AS.NewAgentInventoryRequest() -> AS.RequestUploadCovered() => XML RPC to RS ("UploadCovered")
2. event -> AS.UploadCompleteHandler() -> AS.RequestUploadCharge() => XML RPC to RS ("UploadCharge")
- TCP: OpenSim/Services/CapsService/CAPModules/InventoryCAPS.cs: NewAgentInventoryRequest()
- TCP: OpenSim/Services/CapsService/CAPModules/InventoryCAPS.cs: UploadCompleteHandler()
- UDP: OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs: HandleUDPUploadRequest()
OpenSim/Services/CapsService/CAPModules/InventoryCAPS.cs: NewAgentInventoryRequest()
OpenSim/Services/CapsService/CAPModules/InventoryCAPS.cs: HandleInventoryItemCreate()
- Aurora-Sim では seed_capability として Robust サーバ(Aurora.Server)が指定される( OpenSim では Regionサーバ)
- 従って,Uoload では Regionサーバでイベントが発生せず,Robustサーバ(Aurora.Server) でイベントが発生する.
- Robust サーバ(Aurora.Server) に MoneyModule をロードする.
- 通常のモジュールの読み込みとしては?
- OpenSim/Services/XXX/ にプログラムを作って,サービスとしてロードさせる.サービスは AuroraServerConfig/Main.ini の [Handlers]セクションで指定.
- 詳細不明で断念.
- seed_capability を強制的に Regionサーバにする.
- OpenSim/Services/LLLoginService/LLLoginResponse.cs での LLLoginResponseクラスのコンストラクタ LLLoginResponse(...) で SeedCapability = destination.ServerURI + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath); を追加する.
- 上記の手法により,seed_capability を強制的に Regionサーバにすることは可能.
- この場合,OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs: HandleUDPUploadRequest() がトリガーされる.
- ただし,Regionサーバで Capabilityが定義されないため,Assetの Uploadの通信が UDPとなる(遅い!!)-> 断念.
- 因みに,OpenSim ではこの部分には FillOutSeedCap() という関数が使用されている.
FillOutSeedCap(aCircuit, destination, clientIP);
private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient)
{
SeedCapability = destination.ServerURI + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath);
}
- Robust サーバ(Aurora.Server) から Regionサーバの MoneyModule を呼び出す.
- penSim/Services/CapsService/CAPModules/InventoryCAPS.cs 内でトリガーされる関数から XML RPCを使用して Regionサーバにアクセス.
- この手法を採用!!
Create Group †[edit]
event -> CreateGroup() -> MM.AmountCharge()
-> MM.ApplyCharge() -> MM.PayMoneyCharge() => XML RPC to MS ("PayMoneyCharge")
- OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs: CreateGroup()
XML RPC (from MoneyServer): †[edit]
XML RPC from MS ("OnMoneyTransfered") => MM.OnMoneyTransferedHandler() -> money() event
XML RPC from MS ("UpdateBalance") => MM.BalanceUpdateHandler() => Notify to VW
XML RPC (from external script) †[edit]
XML RPC from SC ("UpdateBalance") => MM.BalanceUpdateHandler() => Notify to VW
XML RPC from SC ("GetBalance") => MM.GetBalanceHandler() => XML RPC to MS ("GetBalance")
=> Response to SC
XML RPC from SC ("UserAlert") => MM.UserAlertHandler() => Message to VW
- SC.AddBankerMoney: Transaction Type is BuyMoney (5010)
- SC.SendMoney: Transaction Type is ReferBonus (5003)
XML RPC from SC ("AddBankerMoney") => MM.AddBankerMoneyHandler() -> MM.AddBankerMoney() => XML RPC to MS ("AddBankerMoney") => MS.handleAddBankerMoney()
XML RPC from SC ("SendMoney") => MM.SendMoneyHandler() -> MM.SendMoney() => XML RPC to MS ("SendMoney")
XML RPC (from Aurora.Server) †[edit]
XML RPC from AS ("UploadCovered") => MM.UploadCoveredHandler() => XML RPC to MS ("GetBalance")
XML RPC from AS ("UploadCharge") => MM.UploadChargeHandler() => XML RPC to MS ("PayMoneyCharge")