#author("2023-12-30T12:27:15+00:00","default:iseki","iseki")
#author("2023-12-30T12:27:47+00:00","default:iseki","iseki")
** Events and delegate functions [#n5dd9145]
- 略号
-- MM -> Money Module, MS -> Money Server, VW -> Viewer 
-- RS -> Region(Robust) Server, US -> User(Robust) Server, SC -> External Script


*** Events [#e5339d2e]
- OpenSim では IClientAPI.cs の event は EventManager からアクセス可

**** MoneyTransferRequest [#r8b4f5a8]
- 他のアバターへの直接的な支払い,ギフト (Gift: 5001)
- event MoneyTransferRequest OnMoneyTransferRequest; (IClientAPI.cs)

 MM.MoneyTransferAction() -> MM.TransferMoney() => XML RPC to MS ("TransferMoney")

- オブジェクトを経由した,他のアバターへの間接的な支払い (PayObject: 5008)
- LSL の money イベントが発生する

 MM.MoneyTransferAction() -> MM.TransferMoney() => XML RPC to MS ("TransferMoney")

**** EconomyDataRequest [#s988b280]
- event EconomyDataRequest OnEconomyDataRequest; (IClientAPI.cs) 


**** MoneyBalanceRequest [#i46be7e9]
- event MoneyBalanceRequest OnMoneyBalanceRequest; (IClientAPI.cs)


**** ParcelBuy [#k1a868ad]
- event ParcelBuy OnParcelBuy; (IClientAPI.cs)

**** ParcelBuyPass [#ub4ad93d]
- event ParcelBuyPass OnParcelBuyPass; (IClientAPI.cs)

**** RequestPayPrice [#a4ae4e97]
- event RequestPayPrice OnRequestPayPrice; (IClientAPI.cs)

**** OnObjectBuy [#fa02b07e]
- オブジェクト購入時に発生 (コピー,オリジナル,コンテンツ) (PayObject: 5008)
- event ObjectBuy OnObjectBuy; (IClientAPI.cs)

 MM.OnObjectBuy() -> MM.BuyObject()
                  -> MM.Transfer() => XML RPC to MS ("TransferMoney")
- BuyObject(): OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs


**** BuyObjectInventory [#r0601ce9]
- event BuyObjectInventory OnBuyObjectInventory; (IClientAPI.cs)

**** MoneyTransferEvent [#h865aa02]
- event MoneyTransferEvent OnMoneyTransfer; (EventManager.cs)

**** LandBuy [#i0b02992]
- event LandBuy OnValidateLandBuy; (EventManager.cs)
- event LandBuy OnLandBuy; (EventManager.cs)





** Calling Sequence of Functions [#nb8e520e]

*** LSL [#z1b3a984]

**** llGiveMoney() [#ueb40dd8]
- Code: ObjectPays (5009)

 MM.ObjectGiveMoney() -> MM.TransferMoney()      => XML RPC to MS ("TransferMoney")
                      -> MM.ForceTransferMoney() => XML RPC to MS ("ForceTransferMoney")

*** Buy Money from System [#pa50af6e]
- Code: BuyMoney (5010)

 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
- [[XML>../../currency.php#ad93a73d]]


*** Buy Land [#td07e397]
- Code: LandSale (5002)

 1. VW => XML RPC to helper SC ("preflightBuyLandPrep") => Response to VW
 2. MM.OnValidateLandBuy event -> MM.ValidateLandBuy()
 3. MM.OnLandBuy event -> MM.processLandBuy() -> MM.TransferMoney() => XML RPC to MS ("TransferMoney")

- 資金が足りないとき

 2. VW => XML RPC to helper SC ("buyLandPrep") => SC.add_money() => XML RPC("AddBankerMoney") => MM => XML RPC("AddBankerMoney") => MS
                                              => Response to VW

*** Upload Inventory [#hc7d10a4]
 1. event -> RS.NewAgentInventoryRequest() -> MM.UploadCovered()
 2. event -> RS.AddUploadedInventoryItem() -> MM.ApplyUploadCharge()

- OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs 
-- NewAgentInventoryRequest() --> UploadCovered()
-- UploadCompleteHandler()  --> 
--- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs:AddUploadedInventoryItem() --> ApplyUploadCharge()

- %%OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs%% 
-- %%NewAgentInventoryRequest() --> UploadCovered()%%
- %%OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs%% 
-- %%HandleUDPUploadRequest() --> UploadCovered()%%


*** Create Group [#udce041d]
 event -> CreateGroup() -> MM.AmountCharge()
                        -> MM.ApplyCharge() -> MM.PayMoneyCharge() => XML RPC to MS ("PayMoneyCharge")
- OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs: CreateGroup()


*** XML RPC (from MoneyServer): [#mc97de42]
 XML RPC from MS ("OnMoneyTransfered") => MM.OnMoneyTransferedHandler() -> money() event
 XML RPC from MS ("UpdateBalance") => MM.BalanceUpdateHandler() => Notify to VW


*** XML RPC (from external script) [#t5ed3468]
 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")

#br

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 ページ一覧 検索 最終更新   ヘルプ   最終更新のRSS