(cherry picked from commit 9299e9b)
This commit is contained in:
Aokromes committed 2017-06-19 20:20:26 +02:00
1 parent 0762d35b71
commit 1a5c0f5c3b
54 files changed
+227 -399

No files matched your search

+4 -4
View File
@@ -10882,7 +10882,7 @@ Unit* Unit::SelectNearbyTarget(Unit* exclude, float dist) const
std::list<Unit*> targets;
Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(this, this, dist);
Trinity::UnitListSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(this, targets, u_check);
VisitNearbyObject(dist, searcher);
Cell::VisitAllObjects(this, searcher, dist);
// remove current target
if (GetVictim())
@@ -12396,7 +12396,7 @@ void Unit::UpdateObjectVisibility(bool forced)
WorldObject::UpdateObjectVisibility(true);
// call MoveInLineOfSight for nearby creatures
Trinity::AIRelocationNotifier notifier(*this);
VisitNearbyObject(GetVisibilityRange(), notifier);
Cell::VisitAllObjects(this, notifier, GetVisibilityRange());
}
}
@@ -14362,7 +14362,7 @@ void Unit::Talk(std::string const& text, ChatMsg msgType, Language language, flo
Trinity::CustomChatTextBuilder builder(this, msgType, text, language, target);
Trinity::LocalizedPacketDo<Trinity::CustomChatTextBuilder> localizer(builder);
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::CustomChatTextBuilder> > worker(this, textRange, localizer);
VisitNearbyWorldObject(textRange, worker);
Cell::VisitWorldObjects(this, worker, textRange);
}
void Unit::Say(std::string const& text, Language language, WorldObject const* target /*= nullptr*/)
@@ -14402,7 +14402,7 @@ void Unit::Talk(uint32 textId, ChatMsg msgType, float textRange, WorldObject con
Trinity::BroadcastTextBuilder builder(this, msgType, textId, target);
Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder> localizer(builder);
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder> > worker(this, textRange, localizer);
VisitNearbyWorldObject(textRange, worker);
Cell::VisitWorldObjects(this, worker, textRange);
}
void Unit::Say(uint32 textId, WorldObject const* target /*= nullptr*/)