aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.cpp
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-02-14 19:13:14 -0700
committerBrian <runningnak3d@gmail.com>2010-02-14 19:13:14 -0700
commit486c00891ba34884e5b2cdd8d44b4d8496f11283 (patch)
tree7df304b9020ed21b87bd66978d2dc6e6683edce7 /src/game/Object.cpp
parent7799ade4da0da17034039439d692122e976c0138 (diff)
* Core switch to client 3.3.2 (11403)
* Credits (in no particular order) to: * n0n4m3, raczman, manuel, Spp, Malcrom, Teacher, QAston, Tartalo, * thenecromancer, Xanadu, Trazom, Zor, kiper * Additional credits to: * TOM_RUS and NoFantasy from MaNGOS * Thanks for testing Aokromes and XTElite1 * SoTA still needs some work, but is very playable (huge thanks to raczman and * kiper) * To upgrade, you need to apply all SQL from sql/updates/3.2.2a_old from the * last rev you are on * and then apply all SQL from sql/updates/3.3.2_old to char / realmd / world * DBs * Known problem with guild banks. --HG-- branch : trunk
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r--src/game/Object.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index 1b8a21650bd..4e0f7c01964 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -611,7 +611,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
if(!target->isAllowedToLoot((Creature*)this))
*data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_LOOTABLE);
else
- *data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_OTHER_TAGGER);
+ *data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_TAPPED);
}
else
*data << m_uint32Values[ index ];
@@ -1103,8 +1103,8 @@ bool Object::PrintIndexError(uint32 index, bool set) const
bool Position::HasInLine(const Unit * const target, float distance, float width) const
{
- assert(target);
- if(!HasInArc(M_PI, target) || !target->IsWithinDist3d(m_positionX, m_positionY, m_positionZ, distance)) return false;
+ if (!HasInArc(M_PI, target) || !target->IsWithinDist3d(m_positionX, m_positionY, m_positionZ, distance))
+ return false;
width += target->GetObjectSize();
float angle = GetRelativeAngle(target);
return abs(sin(angle)) * GetExactDist2d(target->GetPositionX(), target->GetPositionY()) < width;
@@ -1193,7 +1193,6 @@ InstanceData* WorldObject::GetInstanceData()
float WorldObject::GetDistanceZ(const WorldObject* obj) const
{
- assert(obj);
float dz = fabs(GetPositionZ() - obj->GetPositionZ());
float sizefactor = GetObjectSize() + obj->GetObjectSize();
float dist = dz - sizefactor;
@@ -1202,7 +1201,6 @@ float WorldObject::GetDistanceZ(const WorldObject* obj) const
bool WorldObject::_IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D) const
{
- assert(obj);
float dx = GetPositionX() - obj->GetPositionX();
float dy = GetPositionY() - obj->GetPositionY();
float distsq = dx*dx + dy*dy;
@@ -1360,7 +1358,6 @@ void Position::GetSinCos(const float x, const float y, float &vsin, float &vcos)
bool Position::HasInArc(float arc, const Position *obj) const
{
- assert(obj);
// always have self in arc
if(obj == this)
return true;