diff options
| author | click <none@none> | 2010-05-25 08:43:56 +0200 |
|---|---|---|
| committer | click <none@none> | 2010-05-25 08:43:56 +0200 |
| commit | 8f908f9df70c63da2bec7acdfe3f3f1e8eb9d527 (patch) | |
| tree | 4fbacfe065b63e86eeb5ac4419508f442a6927d7 /src | |
| parent | 0f99ca17ee60595a148a9ee5213977945edaca43 (diff) | |
Add support for sending accountbound items between characters on the same account - Fix by Francesco
Closes issue #2332
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Mail.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp index d17347f94ee..847009b83dc 100644 --- a/src/game/Mail.cpp +++ b/src/game/Mail.cpp @@ -160,8 +160,24 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data) pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_RECIPIENT_CAP_REACHED); return; } - // test the receiver's Faction... - if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) && pl->GetTeam() != rc_team && GetSecurity() == SEC_PLAYER) + // test the receiver's Faction... or all items are account bound + bool accountBound = false; + for (uint8 i = 0; i < items_count; ++i) + { + Item* item = pl->GetItemByGuid(itemGUIDs[i]) ; + if (item ) + { + ItemPrototype const* itemProto= item->GetProto(); + if(itemProto && (itemProto->Flags & ITEM_FLAGS_BOA)) + accountBound = true; + else + { + accountBound = false; + break; + } + } + } + if (!accountBound && !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) && pl->GetTeam() != rc_team && GetSecurity() == SEC_PLAYER) { pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_YOUR_TEAM); return; |
