mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 18:43:48 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -1523,17 +1523,11 @@ void Player::UpdatePotionCooldown(Spell* spell)
|
||||
SetLastPotionId(0);
|
||||
}
|
||||
|
||||
template void Player::UpdateVisibilityOf(Player* target, UpdateData& data,
|
||||
std::vector<Unit*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(Creature* target, UpdateData& data,
|
||||
std::vector<Unit*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(Corpse* target, UpdateData& data,
|
||||
std::vector<Unit*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(GameObject* target, UpdateData& data,
|
||||
std::vector<Unit*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(DynamicObject* target,
|
||||
UpdateData& data,
|
||||
std::vector<Unit*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(Player* target, UpdateData& data, std::set<Unit*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(Creature* target, UpdateData& data, std::set<Unit*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(Corpse* target, UpdateData& data, std::set<Unit*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(GameObject* target, UpdateData& data, std::set<Unit*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(DynamicObject* target, UpdateData& data, std::set<Unit*>& visibleNow);
|
||||
|
||||
void Player::UpdateVisibilityForPlayer(bool mapChange)
|
||||
{
|
||||
@@ -1545,7 +1539,7 @@ void Player::UpdateVisibilityForPlayer(bool mapChange)
|
||||
}
|
||||
|
||||
// updates visibility of all objects around point of view for current player
|
||||
Acore::VisibleNotifier notifier(*this, mapChange);
|
||||
Acore::VisibleNotifier notifier(*this);
|
||||
Cell::VisitAllObjects(m_seer, notifier, GetSightRange());
|
||||
notifier.SendToSelf(); // send gathered data
|
||||
}
|
||||
@@ -1566,15 +1560,13 @@ void Player::UpdateObjectVisibility(bool forced)
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, T* target,
|
||||
std::vector<Unit*>& /*v*/)
|
||||
inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, T* target, std::set<Unit*>& /*v*/)
|
||||
{
|
||||
s64.insert(target->GetGUID());
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, GameObject* target,
|
||||
std::vector<Unit*>& /*v*/)
|
||||
inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, GameObject* target, std::set<Unit*>& /*v*/)
|
||||
{
|
||||
// @HACK: This is to prevent objects like deeprun tram from disappearing
|
||||
// when player moves far from its spawn point while riding it
|
||||
@@ -1583,19 +1575,17 @@ inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, GameObject* target,
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, Creature* target,
|
||||
std::vector<Unit*>& v)
|
||||
inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, Creature* target, std::set<Unit*>& v)
|
||||
{
|
||||
s64.insert(target->GetGUID());
|
||||
v.push_back(target);
|
||||
v.insert(target);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, Player* target,
|
||||
std::vector<Unit*>& v)
|
||||
inline void UpdateVisibilityOf_helper(GuidUnorderedSet& s64, Player* target, std::set<Unit*>& v)
|
||||
{
|
||||
s64.insert(target->GetGUID());
|
||||
v.push_back(target);
|
||||
v.insert(target);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -1611,8 +1601,7 @@ inline void BeforeVisibilityDestroy<Creature>(Creature* t, Player* p)
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void Player::UpdateVisibilityOf(T* target, UpdateData& data,
|
||||
std::vector<Unit*>& visibleNow)
|
||||
void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& visibleNow)
|
||||
{
|
||||
if (HaveAtClient(target))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user