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

[svn] *Implement new player conditions CONDITION_NO_AURA, CONDITION_ACTIVE_EVENT
* Default behaviour of pets for creatures changed to REACT_DEFENSIVE
* Disallowed sending wrapped items as COD
* Prevent loading and saving single target auras for pet in same way as already implemented for player
* Correctly limit use some flask types to zones.
* Fixed extracting common.MPQ under *nix
* Many small xleanups and fixes.
** mangos merge rev.

TEST REV so be careful of creepy crawly bugs!

Original author: KingPin?
Date: 2008-11-02 16:53:46-06:00

Files:
1 modified

Legend:

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

    r128 r149  
    5252{ 
    5353   if (sock) 
    54      { 
    55        m_Address = sock->GetRemoteAddress (); 
    56        sock->AddReference (); 
    57      } 
     54   { 
     55           m_Address = sock->GetRemoteAddress (); 
     56           sock->AddReference (); 
     57   } 
    5858} 
    5959 
     
    100100    if (!m_Socket) 
    101101        return; 
     102 
    102103    #ifdef TRINITY_DEBUG 
     104 
    103105    // Code for network use statistic 
    104106    static uint64 sendPacketCount = 0; 
     
    132134        sendLastPacketBytes = packet->wpos();               // wpos is real written size 
    133135    } 
    134 #endif                                                  // !TRINITY_DEBUG 
    135  
    136   if (m_Socket->SendPacket (*packet) == -1) 
    137     { 
    138       m_Socket->CloseSocket (); 
    139     } 
     136 
     137        #endif                                                  // !TRINITY_DEBUG 
     138 
     139        if (m_Socket->SendPacket (*packet) == -1) 
     140                m_Socket->CloseSocket (); 
    140141} 
    141142 
     
    158159bool WorldSession::Update(uint32 /*diff*/) 
    159160{ 
    160   if (m_Socket) 
    161     if (m_Socket->IsClosed ()) 
    162       {  
     161  if (m_Socket && m_Socket->IsClosed ()) 
     162  { 
    163163        m_Socket->RemoveReference (); 
    164164        m_Socket = NULL; 
    165       } 
     165  } 
    166166   
    167167    WorldPacket *packet; 
     
    396396        ///- Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline 
    397397        //No SQL injection as AccountId is uint32 
    398         CharacterDatabase.PExecute("UPDATE characters SET online = 0 WHERE account = '%u'", GetAccountId()); 
     398        CharacterDatabase.PExecute("UPDATE characters SET online = 0 WHERE account = '%u'", 
     399                        GetAccountId()); 
    399400        sLog.outDebug( "SESSION: Sent SMSG_LOGOUT_COMPLETE Message" ); 
    400401    } 
     
    408409void WorldSession::KickPlayer() 
    409410{ 
    410   if (m_Socket) 
    411     { 
    412       m_Socket->CloseSocket (); 
    413     } 
     411        if (m_Socket) 
     412                m_Socket->CloseSocket (); 
    414413} 
    415414