Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts: dep/PackageList.txt src/server/game/Battlegrounds/Battleground.cpp src/server/game/Combat/ThreatManager.cpp src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Handlers/BattleGroundHandler.cpp src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp src/server/game/Movement/Spline/MoveSplineInit.cpp src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/SpellEffects.cpp src/server/game/World/World.cpp src/server/game/World/World.h src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h src/server/scripts/Spells/spell_druid.cpp src/server/scripts/Spells/spell_mage.cpp src/server/scripts/Spells/spell_paladin.cpp src/server/scripts/Spells/spell_priest.cpp src/server/scripts/Spells/spell_rogue.cpp src/server/scripts/Spells/spell_shaman.cpp src/server/scripts/Spells/spell_warlock.cpp src/server/scripts/Spells/spell_warrior.cpp src/tools/map_extractor/CMakeLists.txt src/tools/map_extractor/System.cpp src/tools/map_extractor/loadlib.cpp src/tools/map_extractor/mpq_libmpq.cpp src/tools/map_extractor/mpq_libmpq04.h src/tools/vmap4_assembler/CMakeLists.txt src/tools/vmap4_extractor/CMakeLists.txt src/tools/vmap4_extractor/mpq_libmpq.cpp src/tools/vmap4_extractor/mpq_libmpq04.h
This commit is contained in:
commit
b404e0bec1
274 files changed
+28968
-2768
No files matched your search
@@ -76,7 +76,6 @@ Object::Object() : m_PackGUID(sizeof(uint64)+1)
|
||||
m_objectType = TYPEMASK_OBJECT;
|
||||
|
||||
m_uint32Values = NULL;
|
||||
_changedFields = NULL;
|
||||
m_valuesCount = 0;
|
||||
_fieldNotifyFlags = UF_FLAG_DYNAMIC;
|
||||
|
||||
@@ -120,8 +119,6 @@ Object::~Object()
|
||||
}
|
||||
|
||||
delete [] m_uint32Values;
|
||||
delete [] _changedFields;
|
||||
|
||||
}
|
||||
|
||||
void Object::_InitValues()
|
||||
@@ -129,8 +126,7 @@ void Object::_InitValues()
|
||||
m_uint32Values = new uint32[m_valuesCount];
|
||||
memset(m_uint32Values, 0, m_valuesCount*sizeof(uint32));
|
||||
|
||||
_changedFields = new bool[m_valuesCount];
|
||||
memset(_changedFields, 0, m_valuesCount*sizeof(bool));
|
||||
_changesMask.SetCount(m_valuesCount);
|
||||
|
||||
m_objectUpdated = false;
|
||||
}
|
||||
@@ -901,7 +897,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, UpdateMask*
|
||||
|
||||
void Object::ClearUpdateMask(bool remove)
|
||||
{
|
||||
memset(_changedFields, 0, m_valuesCount*sizeof(bool));
|
||||
_changesMask.Clear();
|
||||
|
||||
if (m_objectUpdated)
|
||||
{
|
||||
@@ -998,13 +994,12 @@ void Object::_LoadIntoDataField(std::string const& data, uint32 startOffset, uin
|
||||
for (uint32 index = 0; index < count; ++index)
|
||||
{
|
||||
m_uint32Values[startOffset + index] = atol(tokens[index]);
|
||||
_changedFields[startOffset + index] = true;
|
||||
_changesMask.SetBit(startOffset + index);
|
||||
}
|
||||
}
|
||||
|
||||
void Object::_SetUpdateBits(UpdateMask* updateMask, Player* target) const
|
||||
{
|
||||
bool* indexes = _changedFields;
|
||||
uint32* flags = NULL;
|
||||
bool isSelf = target == this;
|
||||
bool isOwner = false;
|
||||
@@ -1018,8 +1013,7 @@ void Object::_SetUpdateBits(UpdateMask* updateMask, Player* target) const
|
||||
if (GetTypeId() == TYPEID_PLAYER && target != this)
|
||||
valCount = PLAYER_END_NOT_SELF;
|
||||
|
||||
for (uint16 index = 0; index < valCount; ++index, ++indexes)
|
||||
if (_fieldNotifyFlags & flags[index] || (flags[index] & UF_FLAG_SPECIAL_INFO && hasSpecialInfo) || (*indexes && IsUpdateFieldVisible(flags[index], isSelf, isOwner, isItemOwner, isPartyMember)))
|
||||
for (uint16 index = 0; index < valCount; ++index)
|
||||
updateMask->SetBit(index);
|
||||
}
|
||||
|
||||
@@ -1051,7 +1045,7 @@ void Object::SetInt32Value(uint16 index, int32 value)
|
||||
if (m_int32Values[index] != value)
|
||||
{
|
||||
m_int32Values[index] = value;
|
||||
_changedFields[index] = true;
|
||||
_changesMask.SetBit(index);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1068,7 +1062,7 @@ void Object::SetUInt32Value(uint16 index, uint32 value)
|
||||
if (m_uint32Values[index] != value)
|
||||
{
|
||||
m_uint32Values[index] = value;
|
||||
_changedFields[index] = true;
|
||||
_changesMask.SetBit(index);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1083,7 +1077,7 @@ void Object::UpdateUInt32Value(uint16 index, uint32 value)
|
||||
ASSERT(index < m_valuesCount || PrintIndexError(index, true));
|
||||
|
||||
m_uint32Values[index] = value;
|
||||
_changedFields[index] = true;
|
||||
_changesMask.SetBit(index);
|
||||
}
|
||||
|
||||
void Object::SetUInt64Value(uint16 index, uint64 value)
|
||||
@@ -1093,8 +1087,8 @@ void Object::SetUInt64Value(uint16 index, uint64 value)
|
||||
{
|
||||
m_uint32Values[index] = PAIR64_LOPART(value);
|
||||
m_uint32Values[index + 1] = PAIR64_HIPART(value);
|
||||
_changedFields[index] = true;
|
||||
_changedFields[index + 1] = true;
|
||||
_changesMask.SetBit(index);
|
||||
_changesMask.SetBit(index + 1);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1111,8 +1105,8 @@ bool Object::AddUInt64Value(uint16 index, uint64 value)
|
||||
{
|
||||
m_uint32Values[index] = PAIR64_LOPART(value);
|
||||
m_uint32Values[index + 1] = PAIR64_HIPART(value);
|
||||
_changedFields[index] = true;
|
||||
_changedFields[index + 1] = true;
|
||||
_changesMask.SetBit(index);
|
||||
_changesMask.SetBit(index + 1);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1133,8 +1127,8 @@ bool Object::RemoveUInt64Value(uint16 index, uint64 value)
|
||||
{
|
||||
m_uint32Values[index] = 0;
|
||||
m_uint32Values[index + 1] = 0;
|
||||
_changedFields[index] = true;
|
||||
_changedFields[index + 1] = true;
|
||||
_changesMask.SetBit(index);
|
||||
_changesMask.SetBit(index + 1);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1155,7 +1149,7 @@ void Object::SetFloatValue(uint16 index, float value)
|
||||
if (m_floatValues[index] != value)
|
||||
{
|
||||
m_floatValues[index] = value;
|
||||
_changedFields[index] = true;
|
||||
_changesMask.SetBit(index);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1179,7 +1173,7 @@ void Object::SetByteValue(uint16 index, uint8 offset, uint8 value)
|
||||
{
|
||||
m_uint32Values[index] &= ~uint32(uint32(0xFF) << (offset * 8));
|
||||
m_uint32Values[index] |= uint32(uint32(value) << (offset * 8));
|
||||
_changedFields[index] = true;
|
||||
_changesMask.SetBit(index);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1203,7 +1197,7 @@ void Object::SetUInt16Value(uint16 index, uint8 offset, uint16 value)
|
||||
{
|
||||
m_uint32Values[index] &= ~uint32(uint32(0xFFFF) << (offset * 16));
|
||||
m_uint32Values[index] |= uint32(uint32(value) << (offset * 16));
|
||||
_changedFields[index] = true;
|
||||
_changesMask.SetBit(index);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1270,7 +1264,7 @@ void Object::SetFlag(uint16 index, uint32 newFlag)
|
||||
if (oldval != newval)
|
||||
{
|
||||
m_uint32Values[index] = newval;
|
||||
_changedFields[index] = true;
|
||||
_changesMask.SetBit(index);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1291,7 +1285,7 @@ void Object::RemoveFlag(uint16 index, uint32 oldFlag)
|
||||
if (oldval != newval)
|
||||
{
|
||||
m_uint32Values[index] = newval;
|
||||
_changedFields[index] = true;
|
||||
_changesMask.SetBit(index);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1314,7 +1308,7 @@ void Object::SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
|
||||
if (!(uint8(m_uint32Values[index] >> (offset * 8)) & newFlag))
|
||||
{
|
||||
m_uint32Values[index] |= uint32(uint32(newFlag) << (offset * 8));
|
||||
_changedFields[index] = true;
|
||||
_changesMask.SetBit(index);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -1337,7 +1331,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag)
|
||||
if (uint8(m_uint32Values[index] >> (offset * 8)) & oldFlag)
|
||||
{
|
||||
m_uint32Values[index] &= ~uint32(uint32(oldFlag) << (offset * 8));
|
||||
_changedFields[index] = true;
|
||||
_changesMask.SetBit(index);
|
||||
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
@@ -2113,7 +2107,7 @@ void WorldObject::SendPlaySound(uint32 Sound, bool OnlySelf)
|
||||
|
||||
void Object::ForceValuesUpdateAtIndex(uint32 i)
|
||||
{
|
||||
_changedFields[i] = true;
|
||||
_changesMask.SetBit(i);
|
||||
if (m_inWorld && !m_objectUpdated)
|
||||
{
|
||||
sObjectAccessor->AddUpdateObject(this);
|
||||
@@ -2838,7 +2832,7 @@ void WorldObject::MovePosition(Position &pos, float dist, float angle)
|
||||
desty = pos.m_positionY + dist * std::sin(angle);
|
||||
|
||||
// Prevent invalid coordinates here, position is unchanged
|
||||
if (!Trinity::IsValidMapCoord(destx, desty))
|
||||
if (!Trinity::IsValidMapCoord(destx, desty, pos.m_positionZ))
|
||||
{
|
||||
sLog->outFatal(LOG_FILTER_GENERAL, "WorldObject::MovePosition invalid coordinates X: %f and Y: %f were passed!", destx, desty);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user