112 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: Invoker: %s (%s)", tempInvoker->GetName().c_str(), tempInvoker->GetGUID().ToString().c_str());
125 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
127 if (
IsCreature(*itr) && !(*itr)->ToCreature()->IsPet())
154 else if (targetPlayer)
155 talkTarget = targetPlayer;
159 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_TALK: talker: %s (%s), textGuid: %s",
168 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
177 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SIMPLE_TALK: talker: %s (%s), textGroupId: %u",
178 (*itr)->GetName().c_str(), (*itr)->GetGUID().ToString().c_str(),
uint8(e.
action.
talk.textGroupID));
190 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
194 (*itr)->ToUnit()->HandleEmoteCommand(e.
action.
emote.emote);
195 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_PLAY_EMOTE: target: %s (%s), emote: %u",
196 (*itr)->GetName().c_str(), (*itr)->GetGUID().ToString().c_str(), e.
action.
emote.emote);
209 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
214 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SOUND: target: %s (%s), sound: %u, onlyself: %u",
215 (*itr)->GetName().c_str(), (*itr)->GetGUID().ToString().c_str(), e.
action.
sound.sound, e.
action.
sound.onlySelf);
228 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
234 (*itr)->ToCreature()->setFaction(e.
action.
faction.factionID);
235 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, %s set faction to %u",
236 (*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), e.
action.
faction.factionID);
242 if ((*itr)->ToCreature()->getFaction() != ci->faction)
244 (*itr)->ToCreature()->setFaction(ci->faction);
245 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, %s set faction to %u",
246 (*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), ci->faction);
263 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
276 (*itr)->ToCreature()->SetDisplayId(displayId);
277 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, %s set displayid to %u",
278 (*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), displayId);
285 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, %s set displayid to %u",
286 (*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), e.
action.
morphOrMount.model);
291 (*itr)->ToCreature()->DeMorph();
292 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, %s demorphs.",
293 (*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str());
306 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
310 (*itr)->ToPlayer()->FailQuest(e.
action.
quest.quest);
311 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_FAIL_QUEST: Player %s fails quest %u",
312 (*itr)->GetGUID().ToString().c_str(), e.
action.
quest.quest);
325 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
331 (*itr)->ToPlayer()->AddQuestAndCheckCompletion(q,
NULL);
332 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_ADD_QUEST: Player %s add quest %u",
333 (*itr)->GetGUID().ToString().c_str(), e.
action.
quest.quest);
347 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
377 temp[count] = emotes[i];
388 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
393 (*itr)->ToUnit()->HandleEmoteCommand(emote);
394 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_RANDOM_EMOTE: Creature %s handle random emote %u",
395 (*itr)->GetGUID().ToString().c_str(), emote);
408 for (ThreatContainer::StorageType::const_iterator i = threatList.begin(); i != threatList.end(); ++i)
413 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_THREAT_ALL_PCT: Creature %s modify threat for %s, value %i",
429 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
434 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_THREAT_SINGLE_PCT: Creature %s modify threat for %s, value %i",
449 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
453 if (
Vehicle* vehicle = (*itr)->ToUnit()->GetVehicleKit())
454 for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it)
456 player->AreaExploredOrEventHappens(e.
action.
quest.quest);
460 (*itr)->ToPlayer()->GroupEventHappens(e.
action.
quest.quest,
me);
462 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS: %s credited quest %u",
463 (*itr)->GetGUID().ToString().c_str(), e.
action.
quest.quest);
476 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
493 bool _allowMove =
false;
496 bool hasPower =
true;
531 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_CAST:: %s casts spell %u on target %s with castflags %u",
535 TC_LOG_DEBUG(
"scripts.ai",
"Spell %u not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (%s) already has the aura", e.
action.
cast.spell, (*itr)->GetGUID().ToString().c_str());
544 if (!tempLastInvoker)
551 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
562 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %s casts spell %u on target %s with castflags %u",
566 TC_LOG_DEBUG(
"scripts.ai",
"Spell %u not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (%s) already has the aura", e.
action.
cast.spell, (*itr)->GetGUID().ToString().c_str());
578 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
582 (*itr)->ToUnit()->AddAura(e.
action.
cast.spell, (*itr)->ToUnit());
583 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_ADD_AURA: Adding aura %u to %s",
584 e.
action.
cast.spell, (*itr)->GetGUID().ToString().c_str());
597 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
602 (*itr)->ToGameObject()->SetLootState(
GO_READY);
603 (*itr)->ToGameObject()->UseDoorOrButton(0,
false, unit);
604 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_ACTIVATE_GOBJECT. %s (entry: %u) activated",
605 (*itr)->GetGUID().ToString().c_str(), (*itr)->GetEntry());
618 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
622 (*itr)->ToGameObject()->ResetDoorOrButton();
623 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_RESET_GOBJECT. %s (entry: %u) reset",
624 (*itr)->GetGUID().ToString().c_str(), (*itr)->GetEntry());
637 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
642 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_EMOTE_STATE. %s set emotestate to %u",
643 (*itr)->GetGUID().ToString().c_str(), e.
action.
emote.emote);
656 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
663 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. %s added flag %u to UNIT_FIELD_FLAGS",
669 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. %s added flag %u to UNIT_FIELD_FLAGS_2",
684 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
691 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. %s removed flag %u to UNIT_FIELD_FLAGS",
697 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. %s removed flag %u to UNIT_FIELD_FLAGS_2",
712 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_AUTO_ATTACK: %s bool on = %u",
723 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_ALLOW_COMBAT_MOVEMENT: %s bool on = %u",
733 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_EVENT_PHASE: %s set event phase %u",
744 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_INC_EVENT_PHASE: %s inc event phase by %u, "
768 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: %s DoFleeToGetAssistance",
me->
GetGUID().
ToString().c_str());
779 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_CALL_GROUPEVENTHAPPENS: %s, group credit for quest %u",
785 for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it)
805 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
821 (*itr)->ToUnit()->RemoveAllAuras();
823 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_REMOVEAURASFROMSPELL: %s, spell %u",
842 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
847 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_FOLLOW: %s following target %s",
874 temp[count] = phases[i];
884 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE: %s sets event phase to %u",
895 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE_RANGE: %s sets event phase to %u",
909 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: %s, Killcredit: %u",
919 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
924 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: %s, Killcredit: %u",
928 if (
Vehicle* vehicle = (*itr)->ToUnit()->GetVehicleKit())
929 for (SeatMap::iterator seatItr = vehicle->Seats.begin(); seatItr != vehicle->Seats.end(); ++seatItr)
955 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA: Field: %u, data: %u",
980 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: %u, data: %s",
993 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1037 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_SET_SHEATH: %s, State: %u",
1049 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1053 if (target->IsAlive() &&
IsSmart(target))
1078 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1093 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1094 for (
auto phase : phases)
1106 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1122 (*itr)->ToUnit()->Dismount();
1151 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1202 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1220 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1222 (*itr)->GetPosition(x, y, z, o);
1229 summon->AI()->AttackStart((*itr)->ToUnit());
1240 summon->AI()->AttackStart(unit);
1252 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1257 (*itr)->GetPosition(x, y, z, o);
1280 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1285 (*itr)->ToUnit()->KillSelf();
1302 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1319 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1342 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1381 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1388 TC_LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SET_COUNTER is not using SmartAI, skipping");
1395 TC_LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SET_COUNTER is not using SmartGameObjectAI, skipping");
1464 if (!targets->empty())
1478 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1483 (*itr)->ToPlayer()->SendMovieStart(e.
action.
movie.entry);
1507 target = targets->front();
1516 trans->CalculatePassengerPosition(dest.x, dest.y, dest.z);
1530 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1533 (*itr)->ToCreature()->Respawn();
1547 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1549 (*itr)->ToPlayer()->PlayerTalkClass->SendCloseGossip();
1560 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1571 TC_LOG_ERROR(
"sql.sql",
"SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u", equipId, npc->GetEntry());
1575 npc->SetCurrentEquipmentId(equipId);
1587 npc->SetVirtualItem(0, slot[0]);
1589 npc->SetVirtualItem(1, slot[1]);
1591 npc->SetVirtualItem(2, slot[2]);
1639 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
1683 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
1685 if (
IsSmart(target) && target->GetVictim())
1687 target->GetMotionMaster()->MoveChase(target->GetVictim(), attackDistance, attackAngle);
1703 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
1727 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1740 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1753 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1762 ObjectList* casters =
GetTargets(
CreateEvent(
SMART_EVENT_UPDATE_IC, 0, 0, 0, 0, 0,
SMART_ACTION_NONE, 0, 0, 0, 0, 0, 0, (
SMARTAI_TARGETS)e.
action.
cast.targetType, e.
action.
cast.targetParam1, e.
action.
cast.targetParam2, e.
action.
cast.targetParam3, 0), unit);
1773 for (ObjectList::const_iterator itr = casters->begin(); itr != casters->end(); ++itr)
1780 bool interruptedSpell =
false;
1782 for (ObjectList::const_iterator it = targets->begin(); it != targets->end(); ++it)
1792 interruptedSpell =
true;
1798 TC_LOG_DEBUG(
"scripts.ai",
"Spell %u not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (%s) already has the aura", e.
action.
cast.spell, (*it)->GetGUID().ToString().c_str());
1821 temp[count] = actions[i];
1839 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
1869 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
1893 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1895 (*itr)->ToPlayer()->ActivateTaxiPathTo(e.
action.
taxi.id);
1906 bool foundTarget =
false;
1908 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1915 (*itr)->ToCreature()->GetMotionMaster()->MoveRandom((
float)e.
action.
moveRandom.distance);
1917 (*itr)->ToCreature()->GetMotionMaster()->MoveIdle();
1937 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1950 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1963 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1976 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1989 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2002 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2015 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2028 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2032 creature->GetMotionMaster()->Clear();
2048 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2068 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2075 TC_LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping");
2082 TC_LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping");
2094 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SEND_GOSSIP_MENU: gossipMenuId %d, gossipNpcTextId %d",
2101 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2103 if (
Player* player = (*itr)->ToPlayer())
2108 player->PlayerTalkClass->ClearMenus();
2123 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2138 (*itr)->ToCreature()->SetHomePosition((*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), (*itr)->GetOrientation());
2141 TC_LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SET_HOME_POS is invalid, skipping");
2154 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2167 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2180 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2193 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2206 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2215 std::list<TempSummon*> summonList;
2218 for (std::list<TempSummon*>::const_iterator itr = summonList.begin(); itr != summonList.end(); ++itr)
2220 (*itr)->AI()->AttackStart(unit);
2229 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2241 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2253 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2265 TC_LOG_ERROR(
"sql.sql",
"SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_STOP, inactive event (id: %u)", eventId);
2276 TC_LOG_ERROR(
"sql.sql",
"SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_START, already activated event (id: %u)", eventId);
2297 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
2310 if (!path || path->empty())
2313 WPPath::const_iterator itrWp = path->find(0);
2315 if (itrWp != path->end())
2319 float distToThisPath = target->
GetDistance(wp->x, wp->y, wp->z);
2321 if (distToThisPath < distanceToClosest)
2323 distanceToClosest = distToThisPath;
2342 std::vector<uint32> sounds;
2344 std::back_inserter(sounds), [](
uint32 sound) {
return sound != 0; });
2356 TC_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_RANDOM_SOUND: target: %s (%s), sound: %u, onlyself: %s",
2374 ProcessEvent(linked, unit, var0, var1, bvar, spell, gob);
Definition: SmartScriptMgr.h:1352
struct SmartAction::@114::@186 goFlag
struct SmartAction::@114::@139 setInstanceData64
void ResetBaseObject()
Definition: SmartScript.h:204
Definition: SmartScriptMgr.h:452
Definition: SmartAI.h:233
Definition: SmartScriptMgr.h:1086
struct SmartAction::@114::@156 item
struct SmartAction::@114::@168 unitFlag
Definition: SmartScriptMgr.h:1099
struct SmartAction::@114::@178 RespawnTarget
struct SmartAction::@114::@136 randomPhaseRange
Definition: SmartScriptMgr.h:532
#define sDB2Manager
Definition: DB2Stores.h:224
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime)
Definition: Object.cpp:2372
Definition: Language.h:25
Definition: SmartScriptMgr.h:491
Definition: SmartScriptMgr.h:53
Definition: SmartScriptMgr.h:445
uint32 mLastTextID
Definition: SmartScript.h:277
Definition: UpdateFields.h:136
Definition: SmartScriptMgr.h:1081
void GetTransportHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:677
Definition: SmartScriptMgr.h:543
int8_t int8
Definition: Define.h:148
void MoveRandom(float spawndist=0.0f)
Definition: MotionMaster.cpp:192
void KillSelf(bool durabilityLoss=true)
Definition: Unit.h:1515
struct SmartAction::@114::@116 talk
Definition: SmartScriptMgr.h:529
void MoveIdle()
Definition: MotionMaster.cpp:185
void StoreTargetList(ObjectList *targets, uint32 id)
Definition: SmartScript.h:94
Definition: SmartScriptMgr.h:495
Definition: SmartScriptMgr.h:474
void PlayDirectSound(uint32 sound_id, Player *target=NULL)
Definition: Object.cpp:2966
struct SmartAction::@114::@165 timeEvent
void modifyThreatPercent(Unit *victim, int32 percent)
Definition: ThreatManager.cpp:452
void InstallTemplate(SmartScriptHolder const &e)
Definition: SmartScript.cpp:2388
Definition: SmartScriptMgr.h:451
LootState
Definition: GameObject.h:866
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
Definition: QuestDef.h:279
Definition: SmartScriptMgr.h:492
struct SmartAction::@114::@152 taxi
Definition: SmartScriptMgr.h:496
Definition: CreatureTextMgr.h:31
Definition: SmartScriptMgr.h:531
SmartEvent event
Definition: SmartScriptMgr.h:1372
WorldObject * GetBaseObject()
Definition: SmartScript.h:56
C::value_type const & SelectRandomContainerElement(C const &container)
Definition: Containers.h:68
Definition: SmartScriptMgr.h:503
Definition: SmartScriptMgr.h:480
struct SmartAction::@114::@122 react
#define M_PI
Definition: Common.h:163
Definition: SpellInfo.h:326
Definition: SmartScriptMgr.h:461
SMARTAI_TARGETS type
Definition: SmartScriptMgr.h:1117
Definition: Language.h:26
static void SendChatPacket(WorldObject *source, Builder const &builder, ChatMsg msgType, WorldObject const *whisperTarget=nullptr, CreatureTextRange range=TEXT_RANGE_NORMAL, Team team=TEAM_OTHER, bool gmOnly=false)
Definition: CreatureTextMgr.h:166
bool IsWithinLOSInMap(WorldObject const *obj) const
Definition: Object.cpp:1584
Definition: SmartScriptMgr.h:1098
SmartAIEventList mStoredEvents
Definition: SmartScript.h:273
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
Definition: SmartScriptMgr.h:550
Definition: SmartScriptMgr.h:548
Definition: SmartScriptMgr.h:460
struct SmartAction::@114::@154 wpPause
Definition: SmartScriptMgr.h:498
struct SmartAction::@114::@132 incEventPhase
struct SmartAction::@114::@172 timedActionList
uint32 link
Definition: SmartScriptMgr.h:1370
Definition: SmartScriptMgr.h:54
Definition: SmartScriptMgr.h:526
Definition: SmartScriptMgr.h:1335
struct SmartAction::@114::@125 summonCreature
std::string const & GetName() const
Definition: Object.h:479
Definition: SmartScriptMgr.h:559
float GetMaxRange(bool positive=false, Unit *caster=NULL, Spell *spell=NULL) const
Definition: SpellInfo.cpp:2475
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
struct SmartAction::@114::@182 sendTargetToTarget
Definition: SmartScriptMgr.h:485
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
int8_t int8
Definition: g3dmath.h:163
Definition: SmartScriptMgr.h:454
struct SmartAction::@114::@129 autoAttack
Definition: SmartScriptMgr.h:439
struct SmartAction::@114::@173 randTimedActionList
struct SmartAction::@114::@190 gameEventStart
uint32 mTextTimer
Definition: SmartScript.h:276
struct SmartAction::@114::@158 setRun
uint32 GetEventType() const
Definition: SmartScriptMgr.h:1377
Definition: SmartScriptMgr.h:489
bool IsSmart(Creature *c=NULL)
Definition: SmartScript.h:111
Definition: SmartScriptMgr.h:518
Definition: SmartScriptMgr.h:478
struct SmartAction::@114::@130 combatMove
struct SmartAction::@114::@184 setHealthRegen
void OnReset()
Definition: SmartScript.cpp:66
struct SmartAction::@114::@162 setCounter
Definition: SmartScriptMgr.h:1082
arena_t NULL
Definition: jemalloc_internal.h:624
ThreatContainer::StorageType const & getThreatList() const
Definition: ThreatManager.h:263
struct SmartAction::@114::@170 delunitByte
struct SmartAction::@114::@161 teleport
float y
Definition: SmartScriptMgr.h:1118
Definition: SmartScriptMgr.h:525
void InitTimer(SmartScriptHolder &e)
Definition: SmartScript.cpp:3326
SMART_ACTION
Definition: SmartScriptMgr.h:437
virtual void SetGuidData(uint32, ObjectGuid)
Definition: ZoneScript.h:45
struct SmartAction::@114::@143 forceDespawn
Definition: UpdateFields.h:110
static uint32 ChooseDisplayId(CreatureTemplate const *cinfo, CreatureData const *data=NULL)
Definition: ObjectMgr.cpp:1265
Definition: SmartScriptMgr.h:511
Definition: SmartScriptMgr.h:515
Definition: SmartScriptMgr.h:509
void DecPhase(int32 p=1)
Definition: SmartScript.h:249
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
uint32 event_id
Definition: SmartScriptMgr.h:1369
struct SmartAction::@114::@137 killedMonster
Definition: SmartScriptMgr.h:479
Definition: Creature.h:467
Definition: SmartScriptMgr.h:466
Definition: SmartScriptMgr.h:494
Definition: SmartScriptMgr.h:163
float GetMinRange(bool positive=false) const
Definition: SpellInfo.cpp:2466
ObjectList * GetTargets(SmartScriptHolder const &e, Unit *invoker=NULL)
Definition: SmartScript.cpp:2497
struct SmartAction::@114::@188 power
Definition: SmartScriptMgr.h:549
Definition: SmartScriptMgr.h:551
Definition: SpellInfo.h:553
struct SmartAction::@114::@145 ingamePhaseId
Definition: SmartScriptMgr.h:444
Definition: SmartScriptMgr.h:1084
TempSummonType
Definition: Object.h:52
int32 GetPower(Powers power) const
Definition: Unit.cpp:11589
uint32 event_flags
Definition: SmartScriptMgr.h:191
#define sObjectMgr
Definition: ObjectMgr.h:1567
struct SmartAction::@114::@155 wpStop
GameObject * ToGameObject()
Definition: Object.h:200
Definition: SmartScriptMgr.h:440
T max(const T &x, const T &y)
Definition: g3dmath.h:320
bool IsPlayer(WorldObject *obj)
Definition: SmartScript.h:71
Player * ToPlayer()
Definition: Object.h:191
Definition: VehicleDefines.h:119
Definition: SmartScriptMgr.h:31
struct SmartAction::@114::@183 setRangedMovement
struct SmartEvent::@77::@79 minMaxRepeat
uint32 id
Definition: SmartScriptMgr.h:41
struct SmartAction::@114::@166 movie
Definition: SmartScriptMgr.h:510
std::vector< CostData > CalcPowerCost(Unit const *caster, SpellSchoolMask schoolMask) const
Definition: SpellInfo.cpp:2564
Definition: SmartScriptMgr.h:50
struct SmartAction::@114::@147 setData
Definition: SmartScriptMgr.h:441
SmartTarget target
Definition: SmartScriptMgr.h:1374
Definition: SmartScriptMgr.h:462
Definition: SmartScriptMgr.h:534
Definition: SmartScriptMgr.h:499
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:209
struct SmartAction::@114::@181 setGoLootState
void DoFleeToGetAssistance()
Definition: Creature.cpp:761
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
std::list< WorldObject * > ObjectList
Definition: SmartScriptMgr.h:1391
Definition: SmartScriptMgr.h:453
Definition: SmartScriptMgr.h:536
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
void SetFacingToObject(WorldObject const *object)
Definition: Unit.cpp:15787
Definition: SmartScriptMgr.h:1096
Definition: SmartScriptMgr.h:1074
Powers
Definition: SharedDefines.h:246
Definition: SmartScriptMgr.h:475
float GetOrientation() const
Definition: Position.h:107
Definition: SmartScriptMgr.h:507
Definition: SmartScriptMgr.h:472
SmartScriptHolder CreateEvent(SMART_EVENT e, uint32 event_flags, uint32 event_param1, uint32 event_param2, uint32 event_param3, uint32 event_param4, SMART_ACTION action, uint32 action_param1, uint32 action_param2, uint32 action_param3, uint32 action_param4, uint32 action_param5, uint32 action_param6, SMARTAI_TARGETS t, uint32 target_param1, uint32 target_param2, uint32 target_param3, uint32 phaseMask=0)
Definition: SmartScript.cpp:2467
Definition: SharedDefines.h:4247
struct SmartAction::@114::@164 storeTargets
string ToString(int i)
Definition: strutil.h:491
Definition: SmartScriptMgr.h:477
Definition: SmartScriptMgr.h:442
void IncPhase(int32 p=1)
Definition: SmartScript.h:241
Definition: SmartScriptMgr.h:547
struct SmartAction::@114::@177 flee
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1594
Definition: SmartScriptMgr.h:450
Definition: SmartScriptMgr.h:469
Definition: SmartScriptMgr.h:522
Definition: SmartScriptMgr.h:1087
Definition: SmartScriptMgr.h:517
Definition: SmartScriptMgr.h:521
Definition: SmartScriptMgr.h:448
struct SmartAction::@114::@123 randomEmote
Definition: SmartScriptMgr.h:458
struct SmartAction::@114::@151 active
Definition: SmartScriptMgr.h:490
Definition: SmartScriptMgr.h:533
Definition: ChatTextBuilder.h:27
Definition: SmartScriptMgr.h:471
ObjectGuid meOrigGUID
Definition: SmartScript.h:265
ObjectGuid mLastInvoker
Definition: SmartScript.h:236
bool IsSmartGO(GameObject *g=NULL)
Definition: SmartScript.h:126
#define CAST_AI(a, b)
Definition: ScriptedCreature.h:28
SheathState
Definition: Unit.h:296
Definition: SmartScriptMgr.h:1357
struct SmartAction::@114::@135 randomPhase
Definition: SmartScriptMgr.h:502
struct SmartAction::@114::@149 visibility
float GetPositionY() const
Definition: Position.h:105
G3D::int16 z
Definition: Vector3int16.h:46
Definition: SmartScriptMgr.h:470
Definition: SmartScriptMgr.h:505
struct SmartAction::@114::@142 setSheath
Definition: SmartScriptMgr.h:473
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
TransportBase * GetDirectTransport() const
Returns the transport this unit is on directly (if on vehicle and transport, return vehicle) ...
Definition: Unit.cpp:14365
CreatureAI * AI() const
Definition: Creature.h:525
Definition: SmartScriptMgr.h:530
void ProcessEvent(SmartScriptHolder &e, Unit *unit=NULL, uint32 var0=0, uint32 var1=0, bool bvar=false, const SpellInfo *spell=NULL, GameObject *gob=NULL)
Definition: SmartScript.cpp:2788
#define SI64FMTD
Definition: Define.h:140
struct SmartAction::@114::@176 jump
void SetVisible(bool x)
Definition: Unit.cpp:10368
#define sSpellMgr
Definition: SpellMgr.h:756
Definition: SmartScriptMgr.h:468
float GetPositionZ() const
Definition: Position.h:106
int32_t int32
Definition: Define.h:146
#define sCreatureTextMgr
Definition: CreatureTextMgr.h:113
Definition: SmartScriptMgr.h:446
SMART_EVENT
Definition: SmartScriptMgr.h:102
uint32_t uint32
Definition: Define.h:150
Definition: SmartScriptMgr.h:455
struct SmartAction::@114::@131 setEventPhase
struct SmartAction::@114::@133 removeAura
float z
Definition: SmartScriptMgr.h:1118
Definition: SmartScriptMgr.h:527
G3D::int16 y
Definition: Vector2int16.h:38
struct SmartAction::@114::@175 sendGoCustomAnim
void CallForHelp(float fRadius)
Definition: Creature.cpp:2061
std::unordered_map< uint32, WayPoint * > WPPath
Definition: SmartScriptMgr.h:1389
struct SmartAction::@114::@138 setInstanceData
#define sSmartWaypointMgr
Definition: SmartScriptMgr.h:1670
Definition: SmartScriptMgr.h:488
struct SmartAction::@114::@167 equip
Definition: GameObject.h:880
Definition: SmartScriptMgr.h:457
void SetFacingTo(float ori)
Definition: Unit.cpp:15777
bool IsGameObject(WorldObject *obj)
Definition: SmartScript.h:81
Definition: SmartScriptMgr.h:164
Definition: SmartScriptMgr.h:165
GameObject * go
Definition: SmartScript.h:266
Definition: SmartScriptMgr.h:449
struct SmartAction::@114::@169 setunitByte
Definition: SmartScriptMgr.h:524
void StoreCounter(uint32 id, uint32 value, uint32 reset)
Definition: SmartScript.h:148
SMART_EVENT type
Definition: SmartScriptMgr.h:188
Definition: SmartScriptMgr.h:465
Definition: SmartScriptMgr.h:1080
void CastSpell(Unit *target, uint32 spell, bool triggered=true)
Definition: GameObject.cpp:1833
virtual void SetSheath(SheathState sheathed)
Definition: Unit.h:1463
uint32 mTalkerEntry
Definition: SmartScript.h:278
struct SmartAction::@114::@179 MoveToPos
ReactStates
Definition: Unit.h:1127
Definition: SmartScriptMgr.h:537
Unit * GetLastInvoker()
Definition: SmartScript.cpp:3731
struct SmartAction::@114::@140 updateTemplate
Definition: SmartScriptMgr.h:459
Definition: UpdateFields.h:319
float x
Definition: SmartScriptMgr.h:1118
Definition: SmartScriptMgr.h:1088
struct SmartAction::@114::@150 summonGO
Definition: SmartScriptMgr.h:519
float o
Definition: SmartScriptMgr.h:1118
Definition: SmartScriptMgr.h:481
Definition: SharedDefines.h:1006
Definition: SmartScriptMgr.h:1356
Definition: SmartScriptMgr.h:476
Player * GetLootRecipient() const
Definition: Creature.cpp:977
struct SmartAction::@114::@191 closestWaypointFromList
uint8_t uint8
Definition: g3dmath.h:164
Definition: SmartScriptMgr.h:1093
Definition: SmartScriptMgr.h:487
ObjectGuid const & GetGUID() const
Definition: Object.h:105
struct SmartAction::@114::@192 randomSound
Definition: SmartScriptMgr.h:516
Transport * GetTransport() const
Definition: Object.h:602
bool isDead() const
Definition: Unit.h:1694
#define sGameEventMgr
Definition: GameEventMgr.h:184
struct SmartAction::@114::@153 wpStart
struct SmartAction::@114::@126 threatPCT
struct SmartAction::@114::@148 moveRandom
Definition: SmartScriptMgr.h:1351
int64 entryOrGuid
Definition: SmartScriptMgr.h:1367
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=NULL)
Definition: Object.cpp:2429
Definition: SmartScriptMgr.h:482
uint32 GetActionType() const
Definition: SmartScriptMgr.h:1378
std::list< HostileReference * > StorageType
Definition: ThreatManager.h:149
Definition: UpdateFields.h:109
SmartAction action
Definition: SmartScriptMgr.h:1373
Definition: SharedDefines.h:4230
Definition: SmartScriptMgr.h:544
void ProcessEventsFor(SMART_EVENT e, Unit *unit=NULL, uint32 var0=0, uint32 var1=0, bool bvar=false, const SpellInfo *spell=NULL, GameObject *gob=NULL)
Definition: SmartScript.cpp:83
void SetScript9(SmartScriptHolder &e, uint32 entry)
Definition: SmartScript.cpp:3702
uint32 GetScriptType() const
Definition: SmartScriptMgr.h:1376
Definition: SmartScriptMgr.h:456
Creature * ToCreature()
Definition: Object.h:194
Definition: SmartScriptMgr.h:523
bool IsUnit(WorldObject *obj)
Definition: SmartScript.h:66
Definition: SmartScriptMgr.h:538
SpellSchoolMask GetSchoolMask() const
Definition: SpellInfo.cpp:2131
Definition: SmartScriptMgr.h:1073
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
struct SmartAction::@114::@117 faction
Definition: SmartScriptMgr.h:506
ThreatManager & getThreatManager()
Definition: Unit.h:1998
Definition: SmartScriptMgr.h:545
void SetPhase(uint32 p=0)
Definition: SmartScript.h:258
int32_t int32
Definition: g3dmath.h:167
Definition: SmartScriptMgr.h:514
Definition: UpdateFields.h:124
Definition: InstanceScript.h:141
Definition: SmartScriptMgr.h:483
uint8_t uint8
Definition: Define.h:152
void SetInCombatWithZone()
Definition: Creature.cpp:2299
ObjectGuid goOrigGUID
Definition: SmartScript.h:267
struct SmartAction::@114::@187 creatureGroup
Definition: SmartScriptMgr.h:520
Definition: SmartScriptMgr.h:104
Definition: SmartScriptMgr.h:513
Definition: UpdateFields.h:135
uint32 sound
Definition: SmartScriptMgr.h:585
Definition: SmartScriptMgr.h:554
uint32 GetTargetType() const
Definition: SmartScriptMgr.h:1379
Definition: UpdateFields.h:30
Definition: SmartScriptMgr.h:501
struct SmartAction::@114::@144 invincHP
SmartScript * GetScript()
Definition: SmartAI.h:69
Definition: SmartScriptMgr.h:1092
struct SmartAction::@114::@160 setSwim
uint32 GetEntry() const
Definition: Object.h:107
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
struct SmartAction::@114::@180 sendGossipMenu
Definition: SmartScriptMgr.h:443
uint32 event_chance
Definition: SmartScriptMgr.h:190
struct SmartAction::@114::@124 cast
Definition: SmartScriptMgr.h:186
struct SmartAction::@114::@141 callHelp
Definition: SmartScriptMgr.h:497
Definition: SmartScriptMgr.h:1361
SmartAIEventList mEvents
Definition: SmartScript.h:260
uint32_t uint32
Definition: g3dmath.h:168
Definition: SmartScriptMgr.h:493
Definition: SmartScriptMgr.h:508
Definition: SmartScriptMgr.h:542
Definition: SmartScriptMgr.h:1083
Definition: SmartScriptMgr.h:552
G3D::int16 x
Definition: Vector2int16.h:37
Definition: Creature.h:277
struct SmartAction::@114::@174 interruptSpellCasting
Definition: SpellAuras.h:116
float GetPositionX() const
Definition: Position.h:104
Definition: SmartScriptMgr.h:464
struct SmartAction::@114::@118 morphOrMount
void SetInvincibilityHpLevel(uint32 level)
Definition: SmartAI.h:175
uint32 GetHealth() const
Definition: Unit.h:1426
Definition: SmartScriptMgr.h:447
bool IsCreature(WorldObject *obj)
Definition: SmartScript.h:76
Definition: SmartScriptMgr.h:512
void CombatStop(bool includingCast=false)
Definition: Unit.cpp:7371
Definition: SmartScriptMgr.h:484
Definition: SmartScriptMgr.h:467
struct SmartAction::@114::@189 gameEventStop
uint32 quest
Definition: SmartScriptMgr.h:596
Creature * me
Definition: SmartScript.h:264
Definition: SmartScriptMgr.h:463
Definition: SmartScriptMgr.h:528
Definition: SmartScriptMgr.h:500
float GetObjectSize() const
Definition: Object.cpp:2656
Definition: GameObject.h:869
Definition: SmartScriptMgr.h:504
void SetReactState(ReactStates st)
Definition: Creature.h:502
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
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29
bool mUseTextTimer
Definition: SmartScript.h:279
Definition: Creature.h:79
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:672
bool runOnce
Definition: SmartScriptMgr.h:1383
std::string ToString() const
Definition: ObjectGuid.cpp:99
Unit * ToUnit()
Definition: Object.h:197
Definition: SmartScriptMgr.h:144
Definition: SmartScriptMgr.h:535
std::list< uint32 > mRemIDs
Definition: SmartScript.h:274
SMARTAI_TARGETS
Definition: SmartScriptMgr.h:1071
SMART_ACTION type
Definition: SmartScriptMgr.h:561
struct SmartAction::@114::@134 follow
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346
uint32 ItemEntry[MAX_EQUIPMENT_ITEMS]
Definition: Creature.h:279
struct SmartAction::@114::@159 setFly
Vehicle * GetVehicleKit() const
Definition: Unit.h:2165
Definition: SmartScriptMgr.h:546
struct SmartAction::@114::@146 ingamePhaseGroup
uint32 emote
Definition: SmartScriptMgr.h:591
struct SmartAction::@114::@185 setRoot
Definition: SmartScriptMgr.h:540
Definition: SharedDefines.h:985
void GetClosePoint(float &x, float &y, float &z, float size, float distance2d=0, float angle=0) const
Definition: Object.cpp:2623
Definition: SmartScriptMgr.h:486
static SmartScriptHolder & FindLinkedEvent(SmartAIEventList &list, uint32 link)
Definition: SmartScriptMgr.h:1513
Definition: SmartScriptMgr.h:539
Definition: SmartScriptMgr.h:553
Definition: SharedDefines.h:267
Definition: SmartScriptMgr.h:541
ObjectList * GetTargetList(uint32 id)
Definition: SmartScript.h:140
uint32 CountPctFromMaxHealth(int32 pct) const
Definition: Unit.h:1435