![]() |
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 |
| GridCoord | GetGridCoord () const |
| 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) |
| template<class T > | |
| static void | VisitWorldObjects (WorldObject const *obj, T &visitor, float radius) |
| template<class T > | |
| static void | VisitAllObjects (WorldObject const *obj, T &visitor, float radius) |
| template<class T > | |
| static void | VisitGridObjects (float x, float y, Map *map, T &visitor, float radius) |
| template<class T > | |
| static void | VisitWorldObjects (float x, float y, Map *map, T &visitor, float radius) |
| template<class T > | |
| static void | VisitAllObjects (float x, float y, Map *map, T &visitor, float radius) |
Public Attributes | ||
| union { | ||
| struct { | ||
| uint8 grid_x | ||
| uint8 grid_y | ||
| uint8 cell_x | ||
| uint8 cell_y | ||
| } Part | ||
| uint32 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 25 of file CellImpl.h.
References data, MAX_NUMBER_OF_CELLS, CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.
|
inlinestatic |
Definition at line 33 of file CellImpl.h.
References Trinity::ComputeCellCoord().
Referenced by Visit(), and Map::VisitNearbyCellsOf().
|
inline |
Definition at line 61 of file Cell.h.
References data.
Referenced by Map::AddToGrid(), Map::AddToGrid(), Map::AreaTriggerRelocation(), Map::CheckGridIntegrity(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Map::DynamicObjectRelocation(), Map::GameObjectRelocation(), Map::GameObjectRespawnRelocation(), misc_commandscript::HandleGPSCommand(), Map::MapObjectCellRelocation(), Map::PlayerRelocation(), Map::SwitchGridContainers(), and Map::Visit().
|
inline |
Definition at line 62 of file Cell.h.
References data.
Referenced by Map::AddToGrid(), Map::AddToGrid(), Map::AreaTriggerRelocation(), Map::CheckGridIntegrity(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Map::DynamicObjectRelocation(), Map::GameObjectRelocation(), Map::GameObjectRespawnRelocation(), misc_commandscript::HandleGPSCommand(), Map::MapObjectCellRelocation(), Map::PlayerRelocation(), Map::SwitchGridContainers(), and Map::Visit().
Definition at line 43 of file Cell.h.
References data, and MAX_NUMBER_OF_CELLS.
|
inline |
Definition at line 49 of file Cell.h.
References cell_x, cell_y, data, and Part.
Referenced by Map::AreaTriggerRelocation(), Map::CreatureRelocation(), Map::DynamicObjectRelocation(), Map::GameObjectRelocation(), Map::MapObjectCellRelocation(), and Map::PlayerRelocation().
|
inline |
Definition at line 55 of file Cell.h.
References data, grid_x, grid_y, and Part.
Referenced by Map::AreaTriggerRelocation(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Map::DynamicObjectRelocation(), Map::GameObjectRelocation(), Map::GameObjectRespawnRelocation(), Map::MapObjectCellRelocation(), Map::PlayerRelocation(), and Transport::UpdatePosition().
|
inline |
Definition at line 73 of file Cell.h.
References data, and MAX_NUMBER_OF_CELLS.
|
inline |
|
inline |
Definition at line 63 of file Cell.h.
References data.
Referenced by Map::AddPlayerToMap(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToMap(), Map::AreaTriggerRelocation(), Map::CheckGridIntegrity(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Map::DynamicObjectRelocation(), Map::GameObjectRelocation(), Map::GameObjectRespawnRelocation(), misc_commandscript::HandleGPSCommand(), Map::MapObjectCellRelocation(), Map::PlayerRelocation(), Map::SwitchGridContainers(), and Map::Visit().
|
inline |
Definition at line 64 of file Cell.h.
References data.
Referenced by Map::AddPlayerToMap(), Map::AddToGrid(), Map::AddToGrid(), Map::AddToMap(), Map::AreaTriggerRelocation(), Map::CheckGridIntegrity(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Map::DynamicObjectRelocation(), Map::GameObjectRelocation(), Map::GameObjectRespawnRelocation(), misc_commandscript::HandleGPSCommand(), Map::MapObjectCellRelocation(), Map::PlayerRelocation(), Map::SwitchGridContainers(), and Map::Visit().
|
inline |
|
inline |
Definition at line 56 of file CellImpl.h.
References CalculateCellArea(), CellArea::high_bound, CoordPair< LIMIT >::IsCoordValid(), CellArea::low_bound, SIZE_OF_GRIDS, Map::Visit(), VisitCircle(), CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.
|
inline |
Definition at line 48 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 192 of file CellImpl.h.
References Trinity::ComputeCellCoord(), and Visit().
|
inlinestatic |
Definition at line 160 of file CellImpl.h.
References Trinity::ComputeCellCoord(), WorldObject::GetMap(), Position::GetPositionX(), Position::GetPositionY(), and Visit().
Referenced by boss_sartharion::CastLavaStrikeOnTarget(), spell_sha_flame_shock_fire_nova_enabler::CheckFlameShocks(), spell_dru_lunar_wrath::CheckProc(), spell_sha_lava_surge::CheckProcChance(), SmartScript::DoFindClosestFriendlyInRange(), ScriptedAI::DoFindFriendlyCC(), ScriptedAI::DoFindFriendlyMissingBuff(), ScriptedAI::DoSelectBelowHpPctFriendlyWithEntry(), ScriptedAI::DoSelectLowestHpFriendly(), boss_gathios_the_shatterer::ExecuteEvent(), DynObjAura::FillTargetMap(), WorldObject::FindNearestCreature(), WorldObject::FindNearestCreatureWithOptions(), npc_illidari_fighting_invasion_begins::GetNextTarget(), debug_commandscript::HandleDebugEnterVehicleCommand(), spell_dru_twin_moonfire::HandleEffectHit(), AuraEffect::HandleFeignDeath(), spell_warr_bloodsurge::HandlePeriodic(), spell_dru_luxuriant_soil::HandleProc(), spell_dru_power_of_the_archdruid::HandleProc(), spell_vehicle_throw_passenger::spell_vehicle_throw_passenger_SpellScript::HandleScript(), Creature::Heartbeat(), npc_pet_dk_ebon_gargoyle::InitializeAI(), spell_sporecaller_zancha_festering_harvest_pods_selector::OnPrecast(), spell_dru_shooting_stars::OnTick(), npc_infernal_rain_hellfire::RebuildTargetList(), boss_king_deepbeard::RemoveCallTheSeas(), spell_warl_channel_demonfire_activator::RemoveEffect(), boss_king_deepbeard::RemoveQuakes(), AreaTrigger::SearchUnits(), Unit::SelectNearbyTarget(), Creature::SelectNearestTarget(), Creature::SelectNearestTargetInAttackDistance(), npc_simon_bunny::npc_simon_bunnyAI::StartGame(), Map::SummonCreature(), spell_sha_fire_nova::TriggerDamage(), spell_sha_primordial_wave::TriggerDamage(), spell_sha_molten_assault::TriggerFlameShocks(), GameObject::Update(), TotemAI::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 91 of file CellImpl.h.
References Map::Visit(), CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.
Referenced by Visit().
|
inlinestatic |
Definition at line 172 of file CellImpl.h.
References Trinity::ComputeCellCoord(), and Visit().
|
inlinestatic |
Definition at line 140 of file CellImpl.h.
References Trinity::ComputeCellCoord(), WorldObject::GetMap(), Position::GetPositionX(), Position::GetPositionY(), and Visit().
Referenced by AlysrazorTrashEvaded(), Creature::CallAssistance(), Creature::CallForHelp(), spell_gen_cannibalize::CheckIfCorpseNear(), npc_crok_scourgebane::DamageTaken(), SmartScript::DoFindFriendlyCC(), SmartScript::DoFindFriendlyMissingBuff(), Creature::DoFleeToGetAssistance(), hyjalAI::DoOverrun(), SmartScript::DoSelectLowestHpFriendly(), SmartScript::DoSelectLowestHpPercentFriendly(), Spell::EffectCancelConversation(), 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(), OPvPCapturePointNA::GetAliveGuardsCount(), npc_priestess_alun_za_spirit_of_gold::GetClosestTaintedBloodAreaTrigger(), WorldObject::GetCreatureListWithEntryInGrid(), WorldObject::GetCreatureListWithOptionsInGrid(), WorldObject::GetGameObjectListWithEntryInGrid(), WorldObject::GetGameObjectListWithOptionsInGrid(), ChatHandler::GetNearbyGameObject(), Scripts::Pandaria::TheWanderingIsle::npc_huojin_trainee::GetNewPartner(), npc_thorim_trashAI::AIHelper::GetUnitWithMostMissingHp(), Scripts::Pandaria::TheWanderingIsle::HandleEmoteNearbyTushuiTrainees(), WorldSession::HandleLootOpcode(), mmaps_commandscript::HandleMmapTestArea(), misc_commandscript::HandleRespawnCommand(), hyjalAI::HideNearPos(), boss_orator_krix_vizk::JustDied(), 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(), SmartScript::ProcessAction(), boss_the_lich_king::Reset(), npc_icc_orb_controller::Reset(), DarkFallenAI::Reset(), hyjalAI::RespawnNearPos(), Spell::SearchTargets(), Creature::SelectNearestHostileUnitInAggroRange(), at_briarpatch_to_plains::StartConversation(), npc_egg_pile::npc_egg_pileAI::UpdateAI(), boss_onyxia::UpdateAI(), npc_icc_nerubar_broodkeeper::UpdateAI(), hyjalAI::WaypointReached(), and npc_crok_scourgebane::WaypointStarted().
|
inlinestatic |
Definition at line 182 of file CellImpl.h.
References Trinity::ComputeCellCoord(), and Visit().
|
inlinestatic |
Definition at line 150 of file CellImpl.h.
References Trinity::ComputeCellCoord(), WorldObject::GetMap(), Position::GetPositionX(), Position::GetPositionY(), and Visit().
Referenced by WorldObject::BuildUpdate(), spell_gen_cannibalize::CheckIfCorpseNear(), npc_midsummer_bunny_pole::npc_midsummer_bunny_poleAI::checkNearbyPlayers(), npc_crok_scourgebane::DamageTaken(), WorldObject::DestroyForNearbyPlayers(), Spell::EffectForceDeselect(), ScriptedAI::GetPlayerAtMinimumRange(), WorldObject::GetPlayerListInGrid(), spell_azhiccar_toxic_regurgitation_cast::HandleOnHit(), spell_volkaal_rapid_decay::HandleToxicPool(), npc_gunship_boarding_addAI::HasAttackablePlayerNearby(), npc_gunship_boarding_addAI::MovementInform(), Spell::SearchTargets(), GameObjectType::ControlZone::SearchTargets(), AreaTrigger::SearchUnits(), WorldObject::SelectNearestPlayer(), PlayerAchievementMgr::SendAchievementEarned(), Player::SendChatMessageToSetInRange(), CreatureTextMgr::SendChatPacket(), WorldObject::SendCombatLogMessage(), WorldObject::SendMessageToSet(), Player::SendMessageToSet(), WorldObject::SendMessageToSetInRange(), Player::SendMessageToSetInRange(), Player::SendMessageToSetInRange(), Player::SetContestedPvP(), Unit::Talk(), Unit::Talk(), GameObject::Update(), npc_dream_cloud::UpdateAI(), Creature::UpdateNearbyPlayersInteractions(), WorldObject::UpdateObjectVisibility(), TempSummon::UpdateObjectVisibilityOnCreate(), and TempSummon::UpdateObjectVisibilityOnDestroy().
| uint32 Cell::All |
Definition at line 90 of file Cell.h.
Referenced by operator==().
| uint8 Cell::cell_x |
Definition at line 87 of file Cell.h.
Referenced by DiffCell().
| uint8 Cell::cell_y |
Definition at line 88 of file Cell.h.
Referenced by DiffCell().
| union { ... } Cell::data |
Referenced by Cell(), CellX(), CellY(), Compute(), DiffCell(), DiffGrid(), GetCellCoord(), GetGridCoord(), GridX(), GridY(), operator==(), and Map::SwitchGridContainers().
| uint8 Cell::grid_x |
Definition at line 85 of file Cell.h.
Referenced by DiffGrid(), and Map::SwitchGridContainers().
| uint8 Cell::grid_y |
Definition at line 86 of file Cell.h.
Referenced by DiffGrid(), and Map::SwitchGridContainers().
| struct { ... } Cell::Part |
Referenced by DiffCell(), DiffGrid(), and Map::SwitchGridContainers().