Show
Ignore:
Timestamp:
11/19/08 13:24:39 (17 years ago)
Author:
yumileroy
Message:

[svn] * Updated to 6743 and 685

Moved language id used by Arena to a higher place to solve conflicts
Added the empty script folders

Original author: Neo2003
Date: 2008-10-09 08:42:22-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/MiscHandler.cpp

    r9 r28  
    14271427        GetPlayer()->TeleportTo(mapid,PositionX,PositionY,PositionZ,Orientation); 
    14281428    else 
    1429         SendNotification("You do not have permission to perform that function"); 
     1429        SendNotification(LANG_YOU_NOT_HAVE_PERMISSION); 
    14301430    sLog.outDebug("Received worldport command from player %s", GetPlayer()->GetName()); 
    14311431} 
     
    14361436 
    14371437    sLog.outDebug("Received opcode CMSG_WHOIS"); 
    1438     std::string charname, acc, email, lastip, msg; 
     1438    std::string charname; 
    14391439    recv_data >> charname; 
    14401440 
    14411441    if (GetSecurity() < SEC_ADMINISTRATOR) 
    14421442    { 
    1443         SendNotification("You do not have permission to perform that function"); 
     1443        SendNotification(LANG_YOU_NOT_HAVE_PERMISSION); 
    14441444        return; 
    14451445    } 
     
    14471447    if(charname.empty()) 
    14481448    { 
    1449         SendNotification("Please provide character name"); 
    1450         return; 
    1451     } 
    1452  
    1453     uint32 accid; 
    1454     Field *fields; 
     1449        SendNotification(LANG_NEED_CHARACTER_NAME); 
     1450        return; 
     1451    } 
    14551452 
    14561453    Player *plr = objmgr.GetPlayer(charname.c_str()); 
    14571454 
    1458     if(plr) 
    1459         accid = plr->GetSession()->GetAccountId(); 
    1460     else 
    1461     { 
    1462         SendNotification("Player %s not found or offline", charname.c_str()); 
    1463         return; 
    1464     } 
    1465  
    1466     if(!accid) 
    1467     { 
    1468         SendNotification("Account for character %s not found", charname.c_str()); 
    1469         return; 
    1470     } 
     1455    if(!plr) 
     1456    { 
     1457        SendNotification(LANG_PLAYER_NOT_EXIST_OR_OFFLINE, charname.c_str()); 
     1458        return; 
     1459    } 
     1460 
     1461    uint32 accid = plr->GetSession()->GetAccountId(); 
    14711462 
    14721463    QueryResult *result = loginDatabase.PQuery("SELECT username,email,last_ip FROM account WHERE id=%u", accid); 
    1473     if(result) 
    1474     { 
    1475         fields = result->Fetch(); 
    1476         acc = fields[0].GetCppString(); 
    1477         if(acc.empty()) 
    1478             acc = "Unknown"; 
    1479         email = fields[1].GetCppString(); 
    1480         if(email.empty()) 
    1481             email = "Unknown"; 
    1482         lastip = fields[2].GetCppString(); 
    1483         if(lastip.empty()) 
    1484             lastip = "Unknown"; 
    1485         msg = charname + "'s " + "account is " + acc + ", e-mail: " + email + ", last ip: " + lastip; 
    1486  
    1487         WorldPacket data(SMSG_WHOIS, msg.size()+1); 
    1488         data << msg; 
    1489         _player->GetSession()->SendPacket(&data); 
    1490     } 
    1491     else 
    1492         SendNotification("Account for character %s not found", charname.c_str()); 
     1464    if(!result) 
     1465    { 
     1466        SendNotification(LANG_ACCOUNT_FOR_PLAYER_NOT_FOUND, charname.c_str()); 
     1467        return; 
     1468    } 
     1469 
     1470    Field *fields = result->Fetch(); 
     1471    std::string acc = fields[0].GetCppString(); 
     1472    if(acc.empty()) 
     1473        acc = "Unknown"; 
     1474    std::string email = fields[1].GetCppString(); 
     1475    if(email.empty()) 
     1476        email = "Unknown"; 
     1477    std::string lastip = fields[2].GetCppString(); 
     1478    if(lastip.empty()) 
     1479        lastip = "Unknown"; 
     1480 
     1481    std::string msg = charname + "'s " + "account is " + acc + ", e-mail: " + email + ", last ip: " + lastip; 
     1482 
     1483    WorldPacket data(SMSG_WHOIS, msg.size()+1); 
     1484    data << msg; 
     1485    _player->GetSession()->SendPacket(&data); 
    14931486 
    14941487    delete result; 
     1488 
    14951489    sLog.outDebug("Received whois command from player %s for character %s", GetPlayer()->GetName(), charname.c_str()); 
    14961490}