Merge commit '32d9a71a4219ea353950979a2491e7879b7fa79a' into 4.3.4

Conflicts:
	README.md
	sql/base/auth_database.sql
	sql/updates/world/2014_12_27_01_world_335.sql
	src/server/game/Conditions/ConditionMgr.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Server/WorldSession.cpp
	src/server/scripts/Commands/cs_misc.cpp
	src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
	src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
	src/server/scripts/Spells/spell_hunter.cpp
This commit is contained in:
Carbenium committed 2015-07-21 20:05:44 +02:00
commit 79eb80dcba
71 files changed
+1652 -1862

No files matched your search

+3
View File
@@ -79,6 +79,9 @@
inline float finiteAlways(float f) { return std::isfinite(f) ? f : 0.0f; }
inline unsigned long atoul(char const* str) { return strtoul(str, nullptr, 10); }
inline unsigned long long atoull(char const* str) { return strtoull(str, nullptr, 10); }
#define STRINGIZE(a) #a
enum TimeConstants
@@ -81,6 +81,14 @@ public:
}
}
// Ensures there's "some" free space, make sure to call Normalize() before this
void EnsureFreeSpace()
{
// Double the size of the buffer if it's already full
if (GetRemainingSpace() == 0)
_storage.resize(_storage.size() * 2);
}
void Write(void const* data, std::size_t size)
{
if (size)
+2 -1
View File
@@ -90,7 +90,8 @@ public:
return;
_readBuffer.Normalize();
_socket.async_read_some(boost::asio::buffer(_readBuffer.GetWritePointer(), READ_BLOCK_SIZE),
_readBuffer.EnsureFreeSpace();
_socket.async_read_some(boost::asio::buffer(_readBuffer.GetWritePointer(), _readBuffer.GetRemainingSpace()),
std::bind(&Socket<T>::ReadHandlerInternal, this->shared_from_this(), std::placeholders::_1, std::placeholders::_2));
}
+10 -1
View File
@@ -46,7 +46,16 @@ public:
return false;
}
_acceptor = new AsyncAcceptor(service, bindIp, port);
try
{
_acceptor = new AsyncAcceptor(service, bindIp, port);
}
catch (boost::system::system_error const& err)
{
TC_LOG_ERROR("network", "Exception caught in SocketMgr.StartNetwork (%s:%u): %s", bindIp.c_str(), port, err.what());
return false;
}
_threads = CreateThreads();
ASSERT(_threads);