aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--cmake/genrev.cmake97
-rw-r--r--cmake/macros/FindGit.cmake46
-rw-r--r--cmake/options.cmake1
-rw-r--r--cmake/showoptions.cmake24
-rw-r--r--sql/updates/world/2013_02_09_01_world_creature_equip_template.sql5
-rw-r--r--sql/updates/world/2013_02_09_02_world_areatrigger_teleport.sql4
-rw-r--r--sql/updates/world/2013_02_09_03_world_player_factionchange_spells.sql3
-rw-r--r--sql/updates/world/2013_02_10_00_world_areatrigger_teleport.sql3
-rw-r--r--sql/updates/world/2013_02_11_00_world_creature_template.sql26
-rw-r--r--src/genrev/CMakeLists.txt2
-rw-r--r--src/server/authserver/Server/RealmSocket.cpp8
-rw-r--r--src/server/game/Entities/Object/Object.cpp2
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateMask.h116
-rw-r--r--src/server/game/Server/WorldSocket.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp3
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
-rw-r--r--src/server/worldserver/RemoteAccess/RASocket.cpp5
18 files changed, 229 insertions, 126 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b075b6ede3..72d1a225f28 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,6 +61,10 @@ if( UNIX )
find_package(BZip2)
endif()
+if(NOT WITHOUT_GIT)
+ find_package(Git)
+endif()
+
# Find revision ID and hash of the sourcetree
include(cmake/genrev.cmake)
diff --git a/cmake/genrev.cmake b/cmake/genrev.cmake
index c7a188d1993..35f1a7a11ed 100644
--- a/cmake/genrev.cmake
+++ b/cmake/genrev.cmake
@@ -8,67 +8,54 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-include(${CMAKE_SOURCE_DIR}/cmake/macros/EnsureVersion.cmake)
+# User has manually chosen to ignore the git-tests, so throw them a warning.
+# This is done EACH compile so they can be alerted about the consequences.
-set(_REQUIRED_GIT_VERSION "1.7")
-
-find_program(_GIT_EXEC
- NAMES
- git git.cmd
- HINTS
- ENV PATH
- DOC "git installation path"
-)
-
-if(_GIT_EXEC)
- execute_process(
- COMMAND "${_GIT_EXEC}" --version
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
- OUTPUT_VARIABLE _GIT_VERSION
- ERROR_QUIET
- )
-
- # make sure we're using minimum the required version of git, so the "dirty-testing" will work properly
- ensure_version( "${_REQUIRED_GIT_VERSION}" "${_GIT_VERSION}" _GIT_VERSION_OK)
-endif()
-
-if(_GIT_VERSION_OK)
- execute_process(
- COMMAND "${_GIT_EXEC}" describe --match init --dirty=+ --abbrev=12
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
- OUTPUT_VARIABLE rev_info
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_QUIET
- )
- execute_process(
- COMMAND "${_GIT_EXEC}" show -s --format=%ci
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
- OUTPUT_VARIABLE rev_date
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_QUIET
- )
-else()
- message("")
- message(STATUS "WARNING - Missing or outdated git - did you forget to install a recent version?")
- message(STATUS "WARNING - Observe that for revision hash/date to work you need at least version ${_REQUIRED_GIT_VERSION}")
+if(NOT BUILDDIR)
+ # Workaround for funny MSVC behaviour - this segment only run during compile
+ set(NO_GIT ${WITHOUT_GIT})
+ set(GIT_EXEC ${GIT_EXECUTABLE})
+ set(BUILDDIR ${CMAKE_BINARY_DIR})
endif()
-# Last minute check - ensure that we have a proper revision
-# If everything above fails (means the user has erased the git revision control directory or removed the origin/HEAD tag)
-if(NOT rev_info)
- # No valid ways available to find/set the revision/hash, so let's force some defaults
- message(STATUS "WARNING - Missing repository tags - you may need to pull tags with git fetch -t")
- message(STATUS "WARNING - Continuing anyway - note that the versionstring will be set to 0000-00-00 00:00:00 (Archived)")
- set(rev_date "0000-00-00 00:00:00 +0000")
+if(NO_GIT)
+ set(rev_date "1970-01-01 00:00:00 +0000")
set(rev_hash "Archived")
else()
- # Extract information required to build a proper versionstring
- string(REGEX REPLACE init-|[0-9]+-g "" rev_hash ${rev_info})
-endif()
+ if(GIT_EXEC)
+ # Create a revision-string that we can use
+ execute_process(
+ COMMAND "${GIT_EXEC}" describe --match init --dirty=+ --abbrev=12
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+ OUTPUT_VARIABLE rev_info
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ ERROR_QUIET
+ )
-# Its not set during initial run
-if(NOT BUILDDIR)
- set(BUILDDIR ${CMAKE_BINARY_DIR})
+ # And grab the commits timestamp
+ execute_process(
+ COMMAND "${GIT_EXEC}" show -s --format=%ci
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+ OUTPUT_VARIABLE rev_date
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ ERROR_QUIET
+ )
+ endif()
+
+ # Last minute check - ensure that we have a proper revision
+ # If everything above fails (means the user has erased the git revision control directory or removed the origin/HEAD tag)
+
+ if(NOT rev_info)
+ # No valid ways available to find/set the revision/hash, so let's force some defaults
+ message(STATUS "
+ Could not find a proper repository signature (hash) - you may need to pull tags with git fetch -t
+ Continuing anyway - note that the versionstring will be set to 1970-01-01 00:00:00 (Archived)")
+ set(rev_date "1970-01-01 00:00:00 +0000")
+ set(rev_hash "Archived")
+ else()
+ # Extract information required to build a proper versionstring
+ string(REGEX REPLACE init-|[0-9]+-g "" rev_hash ${rev_info})
+ endif()
endif()
# Create the actual revision.h file from the above params
diff --git a/cmake/macros/FindGit.cmake b/cmake/macros/FindGit.cmake
new file mode 100644
index 00000000000..c23601dbcd8
--- /dev/null
+++ b/cmake/macros/FindGit.cmake
@@ -0,0 +1,46 @@
+# Copyright (C) 2008-2013 Trinity <http://www.trinitycore.org/>
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+include(${CMAKE_SOURCE_DIR}/cmake/macros/EnsureVersion.cmake)
+
+set(_REQUIRED_GIT_VERSION "1.7")
+
+find_program(GIT_EXECUTABLE
+ NAMES
+ git git.cmd
+ HINTS
+ ENV PATH
+ DOC "Full path to git commandline client"
+)
+MARK_AS_ADVANCED(GIT_EXECUTABLE)
+
+if(NOT GIT_EXECUTABLE)
+ message(FATAL_ERROR "
+ Git was NOT FOUND on your system - did you forget to install a recent version, or setting the path to it?
+ Observe that for revision hash/date to work you need at least version ${_REQUIRED_GIT_VERSION}")
+else()
+ message(STATUS "Found git binary : ${GIT_EXECUTABLE}")
+ execute_process(
+ COMMAND "${GIT_EXECUTABLE}" --version
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+ OUTPUT_VARIABLE _GIT_VERSION
+ ERROR_QUIET
+ )
+
+ # make sure we're using minimum the required version of git, so the "dirty-testing" will work properly
+ ensure_version( "${_REQUIRED_GIT_VERSION}" "${_GIT_VERSION}" _GIT_VERSION_OK)
+
+ # throw an error if we don't have a recent enough version of git...
+ if(NOT _GIT_VERSION_OK)
+ message(STATUS "Git version too old : ${_GIT_VERSION}")
+ message(FATAL_ERROR "
+ Git was found but is OUTDATED - did you forget to install a recent version, or setting the path to it?
+ Observe that for revision hash/date to work you need at least version ${_REQUIRED_GIT_VERSION}")
+ endif()
+endif()
diff --git a/cmake/options.cmake b/cmake/options.cmake
index f58c88ba1d5..ecd58019905 100644
--- a/cmake/options.cmake
+++ b/cmake/options.cmake
@@ -15,3 +15,4 @@ option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts"
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
option(WITH_WARNINGS "Show all warnings during compile" 0)
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
+option(WITHOUT_GIT "Disable the GIT testing routines" 0)
diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake
index d3415e4e204..058cce78d09 100644
--- a/cmake/showoptions.cmake
+++ b/cmake/showoptions.cmake
@@ -72,10 +72,28 @@ if( WIN32 )
endif()
endif( WIN32 )
+if ( WITHOUT_GIT )
+ message("* Use GIT revision hash : No")
+ message("")
+ message(" *** WITHOUT_GIT - WARNING!")
+ message(" *** By choosing the WITHOUT_GIT option you have waived all rights for support,")
+ message(" *** and accept that or all requests for support or assistance sent to the core")
+ message(" *** developers will be rejected. This due to that we will be unable to detect")
+ message(" *** what revision of the codebase you are using in a proper way.")
+ message(" *** We remind you that you need to use the repository codebase and a supported")
+ message(" *** version of git for the revision-hash to work, and be allowede to ask for")
+ message(" *** support if needed.")
+else()
+ message("* Use GIT revision hash : Yes")
+endif()
+
if ( NOJEM )
message("")
- message("*** WARNING: jemalloc linking has been disabled!")
- message("*** Please note that this is for DEBUGGING WITH VALGRIND only!")
- message("*** DO NOT DISABLE IT UNLESS YOU KNOW WHAT YOU'RE DOING!")
+ message(" *** NOJEM - WARNING!")
+ message(" *** jemalloc linking has been disabled!")
+ message(" *** Please note that this is for DEBUGGING WITH VALGRIND only!")
+ message(" *** DO NOT DISABLE IT UNLESS YOU KNOW WHAT YOU'RE DOING!")
endif()
+
message("")
+
diff --git a/sql/updates/world/2013_02_09_01_world_creature_equip_template.sql b/sql/updates/world/2013_02_09_01_world_creature_equip_template.sql
new file mode 100644
index 00000000000..fd207746ac1
--- /dev/null
+++ b/sql/updates/world/2013_02_09_01_world_creature_equip_template.sql
@@ -0,0 +1,5 @@
+UPDATE `creature_template` SET `equipment_id`=36561 WHERE `entry` IN (36561,36571);
+
+DELETE FROM `creature_equip_template` WHERE `entry`=36561;
+INSERT INTO `creature_equip_template` (`entry`, `itemEntry1`, `itemEntry2`, `itemEntry3`) VALUES
+(36561, 38488, 0, 0); -- Onyxian Lair Guard
diff --git a/sql/updates/world/2013_02_09_02_world_areatrigger_teleport.sql b/sql/updates/world/2013_02_09_02_world_areatrigger_teleport.sql
new file mode 100644
index 00000000000..2a0c1682e32
--- /dev/null
+++ b/sql/updates/world/2013_02_09_02_world_areatrigger_teleport.sql
@@ -0,0 +1,4 @@
+DELETE FROM `areatrigger_teleport` WHERE `id` IN (4233, 4267);
+INSERT INTO `areatrigger_teleport` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`, `name`) VALUES
+(4233, 530, 9331.49, -7812.27, 136.569, 5.23599, 'Eversong Woods - Duskwither UP Target'),
+(4267, 530, 9334.03, -7880.02, 74.9095, 2.35619, 'Eversong Woods - Duskwither DOWN Target');
diff --git a/sql/updates/world/2013_02_09_03_world_player_factionchange_spells.sql b/sql/updates/world/2013_02_09_03_world_player_factionchange_spells.sql
new file mode 100644
index 00000000000..22f69b11aaa
--- /dev/null
+++ b/sql/updates/world/2013_02_09_03_world_player_factionchange_spells.sql
@@ -0,0 +1,3 @@
+DELETE FROM `player_factionchange_spells` WHERE `alliance_id`=3565 AND `horde_id`=3566;
+INSERT INTO `player_factionchange_spells` (`alliance_id`, `horde_id`) VALUES
+(3565, 3566); -- Teleport: Darnassus / Teleport: Thunder Bluff
diff --git a/sql/updates/world/2013_02_10_00_world_areatrigger_teleport.sql b/sql/updates/world/2013_02_10_00_world_areatrigger_teleport.sql
new file mode 100644
index 00000000000..b5f5c856fe0
--- /dev/null
+++ b/sql/updates/world/2013_02_10_00_world_areatrigger_teleport.sql
@@ -0,0 +1,3 @@
+DELETE FROM `areatrigger_teleport` WHERE `id`=4304;
+INSERT INTO `areatrigger_teleport` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`, `name`) VALUES
+(4304, 530, -233.33, 3199.71, -50, 0.785398, 'Hellfire Ramparts - Omor Exit Target');
diff --git a/sql/updates/world/2013_02_11_00_world_creature_template.sql b/sql/updates/world/2013_02_11_00_world_creature_template.sql
new file mode 100644
index 00000000000..dbbc7267780
--- /dev/null
+++ b/sql/updates/world/2013_02_11_00_world_creature_template.sql
@@ -0,0 +1,26 @@
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry` IN (
+ 17413, -- Sedai Quest Credit Marker
+ 21121, -- Bonechewer Quest credit marker
+ 24887, -- Fengir Quest Credit
+ 24888, -- Isuldof Quest Credit
+ 24889, -- Rodin Quest Credit
+ 24890, -- Windan Quest Credit
+ 27471, -- Forgotten Rifleman Quest Credit
+ 27472, -- Forgotten Peasant Quest Credit
+ 27473, -- Forgotten Knight Quest Credit
+ 27474, -- Captain Luc D'Merud Quest Credit
+ 27879, -- Frostmourne Cavern Quest Credit
+ 38503, -- Blood Infusion Quest Credit Bunny
+ 38546, -- Frost Infusion Quest Credit
+ 38547, -- Sindragosa Quest Credit
+ 39355, -- [DND] Salute Quest Credit Bunny
+ 39356, -- [DND] Roar Quest Credit Bunny
+ 39361, -- [DND] Dance Quest Credit Bunny
+ 39362, -- [DND] Cheer Quest Credit Bunny
+ 39683, -- [DND] Quest Credit Bunny - Eject
+ 39691, -- [DND] Quest Credit Bunny - Move 1
+ 39692, -- [DND] Quest Credit Bunny - Move 2
+ 39695, -- [DND] Quest Credit Bunny - Move 3
+ 39703, -- [DND] Quest Credit Bunny - Attack
+ 40428 -- [DND] Quest Credit Bunny - ET Battle
+);
diff --git a/src/genrev/CMakeLists.txt b/src/genrev/CMakeLists.txt
index c01c57b636f..b54534af827 100644
--- a/src/genrev/CMakeLists.txt
+++ b/src/genrev/CMakeLists.txt
@@ -10,6 +10,6 @@
# Need to pass old ${CMAKE_BINARY_DIR} as param because its different at build stage
add_custom_target(revision.h ALL
- COMMAND ${CMAKE_COMMAND} -DBUILDDIR=${CMAKE_BINARY_DIR} -P ${CMAKE_SOURCE_DIR}/cmake/genrev.cmake
+ COMMAND ${CMAKE_COMMAND} -DNO_GIT=${WITHOUT_GIT} -DGIT_EXEC=${GIT_EXECUTABLE} -DBUILDDIR=${CMAKE_BINARY_DIR} -P ${CMAKE_SOURCE_DIR}/cmake/genrev.cmake
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp
index e67af783d5f..565a8c9a600 100644
--- a/src/server/authserver/Server/RealmSocket.cpp
+++ b/src/server/authserver/Server/RealmSocket.cpp
@@ -23,10 +23,6 @@
#include "RealmSocket.h"
#include "Log.h"
-#ifndef MSG_NOSIGNAL
-#define MSG_NOSIGNAL 0
-#endif
-
RealmSocket::Session::Session(void) {}
RealmSocket::Session::~Session(void) { }
@@ -138,7 +134,11 @@ ssize_t RealmSocket::noblk_send(ACE_Message_Block &message_block)
return -1;
// Try to send the message directly.
+#ifdef MSG_NOSIGNAL
ssize_t n = peer().send(message_block.rd_ptr(), len, MSG_NOSIGNAL);
+#else
+ ssize_t n = peer().send(message_block.rd_ptr(), len);
+#endif // MSG_NOSIGNAL
if (n < 0)
{
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 0be9002e1d8..cb497d11d4f 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -660,7 +660,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, UpdateMask*
WPAssert(updateMask && updateMask->GetCount() == valCount);
*data << (uint8)updateMask->GetBlockCount();
- data->append(updateMask->GetMask(), updateMask->GetLength());
+ updateMask->AppendToPacket(data);
// 2 specialized loops for speed optimization in non-unit case
if (isType(TYPEMASK_UNIT)) // unit (creature/player) case
diff --git a/src/server/game/Entities/Object/Updates/UpdateMask.h b/src/server/game/Entities/Object/Updates/UpdateMask.h
index 784c4eba96f..8be8dfecdaf 100644
--- a/src/server/game/Entities/Object/Updates/UpdateMask.h
+++ b/src/server/game/Entities/Object/Updates/UpdateMask.h
@@ -21,106 +21,106 @@
#include "UpdateFields.h"
#include "Errors.h"
+#include "ByteBuffer.h"
class UpdateMask
{
public:
- UpdateMask() : mCount(0), mBlocks(0), mUpdateMask(0) { }
- UpdateMask(UpdateMask const& mask) : mUpdateMask(0) { *this = mask; }
+ /// Type representing how client reads update mask
+ typedef uint32 ClientUpdateMaskType;
- ~UpdateMask()
+ enum UpdateMaskCount
{
- delete[] mUpdateMask;
- }
+ CLIENT_UPDATE_MASK_BITS = sizeof(ClientUpdateMaskType) * 8,
+ };
- void SetBit(uint32 index)
- {
- ((uint8*)mUpdateMask)[index >> 3] |= 1 << (index & 0x7);
- }
+ UpdateMask() : _fieldCount(0), _blockCount(0), _bits(NULL) { }
- void UnsetBit(uint32 index)
+ UpdateMask(UpdateMask const& right)
{
- ((uint8*)mUpdateMask)[index >> 3] &= (0xff ^ (1 << (index & 0x7)));
+ SetCount(right.GetCount());
+ memcpy(_bits, right._bits, sizeof(uint8) * _blockCount * 32);
}
- bool GetBit(uint32 index) const
+ ~UpdateMask() { delete[] _bits; }
+
+ void SetBit(uint32 index) { _bits[index] = 1; }
+ void UnsetBit(uint32 index) { _bits[index] = 0; }
+ bool GetBit(uint32 index) const { return _bits[index] != 0; }
+
+ void AppendToPacket(ByteBuffer* data)
{
- return (((uint8*)mUpdateMask)[index >> 3] & (1 << (index & 0x7))) != 0;
+ for (uint32 i = 0; i < GetBlockCount(); ++i)
+ {
+ ClientUpdateMaskType maskPart = 0;
+ for (uint32 j = 0; j < CLIENT_UPDATE_MASK_BITS; ++j)
+ if (_bits[CLIENT_UPDATE_MASK_BITS * i + j])
+ maskPart |= 1 << j;
+
+ *data << maskPart;
+ }
}
- uint32 GetBlockCount() const { return mBlocks; }
- uint32 GetLength() const { return mBlocks << 2; }
- uint32 GetCount() const { return mCount; }
- uint8* GetMask() { return (uint8*)mUpdateMask; }
+ uint32 GetBlockCount() const { return _blockCount; }
+ uint32 GetCount() const { return _fieldCount; }
- void SetCount (uint32 valuesCount)
+ void SetCount(uint32 valuesCount)
{
- delete [] mUpdateMask;
+ delete[] _bits;
- mCount = valuesCount;
- mBlocks = (valuesCount + 31) / 32;
+ _fieldCount = valuesCount;
+ _blockCount = (valuesCount + CLIENT_UPDATE_MASK_BITS - 1) / CLIENT_UPDATE_MASK_BITS;
- mUpdateMask = new uint32[mBlocks];
- memset(mUpdateMask, 0, mBlocks << 2);
+ _bits = new uint8[_blockCount * CLIENT_UPDATE_MASK_BITS];
+ memset(_bits, 0, sizeof(uint8) * _blockCount * CLIENT_UPDATE_MASK_BITS);
}
void Clear()
{
- if (mUpdateMask)
- memset(mUpdateMask, 0, mBlocks << 2);
+ if (_bits)
+ memset(_bits, 0, sizeof(uint8) * _blockCount * CLIENT_UPDATE_MASK_BITS);
}
- UpdateMask& operator=(UpdateMask const& mask)
+ UpdateMask& operator=(UpdateMask const& right)
{
- if (this == &mask)
+ if (this == &right)
return *this;
- SetCount(mask.mCount);
- memcpy(mUpdateMask, mask.mUpdateMask, mBlocks << 2);
-
+ SetCount(right.GetCount());
+ memcpy(_bits, right._bits, sizeof(uint8) * _blockCount * CLIENT_UPDATE_MASK_BITS);
return *this;
}
- void operator&=(UpdateMask const& mask)
+ UpdateMask& operator&=(UpdateMask const& right)
{
- ASSERT(mask.mCount <= mCount);
- for (uint32 i = 0; i < mBlocks; ++i)
- mUpdateMask[i] &= mask.mUpdateMask[i];
- }
+ ASSERT(right.GetCount() <= GetCount());
+ for (uint32 i = 0; i < _fieldCount; ++i)
+ _bits[i] &= right._bits[i];
- void operator|=(UpdateMask const& mask)
- {
- ASSERT(mask.mCount <= mCount);
- for (uint32 i = 0; i < mBlocks; ++i)
- mUpdateMask[i] |= mask.mUpdateMask[i];
+ return *this;
}
- UpdateMask operator&(UpdateMask const& mask) const
+ UpdateMask& operator|=(UpdateMask const& right)
{
- ASSERT(mask.mCount <= mCount);
+ ASSERT(right.GetCount() <= GetCount());
+ for (uint32 i = 0; i < _fieldCount; ++i)
+ _bits[i] |= right._bits[i];
- UpdateMask newmask;
- newmask = *this;
- newmask &= mask;
-
- return newmask;
+ return *this;
}
- UpdateMask operator|(UpdateMask const& mask) const
+ UpdateMask operator|(UpdateMask const& right)
{
- ASSERT(mask.mCount <= mCount);
-
- UpdateMask newmask;
- newmask = *this;
- newmask |= mask;
-
- return newmask;
+ UpdateMask ret(*this);
+ ret |= right;
+ return ret;
}
private:
- uint32 mCount;
- uint32 mBlocks;
- uint32 *mUpdateMask;
+ uint32 _fieldCount;
+ uint32 _blockCount;
+ uint8* _bits;
};
+
#endif
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 295432dc956..7c263a62b19 100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -384,9 +384,9 @@ int WorldSocket::handle_output_queue (GuardType& g)
const size_t send_len = mblk->length();
#ifdef MSG_NOSIGNAL
- ssize_t n = peer().send (mblk->rd_ptr(), send_len, MSG_NOSIGNAL);
+ ssize_t n = peer().send(mblk->rd_ptr(), send_len, MSG_NOSIGNAL);
#else
- ssize_t n = peer().send (mblk->rd_ptr(), send_len);
+ ssize_t n = peer().send(mblk->rd_ptr(), send_len);
#endif // MSG_NOSIGNAL
if (n == 0)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
index 7ced791f44c..7730a0448fe 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -2159,7 +2159,8 @@ class spell_the_lich_king_necrotic_plague_jump : public SpellScriptLoader
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* caster = GetCaster())
- caster->GetAI()->SetData(DATA_PLAGUE_STACK, GetStackAmount());
+ if (caster->GetAI())
+ caster->GetAI()->SetData(DATA_PLAGUE_STACK, GetStackAmount());
}
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index b8e17f4ecca..d57ed6e126b 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -140,7 +140,7 @@ class spell_item_blessing_of_ancient_kings : public SpellScriptLoader
protEff->SetAmount(std::min<int32>(protEff->GetAmount() + absorb, 20000));
// Refresh and return to prevent replacing the aura
- aurEff->GetBase()->RefreshDuration();
+ protEff->GetBase()->RefreshDuration();
}
else
GetTarget()->CastCustomSpell(SPELL_PROTECTION_OF_ANCIENT_KINGS, SPELLVALUE_BASE_POINT0, absorb, eventInfo.GetProcTarget(), true, NULL, aurEff);
diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp
index b939f267233..ee05e83ad4d 100644
--- a/src/server/worldserver/RemoteAccess/RASocket.cpp
+++ b/src/server/worldserver/RemoteAccess/RASocket.cpp
@@ -336,7 +336,12 @@ int RASocket::subnegotiate()
//! Just send back end of subnegotiation packet
uint8 const reply[2] = {0xFF, 0xF0};
+
+#ifdef MSG_NOSIGNAL
+ return int(peer().send(reply, 2, MSG_NOSIGNAL));
+#else
return int(peer().send(reply, 2));
+#endif // MSG_NOSIGNAL
}
int RASocket::svc(void)