113 owner->RemoveGameObject(
this,
false);
118 const char* ownerType =
"creature";
120 ownerType =
"player";
124 SF_LOG_FATAL(
"misc",
"Removed GameObject (GUID: %u Entry: %u SpellId: %u LinkedGO: %u) that just lost any reference to the owner (GUID: %u Type: '%s') GO list",
166bool GameObject::Create(
uint32 guidlow,
uint32 name_id,
Map* map,
float x,
float y,
float z,
float ang,
float rotation0,
float rotation1,
float rotation2,
float rotation3,
uint32 animprogress,
GOState go_state,
uint32 artKit)
175 SF_LOG_ERROR(
"misc",
"Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y);
182 name_id =
m_zoneScript->GetGameObjectEntry(guidlow, name_id);
190 SF_LOG_ERROR(
"sql.sql",
"Gameobject (GUID: %u Entry: %u) not created: non-existing entry in `gameobject_template`. Map: %u (X: %f Y: %f Z: %f)", guidlow, name_id, map->
GetId(), x, y, z);
207 SF_LOG_ERROR(
"sql.sql",
"Gameobject (GUID: %u Entry: %u) not created: non-existing GO type '%u' in `gameobject_template`. It will crash client if created.", guidlow, name_id, goinfo->
type);
236 switch (goinfo->
type)
283 loot.maxDuplicates = 3;
293 SF_LOG_ERROR(
"misc",
"Could not initialize GameObjectAI");
313 if (owner->IsInCombat())
386 time_t now = time(NULL);
391 if (linkedRespawntime)
394 if (targetGuid == dbtableHighGuid)
397 m_respawnTime = (now > linkedRespawntime ? now : linkedRespawntime) + std::rand() %
MINUTE + 5;
472 bool IsBattlegroundTrap =
false;
475 float radius = (float)(goInfo->
trap.
radius) / 3 * 2;
486 IsBattlegroundTrap =
true;
529 bg->HandleTriggerBuff(
GetGUID());
593 owner->CastSpell(owner, spellId,
false);
704 SF_LOG_ERROR(
"misc",
"GameObject::SaveToDB failed, cannot get gameobject data!");
776 SF_LOG_ERROR(
"sql.sql",
"Gameobject (GUID: %u) not found in table `gameobject`, can't load. ", guid);
782 float x = data->
posX;
783 float y = data->
posY;
784 float z = data->
posZ;
799 if (!
Create(guid, entry, map, x, y, z, ang, rotation0, rotation1, rotation2, rotation3, animprogress, go_state, artKit))
847 if (addToMap && !
GetMap()->AddToMap(
this))
882 for (QuestRelations::const_iterator itr = qr.first; itr != qr.second; ++itr)
884 if (itr->second == quest_id)
893 for (QuestRelations::const_iterator itr = qir.first; itr != qir.second; ++itr)
895 if (itr->second == quest_id)
925 return m_goValue.Transport.AnimationInfo->TotalTime;
932 m_goValue.Transport.HoldingAtProgress =
false;
951 m_goValue.Transport.WaitingAtPathStart =
false;
952 m_goValue.Transport.HoldingAtProgress =
false;
954 m_goValue.Transport.StateChangeEndTime = 0;
970 m_goValue.Transport.StateChangeTime = now;
971 m_goValue.Transport.StateChangeEndTime = now;
984 bool updateStoppedFlag =
false;
985 bool stopped =
false;
986 if (
m_goValue.Transport.HoldingAtProgress)
988 newProgress =
m_goValue.Transport.HoldProgress;
989 updateStoppedFlag =
true;
1002 uint32 const travelTime = stopTime -
m_goValue.Transport.StateChangeTime;
1005 m_goValue.Transport.StateChangeProgress, targetProgress, period, elapsedTime, travelTime,
1010 newProgress = targetProgress;
1014 updateStoppedFlag =
true;
1017 if (updateStoppedFlag)
1020 if (newProgress ==
m_goValue.Transport.PathProgress)
1023 m_goValue.Transport.PathProgress = newProgress;
1042 m_goValue.Transport.HoldingAtProgress =
false;
1044 m_goValue.Transport.WaitingAtPathStart =
false;
1049 m_goValue.Transport.PathProgress, targetProgress);
1051 m_goValue.Transport.StateChangeTime = now;
1053 m_goValue.Transport.StateChangeEndTime = now + travelTime;
1058 if (
m_goValue.Transport.PathProgress > targetProgress)
1067 if (newToOldStateDelta < 0)
1068 newToOldStateDelta += stopFrameCount + 1;
1071 if (oldToNewStateDelta < 0)
1072 oldToNewStateDelta += stopFrameCount + 1;
1074 bool const isAtStartOfPath =
m_goValue.Transport.StateChangeProgress == 0;
1075 if (oldToNewStateDelta < newToOldStateDelta && !isAtStartOfPath)
1083 if (oldState != newState)
1093 m_goValue.Transport.HoldingAtProgress =
false;
1094 m_goValue.Transport.WaitingAtPathStart =
false;
1095 m_goValue.Transport.StateChangeTime = now;
1097 m_goValue.Transport.StateChangeEndTime = now + travelTime;
1111 m_goValue.Transport.HoldingAtProgress =
false;
1112 m_goValue.Transport.WaitingAtPathStart =
false;
1113 m_goValue.Transport.StateChangeTime = now;
1115 m_goValue.Transport.StateChangeEndTime = now + travelTime;
1119 if (
m_goValue.Transport.PathProgress > targetProgress)
1133 uint32 initialProgress = 0;
1139 m_goValue.Transport.PathProgress = initialProgress;
1140 m_goValue.Transport.StateChangeTime = now;
1141 m_goValue.Transport.StateChangeProgress = initialProgress;
1142 m_goValue.Transport.StateChangeEndTime = now;
1143 m_goValue.Transport.HoldProgress = initialProgress;
1144 m_goValue.Transport.HoldingAtProgress =
true;
1145 m_goValue.Transport.WaitingAtPathStart = waitingAtPathStart;
1161 m_goValue.Transport.StateChangeTime = now;
1163 m_goValue.Transport.StateChangeEndTime = now;
1165 m_goValue.Transport.HoldingAtProgress =
true;
1166 m_goValue.Transport.WaitingAtPathStart =
false;
1178 if (dynamicFlags != updatedFlags)
1197 if (
m_goValue.Transport.WaitingAtPathStart)
1335 cell.
Visit(p, object_checker, *
GetMap(), *target, range);
1353 cell.
Visit(p, grid_object_checker, *
GetMap(), *
this, range);
1373 if (!time_to_restore)
1425 Unit* spellCaster = user;
1427 bool triggered =
false;
1431 if (playerUser->OnArchaeologyFindUsed(
this))
1434 if (
sScriptMgr->OnGossipHello(playerUser,
this))
1437 if (
AI()->GossipHello(playerUser))
1523 bool found_free_slot =
false;
1527 float relativeDistance = (info->
size * itr->first) - (info->
size * (info->
chair.
slots - 1) / 2.0f);
1529 float x_i =
GetPositionX() + relativeDistance * std::cos(orthogonalOrientation);
1530 float y_i =
GetPositionY() + relativeDistance * std::sin(orthogonalOrientation);
1536 if (ChairUser->IsSitState() && ChairUser->getStandState() !=
UNIT_STAND_STATE_SIT && ChairUser->GetExactDist2d(x_i, y_i) < 0.1f)
1545 found_free_slot =
true;
1550 if (thisDistance <= lowestDist)
1552 nearest_slot = itr->first;
1553 lowestDist = thisDistance;
1559 if (found_free_slot)
1561 ChairSlotAndUser::iterator itr =
ChairListSlots.find(nearest_slot);
1564 itr->second = player->
GetGUID();
1608 bg->EventPlayerUsedGO(player,
this);
1671 zone_skill =
sObjectMgr->GetFishingBaseSkillLevel(zone);
1675 SF_LOG_ERROR(
"sql.sql",
"Fishable areaId %u are not properly defined in `skill_fishing_base_level`.", subzone);
1680 if (skill < zone_skill)
1682 chance =
int32(pow((
double)skill / zone_skill, 2) * 100);
1689 int32 roll = std::rand() % 100 + 1;
1691 SF_LOG_DEBUG(
"misc",
"Fishing check (skill: %i zone min skill: %i chance %i roll: %i", skill, zone_skill, chance, roll);
1764 spellCaster = owner;
1771 spellCaster = player;
1792 if (spellId == 62330)
1864 if (!targetPlayer || targetPlayer == player || !targetPlayer->
IsInSameRaidWith(player))
1869 if (level < info->meetingstone.minLevel)
1872 if (level < info->meetingstone.minLevel)
1875 if (info->
entry == 194097)
1955 switch (info->
entry)
1999 SF_LOG_ERROR(
"misc",
"GameObject::Use(): unit (type: %u, guid: %u, name: %s) tries to use object (guid: %u, entry: %u, name: %s) of unknown type (%u)",
2013 SF_LOG_DEBUG(
"outdoorpvp",
"WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId);
2018 spellCaster->
CastSpell(user, spellInfo, triggered);
2042 target->
CastSpell(target, spellInfo,
true);
2056 trigger->
CastSpell(target ? target : trigger, spellInfo,
true, 0, 0, owner->GetGUID());
2063 trigger->
CastSpell(target ? target : trigger, spellInfo,
true, 0, 0, target ? target->
GetGUID() : 0);
2107 float dist = sqrt(dx * dx + dy * dy);
2110 if (G3D::fuzzyEq(dist, 0.0f))
2113 float sinB = dx / dist;
2114 float cosB = dy / dist;
2115 dx = dist * (cosA * cosB + sinA * sinB);
2116 dy = dist * (cosA * sinB - sinA * cosB);
2117 return dx < info->
maxX + radius && dx > info->
minX - radius
2118 && dy < info->
maxY + radius && dy > info->
minY - radius
2119 && dz < info->
maxZ + radius && dz > info->
minZ - radius;
2141 if (cl->Name.size() > uloc_idx && !cl->Name[uloc_idx].empty())
2142 return cl->Name[uloc_idx];
2150 static double const atan_pow = atan(pow(2.0f, -20.0f));
2155 int64 i_rot1 =
int64(f_rot1 / atan_pow * (f_rot2 >= 0 ? 1.0f : -1.0f));
2156 int64 rotation = (i_rot1 << 43 >> 43) & 0x00000000001FFFFF;
2173 if (rotation2 == 0.0f && rotation3 == 0.0f)
2178 rotation2 = (float)f_rot1;
2179 rotation3 = (float)f_rot2;
2188 if (!
m_goValue.Building.MaxHealth || !change)
2192 if (change < 0 && !
m_goValue.Building.Health)
2244 data <<
int32(-change);
2294 sScriptMgr->OnGameObjectDamaged(
this, eventInvoker);
2297 bg->EventPlayerDamagedGO(eventInvoker,
this,
m_goInfo->building.damagedEvent);
2304 if (modelData->DamagedDisplayId)
2305 modelId = modelData->DamagedDisplayId;
2321 sScriptMgr->OnGameObjectDestroyed(
this, eventInvoker);
2327 bg->EventPlayerDamagedGO(eventInvoker,
this,
m_goInfo->building.destroyedEvent);
2328 bg->DestroyGate(eventInvoker,
this);
2337 if (modelData->DestroyedDisplayId)
2338 modelId = modelData->DestroyedDisplayId;
2356 if (modelData->RebuildingDisplayId)
2357 modelId = modelData->RebuildingDisplayId;
2379 bool collision =
false;
2382 collision = !collision;
2400 bool collision =
false;
2402 collision = !collision;
2525 bool const forceTransportDynamicFlags =
2533 forceTransportDynamicFlags ||
2536 updateMask.
SetBit(index);
2541 int16 pathProgress = -1;
2548 else if (targetIsGM)
2565 pathProgress =
int16(
float(transportProgress) /
float(transportPeriod) * 65535.0f);
2573 fieldBuffer <<
uint16(dynFlags);
2574 fieldBuffer <<
int16(pathProgress);
2583 fieldBuffer << flags;
2592 data->
append(fieldBuffer);
2606 *ori = data->orientation;
@ ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT
DBCStorage< DestructibleModelDataEntry > sDestructibleModelDataStore(DestructibleModelDatafmt)
DBCStorage< GameObjectDisplayInfoEntry > sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt)
std::set< uint32 > const & GetPhasesForGroup(uint32 group)
#define MAX_SPELL_EFFECTS
#define FISHING_BOBBER_READY_TIME
@ GO_STATE_TRANSPORT_ACTIVE
@ GO_STATE_TRANSPORT_STOPPED
@ GO_STATE_ACTIVE_ALTERNATIVE
TypeMapContainer< AllGridObjectTypes > GridTypeMapContainer
CoordPair< TOTAL_NUMBER_OF_CELLS_PER_MAP > CellCoord
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_FATAL(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
LootStore LootTemplates_Gameobject("gameobject_loot_template", "gameobject entry", true)
LootStore LootTemplates_Fishing("fishing_loot_template", "area id", true)
#define DEFAULT_VISIBILITY_DISTANCE
@ TEMPSUMMON_MANUAL_DESPAWN
uint32 GUID_LOPART(uint64 x)
bool IS_PET_GUID(uint64 guid)
uint64 MAKE_NEW_GUID(uint32 l, uint32 e, uint32 h)
bool IS_PLAYER_GUID(uint64 guid)
ScriptMapMap sEventScripts
std::pair< QuestRelations::const_iterator, QuestRelations::const_iterator > QuestRelationBounds
@ TELE_TO_NOT_LEAVE_COMBAT
@ TELE_TO_NOT_UNSUMMON_PET
@ TELE_TO_NOT_LEAVE_TRANSPORT
@ QUEST_STATUS_INCOMPLETE
@ GAMEOBJECT_TYPE_MO_TRANSPORT
@ GAMEOBJECT_TYPE_TRANSPORT
@ GAMEOBJECT_TYPE_SUMMONING_RITUAL
@ GAMEOBJECT_TYPE_MEETINGSTONE
@ GAMEOBJECT_TYPE_GENERIC
@ GAMEOBJECT_TYPE_FISHINGHOLE
@ GAMEOBJECT_TYPE_FLAGDROP
@ GAMEOBJECT_TYPE_QUESTGIVER
@ GAMEOBJECT_TYPE_SPELLCASTER
@ GAMEOBJECT_TYPE_FLAGSTAND
@ GAMEOBJECT_TYPE_FISHINGNODE
@ GAMEOBJECT_TYPE_BARBER_CHAIR
@ GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING
@ GO_DYNFLAG_LO_INVERTED_MOVEMENT
#define MAX_GAMEOBJECT_TYPE
GameObjectDestructibleState
@ GO_DESTRUCTIBLE_DESTROYED
@ GO_DESTRUCTIBLE_REBUILDING
@ GO_DESTRUCTIBLE_DAMAGED
@ SPELL_AURA_MOD_INVISIBILITY
Skyfire::AutoPtr< Transaction, Skyfire::Mutex > SQLTransaction
@ UNIT_STAND_STATE_SIT_LOW_CHAIR
@ CURRENT_CHANNELED_SPELL
@ UPDATEFLAG_STATIONARY_POSITION
uint32 GameObjectUpdateFieldFlags[GAMEOBJECT_END]
@ UF_FLAG_VIEWER_DEPENDENT
@ OBJECT_FIELD_DYNAMIC_FLAGS
@ GAMEOBJECT_FIELD_PARENT_ROTATION
@ GAMEOBJECT_FIELD_PERCENT_HEALTH
@ GAMEOBJECT_FIELD_FACTION_TEMPLATE
@ GAMEOBJECT_FIELD_DISPLAY_ID
@ GAMEOBJECT_FIELD_STATE_SPELL_VISUAL_ID
@ WORLD_DEL_EVENT_GAMEOBJECT
BattlegroundTypeId GetTypeID(bool GetRandom=false) const
virtual void EventPlayerClickedOnFlag(Player *, GameObject *)
void WriteGuidBytes(const ObjectGuid &guid, Offsets... offsets)
bool WriteBit(uint32 bit)
void WriteGuidMask(const ObjectGuid &guid, Offsets... offsets)
void WriteByteSeq(uint8 b)
virtual void UpdateAI(uint32)
virtual void OnStateChanged(uint32, Unit *)
virtual void EventInform(uint32)
std::vector< uint32 > m_transportPauseTimes
void SetGoState(GOState state)
void UpdateLegacyTransportPathProgress()
GameObjectValue m_goValue
std::string const & GetNameForLocaleIdx(LocaleConstant locale_idx) const OVERRIDE
GameObjectTemplate const * GetGOInfo() const
uint32 GetDBTableGUIDLow() const
GOState GetGoState() const
void RemoveFromWorld() OVERRIDE
void SetGoArtKit(uint8 artkit)
GameObjectData const * m_goData
LootState getLootState() const
uint32 GetSpellId() const
bool IsAlwaysVisibleFor(WorldObject const *seer) const OVERRIDE
void SetOwnerGUID(uint64 owner)
uint8 GetGoAnimProgress() const
uint64 GetOwnerGUID() const
Position m_stationaryPosition
bool IsInvisibleDueToDespawn() const OVERRIDE
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=NULL)
bool hasInvolvedQuest(uint32 quest_id) const OVERRIDE
void UpdateWorldRotationField()
Group * GetLootRecipientGroup() const
uint32 GetUniqueUseCount() const
void UpdateRotationFields(float rotation2=0.0f, float rotation3=0.0f)
void EnableCollision(bool enable)
uint8 GetGoArtKit() const
void SetGoAnimProgress(uint8 animprogress)
uint32 m_DBTableGuid
For new or temporary gameobjects is 0 for saved it is lowguid.
void InitializeLegacyTransport()
ChairSlotAndUser ChairListSlots
uint32 GetTransportPeriod() const
void MarkLegacyTransportPathProgressChanged()
GameObjectData const * GetGOData() const
Player * GetLootRecipient() const
GameObjectModel * CreateModel()
bool Create(uint32 guidlow, uint32 name_id, Map *map, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit=0)
bool HasLootRecipient() const
void CleanupsBeforeDelete(bool finalCleanup=true) OVERRIDE
uint32 m_respawnDelayTime
GameObjectAI * AI() const
void SetLegacyTransportTravelTime(uint32 travelTime)
void SetLegacyTransportStopped(bool stopped)
bool IsInRange(float x, float y, float z, float radius) const
static GameObject * GetGameObject(WorldObject &object, uint64 guid)
void SetRespawnTime(int32 respawn)
void TriggeringLinkedGameObject(uint32 trapEntry, Unit *target)
GameobjectTypes GetGoType() const
void SetGoType(GameobjectTypes type)
void StartLegacyTransportToFirstStop(uint32 travelTime)
bool LoadGameObjectFromDB(uint32 guid, Map *map, bool addToMap=true)
bool ActivateToQuest(Player *target) const
void SetTransportPathProgress(uint32 pathProgress)
void AddToWorld() OVERRIDE
void StopLegacyTransportAtInitialStop()
void SetPhaseMask(uint32 newPhaseMask, bool update) OVERRIDE
void HandleLegacyTransportStateChange(GOState oldState, GOState newState)
void SaveRespawnTime() OVERRIDE
void SendCustomAnim(uint32 anim)
void SetLootRecipient(Unit *unit)
GameObjectModel * m_model
void EventInform(uint32 eventId)
void UpdateModelPosition()
bool SetPhased(uint32 id, bool update, bool apply) OVERRIDE
void Update(uint32 p_time) OVERRIDE
GameObject * LookupFishingHoleAround(float range)
void BuildValuesUpdate(uint8 updatetype, ByteBuffer *data, Player *target) const OVERRIDE
void SetDisplayId(uint32 displayid)
GameObjectTemplate const * m_goInfo
uint32 GetGOStateValue(GOState state)
std::string GetAIName() const
void SetLootState(LootState s, Unit *unit=NULL)
void StopLegacyTransportAtCurrentProgress()
void SetDestructibleState(GameObjectDestructibleState state, Player *eventInvoker=NULL, bool setHealth=false)
bool IsDynTransport() const
void SwitchDoorOrButton(bool activate, bool alternative=false)
uint32 m_lootRecipientGroup
bool IsDestructibleBuilding() const
std::list< uint32 > m_SkillupList
void CastSpell(Unit *target, uint32 spell)
void ModifyHealth(int32 change, Unit *attackerOrHealer=NULL, uint32 spellId=0)
std::set< uint64 > m_unique_users
void getFishLoot(Loot *loot, Player *loot_owner)
Transport * ToTransport()
uint32 lootingGroupLowGUID
void SetGoHealth(uint8 health)
void GetRespawnPosition(float &x, float &y, float &z, float *ori=NULL) const
uint32 GetLegacyTransportTargetProgress(GOState state) const
GameObjectDestructibleState GetDestructibleState() const
bool IsLootAllowedFor(Player const *player) const
void AddUniqueUse(Player *player)
bool hasQuest(uint32 quest_id) const OVERRIDE
std::vector< uint32 > const * GetPauseTimes() const
static GameObjectModel * Create(std::unique_ptr< GameObjectModelOwnerBase > modelOwner, std::string const &dataPath)
bool isSpawned() const OVERRIDE
uint32 GetDisplayId() const OVERRIDE
G3D::Vector3 GetPosition() const OVERRIDE
float GetScale() const OVERRIDE
float GetOrientation() const OVERRIDE
void DebugVisualizeCorner(G3D::Vector3 const &corner) const OVERRIDE
GameObject const * _owner
uint32 GetPhaseMask() const OVERRIDE
GameObjectModelOwnerImpl(GameObject const *owner)
void ScriptsStart(std::map< uint32, std::multimap< uint32, ScriptInfo > > const &scripts, uint32 id, Object *source, Object *target)
Put scripts in the execution queue.
void RemoveGameObjectModel(const GameObjectModel &model)
time_t GetGORespawnTime(uint32 dbGuid) const
void SaveGORespawnTime(uint32 dbGuid, time_t respawnTime)
void RemoveGORespawnTime(uint32 dbGuid)
GameObject * GetGameObject(uint64 guid)
uint32 GetInstanceId() const
time_t GetLinkedRespawnTime(uint64 guid) const
void InsertGameObjectModel(const GameObjectModel &model)
static Player * GetPlayer(WorldObject const &, uint64 guid)
static Unit * GetUnit(WorldObject const &, uint64 guid)
static Player * FindPlayer(uint64)
void UpdateUInt32Value(uint16 index, uint32 value)
void SetByteValue(uint16 index, uint8 offset, uint8 value)
ObjectGuid GetObjectGUID() const
uint32 GetUInt32Value(uint16 index) const
uint32 GetGUIDLow() const
void _Create(uint32 guidlow, uint32 entry, HighGuid guidhigh)
bool isType(uint16 mask) const
void SetFlag(uint16 index, uint32 newFlag)
void RemoveFlag(uint16 index, uint32 oldFlag)
float GetFloatValue(uint16 index) const
uint16 m_fieldNotifyFlags
void BuildValuesUpdateBlockForPlayer(UpdateData *data, Player *target) const
void SetFloatValue(uint16 index, float value)
virtual void AddToWorld()
bool HasFlag(uint16 index, uint32 flag) const
void SetEntry(uint32 entry)
virtual void SetObjectScale(float scale)
void SetUInt32Value(uint16 index, uint32 value)
void SendCinematicStart(uint32 CinematicSequenceId)
bool CanUseBattlegroundObject(GameObject *gameobject)
bool IsInSameRaidWith(Player const *p) const
bool UpdateFishingSkill()
uint16 GetSkillValue(uint32 skill) const
void SendDirectMessage(WorldPacket *data)
bool InBattleground() const
void SendPreparedGossip(WorldObject *source)
void KillCreditGO(uint32 entry, uint64 guid=0)
WorldSession * GetSession() const
bool HasQuestForGO(int32 goId) const
Battleground * GetBattleground() const
bool IsGameMaster() const
void UpdateAchievementCriteria(AchievementCriteriaTypes type, uint64 miscValue1=0, uint64 miscValue2=0, uint64 miscValue3=0, Unit *unit=NULL)
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options=0)
QuestStatus GetQuestStatus(uint32 quest_id) const
void PrepareGossipMenu(WorldObject *source, uint32 menuId=0, bool showQuests=false)
void SendLoot(uint64 guid, LootType loot_type, bool isAoE=false)
void setFloat(const uint8 index, const float value)
void setUInt16(const uint8 index, const uint16 value)
void setUInt32(const uint8 index, const uint32 value)
void setUInt8(const uint8 index, const uint8 value)
void setInt32(const uint8 index, const int32 value)
SpellImplicitTargetInfo TargetA
Targets GetTarget() const
SpellEffectInfo Effects[MAX_SPELL_EFFECTS]
uint32 CalcCastTime(uint8 level=0, Spell *spell=NULL) const
void RemovePassenger(WorldObject *passenger)
Vehicle * GetVehicle() const
void RemoveGameObject(GameObject *gameObj, bool del)
void setFaction(uint32 faction)
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
float GetSpellMaxRangeForTarget(Unit const *target, SpellInfo const *spellInfo) const
void SetOwnerGUID(uint64 owner)
void RemoveAurasByType(AuraType auraType, uint64 casterGUID=0, Aura *except=NULL, bool negative=true, bool positive=true)
void FinishSpell(CurrentSpellTypes spellType, bool ok=true)
bool IsFriendlyTo(Unit const *unit) const
void SetStandState(uint8 state)
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
bool BuildPacket(WorldPacket *packet)
uint32 GetBlockCount() const
void SetCount(uint32 valuesCount)
void SetBit(uint32 index)
void AppendToPacket(ByteBuffer *data)
virtual void SetPhaseMask(uint32 newPhaseMask, bool update)
uint32 GetPhaseMask() const
bool IsWithinDist3d(float x, float y, float z, float dist) const
virtual void RemoveFromWorld()
Creature * SummonTrigger(float x, float y, float z, float ang, uint32 dur, CreatureAI *(*GetAI)(Creature *)=NULL)
virtual bool IsInvisibleDueToDespawn() const
FlaggedValuesArray32< int32, uint32, InvisibilityType, TOTAL_INVISIBILITY_TYPES > m_invisibility
void SendObjectDeSpawnAnim(uint64 guid)
void SetTransport(Transport *t)
virtual bool SetPhased(uint32 id, bool update, bool apply)
void SetName(std::string const &newname)
float GetDistance2d(WorldObject const *obj) const
ZoneScript * m_zoneScript
std::string const & GetName() const
virtual void SetMap(Map *map)
virtual bool IsAlwaysVisibleFor(WorldObject const *) const
void AddObjectToRemoveList()
void VisitNearbyGridObject(float const &radius, NOTIFIER ¬ifier) const
WorldObject(bool isWorldObject)
Transport * GetTransport() const
void VisitNearbyWorldObject(float const &radius, NOTIFIER ¬ifier) const
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPES > m_stealth
MovementInfo m_movementInfo
virtual void SendMessageToSet(WorldPacket *data, bool self)
void GetZoneAndAreaId(uint32 &zoneid, uint32 &areaid) const
virtual void UpdateObjectVisibility(bool forced=true)
void SendPageText(ObjectGuid GameObjectGUID)
WorldDatabaseWorkerPool WorldDatabase
Accessor to the world database.
@ SMSG_GAMEOBJECT_CUSTOM_ANIM
@ SMSG_ENABLE_BARBER_SHOP
@ SMSG_DESTRUCTIBLE_BUILDING_DAMAGE
@ CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY
GameObjectAI * SelectGameObjectAI(GameObject *go)
C::value_type const & SelectRandomContainerElement(C const &container)
uint32 GetLegacyTransportTransitionTime(uint32 sourceProgress, uint32 targetProgress)
uint32 GetTransportDynamicPathProgress(uint32 gameObjectType, uint32 transportPeriod, uint32 pathProgress)
uint32 InterpolateLegacyTransportPathProgress(uint32 sourceProgress, uint32 targetProgress, uint32 transportPeriod, uint32 elapsedTime, uint32 travelTime, bool invertedMovement=false)
uint32 ClampLegacyTransportPathProgress(uint32 pathProgress, uint32 transportPeriod)
uint32 GetInitialLegacyTransportPathProgress(bool hasStopFrames, uint32 transportPeriod, uint32 now)
uint32 SetLegacyTransportStoppedFlag(uint32 dynamicFlags, bool stopped)
uint32 GetInitialLegacyTransportState(bool, bool hasStopFrames)
bool UsesControlledTransportProgress(uint32 gameObjectType, uint32 transportPeriod)
uint32 WrapTransportPathProgress(uint32 pathProgress, uint32 transportPeriod)
CellCoord ComputeCellCoord(float x, float y)
void Visit(CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, WorldObject const &, float) const
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@114312050106372302366137106154036240136321221160 barberChair
uint32 GetAutoCloseTime() const
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@152130076372303155010023156377005036224346144151 camera
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@154136051106040324176270267211357174344063050360 chest
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@133216107201365043142154201341232071301300107152 transport
uint32 GetCharges() const
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@334327144355150311317234223372371064337023010042 trap
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@105243172300324111262263021120111346345123061033 summoningRitual
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@316034272062200025205312222263007157266267301257 chair
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@243266127071011160240350104214013054067132104252 fishinghole
uint32 casterTargetSpellTargets
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@315077355127077256043020131262337362171234125061 spellcaster
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@240010171105306235035040051230330371375266145364 building
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@336060043160212225074214221232260020127013174055 goober
bool FillLoot(uint32 lootId, LootStore const &store, Player *lootOwner, bool personal, bool noEmptyError=false, uint16 lootMode=LOOT_MODE_DEFAULT)
float GetPositionZ() const
float GetOrientation() const
bool IsPositionValid() const
float GetPositionX() const
float GetPositionY() const
void Relocate(float x, float y)