Increased transaction timeout, not needed anymore due to packet ordering

This commit is contained in:
Shoghi Cervantes 2014-12-22 23:38:47 +01:00
parent 2f6007342c
commit a677bcb331
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89

View File

@ -2182,7 +2182,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
} }
if($this->currentTransaction === null or $this->currentTransaction->getCreationTime() < (microtime(true) - 0.5)){ if($this->currentTransaction === null or $this->currentTransaction->getCreationTime() < (microtime(true) - 8)){
if($this->currentTransaction instanceof SimpleTransactionGroup){ if($this->currentTransaction instanceof SimpleTransactionGroup){
foreach($this->currentTransaction->getInventories() as $inventory){ foreach($this->currentTransaction->getInventories() as $inventory){
if($inventory instanceof PlayerInventory){ if($inventory instanceof PlayerInventory){
@ -2197,19 +2197,16 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$this->currentTransaction->addTransaction($transaction); $this->currentTransaction->addTransaction($transaction);
if($this->currentTransaction->canExecute()){ if($this->currentTransaction->canExecute()){
if(!$this->currentTransaction->execute()){ if($this->currentTransaction->execute()){
$this->currentTransaction = null; foreach($this->currentTransaction->getTransactions() as $ts){
break; $inv = $ts->getInventory();
} if($inv instanceof FurnaceInventory){
if($ts->getSlot() === 2){
foreach($this->currentTransaction->getTransactions() as $ts){ switch($inv->getResult()->getId()){
$inv = $ts->getInventory(); case Item::IRON_INGOT:
if($inv instanceof FurnaceInventory){ $this->awardAchievement("acquireIron");
if($ts->getSlot() === 2){ break;
switch($inv->getResult()->getId()){ }
case Item::IRON_INGOT:
$this->awardAchievement("acquireIron");
break;
} }
} }
} }