Changeset 232

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

[svn] *** Source: MaNGOS ***
* Fixed english spelling in src/game/WorldSocket.h/cpp. Author: Derex
* [240_world.sql] Create new command .senditems and remove from moderator level command .sendmail possibility send items. Author: Vladimir
* Added new command: .sendmoney player "subject" "message" money - Sends a mail with money to a player. Author: fredi
* Correctly apply taken damage debufs/bonuses in cases non-physical melee damage. Author: Frankir
* Fix a crash in add friend/ignore callback. (check if player still logged in). Author: Hunuza
* Better args checking in .sendmoney command. Author: Vladimir

Original author: visagalis
Date: 2008-11-14 17:50:48-06:00

Location:
trunk
Files:
1 added
8 modified

Legend:

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

    r229 r232  
    545545        { "lockaccount",    SEC_PLAYER,         false, &ChatHandler::HandleLockAccountCommand,         "", NULL }, 
    546546        { "respawn",        SEC_ADMINISTRATOR,  false, &ChatHandler::HandleRespawnCommand,             "", NULL }, 
    547         { "sendmail",       SEC_MODERATOR,      false, &ChatHandler::HandleSendMailCommand,            "", NULL }, 
     547        { "senditems",      SEC_ADMINISTRATOR,  true,  &ChatHandler::HandleSendItemsCommand,           "", NULL }, 
     548        { "sendmail",       SEC_MODERATOR,      true,  &ChatHandler::HandleSendMailCommand,            "", NULL }, 
     549        { "sendmoney",      SEC_ADMINISTRATOR,  true,  &ChatHandler::HandleSendMoneyCommand,           "", NULL }, 
    548550        { "rename",         SEC_GAMEMASTER,     true,  &ChatHandler::HandleRenameCommand,              "", NULL }, 
    549551        { "loadscripts",    SEC_ADMINISTRATOR,  true,  &ChatHandler::HandleLoadScriptsCommand,         "", NULL }, 
  • trunk/src/game/Chat.h

    r209 r232  
    118118        bool HandleTaxiCheatCommand(const char* args); 
    119119        bool HandleWhispersCommand(const char* args); 
    120         bool HandleSendMailCommand(const char* args); 
    121120        bool HandleNameTeleCommand(const char* args); 
    122121        bool HandleGroupTeleCommand(const char* args); 
    123122        bool HandleDrunkCommand(const char* args); 
     123        bool HandleSendItemsCommand(const char* args); 
     124        bool HandleSendMailCommand(const char* args); 
     125        bool HandleSendMoneyCommand(const char* args); 
    124126 
    125127        bool HandleEventActiveListCommand(const char* args); 
  • trunk/src/game/Level1.cpp

    r177 r232  
    18641864        return false; 
    18651865 
    1866     // format: name "subject text" "mail text" item1[:count1] item2[:count2] ... item12[:count12] 
     1866    // format: name "subject text" "mail text" 
    18671867 
    18681868    char* pName = strtok((char*)args, " "); 
     
    19111911    std::string text    = msgText; 
    19121912 
    1913     // extract items 
    1914     typedef std::pair<uint32,uint32> ItemPair; 
    1915     typedef std::list< ItemPair > ItemPairs; 
    1916     ItemPairs items; 
    1917  
    1918     // get all tail string 
    1919     char* tail = strtok(NULL, ""); 
    1920  
    1921     // get from tail next item str 
    1922     while(char* itemStr = strtok(tail, " ")) 
    1923     { 
    1924         // and get new tail  
    1925         tail = strtok(NULL, ""); 
    1926  
    1927         // parse item str 
    1928         char* itemIdStr = strtok(itemStr, ":"); 
    1929         char* itemCountStr = strtok(NULL, " "); 
    1930          
    1931         uint32 item_id = atoi(itemIdStr); 
    1932         if(!item_id) 
    1933             return false; 
    1934  
    1935         ItemPrototype const* item_proto = objmgr.GetItemPrototype(item_id); 
    1936         if(!item_proto) 
    1937         { 
    1938             PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, item_id); 
    1939             SetSentErrorMessage(true); 
    1940             return false; 
    1941         } 
    1942  
    1943         uint32 item_count = itemCountStr ? atoi(itemCountStr) : 1; 
    1944         if(item_count < 1 || item_proto->MaxCount && item_count > item_proto->MaxCount) 
    1945         { 
    1946             PSendSysMessage(LANG_COMMAND_INVALID_ITEM_COUNT, item_count,item_id); 
    1947             SetSentErrorMessage(true); 
    1948             return false; 
    1949         } 
    1950  
    1951         while(item_count > item_proto->Stackable) 
    1952         { 
    1953             items.push_back(ItemPair(item_id,item_proto->Stackable)); 
    1954             item_count -= item_proto->Stackable; 
    1955         } 
    1956  
    1957         items.push_back(ItemPair(item_id,item_count)); 
    1958  
    1959         if(items.size() > MAX_MAIL_ITEMS) 
    1960         { 
    1961             PSendSysMessage(LANG_COMMAND_MAIL_ITEMS_LIMIT, MAX_MAIL_ITEMS); 
    1962             SetSentErrorMessage(true); 
    1963             return false; 
    1964         } 
    1965     } 
    1966  
    19671913    if(!normalizePlayerName(name)) 
    19681914    { 
     
    19811927 
    19821928    uint32 mailId = objmgr.GenerateMailID(); 
    1983     uint32 sender_guidlo = m_session->GetPlayer()->GetGUIDLow(); 
     1929    // from console show not existed sender 
     1930    uint32 sender_guidlo = m_session ? m_session->GetPlayer()->GetGUIDLow() : 0; 
     1931 
    19841932    uint32 messagetype = MAIL_NORMAL; 
    19851933    uint32 stationery = MAIL_STATIONERY_GM; 
    1986     uint32 itemTextId = 0; 
    1987     if (!text.empty()) 
    1988     { 
    1989         itemTextId = objmgr.CreateItemText( text ); 
    1990     } 
     1934    uint32 itemTextId = !text.empty() ? objmgr.CreateItemText( text ) : 0; 
    19911935 
    19921936    Player *receiver = objmgr.GetPlayer(receiver_guid); 
    19931937 
    1994     // fill mail 
    1995     MailItemsInfo mi;                                       // item list preparing 
    1996  
    1997     for(ItemPairs::const_iterator itr = items.begin(); itr != items.end(); ++itr) 
    1998     { 
    1999         if(Item* item = Item::CreateItem(itr->first,itr->second,m_session->GetPlayer())) 
    2000         { 
    2001             item->SaveToDB();                               // save for prevent lost at next mail load, if send fail then item will deleted 
    2002             mi.AddItem(item->GetGUIDLow(), item->GetEntry(), item); 
    2003         } 
    2004     } 
    2005  
    2006     WorldSession::SendMailTo(receiver,messagetype, stationery, sender_guidlo, GUID_LOPART(receiver_guid), subject, itemTextId, &mi, 0, 0, MAIL_CHECK_MASK_NONE); 
     1938    WorldSession::SendMailTo(receiver,messagetype, stationery, sender_guidlo, GUID_LOPART(receiver_guid), subject, itemTextId, NULL, 0, 0, MAIL_CHECK_MASK_NONE); 
    20071939 
    20081940    PSendSysMessage(LANG_MAIL_SENT, name.c_str()); 
  • trunk/src/game/Level3.cpp

    r230 r232  
    62026202} 
    62036203 
     6204//Send items by mail 
     6205bool ChatHandler::HandleSendItemsCommand(const char* args) 
     6206{ 
     6207    if(!*args) 
     6208        return false; 
     6209 
     6210    // format: name "subject text" "mail text" item1[:count1] item2[:count2] ... item12[:count12] 
     6211 
     6212    char* pName = strtok((char*)args, " "); 
     6213    if(!pName) 
     6214        return false; 
     6215 
     6216    char* tail1 = strtok(NULL, ""); 
     6217    if(!tail1) 
     6218        return false; 
     6219 
     6220    char* msgSubject; 
     6221    if(*tail1=='"') 
     6222        msgSubject = strtok(tail1+1, "\""); 
     6223    else 
     6224    { 
     6225        char* space = strtok(tail1, "\""); 
     6226        if(!space) 
     6227            return false; 
     6228        msgSubject = strtok(NULL, "\""); 
     6229    } 
     6230 
     6231    if (!msgSubject) 
     6232        return false; 
     6233 
     6234    char* tail2 = strtok(NULL, ""); 
     6235    if(!tail2) 
     6236        return false; 
     6237 
     6238    char* msgText; 
     6239    if(*tail2=='"') 
     6240        msgText = strtok(tail2+1, "\""); 
     6241    else 
     6242    { 
     6243        char* space = strtok(tail2, "\""); 
     6244        if(!space) 
     6245            return false; 
     6246        msgText = strtok(NULL, "\""); 
     6247    } 
     6248 
     6249    if (!msgText) 
     6250        return false; 
     6251 
     6252    // pName, msgSubject, msgText isn't NUL after prev. check 
     6253    std::string name    = pName; 
     6254    std::string subject = msgSubject; 
     6255    std::string text    = msgText; 
     6256 
     6257    // extract items 
     6258    typedef std::pair<uint32,uint32> ItemPair; 
     6259    typedef std::list< ItemPair > ItemPairs; 
     6260    ItemPairs items; 
     6261 
     6262    // get all tail string 
     6263    char* tail = strtok(NULL, ""); 
     6264 
     6265    // get from tail next item str 
     6266    while(char* itemStr = strtok(tail, " ")) 
     6267    { 
     6268        // and get new tail 
     6269        tail = strtok(NULL, ""); 
     6270 
     6271        // parse item str 
     6272        char* itemIdStr = strtok(itemStr, ":"); 
     6273        char* itemCountStr = strtok(NULL, " "); 
     6274 
     6275        uint32 item_id = atoi(itemIdStr); 
     6276        if(!item_id) 
     6277            return false; 
     6278 
     6279        ItemPrototype const* item_proto = objmgr.GetItemPrototype(item_id); 
     6280        if(!item_proto) 
     6281        { 
     6282            PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, item_id); 
     6283            SetSentErrorMessage(true); 
     6284            return false; 
     6285        } 
     6286 
     6287        uint32 item_count = itemCountStr ? atoi(itemCountStr) : 1; 
     6288        if(item_count < 1 || item_proto->MaxCount && item_count > item_proto->MaxCount) 
     6289        { 
     6290            PSendSysMessage(LANG_COMMAND_INVALID_ITEM_COUNT, item_count,item_id); 
     6291            SetSentErrorMessage(true); 
     6292            return false; 
     6293        } 
     6294 
     6295        while(item_count > item_proto->Stackable) 
     6296        { 
     6297            items.push_back(ItemPair(item_id,item_proto->Stackable)); 
     6298            item_count -= item_proto->Stackable; 
     6299        } 
     6300 
     6301        items.push_back(ItemPair(item_id,item_count)); 
     6302 
     6303        if(items.size() > MAX_MAIL_ITEMS) 
     6304        { 
     6305            PSendSysMessage(LANG_COMMAND_MAIL_ITEMS_LIMIT, MAX_MAIL_ITEMS); 
     6306            SetSentErrorMessage(true); 
     6307            return false; 
     6308        } 
     6309    } 
     6310 
     6311    if(!normalizePlayerName(name)) 
     6312    { 
     6313        SendSysMessage(LANG_PLAYER_NOT_FOUND); 
     6314        SetSentErrorMessage(true); 
     6315        return false; 
     6316    } 
     6317 
     6318    uint64 receiver_guid = objmgr.GetPlayerGUIDByName(name); 
     6319    if(!receiver_guid) 
     6320    { 
     6321        SendSysMessage(LANG_PLAYER_NOT_FOUND); 
     6322        SetSentErrorMessage(true); 
     6323        return false; 
     6324    } 
     6325 
     6326    // from console show not existed sender 
     6327    uint32 sender_guidlo = m_session ? m_session->GetPlayer()->GetGUIDLow() : 0; 
     6328 
     6329    uint32 messagetype = MAIL_NORMAL; 
     6330    uint32 stationery = MAIL_STATIONERY_GM; 
     6331    uint32 itemTextId = !text.empty() ? objmgr.CreateItemText( text ) : 0; 
     6332 
     6333    Player *receiver = objmgr.GetPlayer(receiver_guid); 
     6334 
     6335    // fill mail 
     6336    MailItemsInfo mi;                                       // item list preparing 
     6337 
     6338    for(ItemPairs::const_iterator itr = items.begin(); itr != items.end(); ++itr) 
     6339    { 
     6340        if(Item* item = Item::CreateItem(itr->first,itr->second,m_session ? m_session->GetPlayer() : 0)) 
     6341        { 
     6342            item->SaveToDB();                               // save for prevent lost at next mail load, if send fail then item will deleted 
     6343            mi.AddItem(item->GetGUIDLow(), item->GetEntry(), item); 
     6344        } 
     6345    } 
     6346 
     6347    WorldSession::SendMailTo(receiver,messagetype, stationery, sender_guidlo, GUID_LOPART(receiver_guid), subject, itemTextId, &mi, 0, 0, MAIL_CHECK_MASK_NONE); 
     6348 
     6349    PSendSysMessage(LANG_MAIL_SENT, name.c_str()); 
     6350    return true; 
     6351} 
     6352 
     6353///Send money by mail 
     6354bool ChatHandler::HandleSendMoneyCommand(const char* args) 
     6355{ 
     6356    if (!*args) 
     6357        return false; 
     6358 
     6359    /// format: name "subject text" "mail text" money 
     6360 
     6361    char* pName = strtok((char*)args, " "); 
     6362    if (!pName) 
     6363        return false; 
     6364 
     6365    char* tail1 = strtok(NULL, ""); 
     6366    if (!tail1) 
     6367        return false; 
     6368 
     6369    char* msgSubject; 
     6370    if (*tail1=='"') 
     6371        msgSubject = strtok(tail1+1, "\""); 
     6372    else 
     6373    { 
     6374        char* space = strtok(tail1, "\""); 
     6375        if (!space) 
     6376            return false; 
     6377        msgSubject = strtok(NULL, "\""); 
     6378    } 
     6379 
     6380    if (!msgSubject) 
     6381        return false; 
     6382 
     6383    char* tail2 = strtok(NULL, ""); 
     6384    if (!tail2) 
     6385        return false; 
     6386 
     6387    char* msgText; 
     6388    if (*tail2=='"') 
     6389        msgText = strtok(tail2+1, "\""); 
     6390    else 
     6391    { 
     6392        char* space = strtok(tail2, "\""); 
     6393        if (!space) 
     6394            return false; 
     6395        msgText = strtok(NULL, "\""); 
     6396    } 
     6397 
     6398    if (!msgText) 
     6399        return false; 
     6400 
     6401    char* money_str = strtok(NULL, ""); 
     6402    int32 money = money_str ? atoi(money_str) : 0; 
     6403    if (money <= 0) 
     6404        return false; 
     6405 
     6406    // pName, msgSubject, msgText isn't NUL after prev. check 
     6407    std::string name    = pName; 
     6408    std::string subject = msgSubject; 
     6409    std::string text    = msgText; 
     6410 
     6411    if (!normalizePlayerName(name)) 
     6412    { 
     6413        SendSysMessage(LANG_PLAYER_NOT_FOUND); 
     6414        SetSentErrorMessage(true); 
     6415        return false; 
     6416    } 
     6417 
     6418    uint64 receiver_guid = objmgr.GetPlayerGUIDByName(name); 
     6419    if (!receiver_guid) 
     6420    { 
     6421        SendSysMessage(LANG_PLAYER_NOT_FOUND); 
     6422        SetSentErrorMessage(true); 
     6423        return false; 
     6424    } 
     6425 
     6426    uint32 mailId = objmgr.GenerateMailID(); 
     6427 
     6428    // from console show not existed sender 
     6429    uint32 sender_guidlo = m_session ? m_session->GetPlayer()->GetGUIDLow() : 0; 
     6430 
     6431    uint32 messagetype = MAIL_NORMAL; 
     6432    uint32 stationery = MAIL_STATIONERY_GM; 
     6433    uint32 itemTextId = !text.empty() ? objmgr.CreateItemText( text ) : 0; 
     6434 
     6435    Player *receiver = objmgr.GetPlayer(receiver_guid); 
     6436 
     6437    WorldSession::SendMailTo(receiver,messagetype, stationery, sender_guidlo, GUID_LOPART(receiver_guid), subject, itemTextId, NULL, money, 0, MAIL_CHECK_MASK_NONE); 
     6438 
     6439    PSendSysMessage(LANG_MAIL_SENT, name.c_str()); 
     6440    return true; 
     6441} 
     6442 
    62046443/// Send a message to a player in game 
    62056444bool ChatHandler::HandleSendMessageCommand(const char* args) 
  • trunk/src/game/MiscHandler.cpp

    r230 r232  
    500500 
    501501    WorldSession * session = sWorld.FindSession(accountId); 
    502     if(!session) 
     502    if(!session || !session->GetPlayer()) 
    503503        return; 
    504504 
     
    583583 
    584584    WorldSession * session = sWorld.FindSession(accountId); 
    585     if(!session) 
     585    if(!session || !session->GetPlayer()) 
    586586        return; 
    587587 
  • trunk/src/game/Unit.cpp

    r231 r232  
    73337333    AuraList const& mModDamagePercentTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN); 
    73347334    for(AuraList::const_iterator i = mModDamagePercentTaken.begin(); i != mModDamagePercentTaken.end(); ++i) 
    7335         if( (*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellProto) ) 
     7335        if((*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellProto)) 
    73367336            TakenTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f; 
    73377337 
     
    82338233    AuraList const& mDamageTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_TAKEN); 
    82348234    for(AuraList::const_iterator i = mDamageTaken.begin();i != mDamageTaken.end(); ++i) 
    8235         if((*i)->GetModifier()->m_miscvalue & SPELL_SCHOOL_MASK_NORMAL) 
     8235        if((*i)->GetModifier()->m_miscvalue & GetMeleeDamageSchoolMask()) 
    82368236            TakenFlatBenefit += (*i)->GetModifier()->m_amount; 
    82378237 
     
    82578257    AuraList const& mModDamagePercentTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN); 
    82588258    for(AuraList::const_iterator i = mModDamagePercentTaken.begin(); i != mModDamagePercentTaken.end(); ++i) 
    8259         if((*i)->GetModifier()->m_miscvalue & SPELL_SCHOOL_MASK_NORMAL) 
     8259        if((*i)->GetModifier()->m_miscvalue & GetMeleeDamageSchoolMask()) 
    82608260            TakenTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f; 
    82618261 
  • trunk/src/game/WorldSocket.cpp

    r229 r232  
    463463        if (m_Header.space () > 0) 
    464464        { 
    465             //need to recieve the header 
     465            //need to receive the header 
    466466            const size_t to_header = (message_block.length () > m_Header.space () ? m_Header.space () : message_block.length ()); 
    467467            m_Header.copy (message_block.rd_ptr (), to_header); 
     
    470470            if (m_Header.space () > 0) 
    471471            { 
    472                 //couldn't recieve the whole header this time 
     472                // Couldn't receive the whole header this time 
    473473                ACE_ASSERT (message_block.length () == 0); 
    474474                errno = EWOULDBLOCK; 
     
    476476            } 
    477477 
    478           //we just recieved nice new header 
     478          // We just received nice new header 
    479479            if (handle_input_header () == -1) 
    480480            { 
     
    485485 
    486486        // Its possible on some error situations that this happens 
    487         // for example on closing when epoll recieves more chunked data and stuff 
     487        // for example on closing when epoll receives more chunked data and stuff 
    488488        // hope this is not hack ,as proper m_RecvWPct is asserted around 
    489489        if (!m_RecvWPct) 
    490490        { 
    491             sLog.outError ("Forsing close on input m_RecvWPct = NULL"); 
     491            sLog.outError ("Forcing close on input m_RecvWPct = NULL"); 
    492492            errno = EINVAL; 
    493493            return -1; 
    494494        } 
    495495 
    496         // We have full readed header, now check the data payload 
     496        // We have full read header, now check the data payload 
    497497        if (m_RecvPct.space () > 0) 
    498498        { 
     
    504504            if (m_RecvPct.space () > 0) 
    505505            { 
    506                 //couldn't recieve the whole data this time 
     506                //couldn't receive the whole data this time 
    507507                ACE_ASSERT (message_block.length () == 0); 
    508508                errno = EWOULDBLOCK; 
     
    511511        } 
    512512 
    513         //just recieved fresh new payload 
     513        //just received fresh new payload 
    514514        if (handle_input_payload () == -1) 
    515515        { 
     
    573573        return -1; 
    574574 
    575     // dump recieved packet 
     575    // Dump received packet 
    576576    if (sWorldLog.LogWorld ()) 
    577577    { 
     
    638638int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) 
    639639{ 
    640     // NOTE: ATM the socket is singlethreaded, have this in mind ... 
     640    // NOTE: ATM the socket is singlethread, have this in mind ... 
    641641    uint8 digest[20]; 
    642642    uint32 clientSeed; 
     
    930930                { 
    931931                    sLog.outError  ("WorldSocket::HandlePing: Player kicked for " 
    932                                     "overspeeded pings adress = %s", 
     932                                    "over-speed pings address = %s", 
    933933                                    GetRemoteAddress ().c_str ()); 
    934934 
     
    951951            sLog.outError ("WorldSocket::HandlePing: peer sent CMSG_PING, " 
    952952                            "but is not authenticated or got recently kicked," 
    953                             " adress = %s", 
     953                            " address = %s", 
    954954                            GetRemoteAddress ().c_str ()); 
    955955             return -1; 
  • trunk/src/game/WorldSocket.h

    r181 r232  
    5656 * WorldSocket. 
    5757 * 
    58  * This class is responsible for the comunication with 
     58 * This class is responsible for the communication with 
    5959 * remote clients. 
    6060 * Most methods return -1 on failure. 
    61  * The class uses refferece counting. 
     61 * The class uses reference counting. 
    6262 * 
    6363 * For output the class uses one buffer (64K usually) and 
    6464 * a queue where it stores packet if there is no place on 
    6565 * the queue. The reason this is done, is because the server 
    66  * does realy a lot of small-size writes to it, and it doesn't 
     66 * does really a lot of small-size writes to it, and it doesn't 
    6767 * scale well to allocate memory for every. When something is 
    68  * writen to the output buffer the socket is not immideately 
     68 * written to the output buffer the socket is not immediately 
    6969 * activated for output (again for the same reason), there 
    7070 * is 10ms celling (thats why there is Update() method). 
    71  * This concept is simmilar to TCP_CORK, but TCP_CORK 
    72  * usses 200ms celling. As result overhead generated by 
     71 * This concept is similar to TCP_CORK, but TCP_CORK 
     72 * uses 200ms celling. As result overhead generated by 
    7373 * sending packets from "producer" threads is minimal, 
    74  * and doing a lot of writes with small size is tollerated. 
    75  * 
    76  * The calls to Upate () method are managed by WorldSocketMgr 
     74 * and doing a lot of writes with small size is tolerated. 
     75 * 
     76 * The calls to Update () method are managed by WorldSocketMgr 
    7777 * and ReactorRunnable. 
    7878 * 
    7979 * For input ,the class uses one 1024 bytes buffer on stack 
    80  * to which it does recv() calls. And then recieved data is 
    81  * distributed where its needed. 1024 matches pritey well the 
     80 * to which it does recv() calls. And then received data is 
     81 * distributed where its needed. 1024 matches pretty well the 
    8282 * traffic generated by client for now. 
    8383 * 
    8484 * The input/output do speculative reads/writes (AKA it tryes 
    85  * to read all data avaible in the kernel buffer or tryes to 
    86  * write everything avaible in userspace buffer), 
    87  * which is ok for using with Level and Edge Trigered IO 
     85 * to read all data available in the kernel buffer or tryes to 
     86 * write everything available in userspace buffer), 
     87 * which is ok for using with Level and Edge Triggered IO 
    8888 * notification. 
    8989 * 
     
    100100        typedef ACE_Acceptor< WorldSocket, ACE_SOCK_ACCEPTOR > Acceptor; 
    101101 
    102         /// Mutex type used for various syncronizations. 
     102        /// Mutex type used for various synchronizations. 
    103103        typedef ACE_Thread_Mutex LockType; 
    104104        typedef ACE_Guard<LockType> GuardType; 
     
    121121        int SendPacket (const WorldPacket& pct); 
    122122 
    123         /// Add refference to this object. 
     123        /// Add reference to this object. 
    124124        long AddReference (void); 
    125125 
    126         /// Remove refference to this object. 
     126        /// Remove reference to this object. 
    127127        long RemoveReference (void); 
    128128 
     
    186186        ACE_Time_Value m_LastPingTime; 
    187187 
    188         /// Keep track of overspeed pings ,to prevent ping flood. 
     188        /// Keep track of over-speed pings ,to prevent ping flood. 
    189189        uint32 m_OverSpeedPings; 
    190190 
     
    198198        LockType m_SessionLock; 
    199199 
    200         /// Session to which recieved packets are routed 
     200        /// Session to which received packets are routed 
    201201        WorldSession* m_Session; 
    202202 
    203         /// here are stored the fragmens of the recieved data 
     203        /// here are stored the fragments of the received data 
    204204        WorldPacket* m_RecvWPct; 
    205205 
    206206        /// This block actually refers to m_RecvWPct contents, 
    207         /// which alows easy and safe writing to it. 
     207        /// which allows easy and safe writing to it. 
    208208        /// It wont free memory when its deleted. m_RecvWPct takes care of freeing. 
    209209        ACE_Message_Block m_RecvPct; 
    210210 
    211         /// Fragment of the recieved header. 
     211        /// Fragment of the received header. 
    212212        ACE_Message_Block m_Header; 
    213213 
    214         /// Mutex for protecting otuput related data. 
     214        /// Mutex for protecting output related data. 
    215215        LockType m_OutBufferLock; 
    216216 
     
    222222 
    223223        /// Here are stored packets for which there was no space on m_OutBuffer, 
    224         /// this alows not-to kick player if its buffer is overflowed. 
     224        /// this allows not-to kick player if its buffer is overflowed. 
    225225        PacketQueueT m_PacketQueue; 
    226226