51#include <G3D/Vector3.h>
104 std::size_t sizePos = buf.
wpos();
115 uint8 contentsChangedMask = 0;
126 data <<
uint8(
false);
127 data <<
uint8(contentsChangedMask);
162 std::stringstream sstr;
164 return std::move(sstr).str();
218m_movementInfo(), m_name(), m_isActive(false), m_isFarVisible(false), m_isStoredInWorldObjectGridContainer(isWorldObject), m_zoneScript(nullptr),
220m_currMap(nullptr), m_InstanceId(0), _dbPhase(0), m_notifyflags(0), _heartbeatTimer(
HEARTBEAT_INTERVAL)
235 TC_LOG_FATAL(
"misc",
"WorldObject::~WorldObject Corpse Type: {} ({}) deleted but still in map!!",
339 transport->RemovePassenger(
this);
404 float dist = dz - sizefactor;
405 return (dist > 0 ? dist : 0);
410 float sizefactor = 0;
413 float maxdist = dist2compare + sizefactor;
415 Position const* thisOrTransport =
this;
416 Position const* objOrObjTransport = obj;
425 return thisOrTransport->
IsInDist(objOrObjTransport, maxdist);
427 return thisOrTransport->
IsInDist2d(objOrObjTransport, maxdist);
433 return d > 0.0f ? d : 0.0f;
439 return d > 0.0f ? d : 0.0f;
445 return d > 0.0f ? d : 0.0f;
451 return d > 0.0f ? d : 0.0f;
457 return d > 0.0f ? d : 0.0f;
496 return obj &&
_IsWithinDist(obj, dist2compare, is3D, incOwnRadius, incTargetRadius);
571 float distsq1 = dx1*dx1 + dy1*dy1;
580 float distsq2 = dx2*dx2 + dy2*dy2;
587 return distsq1 < distsq2;
594 float distsq = dx*dx + dy*dy;
606 float mindist = minRange + sizefactor;
607 if (distsq < mindist * mindist)
611 float maxdist = maxRange + sizefactor;
612 return distsq < maxdist * maxdist;
624 float mindist = minRange + sizefactor;
625 if (distsq < mindist * mindist)
629 float maxdist = maxRange + sizefactor;
630 return distsq < maxdist * maxdist;
642 float mindist = minRange + sizefactor;
643 if (distsq < mindist * mindist)
647 float maxdist = maxRange + sizefactor;
648 return distsq < maxdist * maxdist;
686 float new_dist = minDistance + (distance - minDistance) * std::sqrt(
rand_norm());
688 x += new_dist * std::cos(angle);
689 y += new_dist * std::sin(angle);
705 z += unit->GetHoverOffset();
724 bool canSwim = unit->CanSwim();
735 float hoverOffset = unit->GetHoverOffset();
736 max_z += hoverOffset;
737 ground_z += hoverOffset;
741 else if (z < ground_z)
750 float ground_z =
GetMapHeight(x, y, z) + unit->GetHoverOffset();
780 return thisCreature->m_SightDistance;
809 if (player->GetCinematicMgr()->IsOnCinematic())
816 return creature->m_SightDistance;
870 if (smoothPhasing->IsBeingReplacedForSeer(
GetGUID()))
880 if (!spawnTrackingStateData->Visible)
883 bool corpseVisibility =
false;
886 bool corpseCheck =
false;
889 if (thisPlayer->isDead() && thisPlayer->GetHealth() > 0 &&
892 if (
Corpse* corpse = thisPlayer->GetCorpse())
895 if (corpse->IsWithinDist(thisPlayer,
GetSightRange(obj),
false))
897 corpseVisibility =
true;
905 if (!thisPlayer->HaveAtClient(vehicle))
912 viewpoint = player->GetViewpoint();
939 if (!thisPlayer->IsGroupVisibleFor(objPlayer))
971 if (thisUnit->isPossessing())
1009 if (!(mask & (
uint64(1) << i)))
1016 if (ownInvisibilityDetectValue < objInvisibilityValue)
1033 float combatReach = 0.0f;
1039 if (distance < combatReach)
1061 int32 detectionValue = 30;
1072 detectionValue -=
int32(owner->GetLevelForTarget(
this) - 1) * 5;
1077 float visibilityRange = float(detectionValue) * 0.3f + combatReach;
1085 visibilityRange += (visibilityRange * 0.08f) + 1.5f;
1092 if (distance > visibilityRange)
1143 combatLogSender(self);
1241 Unit* summonerUnit = summoner ? summoner->
ToUnit() :
nullptr;
1247 summon =
new TempSummon(properties, summoner,
false);
1250 summon =
new Guardian(properties, summonerUnit,
false);
1253 summon =
new Puppet(properties, summonerUnit);
1256 summon =
new Totem(properties, summonerUnit);
1259 summon =
new Minion(properties, summonerUnit,
false);
1263 if (!summon->
Create(GenerateLowGuid<HighGuid::Creature>(),
this, entry, pos,
nullptr, vehId,
true))
1287 if (smoothPhasingInfo)
1295 replacedObject->GetOrCreateSmoothPhasing()->SetViewerDependentInfo(privateObjectOwner, originalSmoothPhasingInfo);
1323template <std::invocable<TempSummonData const&> SummonCreature>
1326 std::vector<TempSummonData>
const* data =
sObjectMgr->GetSummonGroup(summonerId, summonerType, group);
1329 TC_LOG_WARN(
"scripts",
"Summoner {} type {} tried to summon non-existing summon group {}.", summonerId, summonerType, group);
1333 std::vector<TempSummon*> summons;
1334 summons.reserve(data->size());
1337 if (
TempSummon* summon = summonCreature(tempSummonData))
1338 summons.push_back(summon);
1343 if (!summon->IsInWorld())
1348 summoned->push_back(summon);
1352 delete creatureGroup;
1375 return reinterpret_cast<ZoneScript*
>(instanceMap->GetInstanceScript());
1377 return reinterpret_cast<ZoneScript*
>(bgMap->GetBattlegroundScript());
1378 if (!map->IsBattlegroundOrArena())
1398 return instanceMap->GetInstanceScenario();
1407 if (
TempSummon* summon = map->
SummonCreature(entry, pos,
nullptr, despawnTime,
this, spellId, vehId, privateObjectOwner))
1423 return SummonCreature(
id, { x,y,z,o }, despawnType, despawnTime, 0, 0, privateObjectOwner);
1428 ASSERT(privateObjectOwner);
1435 summon->SetTempSummonType(despawnType);
1438 summon->InheritStringIds(thisCreature);
1454 TC_LOG_ERROR(
"sql.sql",
"Gameobject template {} not found in database!", entry);
1518 return SummonCreature(tempSummonData.entry, tempSummonData.pos, tempSummonData.type, tempSummonData.time);
1586 Player* target =
nullptr;
1657 return owner->ToPlayer();
1664 return owner->ToPlayer();
1672 bool positive = target ? !
IsHostileTo(target) :
true;
1708 if (minduration <= 0)
1712 if (minduration == maxduration)
1719 if (consumedItr == powerCosts->end())
1743 auto mechanicCheck = [mechanicMask](
AuraEffect const* aurEff) ->
bool
1745 if (mechanicMask & (
UI64LIT(1) << aurEff->GetMiscValue()))
1756 int32 durationMod = std::min(durationMod_always, durationMod_not_stack);
1757 if (durationMod != 0)
1758 AddPct(duration, durationMod);
1764 durationMod = std::min(durationMod_always, durationMod_not_stack);
1765 if (durationMod != 0)
1766 AddPct(duration, durationMod);
1787 return std::max(duration, 0);
1792 if (!spellInfo || castTime < 0)
1818 if (!spellInfo || duration < 0)
1836 duration =
int32(
float(duration) * unitCaster->
m_unitData->ModCastingSpeed);
1860 float missChance = [&]()
1870 thisLevel = std::max<int32>(thisLevel, spellInfo->
SpellLevel);
1872 int32 levelBasedHitDiff = leveldif;
1875 float modHitChance = 100;
1876 if (levelBasedHitDiff >= 0)
1880 modHitChance = 94 - 3 * std::min(levelBasedHitDiff, 3);
1881 levelBasedHitDiff -= 3;
1885 modHitChance = 96 - std::min(levelBasedHitDiff, 2);
1886 levelBasedHitDiff -= 2;
1888 if (levelBasedHitDiff > 0)
1889 modHitChance -= lchance * std::min(levelBasedHitDiff, 7);
1892 modHitChance = 97 - levelBasedHitDiff;
1918 if (tmp > 0 && rand < tmp)
1925 if (resist_chance > 0 && rand < (tmp += resist_chance))
1932 if (deflect_chance > 0 && rand < (tmp += deflect_chance))
1976 if (reflectchance > 0 &&
roll_chance(reflectchance))
1999 spellMissLog.
SpellID = spellID;
2017 TC_LOG_ERROR(
"entities.unit",
"Creature (template id: {}) has invalid faction (faction template Id) #{}",
ToCreature()->GetCreatureTemplate()->
Entry, factionId);
2021 TC_LOG_ERROR(
"entities.faction",
"GameObject (template id: {}) has invalid faction (faction template Id) #{}",
ToGameObject()->GetGOInfo()->entry, factionId);
2039 auto isAttackableBySummoner = [&](
Unit const* me,
ObjectGuid const& targetGuid)
2066 if (selfPlayerOwner)
2072 else if (targetPlayerOwner)
2079 Unit const* unit = Coalesce<const Unit>(
ToUnit(), selfPlayerOwner);
2080 Unit const* targetUnit = Coalesce<const Unit>(target->
ToUnit(), targetPlayerOwner);
2085 if (selfPlayerOwner && targetPlayerOwner)
2088 if (selfPlayerOwner == targetPlayerOwner)
2106 if (selfPlayerOwner)
2116 if (targetFactionEntry->CanHaveReputation())
2142 if (!factionTemplateEntry)
2146 if (!targetFactionTemplateEntry)
2155 if (
ReputationRank const* repRank = targetPlayerOwner->GetReputationMgr().GetForcedRankIfAny(factionTemplateEntry))
2161 if (factionEntry->CanHaveReputation())
2164 ReputationRank repRank = targetPlayerOwner->GetReputationMgr().GetRank(factionEntry);
2165 if (targetPlayerOwner->GetReputationMgr().IsAtWar(factionEntry))
2174 if (factionTemplateEntry->
IsHostileTo(targetFactionTemplateEntry))
2176 if (factionTemplateEntry->
IsFriendlyTo(targetFactionTemplateEntry))
2178 if (targetFactionTemplateEntry->
IsFriendlyTo(factionTemplateEntry))
2227 TC_LOG_ERROR(
"entities.unit",
"CastSpell: unknown spell {} by caster {}", spellId,
GetGUID());
2233 TC_LOG_ERROR(
"entities.unit",
"CastSpell: Invalid target passed to spell cast {} by {}", spellId,
GetGUID());
2265 if (withSourceOrientation)
2278 playOrphanSpellVisual.
Target = target;
2290 if (withSourceOrientation)
2334 bool isPositiveSpell = bySpell && bySpell->
IsPositive();
2337 if (!bySpell &&
this == target)
2387 Unit const* unitOrOwner = unit;
2433 if (!playerAffectingAttacker && unitTarget && unitTarget->
IsPet() && playerAffectingTarget && playerAffectingTarget->
IsMounted())
2437 if ((playerAffectingAttacker && !playerAffectingTarget) || (!playerAffectingAttacker && playerAffectingTarget))
2439 Player const* player = playerAffectingAttacker ? playerAffectingAttacker : playerAffectingTarget;
2441 if (
Unit const* creature = playerAffectingAttacker ? unitTarget : unit)
2458 if (playerAffectingAttacker && playerAffectingTarget)
2459 if (playerAffectingAttacker->
duel && playerAffectingAttacker->
duel->Opponent == playerAffectingTarget && playerAffectingAttacker->
duel->State ==
DUEL_STATE_IN_PROGRESS)
2471 if (playerAffectingAttacker && playerAffectingTarget)
2476 if (playerAffectingAttacker->
IsFFAPvP() && playerAffectingTarget->
IsFFAPvP())
2492 bool isNegativeSpell = bySpell && !bySpell->
IsPositive();
2509 if (unit && unitTarget && unit->
GetVehicle())
2571 if (selfPlayerOwner && targetPlayerOwner)
2574 if (selfPlayerOwner != targetPlayerOwner && targetPlayerOwner->
duel)
2592 if (unitTarget && !unitTarget->
IsPvP())
2609 if (
Unit* magnet = aurEff->GetBase()->GetCaster())
2620 else if (spellInfo->
Speed > 0.0f)
2642template <
typename Container>
2650template <
typename Container>
2662template <
typename Container>
2670template <
typename Container>
2682template <
typename Container>
2698 if (
this != searcher)
2700 float myHover = 0.0f, searcherHover = 0.0f;
2702 myHover = unit->GetHoverOffset();
2703 if (
Unit const* searchUnit = searcher->
ToUnit())
2704 searcherHover = searchUnit->GetHoverOffset();
2706 float hoverDelta = myHover - searcherHover;
2707 if (hoverDelta != 0.0f)
2708 effectiveReach = std::sqrt(std::max(effectiveReach * effectiveReach - hoverDelta * hoverDelta, 0.0f));
2712 x =
GetPositionX() + (effectiveReach + distance2d) * std::cos(absAngle);
2713 y =
GetPositionY() + (effectiveReach + distance2d) * std::sin(absAngle);
2739 for (
float angle =
float(
M_PI) / 8; angle < float(
M_PI) * 2; angle += float(
M_PI) / 8)
2790 float destx, desty, destz, ground, floor;
2797 TC_LOG_FATAL(
"misc",
"WorldObject::MovePosition: Object {} has invalid coordinates X: {} and Y: {} were passed!",
2806 float step = dist/10.0f;
2808 for (
uint8 j = 0; j < 10; ++j)
2811 if (std::fabs(pos.
m_positionZ - destz) > maxHeightChange)
2813 destx -= step * std::cos(angle);
2814 desty -= step * std::sin(angle);
2836 float cosAngle = std::cos(angle);
2837 float sinAngle = std::sin(angle);
2838 float destx, desty, destz;
2846 TC_LOG_FATAL(
"misc",
"WorldObject::MovePositionToFirstCollision invalid coordinates Src: {}, dist {}, angle {}, destX: {} destY: {} were passed!",
2847 pos.
ToString(), dist, angle, destx, desty);
2862 G3D::Vector3
const& result = path.
GetPath().back();
2873 destx, desty, destz + halfHeight,
2874 destx, desty, destz, -0.5f);
2876 destz -= halfHeight;
2889 destx, desty, destz + halfHeight,
2890 destx, desty, destz, -0.5f);
2892 destz -= halfHeight;
2920 pos.
m_positionZ = gridHeight + unit->GetHoverOffset();
2972template <std::invocable<Player*> Work>
2983 Player* source = ref.GetSource();
2995 for (
Player* viewer : ref.GetSource()->GetSharedVisionList())
3010 if (*caster->m_activePlayerData->FarsightObject == source->
GetGUID())
3016 template <
class SKIP>
3026 if (player ==
object)
3035 object->DestroyForPlayer(player);
3118 bool swimming = [&]()
3141 std::stringstream sstr;
std::unordered_map< Player *, UpdateData > UpdateDataMapType
DB2Storage< FactionTemplateEntry > sFactionTemplateStore("FactionTemplate.db2", &FactionTemplateLoadInfo::Instance)
DB2Storage< AreaTableEntry > sAreaTableStore("AreaTable.db2", &AreaTableLoadInfo::Instance)
DB2Storage< FactionEntry > sFactionStore("Faction.db2", &FactionLoadInfo::Instance)
@ FACTION_TEMPLATE_FLAG_HOSTILE_BY_DEFAULT
@ FACTION_TEMPLATE_FLAG_CONTESTED_GUARD
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
std::chrono::seconds Seconds
Seconds shorthand typedef.
#define TC_LOG_DEBUG(filterType__, message__,...)
#define TC_LOG_ERROR(filterType__, message__,...)
#define TC_LOG_FATAL(filterType__, message__,...)
#define TC_LOG_WARN(filterType__, message__,...)
@ MOVEMENTFLAG_SPLINE_ELEVATION
@ MOVEMENTFLAG_ALWAYS_ALLOW_PITCHING
#define MAX_VISIBILITY_DISTANCE
#define DEFAULT_VISIBILITY_DISTANCE
@ TEMPSUMMON_DEAD_DESPAWN
@ TEMPSUMMON_TIMED_DESPAWN
#define VISIBILITY_DISTANCE_LARGE
#define VISIBILITY_DISTANCE_TINY
@ GO_SUMMON_TIMED_OR_CORPSE_DESPAWN
#define DEFAULT_VISIBILITY_INSTANCE
#define VISIBILITY_DISTANCE_GIGANTIC
#define VISIBILITY_DISTANCE_SMALL
std::unordered_set< ObjectGuid > GuidUnorderedSet
@ SUMMONER_TYPE_GAMEOBJECT
constexpr float VisibilityDistances[AsUnderlyingType(VisibilityDistanceType::Max)]
struct Object::ObjectFragmentInfoInitializer InitObjectFragment
static void SummonCreatureGroup(uint32 summonerId, SummonerType summonerType, uint8 group, std::list< TempSummon * > *summoned, SummonCreature summonCreature)
static constexpr Milliseconds const HEARTBEAT_INTERVAL
@ PATHFIND_NOT_USING_PATH
@ PATHFIND_FARFROMPOLY_START
@ PLAYER_FLAGS_CONTESTED_PVP
int32 irand(int32 min, int32 max)
bool roll_chance(float chance, PseudoRandomDistributionState &state)
@ SERVERSIDE_VISIBILITY_GM
@ SERVERSIDE_VISIBILITY_GHOST
@ SPELL_ATTR11_CAN_ASSIST_UNINTERACTIBLE
@ SPELL_ATTR9_HASTE_AFFECTS_MELEE_ABILITY_CASTTIME
@ SPELL_ATTR9_MISSILE_SPEED_IS_DELAY_IN_SEC
@ SPELL_ATTR7_REFLECTION_ONLY_DEFENDS
@ SPELL_ATTR7_NO_ATTACK_MISS
@ SPELL_ATTR7_NO_TARGET_DURATION_MOD
@ SPELL_ATTR5_IGNORE_AREA_EFFECT_PVP_CHECK
@ SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC
@ SPELL_ATTR2_AUTO_REPEAT
@ SPELL_ATTR2_RETAIN_ITEM_CAST
@ TOTAL_INVISIBILITY_TYPES
@ SPELL_ATTR1_NO_REDIRECTION
@ SPELL_ATTR3_NO_AVOIDANCE
@ SPELL_ATTR3_IGNORE_CASTER_MODIFIERS
@ SPELL_DAMAGE_CLASS_RANGED
@ SPELL_DAMAGE_CLASS_MAGIC
@ SPELL_DAMAGE_CLASS_NONE
@ SPELL_DAMAGE_CLASS_MELEE
@ SPELL_ATTR0_IS_TRADESKILL
@ SPELL_ATTR0_NO_IMMUNITIES
@ SPELL_ATTR0_USES_RANGED_SLOT
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_FAILED_SPELL_UNAVAILABLE
constexpr float Z_OFFSET_FIND_HEIGHT
@ SUMMON_CATEGORY_POSSESSED_VEHICLE
@ SUMMON_CATEGORY_VEHICLE
@ CREATURE_TYPE_FLAG_CAN_ASSIST
@ SPELL_ATTR8_IGNORE_SANCTUARY
@ SPELL_ATTR8_MELEE_HASTE_AFFECTS_PERIODIC
@ SPELL_ATTR8_ALLOW_TARGETS_HIDDEN_BY_SPAWN_TRACKING
@ SPELL_ATTR8_CAN_ATTACK_IMMUNE_PC
@ SPELL_ATTR6_CAN_TARGET_UNTARGETABLE
@ SPELL_ATTR6_IGNORE_PHASE_SHIFT
@ SPELL_ATTR6_CAN_ASSIST_IMMUNE_PC
@ SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL_NOT_STACK
@ SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK
@ SPELL_AURA_REFLECT_SPELLS
@ SPELL_AURA_IGNORE_HIT_DIRECTION
@ SPELL_AURA_DEFLECT_SPELLS
@ SPELL_AURA_DETECT_VISIBLE_WHILE_INVISIBLE
@ SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL
@ SPELL_AURA_MECHANIC_DURATION_MOD
@ SPELL_AURA_DETECT_STEALTH
@ SPELL_AURA_SPELL_MAGNET
@ SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE
@ SPELL_AURA_REFLECT_SPELLS_SCHOOL
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
@ SPELL_ATTR0_CU_CAN_TARGET_ANY_PRIVATE_OBJECT
bool IsPartOfSkillLine(uint32 skillId, uint32 spellId)
@ SPELL_GROUP_ELIXIR_BATTLE
@ SPELL_GROUP_ELIXIR_GUARDIAN
@ UNIT_FLAG2_IGNORE_REPUTATION
@ UNIT_FLAG2_GIGANTIC_AOI
@ UNIT_FLAG2_INFINITE_AOI
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_NON_ATTACKABLE_2
@ UNIT_FLAG_NOT_ATTACKABLE_1
@ UNIT_FLAG_PLAYER_CONTROLLED
#define MAX_PLAYER_STEALTH_DETECT_RANGE
@ UNIT_STATE_UNATTACKABLE
T RoundToInterval(T &num, T floor, T ceil)
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
#define VMAP_INVALID_HEIGHT_VALUE
#define VMAP_INVALID_HEIGHT
ObjectGuid GetCastItemGUID() const
ObjectGuid const & GetGUID() const
void BuildUpdateChangesMask()
virtual std::string GetDebugInfo() const
WowCS::EntityFragmentsHolder m_entityFragments
UF::UpdateFieldHolder m_values
virtual void RemoveFromWorld()
CreateObjectBits m_updateFlag
virtual void AddToWorld()
void ClearUpdateMask(bool remove)
bool IsGameObject() const
ByteBuffer & PrepareValuesUpdateBuffer(UpdateData *data) const
void BuildFieldsUpdate(Player *player, UpdateDataMapType &data_map) const
void put(std::size_t pos, T value)
void AddMember(Creature *member)
void SetHomePosition(float x, float y, float z, float o)
float GetAttackDistance(Unit const *player) const
bool IsEvadingAttacks() const
bool AIM_Initialize(CreatureAI *ai=nullptr)
bool Create(ObjectGuid::LowType guidlow, Map *map, uint32 entry, Position const &pos, CreatureData const *data, uint32 vehId, bool dynamic=false)
ObjectGuid GetCasterGUID() const
void KillAllEvents(bool force)
void Update(uint32 p_time)
T_VALUES GetValue(FLAG_TYPE flag) const
void SetValue(FLAG_TYPE flag, T_VALUES value)
static GameObject * CreateGameObject(uint32 entry, Map *map, Position const &pos, QuaternionData const &rotation, uint32 animProgress, GOState goState, uint32 artKit=0)
void SetRespawnTime(int32 respawn)
void SetSpawnedByDefault(bool b)
GameobjectTypes GetGoType() const
QuaternionData GetWorldRotation() const
void AddObjectToRemoveList(WorldObject *obj)
void RemoveFromActive(WorldObject *obj)
void RemoveUpdateObject(BaseEntity *obj)
bool isInLineOfSight(PhaseShift const &phaseShift, float x1, float y1, float z1, float x2, float y2, float z2, LineOfSightChecks checks, VMAP::ModelIgnoreFlags ignoreFlags) const
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, Milliseconds duration=0ms, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty, SmoothPhasingInfo const *smoothPhasingInfo=nullptr)
void GetZoneAndAreaId(PhaseShift const &phaseShift, uint32 &zoneid, uint32 &areaid, float x, float y, float z)
bool getObjectHitPos(PhaseShift const &phaseShift, float x1, float y1, float z1, float x2, float y2, float z2, float &rx, float &ry, float &rz, float modifyDist)
void AddWorldObject(WorldObject *obj)
void GetFullTerrainStatusForPosition(PhaseShift const &phaseShift, float x, float y, float z, PositionFullTerrainStatus &data, Optional< map_liquidHeaderTypeFlags > reqLiquidType={}, float collisionHeight=2.03128f)
float GetWaterOrGroundLevel(PhaseShift const &phaseShift, float x, float y, float z, float *ground=nullptr, bool swim=false, float collisionHeight=2.03128f)
BattlegroundMap * ToBattlegroundMap()
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
void AddUpdateObject(BaseEntity *obj)
void RemoveWorldObject(WorldObject *obj)
Difficulty GetDifficultyID() const
float GetVisibilityRange() const
float GetHeight(PhaseShift const &phaseShift, float x, float y, float z, bool vmap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH)
InstanceMap * ToInstanceMap()
float GetGridHeight(PhaseShift const &phaseShift, float x, float y)
uint32 GetInstanceId() const
void AddToActive(WorldObject *obj)
void AddObjectToSwitchList(WorldObject *obj, bool on)
static ObjectGuid const Empty
std::string ToString() const
virtual void BuildValuesUpdateWithFlag(UF::UpdateFieldFlag flags, ByteBuffer &data, Player const *target) const
void AddToWorld() override
Trinity::unique_trackable_ptr< Object > m_scriptRef
std::string GetDebugInfo() const override
static void BuildObjectFragmentUpdate(void const *rawFragmentData, UF::UpdateFieldFlag flags, ByteBuffer &data, Player const *target, BaseEntity const *entity)
void BuildValuesUpdateBlockForPlayerWithFlag(UpdateData *data, UF::UpdateFieldFlag flags, Player const *target) const
virtual void BuildValuesCreate(UF::UpdateFieldFlag flags, ByteBuffer &data, Player const *target) const =0
virtual void BuildValuesUpdate(UF::UpdateFieldFlag flags, ByteBuffer &data, Player const *target) const =0
static void BuildObjectFragmentCreate(void const *rawFragmentData, UF::UpdateFieldFlag flags, ByteBuffer &data, Player const *target, BaseEntity const *entity)
GameObject * ToGameObject()
static bool IsObjectFragmentChanged(void const *rawFragmentData)
void BuildEntityFragmentsForValuesUpdateForPlayerWithMask(ByteBuffer &data, EnumFlag< UF::UpdateFieldFlag > flags) const
virtual void ClearValuesChangesMask()
void RemoveFromWorld() override
UF::UpdateField< UF::ObjectData, int32(WowCS::EntityFragment::CGObject), TYPEID_OBJECT > m_objectData
virtual SpawnTrackingStateData const * GetSpawnTrackingStateDataForPlayer(Player const *player) const
static void ClearObjectFragmentChanged(void const *rawFragmentData)
void SetUseRaycast(bool useRaycast)
Movement::PointsArray const & GetPath() const
PathType GetPathType() const
bool CalculatePath(float srcX, float srcY, float srcZ, float destX, float destY, float destZ, bool forceDest=false)
static uint32 GetTerrainMapId(PhaseShift const &phaseShift, uint32 mapId, TerrainInfo const *terrain, float x, float y)
static void InheritPhaseShift(WorldObject *target, WorldObject const *source)
static PhaseShift const & GetAlwaysVisiblePhaseShift()
void SendDirectMessage(WorldPacket const *data) const
GuidUnorderedSet m_clientGUIDs
bool HaveAtClient(BaseEntity const *u) const
bool GetCommandStatus(uint32 command) const
bool IsGameMaster() const
bool IsAdvancedCombatLoggingEnabled() const
bool HasPlayerFlag(PlayerFlags flags) const
std::unique_ptr< DuelInfo > duel
ReputationMgr & GetReputationMgr()
FactionState const * GetState(FactionEntry const *factionEntry) const
bool IsAtWar(uint32 faction_id) const
ReputationRank const * GetForcedRankIfAny(FactionTemplateEntry const *factionTemplateEntry) const
void SetSingleInfo(SmoothPhasingInfo const &info)
uint32 GetSpellXSpellVisualId(WorldObject const *caster=nullptr, WorldObject const *viewer=nullptr) const
SpellRange GetMinMaxRange(bool positive=false, WorldObject const *caster=nullptr, Spell *spell=nullptr) const
bool HasOnlyDamageEffects() const
int32 GetMaxDuration() const
bool IsAllowingDeadTarget() const
SpellSchoolMask GetSchoolMask() const
bool HasAttribute(SpellAttr0 attribute) const
SpellDurationEntry const * DurationEntry
uint64 GetSpellMechanicMaskByEffectMask(uint32 effectMask) const
int32 GetDuration() const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
SpellCastResult CheckExplicitTarget(WorldObject const *caster, WorldObject const *target, Item const *itemTarget=nullptr) const
bool IsAffectingArea() const
void SetSpellValue(CastSpellExtraArgsInit::SpellValueOverride const &value)
SpellCastResult prepare(SpellCastTargets const &targets, AuraEffect const *triggeredByAura=nullptr)
bool m_scriptWaitsForSpellHit
Scripting::v2::ActionResultSetter< SpellCastResult > m_scriptResult
virtual void InitStats(WorldObject *summoner, Milliseconds duration)
ObjectGuid GetSummonerGUID() const
void SetTempSummonType(TempSummonType type)
virtual void InitSummon(WorldObject *summoner)
SummonPropertiesEntry const *const m_Properties
virtual ObjectGuid GetTransportGUID() const =0
virtual Position GetPositionOffsetTo(Position const &endPos) const =0
This method transforms supplied global coordinates into local offsets.
virtual void AddPassenger(WorldObject *passenger, Position const &offset)=0
virtual TransportBase * RemovePassenger(WorldObject *passenger)=0
void ClearChangesMask(UpdateField< T, BlockBit, Bit >(Derived::*field))
uint32 GetChangedObjectTypeMask() const
Unit * GetCharmed() const
Vehicle * GetVehicle() const
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
bool HasPvpFlag(UnitPVPStateFlags flags) const
float GetTotalAuraModifierByMiscMask(AuraType auraType, uint32 misc_mask) const
bool HasAuraTypeWithMiscvalue(AuraType auraType, int32 miscValue) const
void SetFaction(uint32 faction) override
std::forward_list< AuraEffect * > AuraEffectList
float GetMaxNegativeAuraModifierByMiscValue(AuraType auraType, int32 misc_value) const
Unit * GetVehicleBase() const
bool HasUnitFlag(UnitFlags flags) const
void SetCreatedBySpell(int32 spellId)
bool CanInstantCast() const
bool HasUnitFlag2(UnitFlags2 flags) const
bool IsInSanctuary() const
void SetDemonCreatorGUID(ObjectGuid guid)
float GetCombatReach() const override
TempSummon * ToTempSummon()
virtual bool HasSpell(uint32) const
bool IsOnVehicle(Unit const *vehicle) const
bool IsImmuneToNPC() const
Unit * GetCharmerOrOwner() const
void AddGameObject(GameObject *gameObj)
SharedVisionList const & GetSharedVisionList()
float GetMechanicResistChance(SpellInfo const *spellInfo) const
float GetTotalAuraModifier(AuraType auraType) const
bool HasAuraType(AuraType auraType) const
bool IsImmunedToSpell(SpellInfo const *spellInfo, uint32 effectMask, WorldObject const *caster, bool requireImmunityPurgesEffectAttribute=false) const
uint8 GetLevelForTarget(WorldObject const *) const override
float GetMaxNegativeAuraModifier(AuraType auraType) const
float GetTotalAuraModifierByMiscValue(AuraType auraType, int32 misc_value) const
UF::UpdateField< UF::UnitData, int32(WowCS::EntityFragment::CGObject), TYPEID_UNIT > m_unitData
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
bool HasUnitState(const uint32 f) const
bool IsInRaidWith(Unit const *unit) const
void SetLevel(uint8 lvl, bool sendUpdate=true)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
std::array< float, MAX_ATTACK > m_modAttackSpeedPct
bool IsUninteractible() const
bool IsImmuneToPC() const
static VMapManager * createOrGetVMapManager()
bool getObjectHitPos(uint32 mapId, float x1, float y1, float z1, float x2, float y2, float z2, float &rx, float &ry, float &rz, float modifyDist)
std::string GetDebugInfo() const
constexpr uint32 GetMapId() const
Unit * GetMagicHitRedirectTarget(Unit *victim, SpellInfo const *spellInfo)
bool InSamePhase(PhaseShift const &phaseShift) const
TempSummon * SummonPersonalClone(Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, Player *privateObjectOwner=nullptr)
ZLiquidStatus m_liquidStatus
void GetPlayerListInGrid(Container &playerContainer, float maxSearchRange, bool alive=true) const
virtual bool IsInvisibleDueToDespawn(WorldObject const *seer) const
Player * SelectNearestPlayer(float range) const
void PlayDirectSound(uint32 soundId, Player const *target=nullptr, uint32 broadcastTextId=0) const
void MovePosition(Position &pos, float dist, float angle, float maxHeightChange=6.0f) const
bool IsWithinDist2d(float x, float y, float dist) const
bool IsWithinDist3d(float x, float y, float z, float dist) const
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
virtual void SendMessageToSet(WorldPacket const *data, bool self) const
bool CanDetect(WorldObject const *obj, bool ignoreStealth, bool checkAlert=false) const
Scenario * GetScenario() const
ZoneScript * FindZoneScript() const
void GetGameObjectListWithOptionsInGrid(Container &gameObjectContainer, float maxSearchRange, FindGameObjectOptions const &options) const
Creature * FindNearestCreatureWithOptions(float range, FindCreatureOptions const &options) const
void UpdateAllowedPositionZ(float x, float y, float &z, float *groundZ=nullptr) const
Position GetRandomPoint(Position const &srcPos, float distance, float minDistance=0.0f) const
void AddToWorld() override
virtual float GetCollisionHeight() const
virtual bool IsAlwaysVisibleFor(WorldObject const *seer) const
Unit * GetCharmerOrOwner() const
void RemoveFromWorld() override
InstanceScript * GetInstanceScript() const
virtual uint8 GetLevelForTarget(WorldObject const *) const
virtual void UpdateObjectVisibilityOnDestroy()
void SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
Unit * GetCharmerOrOwnerOrSelf() const
bool CheckPrivateObjectOwnerVisibility(WorldObject const *seer) const
bool IsWithinLOS(float x, float y, float z, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
void BuildUpdate(UpdateDataMapType &) override
void SendCombatLogMessage(WorldPackets::CombatLog::CombatLogServerPacket *combatLog) const
virtual SpellMissInfo MeleeSpellHitResult(Unit *victim, SpellInfo const *spellInfo) const
Position GetHitSpherePointFor(Position const &dest) const
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
void GetNearPoint(WorldObject const *searcher, float &x, float &y, float &z, float distance2d, float absAngle) const
ObjectGuid GetPrivateObjectOwner() const
bool IsInRange2d(Position const *pos, float minRange, float maxRange) const
float GetGridActivationRange() const
void GetClosePoint(float &x, float &y, float &z, float size, float distance2d=0, float relAngle=0) const
void GetGameObjectListWithEntryInGrid(Container &gameObjectContainer, uint32 entry, float maxSearchRange=250.0f) const
GameObject * FindNearestGameObjectOfType(GameobjectTypes type, float range) const
float GetMapHeight(float x, float y, float z, bool vmap=true, float distanceToSearch=50.0f) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
void PlayDirectMusic(uint32 musicId, Player const *target=nullptr) const
float GetMapWaterOrGroundLevel(float x, float y, float z, float *ground=nullptr) const
std::string GetDebugInfo() const override
bool IsValidAttackTarget(WorldObject const *target, SpellInfo const *bySpell=nullptr) const
bool IsHostileToPlayers() const
virtual bool IsAlwaysDetectableFor(WorldObject const *seer) const
bool IsHostileTo(WorldObject const *target) const
bool IsVisibilityOverridden() const
virtual ObjectGuid GetCharmerOrOwnerGUID() const
SmoothPhasing * GetOrCreateSmoothPhasing()
virtual bool CanNeverSee(WorldObject const *obj, bool ignorePhaseShift=false) const
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
PhaseShift & GetPhaseShift()
FlaggedValuesArray32< int32, uint64, InvisibilityType, TOTAL_INVISIBILITY_TYPES > m_invisibility
int32 CalcSpellDuration(SpellInfo const *spellInfo, std::vector< SpellPowerCost > const *powerCosts) const
bool isActiveObject() const
bool IsSelfOrInSameMap(WorldObject const *obj) const
TransportBase * GetTransport() const
bool GetDistanceOrder(WorldObject const *obj1, WorldObject const *obj2, bool is3D=true) const
bool IsPrivateObject() const
FlaggedValuesArray32< int32, uint64, InvisibilityType, TOTAL_INVISIBILITY_TYPES > m_invisibilityDetect
bool isInFront(WorldObject const *target, float arc=float(M_PI)) const
SpellMissInfo SpellHitResult(Unit *victim, SpellInfo const *spellInfo, bool canReflect, bool canImmune) const
void setActive(bool isActiveObject)
void SetPrivateObjectOwner(ObjectGuid const &owner)
Position GetNearPosition(float dist, float angle)
float GetDistance2d(WorldObject const *obj) const
Creature * SummonTrigger(float x, float y, float z, float ang, Milliseconds despawnTime, CreatureAI *(*GetAI)(Creature *)=nullptr)
ZoneScript * m_zoneScript
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
ObjectGuid GetCharmerOrOwnerOrOwnGUID() const
Position GetRandomNearPosition(float radius)
int32 ModSpellDuration(SpellInfo const *spellInfo, WorldObject const *target, int32 duration, bool positive, uint32 effectMask) const
SmoothPhasing * GetSmoothPhasing()
float GetSightRange(WorldObject const *target=nullptr) const
static ReputationRank GetFactionReactionTo(FactionTemplateEntry const *factionTemplateEntry, WorldObject const *target)
void PlayDistanceSound(uint32 soundId, Player const *target=nullptr) const
virtual bool IsNeverVisibleFor(WorldObject const *seer, bool allowServersideObjects) const
std::string const & GetName() const
virtual void SetMap(Map *map)
bool IsFarVisible() const
void SetFarVisible(bool on)
bool IsInBetween(Position const &pos1, Position const &pos2, float size=0) const
void AddObjectToRemoveList()
void GetNearPoint2D(WorldObject const *searcher, float &x, float &y, float distance, float absAngle) const
SpellRange GetSpellMinMaxRangeForTarget(Unit const *target, SpellInfo const *spellInfo) const
bool IsWithinLOSInMap(WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
WorldObject(bool isWorldObject)
bool CanDetectStealthOf(WorldObject const *obj, bool checkAlert=false) const
virtual void ProcessPositionDataChanged(PositionFullTerrainStatus const &data)
SpellMissInfo MagicSpellHitResult(Unit *victim, SpellInfo const *spellInfo) const
bool CanSeeOrDetect(WorldObject const *obj, CanSeeOrDetectExtraArgs const &args={ }) const
void GetContactPoint(WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const
bool CanDetectInvisibilityOf(WorldObject const *obj) const
virtual ObjectGuid GetTransGUID() const
GameObject * FindNearestGameObjectWithOptions(float range, FindGameObjectOptions const &options) const
bool const m_isStoredInWorldObjectGridContainer
void DestroyForNearbyPlayers()
GameObject * FindNearestUnspawnedGameObject(uint32 entry, float range) const
bool isInBack(WorldObject const *target, float arc=float(M_PI)) const
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPES > m_stealthDetect
void SendPlayOrphanSpellVisual(Position const &sourceLocation, ObjectGuid const &target, uint32 spellVisualId, float travelSpeed, bool speedAsTime=false, bool withSourceOrientation=false)
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
bool IsNeutralToAll() const
void UpdatePositionData()
void UpdateGroundPositionZ(float x, float y, float &z) const
bool IsStoredInWorldObjectGridContainer() const
Player * GetSpellModOwner() const
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
ReputationRank GetReactionTo(WorldObject const *target) const
void SetIsStoredInWorldObjectGridContainer(bool apply)
bool IsInWorldPvpZone() const
bool IsValidAssistTarget(WorldObject const *target, SpellInfo const *bySpell=nullptr) const
bool IsInRange(WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
std::unique_ptr< SmoothPhasing > _smoothPhasing
virtual bool _IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D, bool incOwnRadius=true, bool incTargetRadius=true) const
void MovePositionToFirstCollision(Position &pos, float dist, float angle) const
float GetVisibilityRange() const
SpellEffectValue ApplyEffectModifiers(SpellInfo const *spellInfo, uint8 effIndex, SpellEffectValue value) const
bool IsInRange3d(Position const *pos, float minRange, float maxRange) const
TransportBase * m_transport
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPES > m_stealth
virtual uint32 GetCastSpellXSpellVisualId(SpellInfo const *spellInfo) const
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibilityDetect
void SendCancelOrphanSpellVisual(uint32 id)
virtual uint32 GetFaction() const =0
float GetDistance(WorldObject const *obj) const
Optional< float > m_visibilityDistanceOverride
ObjectGuid _privateObjectOwner
virtual ObjectGuid GetOwnerGUID() const =0
void SetVisibilityDistanceOverride(VisibilityDistanceType type)
void StopDistanceSound(Player const *target=nullptr) const
virtual void SendMessageToSetInRange(WorldPacket const *data, float dist, bool self) const
Position GetFirstCollisionPosition(float dist, float angle)
Milliseconds _heartbeatTimer
MovementInfo m_movementInfo
Optional< WmoLocation > m_currentWmo
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibility
float GetDistanceZ(WorldObject const *obj) const
void PlayObjectSound(int32 soundKitId, ObjectGuid targetObject, Player const *target=nullptr, int32 broadcastTextId=0) const
void GetCreatureListWithOptionsInGrid(Container &creatureContainer, float maxSearchRange, FindCreatureOptions const &options) const
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
void ModSpellCastTime(SpellInfo const *spellInfo, int32 &castTime, Spell *spell=nullptr) const
bool IsFriendlyTo(WorldObject const *target) const
virtual float GetCombatReach() const
Player * GetAffectingPlayer() const
virtual bool CanAlwaysSee(WorldObject const *) const
bool IsInMap(WorldObject const *obj) const
virtual void Update(uint32 diff)
FactionTemplateEntry const * GetFactionTemplateEntry() const
bool AddToObjectUpdate() override
virtual void UpdateObjectVisibility(bool forced=true)
virtual void CleanupsBeforeDelete(bool finalCleanup=true)
void RemoveFromObjectUpdate() override
virtual float MeleeSpellMissChance(Unit const *victim, WeaponAttackType attType, SpellInfo const *spellInfo) const
void ModSpellDurationTime(SpellInfo const *spellInfo, int32 &durationTime, Spell *spell=nullptr) const
void SetTransport(TransportBase *t)
WorldPacket const * GetFullLogPacket() const
WorldPacket const * GetBasicLogPacket() const
std::vector< SpellLogMissEntry > Entries
WorldPacket const * Write() override
WorldPacket const * Write() override
TaggedPosition<::Position::XYZ > Position
ObjectGuid TargetObjectGUID
ObjectGuid SourceObjectGUID
virtual WorldPacket const * Write()=0
WorldPacket const * Write() override
TaggedPosition< Position::XYZ > SourceRotation
TaggedPosition< Position::XYZ > TargetLocation
TaggedPosition< Position::XYZ > SourceLocation
WorldPacket const * Write() override
@ CONFIG_DETECT_POS_COLLISION
static constexpr uint32 Entry[5]
TC_GAME_API std::string MovementFlags_ToString(MovementFlags flags)
TC_GAME_API WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const &)
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
bool IsValidMapCoord(float c)
constexpr void NormalizeMapCoord(float &c)
constexpr bool IsIndirectFragment(EntityFragment frag)
Optional< SpellCastTargets > Targets
static void VisitWorldObjects(WorldObject const *obj, T &visitor, float radius)
static void VisitAllObjects(WorldObject const *obj, T &visitor, float radius)
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius)
CombatLogSender(WorldPackets::CombatLog::CombatLogServerPacket *msg)
WorldPackets::CombatLog::CombatLogServerPacket const * i_message
void operator()(Player const *player) const
bool IsHostileToPlayers() const
bool IsNeutralToAll() const
bool IsFriendlyTo(FactionTemplateEntry const *entry) const
bool IsHostileTo(FactionTemplateEntry const *entry) const
Optional< Inertia > inertia
Optional< ObjectGuid > standingOnGameObjectGUID
struct MovementInfo::JumpInfo jump
float stepUpStartElevation
struct MovementInfo::TransportInfo transport
Optional< AdvFlying > advFlying
ObjectFragmentInfoInitializer()
Optional< WmoLocation > wmoLocation
ZLiquidStatus liquidStatus
constexpr void SetOrientation(float orientation)
constexpr float GetPositionX() const
constexpr float GetPositionY() const
float GetExactDist2d(const float x, const float y) const
constexpr bool IsInDist2d(float x, float y, float dist) const
std::string ToString() const
float GetExactDist(float x, float y, float z) const
bool HasInArc(float arcangle, Position const *pos, float border=2.0f) const
float GetAbsoluteAngle(float x, float y) const
constexpr float GetExactDist2dSq(const float x, const float y) const
constexpr void GetPosition(float &x, float &y) const
constexpr void Relocate(float x, float y)
constexpr float GetExactDistSq(float x, float y, float z) const
constexpr Position GetPosition() const
constexpr bool IsInDist(float x, float y, float z, float dist) const
constexpr float GetOrientation() const
constexpr float GetPositionZ() const
void toEulerAnglesZYX(float &Z, float &Y, float &X) const
Optional< ObjectGuid > ReplaceObject
int32 DurationPerResource
EnumFlag< SummonPropertiesFlags > GetFlags() const
Stores data for temp summons.
Milliseconds time
Despawn time, usable only with certain temp summon types.
uint32 entry
Entry of summoned creature.
Position pos
Position, where should be creature spawned.
PhaseShift const * i_phaseShift
UpdateDataMapType & i_updateDatas
WorldObjectChangeAccumulator(WorldObject &obj, UpdateDataMapType &d)
void operator()(Player *player)
GuidUnorderedSet plr_list
void operator()(Player *player) const
WorldObjectVisibleChangeVisitor(Work &work_)
void Visit(PlayerMapType &m) const
static void Visit(GridRefManager< SKIP > const &)
void Visit(CreatureMapType &m) const
void Visit(DynamicObjectMapType &m) const
static void Register(EntityFragment fragment, EntityFragmentSerializeFn serializeCreate, EntityFragmentSerializeFn serializeUpdate, EntityFragmentIsChangedFn isChanged, EntityFragmentClearChangedFn clearChanged)
std::array< EntityFragment, N > Ids
std::array< uint8, N > Masks
UpdateableFragments Updateable
void Add(EntityFragment fragment, bool update, void const *data=nullptr)