Process queued scripts.
311 source = player->GetItemByGuid(step.
sourceGUID);
333 TC_LOG_ERROR(
"scripts",
"%s source with unsupported high guid %s.",
364 TC_LOG_ERROR(
"scripts",
"%s target with unsupported high guid %s.",
430 cSource->HandleEmoteCommand(step.
script->
Emote.EmoteID);
440 TC_LOG_ERROR(
"scripts",
"%s wrong field %u (max count: %u) in object (TypeId: %u, %s) specified, skipping.",
442 cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetGUID().ToString().c_str());
470 TC_LOG_ERROR(
"scripts",
"%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, %s) specified, skipping.",
472 cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUID().ToString().c_str());
486 TC_LOG_ERROR(
"scripts",
"%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, %s) specified, skipping.",
488 cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUID().ToString().c_str());
530 TC_LOG_ERROR(
"scripts",
"%s source is not unit, gameobject or player (TypeId: %u, Entry: %u, %s), skipping.",
543 TC_LOG_ERROR(
"scripts",
"%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, %s), skipping.",
551 TC_LOG_ERROR(
"scripts",
"%s neither source nor target is player (Entry: %u, GUID: %s; target: Entry: %u, GUID: %s), skipping.",
573 player->RewardPlayerAndGroupAtEvent(step.
script->
KillCredit.CreatureEntry, player);
601 TC_LOG_ERROR(
"scripts",
"%s can not be used with gameobject of type %u (guid: %u).",
657 TC_LOG_ERROR(
"scripts",
"%s target object is not gameobject (TypeId: %u, Entry: %u, %s), skipping.",
679 if (!source && !target)
757 ItemPosCountVec dest;
801 if (creatureBounds.first != creatureBounds.second)
804 auto creatureItr = std::find_if(creatureBounds.first, creatureBounds.second, [](Map::CreatureBySpawnIdContainer::value_type
const& pair)
806 return pair.second->IsAlive();
809 cTarget = creatureItr != creatureBounds.second ? creatureItr->second : creatureBounds.first->second;
836 if (cSource->isDead())
838 TC_LOG_ERROR(
"scripts",
"%s creature is already dead (Entry: %u, %s)",
839 step.
script->
GetDebugInfo().c_str(), cSource->GetEntry(), cSource->GetGUID().ToString().c_str());
845 cSource->RemoveCorpse();
871 cSource->LoadEquipment(step.
script->
Equip.EquipmentID);
883 player->PlayerTalkClass->SendCloseGossip();
G3D::Matrix abs(const G3D::Matrix &M)
Definition: Matrix.h:632
Definition: ObjectMgr.h:115
ScriptScheduleMap m_scriptSchedule
Definition: Map.h:691
Definition: ObjectMgr.h:97
Definition: ObjectMgr.h:161
Definition: ObjectMgr.h:108
Definition: ObjectMgr.h:96
Definition: UpdateFields.h:136
Definition: Creature.h:341
Definition: ObjectMgr.h:95
void ScriptsStart(std::map< uint32, std::multimap< uint32, ScriptInfo > > const &scripts, uint32 id, Object *source, Object *target)
Put scripts in the execution queue.
Definition: MapScripts.cpp:33
struct ScriptInfo::@280::@297 CreateItem
GameObject * _FindGameObject(WorldObject *pWorldObject, ObjectGuid::LowType guid) const
Definition: MapScripts.cpp:282
Definition: ObjectMgr.h:94
Definition: Creature.h:343
Definition: ObjectMgr.h:89
Map * GetMap() const
Definition: Object.h:543
Definition: ObjectMgr.h:170
virtual void TextEmote(std::string const &text, WorldObject const *target=nullptr, bool isBossEmote=false)
Definition: Unit.cpp:16403
float Orientation
Definition: ObjectMgr.h:243
void _ScriptProcessDoor(Object *source, Object *target, const ScriptInfo *scriptInfo) const
Definition: MapScripts.cpp:227
struct ScriptInfo::@280::@286 MoveTo
Player * _GetScriptPlayer(Object *obj, bool isSource, const ScriptInfo *scriptInfo) const
Definition: MapScripts.cpp:175
TC_GAME_API Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive)
Definition: ScriptedCreature.cpp:611
ScriptCommands command
Definition: ObjectMgr.h:187
ScriptsType
Definition: ObjectMgr.h:138
Definition: ObjectMgr.h:103
Definition: ObjectMgr.h:106
bool isType(uint16 mask) const
Definition: Object.h:114
struct ScriptInfo::@280::@304 Model
ScriptInfo const * script
owner of source if source is item
Definition: Map.h:66
Definition: ObjectMgr.h:167
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
struct ScriptInfo::@280::@285 FieldSet
std::map< uint32, ScriptMap > ScriptMapMap
Definition: ObjectMgr.h:376
ObjectGuid ownerGUID
Definition: Map.h:65
Definition: ObjectMgr.h:101
Definition: ObjectGuid.h:32
std::string GetDebugInfo() const
Definition: ObjectMgr.cpp:126
Definition: ObjectMgr.h:90
arena_t NULL
Definition: jemalloc_internal.h:624
struct ScriptInfo::@280::@284 Emote
Definition: Creature.h:345
struct ScriptInfo::@280::@299 LoadPath
Pet * GetPet(ObjectGuid const &guid)
Definition: Map.cpp:3550
Definition: ObjectMgr.h:113
Definition: Creature.h:467
void SetRespawnTime(int32 respawn)
Definition: GameObject.h:945
#define sWorld
Definition: World.h:887
struct ScriptInfo::@280::@300 CallScript
Definition: SharedDefines.h:2082
Corpse * GetCorpse(ObjectGuid const &guid)
Definition: Map.cpp:3530
GameObject * ToGameObject()
Definition: Object.h:200
Definition: Creature.h:340
T max(const T &x, const T &y)
Definition: g3dmath.h:320
struct ScriptInfo::@280::@301 Kill
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
Definition: ObjectMgr.h:87
Player * ToPlayer()
Definition: Object.h:191
Definition: ObjectGuid.h:49
Definition: ObjectMgr.h:91
Definition: ObjectMgr.h:107
struct ScriptInfo::@280::@291 RespawnGameobject
struct ScriptInfo::@280::@283 Talk
TypeID GetTypeId() const
Definition: Object.h:113
void SetLootState(LootState s, Unit *unit=NULL)
Definition: GameObject.cpp:2112
Definition: UpdateFields.h:29
void SetFacingToObject(WorldObject const *object)
Definition: Unit.cpp:15787
float GetOrientation() const
Definition: Position.h:107
#define sWaypointMgr
Definition: WaypointManager.h:75
Definition: ObjectMgr.h:86
struct ScriptInfo::@280::@305 PlayMovie
Definition: SharedDefines.h:2066
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1594
Definition: ObjectMgr.h:102
struct ScriptInfo::@280::@306 PlayAnimKit
Definition: ObjectMgr.h:175
Definition: ObjectMgr.h:169
struct ScriptInfo::@280::@294 RemoveAura
void NearTeleportTo(float x, float y, float z, float orientation, bool casting=false)
Definition: Unit.cpp:15407
Creature * _GetScriptCreature(Object *obj, bool isSource, const ScriptInfo *scriptInfo) const
Definition: MapScripts.cpp:192
G3D::int16 z
Definition: Vector3int16.h:46
bool AddToMap(T *)
Definition: Map.cpp:566
Unit * _GetScriptUnit(Object *obj, bool isSource, const ScriptInfo *scriptInfo) const
Definition: MapScripts.cpp:155
Definition: ObjectGuid.h:34
int32_t int32
Definition: Define.h:146
ObjectGuid targetGUID
Definition: Map.h:64
CreatureBySpawnIdContainer _creatureBySpawnIdStore
Definition: Map.h:739
G3D::int16 y
Definition: Vector2int16.h:38
struct ScriptInfo::@280::@295 CastSpell
Definition: GameObject.h:880
void SetFacingTo(float ori)
Definition: Unit.cpp:15777
WorldObject * _GetScriptWorldObject(Object *obj, bool isSource, const ScriptInfo *scriptInfo) const
Definition: MapScripts.cpp:209
ScriptMapMap * GetScriptsMapByType(ScriptsType type)
Definition: ObjectMgr.cpp:68
struct ScriptInfo::@280::@298 DespawnSelf
Definition: ObjectMgr.h:92
Definition: ObjectMgr.h:152
Definition: ObjectMgr.h:176
ObjectGuid sourceGUID
Definition: Map.h:63
void Use(Unit *user)
Definition: GameObject.cpp:1232
Player * _GetScriptPlayerSourceOrTarget(Object *source, Object *target, const ScriptInfo *scriptInfo) const
Definition: MapScripts.cpp:100
Definition: ObjectMgr.h:172
Definition: ObjectMgr.h:112
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
virtual void Whisper(std::string const &text, Language language, Player *target, bool isBossWhisper=false)
Definition: Unit.cpp:16408
virtual void Yell(std::string const &text, Language language, WorldObject const *target=nullptr)
Definition: Unit.cpp:16398
Definition: Creature.h:342
ObjectGuid const & GetGUID() const
Definition: Object.h:105
struct ScriptInfo::@280::@292 TempSummonCreature
bool isSpawned() const
Definition: GameObject.h:951
virtual void Say(std::string const &text, Language language, WorldObject const *target=nullptr)
Definition: Unit.cpp:16393
Definition: ObjectGuid.h:33
GameobjectTypes GetGoType() const
Definition: GameObject.h:964
Definition: ObjectMgr.h:100
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
SPECIFIC_TYPE * Find(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:74
void MonsterMoveWithSpeed(float x, float y, float z, float speed, bool generatePath=false, bool forceDestination=false)
Definition: Unit.cpp:426
Definition: ObjectMgr.h:164
Definition: ObjectMgr.h:171
Definition: ObjectMgr.h:98
Definition: ObjectMgr.h:116
struct ScriptInfo::@280::@303 Equip
void MovePath(uint32 path_id, bool repeatable)
Definition: MotionMaster.cpp:618
Definition: ObjectMgr.h:99
HighGuid GetHigh() const
Definition: ObjectGuid.h:217
int32_t int32
Definition: g3dmath.h:167
Definition: ObjectAccessor.h:45
#define sScriptMgr
Definition: ScriptMgr.h:837
uint32 GetEntry() const
Definition: Object.h:107
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
Definition: ObjectMgr.h:155
struct ScriptInfo::@280::@290 KillCredit
uint32_t uint32
Definition: g3dmath.h:168
G3D::int16 x
Definition: Vector2int16.h:37
struct ScriptInfo::@280::@288 TeleportTo
Definition: ObjectMgr.h:179
InventoryResult
Definition: Item.h:46
Transport * GetTransport(ObjectGuid const &guid)
Definition: Map.cpp:3555
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
struct ScriptInfo::@280::@296 PlaySound
Definition: ObjectMgr.h:158
Creature * _GetScriptCreatureSourceOrTarget(Object *source, Object *target, const ScriptInfo *scriptInfo, bool bReverse=false) const
Definition: MapScripts.cpp:122
Definition: ObjectMgr.h:104
struct ScriptInfo::@280::@287 FlagToggle
Definition: ObjectMgr.h:93
Definition: GameObject.h:869
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
Definition: SharedDefines.h:2071
Definition: ObjectMgr.h:114
std::string ToString() const
Definition: ObjectGuid.cpp:99
Definition: ObjectMgr.h:168
struct ScriptInfo::@280::@289 QuestExplored
Unit * ToUnit()
Definition: Object.h:197
bool IsEmpty() const
Definition: ObjectGuid.h:242
Definition: ObjectMgr.h:111
Definition: SharedDefines.h:2065
Definition: ObjectMgr.h:88
Definition: Creature.h:344