fix(gen1): return configured object PayPrice buttons to Firestorm
This commit is contained in:
1 parent
6320338246
commit
242bee9192
1 file changed
+20
@@ -1048,6 +1048,9 @@ namespace NexVerse.RegionModules.Economy
|
||||
EconomyDataRequestHandler;
|
||||
client.OnMoneyBalanceRequest +=
|
||||
SendMoneyBalance;
|
||||
// Firestorm requests the root prim's configured PayPrice buttons.
|
||||
client.OnRequestPayPrice +=
|
||||
HandleRequestPayPrice;
|
||||
client.OnObjectBuy +=
|
||||
ObjectBuy;
|
||||
// Firestorm's Groups > Land & NV$ tab sends these legacy UDP
|
||||
@@ -1067,6 +1070,23 @@ namespace NexVerse.RegionModules.Economy
|
||||
}
|
||||
|
||||
|
||||
// Return server-owned quick-pay prices without performing a transfer.
|
||||
private void HandleRequestPayPrice(
|
||||
IClientAPI client,
|
||||
UUID objectId)
|
||||
{
|
||||
if (client?.Scene is not Scene scene)
|
||||
return;
|
||||
|
||||
SceneObjectPart part = scene.GetSceneObjectPart(objectId);
|
||||
SceneObjectGroup group = part?.ParentGroup;
|
||||
SceneObjectPart root = group?.RootPart;
|
||||
if (group == null || group.IsDeleted || root == null)
|
||||
return;
|
||||
|
||||
client.SendPayPrice(objectId, root.PayPrice);
|
||||
}
|
||||
|
||||
private void QueueInitialBalanceRefresh(
|
||||
IClientAPI client)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user