aboutsummaryrefslogtreecommitdiff
path: root/src/game/Mail.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-03-19 13:36:54 +0100
committerMachiavelli <none@none>2010-03-19 13:36:54 +0100
commit1146c59f66c12177b5147f115cb008638c585de9 (patch)
tree63fe960ecefac4907f3678d681e1f72b88e3c48c /src/game/Mail.cpp
parent34d7e1fed941c03674147e8b84a0f30548f614b8 (diff)
Fix crash in Player::_saveInventory().
Fixes issue #1175 --HG-- branch : trunk
Diffstat (limited to 'src/game/Mail.cpp')
-rw-r--r--src/game/Mail.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp
index 428d2870b9f..3376d74e017 100644
--- a/src/game/Mail.cpp
+++ b/src/game/Mail.cpp
@@ -247,6 +247,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data )
GetPlayerName(), GetAccountId(), item->GetProto()->Name1, item->GetEntry(), item->GetCount(), receiver.c_str(), rc_account);
}
+ item->SetNotRefundable(GetPlayer()); // makes the item no longer refundable
pl->MoveItemFromInventory(items[i]->GetBagSlot(), item->GetSlot(), true);
CharacterDatabase.BeginTransaction();
item->DeleteFromInventoryDB(); // deletes item from character's inventory
@@ -254,7 +255,6 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data )
// owner in data will set at mail receive and item extracting
CharacterDatabase.PExecute("UPDATE item_instance SET owner_guid = '%u' WHERE guid='%u'", GUID_LOPART(rc), item->GetGUIDLow());
CharacterDatabase.CommitTransaction();
-
draft.AddItem(item);
}