mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[10020] Drop unused member in VisibleNotifier structure and related functions
(based on SilverIce's repo commit e678555) Signed-off-by: VladimirMangos <vladimir@getmangos.com> Also applied mangos code style to GridNotifiersImpl.h
This commit is contained in:
parent
57ca730a2f
commit
d6c5207867
6 changed files with 127 additions and 145 deletions
|
|
@ -53,7 +53,7 @@ VisibleNotifier::Notify()
|
|||
{
|
||||
// ignore far sight case
|
||||
(*itr)->UpdateVisibilityOf((*itr),&i_player);
|
||||
i_player.UpdateVisibilityOf(&i_player,(*itr),i_data,i_data_updates,i_visibleNow);
|
||||
i_player.UpdateVisibilityOf(&i_player,(*itr),i_data,i_visibleNow);
|
||||
i_clientGUIDs.erase((*itr)->GetGUID());
|
||||
}
|
||||
}
|
||||
|
|
@ -68,17 +68,6 @@ VisibleNotifier::Notify()
|
|||
DEBUG_FILTER_LOG(LOG_FILTER_VISIBILITY_CHANGES, "%s is out of range (no in active cells set) now for player %u",itr->GetString().c_str(),i_player.GetGUIDLow());
|
||||
}
|
||||
|
||||
// send update to other players (except player updates that already sent using SendUpdateToPlayer)
|
||||
for(UpdateDataMapType::iterator iter = i_data_updates.begin(); iter != i_data_updates.end(); ++iter)
|
||||
{
|
||||
if(iter->first==&i_player)
|
||||
continue;
|
||||
|
||||
WorldPacket packet;
|
||||
iter->second.BuildPacket(&packet);
|
||||
iter->first->GetSession()->SendPacket(&packet);
|
||||
}
|
||||
|
||||
if( i_data.HasData() )
|
||||
{
|
||||
// send create/outofrange packet to player (except player create updates that already sent using SendUpdateToPlayer)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ namespace MaNGOS
|
|||
{
|
||||
Player &i_player;
|
||||
UpdateData i_data;
|
||||
UpdateDataMapType i_data_updates;
|
||||
ObjectGuidSet i_clientGUIDs;
|
||||
std::set<WorldObject*> i_visibleNow;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,39 +29,36 @@
|
|||
#include "DBCEnums.h"
|
||||
|
||||
template<class T>
|
||||
inline void
|
||||
MaNGOS::VisibleNotifier::Visit(GridRefManager<T> &m)
|
||||
inline void MaNGOS::VisibleNotifier::Visit(GridRefManager<T> &m)
|
||||
{
|
||||
WorldObject const* viewPoint = i_player.GetViewPoint();
|
||||
|
||||
for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
i_player.UpdateVisibilityOf(viewPoint,iter->getSource(),i_data,i_data_updates,i_visibleNow);
|
||||
i_player.UpdateVisibilityOf(viewPoint,iter->getSource(), i_data, i_visibleNow);
|
||||
i_clientGUIDs.erase(iter->getSource()->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
inline void
|
||||
MaNGOS::ObjectUpdater::Visit(CreatureMapType &m)
|
||||
inline void MaNGOS::ObjectUpdater::Visit(CreatureMapType &m)
|
||||
{
|
||||
for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
||||
for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
iter->getSource()->Update(i_timeDiff);
|
||||
}
|
||||
|
||||
inline void
|
||||
MaNGOS::PlayerRelocationNotifier::Visit(PlayerMapType &m)
|
||||
inline void MaNGOS::PlayerRelocationNotifier::Visit(PlayerMapType &m)
|
||||
{
|
||||
for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
||||
for(PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
if(&i_player==iter->getSource())
|
||||
if (&i_player==iter->getSource())
|
||||
continue;
|
||||
|
||||
// visibility for players updated by ObjectAccessor::UpdateVisibilityFor calls in appropriate places
|
||||
|
||||
// Cancel Trade
|
||||
if(i_player.GetTrader()==iter->getSource())
|
||||
if (i_player.GetTrader()==iter->getSource())
|
||||
// iteraction distance
|
||||
if(!i_player.IsWithinDistInMap(iter->getSource(), 5))
|
||||
if (!i_player.IsWithinDistInMap(iter->getSource(), INTERACTION_DISTANCE))
|
||||
i_player.GetSession()->SendCancelTrade(); // will clode both side trade windows
|
||||
}
|
||||
}
|
||||
|
|
@ -72,44 +69,42 @@ inline void PlayerCreatureRelocationWorker(Player* pl, WorldObject const* viewPo
|
|||
pl->UpdateVisibilityOf(viewPoint,c);
|
||||
|
||||
// Creature AI reaction
|
||||
if(!c->hasUnitState(UNIT_STAT_FLEEING))
|
||||
if (!c->hasUnitState(UNIT_STAT_FLEEING))
|
||||
{
|
||||
if( c->AI() && c->AI()->IsVisible(pl) && !c->IsInEvadeMode() )
|
||||
if (c->AI() && c->AI()->IsVisible(pl) && !c->IsInEvadeMode())
|
||||
c->AI()->MoveInLineOfSight(pl);
|
||||
}
|
||||
}
|
||||
|
||||
inline void CreatureCreatureRelocationWorker(Creature* c1, Creature* c2)
|
||||
{
|
||||
if(!c1->hasUnitState(UNIT_STAT_FLEEING))
|
||||
if (!c1->hasUnitState(UNIT_STAT_FLEEING))
|
||||
{
|
||||
if( c1->AI() && c1->AI()->IsVisible(c2) && !c1->IsInEvadeMode() )
|
||||
if (c1->AI() && c1->AI()->IsVisible(c2) && !c1->IsInEvadeMode())
|
||||
c1->AI()->MoveInLineOfSight(c2);
|
||||
}
|
||||
|
||||
if(!c2->hasUnitState(UNIT_STAT_FLEEING))
|
||||
if (!c2->hasUnitState(UNIT_STAT_FLEEING))
|
||||
{
|
||||
if( c2->AI() && c2->AI()->IsVisible(c1) && !c2->IsInEvadeMode() )
|
||||
if (c2->AI() && c2->AI()->IsVisible(c1) && !c2->IsInEvadeMode())
|
||||
c2->AI()->MoveInLineOfSight(c1);
|
||||
}
|
||||
}
|
||||
|
||||
inline void
|
||||
MaNGOS::PlayerRelocationNotifier::Visit(CreatureMapType &m)
|
||||
inline void MaNGOS::PlayerRelocationNotifier::Visit(CreatureMapType &m)
|
||||
{
|
||||
if(!i_player.isAlive() || i_player.isInFlight())
|
||||
if (!i_player.isAlive() || i_player.isInFlight())
|
||||
return;
|
||||
|
||||
WorldObject const* viewPoint = i_player.GetViewPoint();
|
||||
|
||||
for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
||||
for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
if (iter->getSource()->isAlive())
|
||||
PlayerCreatureRelocationWorker(&i_player,viewPoint,iter->getSource());
|
||||
PlayerCreatureRelocationWorker(&i_player, viewPoint, iter->getSource());
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void
|
||||
MaNGOS::CreatureRelocationNotifier::Visit(PlayerMapType &m)
|
||||
inline void MaNGOS::CreatureRelocationNotifier::Visit(PlayerMapType &m)
|
||||
{
|
||||
if(!i_creature.isAlive())
|
||||
return;
|
||||
|
|
@ -121,26 +116,25 @@ MaNGOS::CreatureRelocationNotifier::Visit(PlayerMapType &m)
|
|||
}
|
||||
|
||||
template<>
|
||||
inline void
|
||||
MaNGOS::CreatureRelocationNotifier::Visit(CreatureMapType &m)
|
||||
inline void MaNGOS::CreatureRelocationNotifier::Visit(CreatureMapType &m)
|
||||
{
|
||||
if(!i_creature.isAlive())
|
||||
if (!i_creature.isAlive())
|
||||
return;
|
||||
|
||||
for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
||||
for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
Creature* c = iter->getSource();
|
||||
if( c != &i_creature && c->isAlive())
|
||||
if (c != &i_creature && c->isAlive())
|
||||
CreatureCreatureRelocationWorker(c, &i_creature);
|
||||
}
|
||||
}
|
||||
|
||||
inline void MaNGOS::DynamicObjectUpdater::VisitHelper(Unit* target)
|
||||
{
|
||||
if(!target->isAlive() || target->isInFlight() )
|
||||
if (!target->isAlive() || target->isInFlight() )
|
||||
return;
|
||||
|
||||
if(target->GetTypeId()==TYPEID_UNIT && ((Creature*)target)->isTotem())
|
||||
if (target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->isTotem())
|
||||
return;
|
||||
|
||||
if (!i_dynobject.IsWithinDistInMap(target, i_dynobject.GetRadius()))
|
||||
|
|
@ -151,14 +145,14 @@ inline void MaNGOS::DynamicObjectUpdater::VisitHelper(Unit* target)
|
|||
return;
|
||||
|
||||
// Evade target
|
||||
if( target->GetTypeId()==TYPEID_UNIT && ((Creature*)target)->IsInEvadeMode() )
|
||||
if (target->GetTypeId()==TYPEID_UNIT && ((Creature*)target)->IsInEvadeMode())
|
||||
return;
|
||||
|
||||
//Check player targets and remove if in GM mode or GM invisibility (for not self casting case)
|
||||
if( target->GetTypeId()==TYPEID_PLAYER && target != i_check && (((Player*)target)->isGameMaster() || ((Player*)target)->GetVisibility()==VISIBILITY_OFF) )
|
||||
if (target->GetTypeId() == TYPEID_PLAYER && target != i_check && (((Player*)target)->isGameMaster() || ((Player*)target)->GetVisibility() == VISIBILITY_OFF))
|
||||
return;
|
||||
|
||||
if (i_check->GetTypeId()==TYPEID_PLAYER )
|
||||
if (i_check->GetTypeId() == TYPEID_PLAYER )
|
||||
{
|
||||
if (i_check->IsFriendlyTo( target ))
|
||||
return;
|
||||
|
|
@ -174,9 +168,11 @@ inline void MaNGOS::DynamicObjectUpdater::VisitHelper(Unit* target)
|
|||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId());
|
||||
SpellEffectIndex eff_index = i_dynobject.GetEffIndex();
|
||||
|
||||
// Check target immune to spell or aura
|
||||
if (target->IsImmunedToSpell(spellInfo) || target->IsImmunedToSpellEffect(spellInfo, eff_index))
|
||||
return;
|
||||
|
||||
// Apply PersistentAreaAura on target
|
||||
PersistentAreaAura* Aur = new PersistentAreaAura(spellInfo, eff_index, NULL, target, i_dynobject.GetCaster());
|
||||
target->AddAura(Aur);
|
||||
|
|
@ -184,18 +180,16 @@ inline void MaNGOS::DynamicObjectUpdater::VisitHelper(Unit* target)
|
|||
}
|
||||
|
||||
template<>
|
||||
inline void
|
||||
MaNGOS::DynamicObjectUpdater::Visit(CreatureMapType &m)
|
||||
inline void MaNGOS::DynamicObjectUpdater::Visit(CreatureMapType &m)
|
||||
{
|
||||
for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
VisitHelper(itr->getSource());
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void
|
||||
MaNGOS::DynamicObjectUpdater::Visit(PlayerMapType &m)
|
||||
inline void MaNGOS::DynamicObjectUpdater::Visit(PlayerMapType &m)
|
||||
{
|
||||
for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
VisitHelper(itr->getSource());
|
||||
}
|
||||
|
||||
|
|
@ -207,12 +201,12 @@ template<class Check>
|
|||
void MaNGOS::WorldObjectSearcher<Check>::Visit(GameObjectMapType &m)
|
||||
{
|
||||
// already found
|
||||
if(i_object)
|
||||
if (i_object)
|
||||
return;
|
||||
|
||||
for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if (i_check(itr->getSource()))
|
||||
|
|
@ -227,15 +221,15 @@ template<class Check>
|
|||
void MaNGOS::WorldObjectSearcher<Check>::Visit(PlayerMapType &m)
|
||||
{
|
||||
// already found
|
||||
if(i_object)
|
||||
if (i_object)
|
||||
return;
|
||||
|
||||
for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
{
|
||||
i_object = itr->getSource();
|
||||
return;
|
||||
|
|
@ -247,15 +241,15 @@ template<class Check>
|
|||
void MaNGOS::WorldObjectSearcher<Check>::Visit(CreatureMapType &m)
|
||||
{
|
||||
// already found
|
||||
if(i_object)
|
||||
if (i_object)
|
||||
return;
|
||||
|
||||
for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
{
|
||||
i_object = itr->getSource();
|
||||
return;
|
||||
|
|
@ -267,15 +261,15 @@ template<class Check>
|
|||
void MaNGOS::WorldObjectSearcher<Check>::Visit(CorpseMapType &m)
|
||||
{
|
||||
// already found
|
||||
if(i_object)
|
||||
if (i_object)
|
||||
return;
|
||||
|
||||
for(CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(CorpseMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
{
|
||||
i_object = itr->getSource();
|
||||
return;
|
||||
|
|
@ -287,15 +281,15 @@ template<class Check>
|
|||
void MaNGOS::WorldObjectSearcher<Check>::Visit(DynamicObjectMapType &m)
|
||||
{
|
||||
// already found
|
||||
if(i_object)
|
||||
if (i_object)
|
||||
return;
|
||||
|
||||
for(DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(DynamicObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
{
|
||||
i_object = itr->getSource();
|
||||
return;
|
||||
|
|
@ -306,45 +300,45 @@ void MaNGOS::WorldObjectSearcher<Check>::Visit(DynamicObjectMapType &m)
|
|||
template<class Check>
|
||||
void MaNGOS::WorldObjectListSearcher<Check>::Visit(PlayerMapType &m)
|
||||
{
|
||||
for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
if(itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if(i_check(itr->getSource()))
|
||||
for(PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (i_check(itr->getSource()))
|
||||
i_objects.push_back(itr->getSource());
|
||||
}
|
||||
|
||||
template<class Check>
|
||||
void MaNGOS::WorldObjectListSearcher<Check>::Visit(CreatureMapType &m)
|
||||
{
|
||||
for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
if(itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if(i_check(itr->getSource()))
|
||||
for(CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (i_check(itr->getSource()))
|
||||
i_objects.push_back(itr->getSource());
|
||||
}
|
||||
|
||||
template<class Check>
|
||||
void MaNGOS::WorldObjectListSearcher<Check>::Visit(CorpseMapType &m)
|
||||
{
|
||||
for(CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
if(itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if(i_check(itr->getSource()))
|
||||
for(CorpseMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (i_check(itr->getSource()))
|
||||
i_objects.push_back(itr->getSource());
|
||||
}
|
||||
|
||||
template<class Check>
|
||||
void MaNGOS::WorldObjectListSearcher<Check>::Visit(GameObjectMapType &m)
|
||||
{
|
||||
for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
if(itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if(i_check(itr->getSource()))
|
||||
for(GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (i_check(itr->getSource()))
|
||||
i_objects.push_back(itr->getSource());
|
||||
}
|
||||
|
||||
template<class Check>
|
||||
void MaNGOS::WorldObjectListSearcher<Check>::Visit(DynamicObjectMapType &m)
|
||||
{
|
||||
for(DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
if(itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if(i_check(itr->getSource()))
|
||||
for(DynamicObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (i_check(itr->getSource()))
|
||||
i_objects.push_back(itr->getSource());
|
||||
}
|
||||
|
||||
|
|
@ -354,15 +348,15 @@ template<class Check>
|
|||
void MaNGOS::GameObjectSearcher<Check>::Visit(GameObjectMapType &m)
|
||||
{
|
||||
// already found
|
||||
if(i_object)
|
||||
if (i_object)
|
||||
return;
|
||||
|
||||
for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
{
|
||||
i_object = itr->getSource();
|
||||
return;
|
||||
|
|
@ -373,12 +367,12 @@ void MaNGOS::GameObjectSearcher<Check>::Visit(GameObjectMapType &m)
|
|||
template<class Check>
|
||||
void MaNGOS::GameObjectLastSearcher<Check>::Visit(GameObjectMapType &m)
|
||||
{
|
||||
for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
i_object = itr->getSource();
|
||||
}
|
||||
}
|
||||
|
|
@ -386,9 +380,9 @@ void MaNGOS::GameObjectLastSearcher<Check>::Visit(GameObjectMapType &m)
|
|||
template<class Check>
|
||||
void MaNGOS::GameObjectListSearcher<Check>::Visit(GameObjectMapType &m)
|
||||
{
|
||||
for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
if(itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if(i_check(itr->getSource()))
|
||||
for(GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (i_check(itr->getSource()))
|
||||
i_objects.push_back(itr->getSource());
|
||||
}
|
||||
|
||||
|
|
@ -398,15 +392,15 @@ template<class Check>
|
|||
void MaNGOS::UnitSearcher<Check>::Visit(CreatureMapType &m)
|
||||
{
|
||||
// already found
|
||||
if(i_object)
|
||||
if (i_object)
|
||||
return;
|
||||
|
||||
for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
{
|
||||
i_object = itr->getSource();
|
||||
return;
|
||||
|
|
@ -418,15 +412,15 @@ template<class Check>
|
|||
void MaNGOS::UnitSearcher<Check>::Visit(PlayerMapType &m)
|
||||
{
|
||||
// already found
|
||||
if(i_object)
|
||||
if (i_object)
|
||||
return;
|
||||
|
||||
for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
{
|
||||
i_object = itr->getSource();
|
||||
return;
|
||||
|
|
@ -437,12 +431,12 @@ void MaNGOS::UnitSearcher<Check>::Visit(PlayerMapType &m)
|
|||
template<class Check>
|
||||
void MaNGOS::UnitLastSearcher<Check>::Visit(CreatureMapType &m)
|
||||
{
|
||||
for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
i_object = itr->getSource();
|
||||
}
|
||||
}
|
||||
|
|
@ -450,12 +444,12 @@ void MaNGOS::UnitLastSearcher<Check>::Visit(CreatureMapType &m)
|
|||
template<class Check>
|
||||
void MaNGOS::UnitLastSearcher<Check>::Visit(PlayerMapType &m)
|
||||
{
|
||||
for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
i_object = itr->getSource();
|
||||
}
|
||||
}
|
||||
|
|
@ -463,18 +457,18 @@ void MaNGOS::UnitLastSearcher<Check>::Visit(PlayerMapType &m)
|
|||
template<class Check>
|
||||
void MaNGOS::UnitListSearcher<Check>::Visit(PlayerMapType &m)
|
||||
{
|
||||
for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
if(itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if(i_check(itr->getSource()))
|
||||
for(PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (i_check(itr->getSource()))
|
||||
i_objects.push_back(itr->getSource());
|
||||
}
|
||||
|
||||
template<class Check>
|
||||
void MaNGOS::UnitListSearcher<Check>::Visit(CreatureMapType &m)
|
||||
{
|
||||
for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
if(itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if(i_check(itr->getSource()))
|
||||
for(CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (i_check(itr->getSource()))
|
||||
i_objects.push_back(itr->getSource());
|
||||
}
|
||||
|
||||
|
|
@ -484,15 +478,15 @@ template<class Check>
|
|||
void MaNGOS::CreatureSearcher<Check>::Visit(CreatureMapType &m)
|
||||
{
|
||||
// already found
|
||||
if(i_object)
|
||||
if (i_object)
|
||||
return;
|
||||
|
||||
for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
{
|
||||
i_object = itr->getSource();
|
||||
return;
|
||||
|
|
@ -503,12 +497,12 @@ void MaNGOS::CreatureSearcher<Check>::Visit(CreatureMapType &m)
|
|||
template<class Check>
|
||||
void MaNGOS::CreatureLastSearcher<Check>::Visit(CreatureMapType &m)
|
||||
{
|
||||
for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
i_object = itr->getSource();
|
||||
}
|
||||
}
|
||||
|
|
@ -516,9 +510,9 @@ void MaNGOS::CreatureLastSearcher<Check>::Visit(CreatureMapType &m)
|
|||
template<class Check>
|
||||
void MaNGOS::CreatureListSearcher<Check>::Visit(CreatureMapType &m)
|
||||
{
|
||||
for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
if(itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if( i_check(itr->getSource()))
|
||||
for(CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (i_check(itr->getSource()))
|
||||
i_objects.push_back(itr->getSource());
|
||||
}
|
||||
|
||||
|
|
@ -526,15 +520,15 @@ template<class Check>
|
|||
void MaNGOS::PlayerSearcher<Check>::Visit(PlayerMapType &m)
|
||||
{
|
||||
// already found
|
||||
if(i_object)
|
||||
if (i_object)
|
||||
return;
|
||||
|
||||
for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
|
||||
for(PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if(!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
if (!itr->getSource()->InSamePhase(i_phaseMask))
|
||||
continue;
|
||||
|
||||
if(i_check(itr->getSource()))
|
||||
if (i_check(itr->getSource()))
|
||||
{
|
||||
i_object = itr->getSource();
|
||||
return;
|
||||
|
|
@ -550,14 +544,14 @@ void MaNGOS::LocalizedPacketDo<Builder>::operator()( Player* p )
|
|||
WorldPacket* data;
|
||||
|
||||
// create if not cached yet
|
||||
if(i_data_cache.size() < cache_idx+1 || !i_data_cache[cache_idx])
|
||||
if (i_data_cache.size() < cache_idx+1 || !i_data_cache[cache_idx])
|
||||
{
|
||||
if(i_data_cache.size() < cache_idx+1)
|
||||
if (i_data_cache.size() < cache_idx+1)
|
||||
i_data_cache.resize(cache_idx+1);
|
||||
|
||||
data = new WorldPacket(SMSG_MESSAGECHAT, 200);
|
||||
|
||||
i_builder(*data,loc_idx);
|
||||
i_builder(*data, loc_idx);
|
||||
|
||||
i_data_cache[cache_idx] = data;
|
||||
}
|
||||
|
|
@ -575,14 +569,14 @@ void MaNGOS::LocalizedPacketListDo<Builder>::operator()( Player* p )
|
|||
WorldPacketList* data_list;
|
||||
|
||||
// create if not cached yet
|
||||
if(i_data_cache.size() < cache_idx+1 || i_data_cache[cache_idx].empty())
|
||||
if (i_data_cache.size() < cache_idx+1 || i_data_cache[cache_idx].empty())
|
||||
{
|
||||
if(i_data_cache.size() < cache_idx+1)
|
||||
if (i_data_cache.size() < cache_idx+1)
|
||||
i_data_cache.resize(cache_idx+1);
|
||||
|
||||
data_list = &i_data_cache[cache_idx];
|
||||
|
||||
i_builder(*data_list,loc_idx);
|
||||
i_builder(*data_list, loc_idx);
|
||||
}
|
||||
else
|
||||
data_list = &i_data_cache[cache_idx];
|
||||
|
|
|
|||
|
|
@ -19202,7 +19202,7 @@ inline void UpdateVisibilityOf_helper(ObjectGuidSet& s64, GameObject* target)
|
|||
}
|
||||
|
||||
template<class T>
|
||||
void Player::UpdateVisibilityOf(WorldObject const* viewPoint, T* target, UpdateData& data, UpdateDataMapType& /*data_updates*/, std::set<WorldObject*>& visibleNow)
|
||||
void Player::UpdateVisibilityOf(WorldObject const* viewPoint, T* target, UpdateData& data, std::set<WorldObject*>& visibleNow)
|
||||
{
|
||||
if(HaveAtClient(target))
|
||||
{
|
||||
|
|
@ -19231,11 +19231,11 @@ void Player::UpdateVisibilityOf(WorldObject const* viewPoint, T* target, UpdateD
|
|||
}
|
||||
}
|
||||
|
||||
template void Player::UpdateVisibilityOf(WorldObject const* viewPoint, Player* target, UpdateData& data, UpdateDataMapType& data_updates, std::set<WorldObject*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(WorldObject const* viewPoint, Creature* target, UpdateData& data, UpdateDataMapType& data_updates, std::set<WorldObject*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(WorldObject const* viewPoint, Corpse* target, UpdateData& data, UpdateDataMapType& data_updates, std::set<WorldObject*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(WorldObject const* viewPoint, GameObject* target, UpdateData& data, UpdateDataMapType& data_updates, std::set<WorldObject*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(WorldObject const* viewPoint, DynamicObject* target, UpdateData& data, UpdateDataMapType& data_updates, std::set<WorldObject*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(WorldObject const* viewPoint, Player* target, UpdateData& data, std::set<WorldObject*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(WorldObject const* viewPoint, Creature* target, UpdateData& data, std::set<WorldObject*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(WorldObject const* viewPoint, Corpse* target, UpdateData& data, std::set<WorldObject*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(WorldObject const* viewPoint, GameObject* target, UpdateData& data, std::set<WorldObject*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(WorldObject const* viewPoint, DynamicObject* target, UpdateData& data, std::set<WorldObject*>& visibleNow);
|
||||
|
||||
void Player::InitPrimaryProfessions()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2201,7 +2201,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void UpdateVisibilityOf(WorldObject const* viewPoint, WorldObject* target);
|
||||
|
||||
template<class T>
|
||||
void UpdateVisibilityOf(WorldObject const* viewPoint,T* target, UpdateData& data, UpdateDataMapType& data_updates, std::set<WorldObject*>& visibleNow);
|
||||
void UpdateVisibilityOf(WorldObject const* viewPoint,T* target, UpdateData& data, std::set<WorldObject*>& visibleNow);
|
||||
|
||||
// Stealth detection system
|
||||
void HandleStealthedUnitsDetection();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10019"
|
||||
#define REVISION_NR "10020"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue