![]() |
TrinityCore
|
#include <Cell.h>
Public Member Functions | |
| Cell () | |
| Cell (CellCoord const &p) | |
| Cell (float x, float y) | |
| void | Compute (uint32 &x, uint32 &y) const |
| bool | DiffCell (Cell const &cell) const |
| bool | DiffGrid (Cell const &cell) const |
| uint32 | CellX () const |
| uint32 | CellY () const |
| uint32 | GridX () const |
| uint32 | GridY () const |
| bool | NoCreate () const |
| void | SetNoCreate () |
| CellCoord | GetCellCoord () const |
| bool | operator== (Cell const &cell) const |
| template<class T , class CONTAINER > | |
| void | Visit (CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, WorldObject const &obj, float radius) const |
| template<class T , class CONTAINER > | |
| void | Visit (CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, float x, float y, float radius) const |
Static Public Member Functions | |
| static CellArea | CalculateCellArea (float x, float y, float radius) |
| template<class T > | |
| static void | VisitGridObjects (WorldObject const *obj, T &visitor, float radius, bool dont_load=true) |
| template<class T > | |
| static void | VisitWorldObjects (WorldObject const *obj, T &visitor, float radius, bool dont_load=true) |
| template<class T > | |
| static void | VisitAllObjects (WorldObject const *obj, T &visitor, float radius, bool dont_load=true) |
| template<class T > | |
| static void | VisitGridObjects (float x, float y, Map *map, T &visitor, float radius, bool dont_load=true) |
| template<class T > | |
| static void | VisitWorldObjects (float x, float y, Map *map, T &visitor, float radius, bool dont_load=true) |
| template<class T > | |
| static void | VisitAllObjects (float x, float y, Map *map, T &visitor, float radius, bool dont_load=true) |
Public Attributes | ||
| union { | ||
| struct { | ||
| uint8 grid_x | ||
| uint8 grid_y | ||
| uint8 cell_x | ||
| uint8 cell_y | ||
| uint8 nocreate | ||
| } Part | ||
| uint64 All | ||
| } | data | |
Private Member Functions | |
| template<class T , class CONTAINER > | |
| void | VisitCircle (TypeContainerVisitor< T, CONTAINER > &, Map &, CellCoord const &, CellCoord const &) const |
|
inlineexplicit |
Definition at line 27 of file CellImpl.h.
References data, MAX_NUMBER_OF_CELLS, CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.
|
inlinestatic |
Definition at line 35 of file CellImpl.h.
References Trinity::ComputeCellCoord(), and CoordPair< LIMIT >::normalize().
Referenced by Visit(), and Map::VisitNearbyCellsOf().
|
inline |
Definition at line 70 of file Cell.h.
References data.
Referenced by Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::CheckGridIntegrity(), Map::CreatureCellRelocation(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Map::DynamicObjectCellRelocation(), Map::DynamicObjectRelocation(), Map::GameObjectCellRelocation(), Map::GameObjectRelocation(), Map::GameObjectRespawnRelocation(), misc_commandscript::HandleGPSCommand(), Map::PlayerRelocation(), Map::SwitchGridContainers(), Map::SwitchGridContainers(), Map::Visit(), and ObjectWorldLoader::Visit().
|
inline |
Definition at line 71 of file Cell.h.
References data.
Referenced by Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::CheckGridIntegrity(), Map::CreatureCellRelocation(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Map::DynamicObjectCellRelocation(), Map::DynamicObjectRelocation(), Map::GameObjectCellRelocation(), Map::GameObjectRelocation(), Map::GameObjectRespawnRelocation(), misc_commandscript::HandleGPSCommand(), Map::PlayerRelocation(), Map::SwitchGridContainers(), Map::SwitchGridContainers(), Map::Visit(), and ObjectWorldLoader::Visit().
Definition at line 52 of file Cell.h.
References data, and MAX_NUMBER_OF_CELLS.
|
inline |
Definition at line 58 of file Cell.h.
References cell_x, cell_y, data, and Part.
Referenced by Map::CreatureCellRelocation(), Map::CreatureRelocation(), Map::DynamicObjectCellRelocation(), Map::DynamicObjectRelocation(), Map::GameObjectCellRelocation(), Map::GameObjectRelocation(), and Map::PlayerRelocation().
|
inline |
Definition at line 64 of file Cell.h.
References data, grid_x, grid_y, and Part.
Referenced by Map::CreatureCellRelocation(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Map::DynamicObjectCellRelocation(), Map::DynamicObjectRelocation(), Map::GameObjectCellRelocation(), Map::GameObjectRelocation(), Map::GameObjectRespawnRelocation(), Map::PlayerRelocation(), and Transport::UpdatePosition().
|
inline |
Definition at line 77 of file Cell.h.
References data, and MAX_NUMBER_OF_CELLS.
Referenced by ObjectWorldLoader::Visit(), ObjectGridLoader::Visit(), and ObjectGridLoader::Visit().
|
inline |
Definition at line 72 of file Cell.h.
References data.
Referenced by Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToMap(), Map::CheckGridIntegrity(), Map::CreatureCellRelocation(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Map::DynamicObjectCellRelocation(), Map::DynamicObjectRelocation(), Map::EnsureGridLoaded(), Map::EnsureGridLoadedForActiveObject(), Map::GameObjectCellRelocation(), Map::GameObjectRelocation(), Map::GameObjectRespawnRelocation(), misc_commandscript::HandleGPSCommand(), Map::PlayerRelocation(), Map::SwitchGridContainers(), Map::SwitchGridContainers(), and Map::Visit().
|
inline |
Definition at line 73 of file Cell.h.
References data.
Referenced by Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToMap(), Map::CheckGridIntegrity(), Map::CreatureCellRelocation(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Map::DynamicObjectCellRelocation(), Map::DynamicObjectRelocation(), Map::EnsureGridLoaded(), Map::EnsureGridLoadedForActiveObject(), Map::GameObjectCellRelocation(), Map::GameObjectRelocation(), Map::GameObjectRespawnRelocation(), misc_commandscript::HandleGPSCommand(), Map::PlayerRelocation(), Map::SwitchGridContainers(), Map::SwitchGridContainers(), and Map::Visit().
|
inline |
|
inline |
|
inline |
Definition at line 75 of file Cell.h.
References data.
Referenced by Map::ProcessRelocationNotifies(), VisitAllObjects(), VisitAllObjects(), VisitGridObjects(), VisitGridObjects(), Map::VisitNearbyCellsOf(), VisitWorldObjects(), and VisitWorldObjects().
|
inline |
Definition at line 58 of file CellImpl.h.
References CalculateCellArea(), data, CellArea::high_bound, CoordPair< LIMIT >::IsCoordValid(), CellArea::low_bound, nocreate, Part, SIZE_OF_GRIDS, Map::Visit(), VisitCircle(), CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.
|
inline |
Definition at line 50 of file CellImpl.h.
References WorldObject::GetCombatReach(), Position::GetPositionX(), Position::GetPositionY(), and Visit().
Referenced by Visit(), Trinity::DelayedUnitRelocation::Visit(), VisitAllObjects(), VisitAllObjects(), VisitGridObjects(), VisitGridObjects(), VisitWorldObjects(), and VisitWorldObjects().
|
inlinestatic |
Definition at line 230 of file CellImpl.h.
References Trinity::ComputeCellCoord(), SetNoCreate(), and Visit().
|
inlinestatic |
Definition at line 192 of file CellImpl.h.
References Trinity::ComputeCellCoord(), WorldObject::GetMap(), Position::GetPositionX(), Position::GetPositionY(), SetNoCreate(), and Visit().
Referenced by boss_sartharion::CastLavaStrikeOnTarget(), SmartScript::DoFindClosestFriendlyInRange(), ScriptedAI::DoFindFriendlyCC(), ScriptedAI::DoFindFriendlyMissingBuff(), ScriptedAI::DoSelectBelowHpPctFriendlyWithEntry(), ScriptedAI::DoSelectLowestHpFriendly(), boss_gathios_the_shatterer::ExecuteEvent(), UnitAura::FillTargetMap(), DynObjAura::FillTargetMap(), WorldObject::FindNearestCreature(), WorldObject::FindNearestCreatureWithOptions(), SmartScript::GetWorldObjectsInDist(), debug_commandscript::HandleDebugEnterVehicleCommand(), AuraEffect::HandleFeignDeath(), AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(), spell_vehicle_throw_passenger::spell_vehicle_throw_passenger_SpellScript::HandleScript(), npc_pet_dk_ebon_gargoyle::InitializeAI(), npc_infernal_rain_hellfire::RebuildTargetList(), Unit::SelectNearbyTarget(), Creature::SelectNearestTarget(), Creature::SelectNearestTargetInAttackDistance(), npc_simon_bunny::npc_simon_bunnyAI::StartGame(), Map::SummonCreature(), GameObject::Update(), TotemAI::UpdateAI(), npc_zealot_lorkhan::UpdateAI(), npc_belnistrasz::npc_belnistraszAI::UpdateAI(), npc_watch_commander_leonus::UpdateAI(), Unit::UpdateObjectVisibility(), Player::UpdateVisibilityForPlayer(), Trinity::DelayedUnitRelocation::Visit(), and npc_demolitionist_legoso::npc_demolitionist_legosoAI::WaypointReached().
|
inlineprivate |
Definition at line 116 of file CellImpl.h.
References data, nocreate, Part, Map::Visit(), CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.
Referenced by Visit().
|
inlinestatic |
Definition at line 206 of file CellImpl.h.
References Trinity::ComputeCellCoord(), SetNoCreate(), and Visit().
|
inlinestatic |
Definition at line 168 of file CellImpl.h.
References Trinity::ComputeCellCoord(), WorldObject::GetMap(), Position::GetPositionX(), Position::GetPositionY(), SetNoCreate(), and Visit().
Referenced by Creature::CallAssistance(), Creature::CallForHelp(), spell_gen_cannibalize::CheckIfCorpseNear(), spell_hun_pet_carrion_feeder::CheckIfCorpseNear(), npc_crok_scourgebane::DamageTaken(), SmartScript::DoFindFriendlyCC(), SmartScript::DoFindFriendlyMissingBuff(), Creature::DoFleeToGetAssistance(), hyjalAI::DoOverrun(), SmartScript::DoSelectLowestHpFriendly(), SmartScript::DoSelectLowestHpPercentFriendly(), OrbsDespawner::Execute(), ValithriaDespawner::Execute(), npc_captain_arnath::FindFriendlyCreature(), WorldObject::FindNearestGameObject(), WorldObject::FindNearestGameObjectOfType(), WorldObject::FindNearestGameObjectWithOptions(), WorldObject::FindNearestUnspawnedGameObject(), instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::FloorEruption(), ScriptedAI::ForceCombatStopForCreatureEntry(), npc_overlord_runthak_orgrimmar::npc_overlord_runthak_orgrimmarAI::GetCitizenGuids(), WorldObject::GetCreatureListWithEntryInGrid(), WorldObject::GetCreatureListWithOptionsInGrid(), WorldObject::GetGameObjectListWithEntryInGrid(), WorldObject::GetGameObjectListWithOptionsInGrid(), ChatHandler::GetNearbyGameObject(), npc_thorim_trashAI::AIHelper::GetUnitWithMostMissingHp(), mmaps_commandscript::HandleMmapTestArea(), misc_commandscript::HandleRespawnCommand(), hyjalAI::HideNearPos(), GameObject::LookupFishingHoleAround(), spell_corrupting_plague_aura::OnPeriodic(), spell_stasis_field_aura::OnPeriodic(), spell_thorim_activate_lightning_orb_periodic::spell_thorim_activate_lightning_orb_periodic_AuraScript::PeriodicTick(), boss_the_lich_king::Reset(), npc_icc_orb_controller::Reset(), DarkFallenAI::Reset(), hyjalAI::RespawnNearPos(), Spell::SearchTargets(), Creature::SelectNearestHostileUnitInAggroRange(), boss_onyxia::UpdateAI(), npc_icc_nerubar_broodkeeper::UpdateAI(), hyjalAI::WaypointReached(), and npc_crok_scourgebane::WaypointStarted().
|
inlinestatic |
Definition at line 218 of file CellImpl.h.
References Trinity::ComputeCellCoord(), SetNoCreate(), and Visit().
|
inlinestatic |
Definition at line 180 of file CellImpl.h.
References Trinity::ComputeCellCoord(), WorldObject::GetMap(), Position::GetPositionX(), Position::GetPositionY(), SetNoCreate(), and Visit().
Referenced by WorldObject::BuildUpdate(), spell_gen_cannibalize::CheckIfCorpseNear(), spell_hun_pet_carrion_feeder::CheckIfCorpseNear(), npc_midsummer_bunny_pole::npc_midsummer_bunny_poleAI::checkNearbyPlayers(), npc_geezle::npc_geezleAI::CompleteQuest(), npc_crok_scourgebane::DamageTaken(), WorldObject::DestroyForNearbyPlayers(), Spell::EffectForceDeselect(), ScriptedAI::GetPlayerAtMinimumRange(), WorldObject::GetPlayerListInGrid(), WorldSession::HandleTextEmoteOpcode(), npc_gunship_boarding_addAI::HasAttackablePlayerNearby(), npc_clintar_spirit::npc_clintar_spiritAI::IsSummonedBy(), npc_gunship_boarding_addAI::MovementInform(), spell_love_is_in_the_air_romantic_picnic::OnPeriodic(), Spell::SearchTargets(), WorldObject::SelectNearestPlayer(), AchievementMgr::SendAchievementEarned(), CreatureTextMgr::SendChatPacket(), WorldObject::SendMessageToSet(), Player::SendMessageToSet(), WorldObject::SendMessageToSetInRange(), Player::SendMessageToSetInRange(), Player::SendMessageToSetInRange(), Player::SetContestedPvP(), Unit::Talk(), Unit::Talk(), BfCapturePoint::Update(), OPvPCapturePoint::Update(), GameObject::Update(), npc_dream_cloud::UpdateAI(), and WorldObject::UpdateObjectVisibility().
| uint64 Cell::All |
Definition at line 95 of file Cell.h.
Referenced by operator==().
| uint8 Cell::cell_x |
Definition at line 91 of file Cell.h.
Referenced by DiffCell(), and ObjectGridLoader::LoadN().
| uint8 Cell::cell_y |
Definition at line 92 of file Cell.h.
Referenced by DiffCell(), and ObjectGridLoader::LoadN().
| union { ... } Cell::data |
| uint8 Cell::grid_x |
Definition at line 89 of file Cell.h.
Referenced by DiffGrid(), Map::SwitchGridContainers(), and Map::SwitchGridContainers().
| uint8 Cell::grid_y |
Definition at line 90 of file Cell.h.
Referenced by DiffGrid(), Map::SwitchGridContainers(), and Map::SwitchGridContainers().
| uint8 Cell::nocreate |
Definition at line 93 of file Cell.h.
Referenced by Visit(), and VisitCircle().
| struct { ... } Cell::Part |
Referenced by DiffCell(), DiffGrid(), ObjectGridLoader::LoadN(), Map::SwitchGridContainers(), Map::SwitchGridContainers(), Visit(), and VisitCircle().