Core/Db/Conditions:
-Drop condition CONDITION_SPELL_SCRIPT_TARGET, use other condition types instead -Change CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET to CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET: --allow using this condition for more spell implicit target types (not just ENTRY) --SourceGroup value for this src type is now effMask and it's now required Core/Spells: Unify the way implicit targets are handled, fully implement some partially implemented target types, fix some minor bugs found on the way, general improvements and cleanup.
This commit is contained in:
1 parent
6155fdd103
commit
f09b5a6bea
23 files changed
+5721
-1823
No files matched your search
@@ -1085,9 +1085,9 @@ bool Object::PrintIndexError(uint32 index, bool set) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Position::HasInLine(Unit const* target, float distance, float width) const
|
||||
bool Position::HasInLine(WorldObject const* target, float width) const
|
||||
{
|
||||
if (!HasInArc(M_PI, target) || !target->IsWithinDist3d(m_positionX, m_positionY, m_positionZ, distance))
|
||||
if (!HasInArc(M_PI, target))
|
||||
return false;
|
||||
width += target->GetObjectSize();
|
||||
float angle = GetRelativeAngle(target);
|
||||
@@ -1502,14 +1502,14 @@ bool WorldObject::IsInBetween(const WorldObject* obj1, const WorldObject* obj2,
|
||||
return (size * size) >= GetExactDist2dSq(obj1->GetPositionX() + cos(angle) * dist, obj1->GetPositionY() + sin(angle) * dist);
|
||||
}
|
||||
|
||||
bool WorldObject::isInFront(WorldObject const* target, float distance, float arc) const
|
||||
bool WorldObject::isInFront(WorldObject const* target, float arc) const
|
||||
{
|
||||
return IsWithinDist(target, distance) && HasInArc(arc, target);
|
||||
return HasInArc(arc, target);
|
||||
}
|
||||
|
||||
bool WorldObject::isInBack(WorldObject const* target, float distance, float arc) const
|
||||
bool WorldObject::isInBack(WorldObject const* target, float arc) const
|
||||
{
|
||||
return IsWithinDist(target, distance) && !HasInArc(2 * M_PI - arc, target);
|
||||
return !HasInArc(2 * M_PI - arc, target);
|
||||
}
|
||||
|
||||
void WorldObject::GetRandomPoint(const Position &pos, float distance, float &rand_x, float &rand_y, float &rand_z) const
|
||||
|
||||
Reference in new issue
Block a user