flagflag  If you want to see English page, please click "English" Button at Left.

ObjectBuy

  • このフォーラムに新しいトピックを立てることはできません
  • このフォーラムではゲスト投稿が禁止されています

なし ObjectBuy

msg# 1
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 .2 | 投稿日時 2013-4-20 19:43
unethika  Just popping in   投稿数: 3
ObjectBuy中、オブジェクトは、転送にお金の前に来る。
During ObjectBuy, object comes before money transfer.

お金のトランザクションが失敗した場合、オブジェクトはとにかく転送される。
If a money transaction fails, the object is transferred anyway.

これはなぜ起こるのでしょうか?
Why does this happen?

お金のトランザクションの後にオブジェクトを転送することはできますか?
Is it possible to transfer the object after the transaction of money?
投票数:46 平均点:4.35

なし Re: ObjectBuy

msg# 1.1
前の投稿 - 次の投稿 | 親投稿 - 子投稿なし | 投稿日時 2013-4-20 22:40 | 最終変更
iseki  Home away from home   投稿数: 1581
Hi unethika,

Thank you for Japanese text. It is very intelligible.

When processing of an object is failed, system should be rollback. Was not rollback performed?
This is a very difficult problem.

Surely, in our code, after sending an object, money is transacted.

UUID receiverId = sceneObj.OwnerID;
if (mod.BuyObject(remoteClient, categoryID, localID, saleType, salePrice))                     // Object is transferred
{
    ulong regionHandle = sceneObj.RegionHandle;
    TransferMoney(remoteClient.AgentId, receiverId, salePrice,                                 // Pay Money
                (int)TransactionType.PayObject, sceneObj.UUID, regionHandle, "Object Buy");
}

It is possible that after money was transacted, sending an object.
In this case, it may be happen that user paid money but object is not sent.

Do you think which is better?
投票数:47 平均点:4.47

なし Re: ObjectBuy

msg# 1.2
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2013-4-21 7:52
unethika  Just popping in   投稿数: 3
事前にお金を転送する最も安全な方法です。
It is the most secure way to transfer money in advance.

その場合には、DTL機能の処理が妥当である。
In that case, the processing of DTL function is reasonable.

https://github.com/unethika/Mod-DTL_NSL-MoneyServer

これは、オブジェクトの所有者の権利を有します。
It reserves the right of the owner of the object.

障害が発生した場合、当事者は手動でオブジェクトを転送することができるであろう。
If a failure occurs, the parties will be able to transfer objects manually.
投票数:56 平均点:5.18

なし Re: ObjectBuy

msg# 1.2.1
前の投稿 - 次の投稿 | 親投稿 - 子投稿なし | 投稿日時 2013-4-22 18:01
iseki  Home away from home   投稿数: 1581
Hi unethika,

I see.
Thank you for your comment.

I am going to correct it at next version.
Thanks.


--- MoneyModule.cs-     2013-04-22 17:56:50.000000000 +0900
+++ MoneyModule.cs      2013-04-22 17:58:44.000000000 +0900
@@ -690,12 +690,21 @@
                                        {
                                                UUID receiverId = sceneObj.OwnerID;
                                                ulong regionHandle = sceneObj.RegionHandle;
+                                               bool ret = TransferMoney(remoteClient.AgentId, receiverId, salePrice, 
+                                                                                                       (int)TransactionType.PayObject, sceneObj.UUID, regionHandle, "Object Buy");
+                                               if (ret)
+                                               {
+                                                       mod.BuyObject(remoteClient, categoryID, localID, saleType, salePrice);
+                                               }
+
+                                               /*
                                                if (mod.BuyObject(remoteClient, categoryID, localID, saleType, salePrice))
                                                {
                                                        ulong regionHandle = sceneObj.RegionHandle;
                                                        TransferMoney(remoteClient.AgentId, receiverId, salePrice,
                                                                                        (int)TransactionType.PayObject, sceneObj.UUID, regionHandle, "Object Buy");
                                                }
+                                               */
                                        }
                                }
                                else
投票数:55 平均点:5.64

  条件検索へ


サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 4月翌月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
<今日>

オンライン状況

72 人のユーザが現在オンラインです。 (3 人のユーザが Forum を参照しています。)

登録ユーザ: 0
ゲスト: 72

もっと...

アクセスカウンタ

今日 : 5875587558755875
昨日 : 8008800880088008
総計 : 2328151123281511232815112328151123281511232815112328151123281511
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com