Instructions Jenkins Doxygen

[fixed] mantis 4416 deposit/withdraw not working at banks 11/1011/3
authorKlivian <klivian@hotmail.com>
Sun, 27 Oct 2013 23:19:48 +0000 (23:19 +0000)
committerVictor Popovici <theanswer@swgemu.com>
Sun, 27 Oct 2013 23:37:47 +0000 (00:37 +0100)
Change-Id: If8cb4e68cb8fe7bb93e7c99be5cb60080df0630b

MMOCoreORB/src/server/zone/objects/player/sui/callbacks/BankTerminalSuiCallback.h

index 5e72d31..9b6633d 100644 (file)
@@ -20,6 +20,30 @@ public:
                        return;
                }
 
+               if (args->size() < 2)
+                       return;
+
+               int cash = Integer::valueOf(args->get(0).toString());
+               int bank = Integer::valueOf(args->get(1).toString());
+
+               SuiBankTransferBox* suiBank = cast<SuiBankTransferBox*>( sui);
+
+               ManagedReference<SceneObject*> bankObject = suiBank->getBank();
+
+               if (bankObject == NULL)
+                       return;
+
+               if (!player->isInRange(bankObject, 5))
+                       return;
+
+               uint32 currentCash = player->getCashCredits();
+               uint32 currentBank = player->getBankCredits();
+
+               if ((currentCash + currentBank) == ((uint32) cash + (uint32) bank)) {
+                       player->setCashCredits(cash);
+                       player->setBankCredits(bank);
+               }
+
                player->sendSystemMessage("@base_player:bank_success");
        }
 };