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/Player.cpp

    r18 r28  
    266266        SetAcceptTicket(true); 
    267267 
    268     // players always and GM if set in config accept whispers by default 
    269     if(GetSession()->GetSecurity() == SEC_PLAYER || sWorld.getConfig(CONFIG_GM_WISPERING_TO)) 
     268    // players always accept  
     269    if(GetSession()->GetSecurity() == SEC_PLAYER) 
    270270        SetAcceptWhispers(true); 
    271271 
     
    14161416    // 0x2 - dnd 
    14171417    // 0x1 - afk 
    1418     if(isGameMaster()) 
     1418    if(isGMChat()) 
    14191419        return 4; 
    14201420    else if(isDND()) 
     
    15561556        } 
    15571557 
    1558         SetSemaphoreTeleport(false); 
    1559  
    15601558        if(!GetSession()->PlayerLogout()) 
     1559        { 
     1560            // don't reset teleport semaphore while logging out, otherwise m_teleport_dest won't be used in Player::SaveToDB 
     1561            SetSemaphoreTeleport(false); 
     1562 
    15611563            UpdateZone(GetZoneId()); 
     1564        } 
    15621565 
    15631566        // new zone 
     
    93239326        if( pProto ) 
    93249327        { 
     9328            // May be here should be more stronger checks; STUNNED checked 
     9329            // ROOT, CONFUSED, DISTRACTED, FLEEING this needs to be checked. 
     9330            if (not_loading && hasUnitState(UNIT_STAT_STUNNED)) 
     9331                return EQUIP_ERR_YOU_ARE_STUNNED; 
     9332 
    93259333            if(pItem->IsBindedNotWith(GetGUID())) 
    93269334                return EQUIP_ERR_DONT_OWN_THAT_ITEM; 
     
    93469354            if(isInCombat()&& pProto->Class == ITEM_CLASS_WEAPON && m_weaponChangeTimer != 0) 
    93479355                return EQUIP_ERR_CANT_DO_RIGHT_NOW;         // maybe exist better err 
     9356 
     9357            if(IsNonMeleeSpellCasted(false)) 
     9358                return EQUIP_ERR_CANT_DO_RIGHT_NOW; 
    93489359 
    93499360            uint8 eslot = FindEquipSlot( pProto, slot, swap ); 
     
    1379913810        switch(sWorld.getConfig(CONFIG_GM_LOGIN_STATE)) 
    1380013811        { 
    13801             case 0:                                         // disable 
    13802                 break; 
    13803             case 1:                                         // enable 
    13804                 SetGameMaster(true); 
    13805                 break; 
     13812            default: 
     13813            case 0:                      break;             // disable 
     13814            case 1: SetGameMaster(true); break;             // enable 
    1380613815            case 2:                                         // save state 
    13807                 if(gmstate) 
     13816                if(gmstate & PLAYER_EXTRA_GM_ON) 
    1380813817                    SetGameMaster(true); 
    1380913818                break; 
     13819        } 
     13820 
     13821        switch(sWorld.getConfig(CONFIG_GM_ACCEPT_TICKETS)) 
     13822        { 
    1381013823            default: 
     13824            case 0:                        break;           // disable 
     13825            case 1: SetAcceptTicket(true); break;           // enable 
     13826            case 2:                                         // save state 
     13827            if(gmstate & PLAYER_EXTRA_GM_ACCEPT_TICKETS) 
     13828                SetAcceptTicket(true); 
     13829            break; 
     13830        } 
     13831 
     13832        switch(sWorld.getConfig(CONFIG_GM_CHAT)) 
     13833        { 
     13834            default: 
     13835            case 0:                  break;                 // disable 
     13836            case 1: SetGMChat(true); break;                 // enable 
     13837            case 2:                                         // save state 
     13838                if(gmstate & PLAYER_EXTRA_GM_CHAT) 
     13839                    SetGMChat(true); 
     13840                break; 
     13841        } 
     13842 
     13843        switch(sWorld.getConfig(CONFIG_GM_WISPERING_TO)) 
     13844        { 
     13845            default: 
     13846            case 0:                          break;         // disable 
     13847            case 1: SetAcceptWhispers(true); break;         // enable 
     13848            case 2:                                         // save state 
     13849                if(gmstate & PLAYER_EXTRA_ACCEPT_WHISPERS) 
     13850                    SetAcceptWhispers(true); 
    1381113851                break; 
    1381213852        } 
     
    1487814918 
    1487914919    ss << ", "; 
    14880     ss << (isGameMaster()? 1 : 0); 
     14920    ss << m_ExtraFlags; 
    1488114921 
    1488214922    ss << ", "; 
     
    1638816428    } 
    1638916429 
    16390     VendorItem const* crItem = vItems->FindItem(item); 
    16391     if(!crItem) 
     16430    size_t vendor_slot = vItems->FindItemSlot(item); 
     16431    if(vendor_slot >= vItems->GetItemCount()) 
    1639216432    { 
    1639316433        SendBuyError( BUY_ERR_CANT_FIND_ITEM, pCreature, item, 0); 
    1639416434        return false; 
    1639516435    } 
     16436 
     16437    VendorItem const* crItem = vItems->m_items[vendor_slot]; 
    1639616438 
    1639716439    // check current item amount if it limited 
     
    1652116563            WorldPacket data(SMSG_BUY_ITEM, (8+4+4+4)); 
    1652216564            data << pCreature->GetGUID(); 
    16523             data << (uint32)crItem->item; 
     16565            data << (uint32)(vendor_slot+1);                // numbered from 1 at client 
    1652416566            data << (uint32)(crItem->maxcount > 0 ? new_count : 0xFFFFFFFF); 
    1652516567            data << (uint32)count; 
     
    1656016602            WorldPacket data(SMSG_BUY_ITEM, (8+4+4+4)); 
    1656116603            data << pCreature->GetGUID(); 
    16562             data << (uint32)crItem->item; 
     16604            data << (uint32)(vendor_slot+1);                // numbered from 1 at client 
    1656316605            data << (uint32)(crItem->maxcount > 0 ? new_count : 0xFFFFFFFF); 
    1656416606            data << (uint32)count;