mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
[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! --HG-- branch : trunk
This commit is contained in:
@@ -51,10 +51,10 @@ m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex
|
||||
_logoutTime(0), m_playerLoading(false), m_playerLogout(false), m_playerRecentlyLogout(false), m_latency(0)
|
||||
{
|
||||
if (sock)
|
||||
{
|
||||
m_Address = sock->GetRemoteAddress ();
|
||||
sock->AddReference ();
|
||||
}
|
||||
{
|
||||
m_Address = sock->GetRemoteAddress ();
|
||||
sock->AddReference ();
|
||||
}
|
||||
}
|
||||
|
||||
/// WorldSession destructor
|
||||
@@ -99,7 +99,9 @@ void WorldSession::SendPacket(WorldPacket const* packet)
|
||||
{
|
||||
if (!m_Socket)
|
||||
return;
|
||||
|
||||
#ifdef TRINITY_DEBUG
|
||||
|
||||
// Code for network use statistic
|
||||
static uint64 sendPacketCount = 0;
|
||||
static uint64 sendPacketBytes = 0;
|
||||
@@ -131,12 +133,11 @@ void WorldSession::SendPacket(WorldPacket const* packet)
|
||||
sendLastPacketCount = 1;
|
||||
sendLastPacketBytes = packet->wpos(); // wpos is real written size
|
||||
}
|
||||
#endif // !TRINITY_DEBUG
|
||||
|
||||
if (m_Socket->SendPacket (*packet) == -1)
|
||||
{
|
||||
m_Socket->CloseSocket ();
|
||||
}
|
||||
#endif // !TRINITY_DEBUG
|
||||
|
||||
if (m_Socket->SendPacket (*packet) == -1)
|
||||
m_Socket->CloseSocket ();
|
||||
}
|
||||
|
||||
/// Add an incoming packet to the queue
|
||||
@@ -157,12 +158,11 @@ void WorldSession::logUnexpectedOpcode(WorldPacket* packet, const char *reason)
|
||||
/// Update the WorldSession (triggered by World update)
|
||||
bool WorldSession::Update(uint32 /*diff*/)
|
||||
{
|
||||
if (m_Socket)
|
||||
if (m_Socket->IsClosed ())
|
||||
{
|
||||
if (m_Socket && m_Socket->IsClosed ())
|
||||
{
|
||||
m_Socket->RemoveReference ();
|
||||
m_Socket = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket *packet;
|
||||
|
||||
@@ -395,7 +395,8 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||
|
||||
///- Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline
|
||||
//No SQL injection as AccountId is uint32
|
||||
CharacterDatabase.PExecute("UPDATE characters SET online = 0 WHERE account = '%u'", GetAccountId());
|
||||
CharacterDatabase.PExecute("UPDATE characters SET online = 0 WHERE account = '%u'",
|
||||
GetAccountId());
|
||||
sLog.outDebug( "SESSION: Sent SMSG_LOGOUT_COMPLETE Message" );
|
||||
}
|
||||
|
||||
@@ -407,10 +408,8 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||
/// Kick a player out of the World
|
||||
void WorldSession::KickPlayer()
|
||||
{
|
||||
if (m_Socket)
|
||||
{
|
||||
m_Socket->CloseSocket ();
|
||||
}
|
||||
if (m_Socket)
|
||||
m_Socket->CloseSocket ();
|
||||
}
|
||||
|
||||
/// Cancel channeling handler
|
||||
|
||||
Reference in New Issue
Block a user