Changeset 209 for trunk/src/game/MiscHandler.cpp
- Timestamp:
- 11/19/08 13:46:36 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/MiscHandler.cpp
r207 r209 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 147 147 wstrToLower(wguild_name); 148 148 149 // client send in case not set max level value 100 but Trinitysupport 255 max level,149 // client send in case not set max level value 100 but mangos support 255 max level, 150 150 // update it to show GMs with characters after 100 level 151 151 if(level_max >= 100) … … 470 470 std::string friendName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN); 471 471 std::string friendNote; 472 472 473 473 recv_data >> friendName; 474 474 … … 493 493 if(!result) 494 494 return; 495 495 496 496 uint64 friendGuid = MAKE_NEW_GUID((*result)[0].GetUInt32(), 0, HIGHGUID_PLAYER); 497 497 uint32 team = Player::TeamForRace((*result)[1].GetUInt8()); 498 498 499 499 delete result; 500 500 501 501 WorldSession * session = sWorld.FindSession(accountId); 502 502 if(!session) 503 503 return; 504 504 505 505 FriendsResult friendResult = FRIEND_NOT_FOUND; 506 506 if(friendGuid) … … 519 519 else 520 520 friendResult = FRIEND_ADDED_OFFLINE; 521 522 if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(friendGuid), false))523 {524 friendResult = FRIEND_LIST_FULL;525 sLog.outDebug( "WORLD: %s's friend list is full.", session->GetPlayer()->GetName());526 }521 522 if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(friendGuid), false)) 523 { 524 friendResult = FRIEND_LIST_FULL; 525 sLog.outDebug( "WORLD: %s's friend list is full.", session->GetPlayer()->GetName()); 526 } 527 527 528 528 session->GetPlayer()->GetSocial()->SetFriendNote(GUID_LOPART(friendGuid), friendNote); … … 577 577 if(!result) 578 578 return; 579 579 580 580 uint64 IgnoreGuid = MAKE_NEW_GUID((*result)[0].GetUInt32(), 0, HIGHGUID_PLAYER); 581 581 582 582 delete result; 583 583 584 584 WorldSession * session = sWorld.FindSession(accountId); 585 585 if(!session) 586 586 return; 587 587 588 588 FriendsResult ignoreResult = FRIEND_IGNORE_NOT_FOUND; 589 589 if(IgnoreGuid) … … 591 591 if(IgnoreGuid==session->GetPlayer()->GetGUID()) //not add yourself 592 592 ignoreResult = FRIEND_IGNORE_SELF; 593 594 593 else if( session->GetPlayer()->GetSocial()->HasIgnore(GUID_LOPART(IgnoreGuid)) ) 594 ignoreResult = FRIEND_IGNORE_ALREADY; 595 595 else 596 596 { 597 597 ignoreResult = FRIEND_IGNORE_ADDED; 598 598 599 // ignore list full600 if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(IgnoreGuid), true))601 ignoreResult = FRIEND_IGNORE_FULL;599 // ignore list full 600 if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(IgnoreGuid), true)) 601 ignoreResult = FRIEND_IGNORE_FULL; 602 602 } 603 603 } … … 794 794 (fabs(dz) > atEntry->box_z/2 + delta) ) 795 795 { 796 sLog.outDebug("Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: % u 1/2 box Z: %urotate dX: %f rotate dY: %f dZ:%f), ignore Area Trigger ID: %u",796 sLog.outDebug("Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotate dX: %f rotate dY: %f dZ:%f), ignore Area Trigger ID: %u", 797 797 pl->GetName(), pl->GetGUIDLow(), atEntry->box_x/2, atEntry->box_y/2, atEntry->box_z/2, rotateDx, rotateDy, dz, Trigger_ID); 798 798 return;