39 std::string localizedName =
_source->GetNameForLocaleIdx(locale);
45 *data <<
uint32(localizedName.size() + 1);
46 *data << localizedName;
47 size_t whisperGUIDpos = data->
wpos();
54 *data <<
uint32(text.length() + 1);
58 return whisperGUIDpos;
87 for (SmartAIEventList::iterator i =
mEvents.begin(); i !=
mEvents.end(); ++i)
123 for (SmartAIEventList::iterator i =
mEvents.begin(); i !=
mEvents.end(); ++i)
145 uint32 rnd = std::rand() % 100;
155 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: Invoker: %s (guidlow: %u)", tempInvoker->GetName().c_str(), tempInvoker->GetGUIDLow());
163 Player* targetPlayer = NULL;
166 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
168 if (
IsCreature((*itr)) && !(*itr)->ToCreature()->IsPet())
189 Unit* talkTarget = NULL;
193 talkTarget = targetPlayer;
197 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_TALK: talker: %s (GuidLow: %u), textGuid: %u",
206 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
215 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SIMPLE_TALK: talker: %s (GuidLow: %u), textGroupId: %u",
228 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
232 (*itr)->ToUnit()->HandleEmoteCommand(e.
action.
emote.emote);
233 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_PLAY_EMOTE: target: %s (GuidLow: %u), emote: %u",
234 (*itr)->GetName().c_str(), (*itr)->GetGUIDLow(), e.
action.
emote.emote);
247 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
252 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SOUND: target: %s (GuidLow: %u), sound: %u, onlyself: %u",
266 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
273 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, GuidLow %u set faction to %u",
280 if ((*itr)->ToCreature()->getFaction() != ci->faction_A)
282 (*itr)->ToCreature()->setFaction(ci->faction_A);
283 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, GuidLow %u set faction to %u",
284 (*itr)->GetEntry(), (*itr)->GetGUIDLow(), ci->faction_A);
301 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
314 (*itr)->ToCreature()->SetDisplayId(displayId);
315 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u set displayid to %u",
316 (*itr)->GetEntry(), (*itr)->GetGUIDLow(), displayId);
323 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u set displayid to %u",
329 (*itr)->ToCreature()->DeMorph();
330 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u demorphs.",
331 (*itr)->GetEntry(), (*itr)->GetGUIDLow());
344 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
348 (*itr)->ToPlayer()->FailQuest(e.
action.
quest.quest);
349 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_FAIL_QUEST: Player guidLow %u fails quest %u",
363 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
368 (*itr)->ToPlayer()->AddQuest(q, NULL);
369 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_ADD_QUEST: Player guidLow %u add quest %u",
383 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_REACT_STATE: Creature guidLow %u set reactstate %u",
406 temp[count] = emotes[i];
417 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
421 uint32 emote = temp[std::rand() % count];
422 (*itr)->ToUnit()->HandleEmoteCommand(emote);
423 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_RANDOM_EMOTE: Creature guidLow %u handle random emote %u",
424 (*itr)->GetGUIDLow(), emote);
437 for (ThreatContainer::StorageType::const_iterator i = threatList.begin(); i != threatList.end(); ++i)
442 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_THREAT_ALL_PCT: Creature guidLow %u modify threat for unit %u, value %i",
457 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
462 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_THREAT_SINGLE_PCT: Creature guidLow %u modify threat for unit %u, value %i",
476 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
480 if (
Vehicle* vehicle = (*itr)->ToUnit()->GetVehicleKit())
481 for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it)
483 player->AreaExploredOrEventHappens(e.
action.
quest.quest);
487 (*itr)->ToPlayer()->AreaExploredOrEventHappens(e.
action.
quest.quest);
488 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS: Player guidLow %u credited quest %u",
505 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
513 me->InterruptNonMeleeSpells(
false);
516 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_CAST:: Creature %u casts spell %u on target %u with castflags %u",
520 SF_LOG_DEBUG(
"scripts.ai",
"Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.
action.
cast.
spell, (*itr)->GetGUID(), (*itr)->GetEntry(),
uint32((*itr)->GetTypeId()));
529 if (!tempLastInvoker)
536 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
547 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %u casts spell %u on target %u with castflags %u",
551 SF_LOG_DEBUG(
"scripts.ai",
"Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.
action.
cast.
spell, (*itr)->GetGUID(), (*itr)->GetEntry(),
uint32((*itr)->GetTypeId()));
563 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
568 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_ADD_AURA: Adding aura %u to unit %u",
582 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
588 (*itr)->ToGameObject()->UseDoorOrButton(0,
false, unit);
589 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_ACTIVATE_GOBJECT. Gameobject %u (entry: %u) activated",
590 (*itr)->GetGUIDLow(), (*itr)->GetEntry());
603 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
607 (*itr)->ToGameObject()->ResetDoorOrButton();
608 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_RESET_GOBJECT. Gameobject %u (entry: %u) reset",
609 (*itr)->GetGUIDLow(), (*itr)->GetEntry());
622 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
627 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_EMOTE_STATE. Unit %u set emotestate to %u",
641 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
648 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. Unit %u added flag %u to UNIT_FIELD_FLAGS",
654 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. Unit %u added flag %u to UNIT_FIELD_FLAGS2",
669 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
676 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. Unit %u removed flag %u to UNIT_FIELD_FLAGS",
682 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. Unit %u removed flag %u to UNIT_FIELD_FLAGS2",
697 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_AUTO_ATTACK: Creature: %u bool on = %u",
708 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_ALLOW_COMBAT_MOVEMENT: Creature %u bool on = %u",
718 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_EVENT_PHASE: Creature %u set event phase %u",
729 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_INC_EVENT_PHASE: Creature %u inc event phase by %u, "
738 me->AI()->EnterEvadeMode();
739 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_EVADE: Creature %u EnterEvadeMode",
me->GetGUIDLow());
747 me->DoFleeToGetAssistance();
753 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: Creature %u DoFleeToGetAssistance",
me->GetGUIDLow());
764 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_CALL_GROUPEVENTHAPPENS: Player %u, group credit for quest %u",
770 for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it)
781 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
787 (*itr)->ToUnit()->RemoveAllAuras();
791 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_REMOVEAURASFROMSPELL: Unit %u, spell %u",
807 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
812 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_FOLLOW: Creature %u following target %u",
813 me->GetGUIDLow(), (*itr)->GetGUIDLow());
839 temp[count] = phases[i];
847 uint32 phase = temp[std::rand() % count];
849 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE: Creature %u sets event phase to %u",
860 uint32 phase = (phaseMax > phaseMin) ? (std::rand() % (phaseMax - phaseMin + 1) + phaseMin) : phaseMin;
862 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE_RANGE: Creature %u sets event phase to %u",
873 if (
Player* player =
me->GetLootRecipient())
876 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: Player %u, Killcredit: %u",
886 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
891 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: Player %u, Killcredit: %u",
895 if (
Vehicle* vehicle = (*itr)->ToUnit()->GetVehicleKit())
896 for (SeatMap::iterator itr = vehicle->Seats.begin(); itr != vehicle->Seats.end(); ++itr)
922 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA: Field: %u, data: %u",
947 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: %u, data: " UI64FMTD,
959 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_UPDATE_TEMPLATE: Creature %u, Template: %u, Team: %u",
965 if (
me && !
me->isDead())
968 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_DIE: Creature %u",
me->GetGUIDLow());
976 me->SetInCombatWithZone();
977 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_SET_IN_COMBAT_WITH_ZONE: Creature %u",
me->GetGUIDLow());
991 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_CALL_FOR_HELP: Creature %u",
me->GetGUIDLow());
1000 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_SET_SHEATH: Creature %u, State: %u",
1030 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1042 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1058 (*itr)->ToUnit()->Dismount();
1086 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1128 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1132 me->AI()->AttackStart((*itr)->ToUnit());
1146 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1148 (*itr)->GetPosition(x, y, z, o);
1155 summon->AI()->AttackStart((*itr)->ToUnit());
1166 summon->AI()->AttackStart(unit);
1178 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1183 (*itr)->GetPosition(x, y, z, o);
1206 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1211 (*itr)->ToUnit()->Kill((*itr)->ToUnit());
1228 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1245 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1275 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1363 me->SetFacingTo((
me->GetTransport() ?
me->GetTransportHomePosition() :
me->GetHomePosition()).GetOrientation());
1368 if (!targets->empty())
1369 me->SetFacingToObject(*targets->begin());
1382 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1411 target = targets->front();
1420 trans->CalculatePassengerPosition(dest.x, dest.y, dest.z);
1434 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1437 (*itr)->ToCreature()->Respawn();
1451 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1453 (*itr)->ToPlayer()->PlayerTalkClass->SendCloseGossip();
1464 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1475 SF_LOG_ERROR(
"sql.sql",
"SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u", equipId,
npc->GetEntry());
1479 npc->SetCurrentEquipmentId(equipId);
1543 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
1552 me = (*itr)->ToCreature();
1561 go = (*itr)->ToGameObject();
1587 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
1589 if (
IsSmart(target) && target->GetVictim())
1591 target->GetMotionMaster()->MoveChase(target->GetVictim(), attackDistance, attackAngle);
1607 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
1631 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1644 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1657 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1666 ObjectList* casters =
GetTargets(
CreateEvent(
SMART_EVENT_UPDATE_IC, 0, 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);
1677 for (ObjectList::const_iterator itr = casters->begin(); itr != casters->end(); ++itr)
1682 bool interruptedSpell =
false;
1684 for (ObjectList::const_iterator it = targets->begin(); it != targets->end(); ++it)
1693 (*itr)->ToUnit()->InterruptNonMeleeSpells(
false);
1694 interruptedSpell =
true;
1700 SF_LOG_DEBUG(
"scripts.ai",
"Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.
action.
cast.
spell, (*it)->GetGUID(), (*it)->GetEntry(),
uint32((*it)->GetTypeId()));
1723 temp[count] = actions[i];
1731 uint32 id = temp[std::rand() % count];
1741 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
1763 uint32 id = (entry2 > entry1) ? (std::rand() % (entry2 - entry1 + 1) + entry1) : entry1;
1773 for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
1797 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1799 (*itr)->ToPlayer()->ActivateTaxiPathTo(e.
action.
taxi.
id);
1810 bool foundTarget =
false;
1812 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1821 (*itr)->ToCreature()->GetMotionMaster()->MoveIdle();
1830 me->GetMotionMaster()->MoveIdle();
1841 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1854 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1867 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1880 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1893 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1906 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1919 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1932 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1936 creature->GetMotionMaster()->Clear();
1952 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1972 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
1979 SF_LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping");
1986 SF_LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping");
1998 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SEND_GOSSIP_MENU: gossipMenuId %d, gossipNpcTextId %d",
2004 ai->SetGossipReturn(
true);
2009 ai->SetGossipReturn(
true);
2016 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2023 player->PlayerTalkClass->ClearMenus();
2038 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2043 (*itr)->ToCreature()->SetHomePosition(
me->GetPositionX(),
me->GetPositionY(),
me->GetPositionZ(),
me->GetOrientation());
2053 (*itr)->ToCreature()->SetHomePosition((*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), (*itr)->GetOrientation());
2056 SF_LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SET_HOME_POS is invalid, skipping");
2069 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2082 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2095 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2108 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2121 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2130 std::list<TempSummon*> summonList;
2133 for (std::list<TempSummon*>::const_iterator itr = summonList.begin(); itr != summonList.end(); ++itr)
2135 (*itr)->AI()->AttackStart(unit);
2144 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2156 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2168 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2180 SF_LOG_ERROR(
"sql.sql",
"SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_STOP, inactive event (id: %u)", eventId);
2191 SF_LOG_ERROR(
"sql.sql",
"SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_START, already activated event (id: %u)", eventId);
2203 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2210 (*itr)->ToUnit()->ModifyHealth(
int32((*itr)->ToUnit()->CountPctFromMaxHealth(healthpct)));
2214 int32 missingHealth =
int32((*itr)->ToUnit()->GetMaxHealth() - (*itr)->ToUnit()->GetHealth());
2215 (*itr)->ToUnit()->ModifyHealth(missingHealth);
2218 (*itr)->ToUnit()->SetHealth(
me->GetHealth());
2220 me->SetHealth((*itr)->ToUnit()->GetHealth());
2222 (*itr)->ToUnit()->SetMaxHealth(
me->GetMaxHealth());
2224 me->SetMaxHealth((*itr)->ToUnit()->GetMaxHealth());
2228 (*itr)->ToUnit()->SetMaxHealth(health);
2233 (*itr)->ToUnit()->SetHealth(health);
2237 SF_LOG_ERROR(
"sql.sql",
"SmartScript: Invalid type for SMART_ACTION_SET_HEALTH, skipping");
2266 temp[count] = sounds[i];
2283 uint32 sound = temp[std::rand() % count];
2284 obj->PlayDirectSound(sound, onlySelf ? obj->ToPlayer() :
nullptr);
2285 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_RANDOM_SOUND: target: %s (" UI64FMTD "), sound: %u, onlyself: %s",
2286 obj->GetName().c_str(), obj->GetGUID(), sound, onlySelf ?
"true" :
"false");
2303 for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
2306 (*itr)->ToCreature()->CombatStop();
2321 ProcessEvent(linked, unit, var0, var1, bvar, spell, gob);
2352 AddEvent(
SMART_EVENT_UPDATE_IC, 0, 0, 0, e.
action.
installTtemplate.
param2, e.
action.
installTtemplate.
param3, 0,
SMART_ACTION_CAST, e.
action.
installTtemplate.
param1, e.
target.
raw.
param1, 0, 0, 0, 0,
SMART_TARGET_VICTIM, 0, 0, 0, 1);
2353 AddEvent(
SMART_EVENT_RANGE, 0, e.
action.
installTtemplate.
param4, 300, 0, 0, 0,
SMART_ACTION_ALLOW_COMBAT_MOVEMENT, 1, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 1);
2354 AddEvent(
SMART_EVENT_RANGE, 0, 0, e.
action.
installTtemplate.
param4 > 10 ? e.
action.
installTtemplate.
param4 - 10 : 0, 0, 0, 0,
SMART_ACTION_ALLOW_COMBAT_MOVEMENT, 0, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 1);
2355 AddEvent(
SMART_EVENT_MANA_PCT, 0, e.
action.
installTtemplate.
param5 - 15 > 100 ? 100 : e.
action.
installTtemplate.
param5 + 15, 100, 1000, 1000, 0,
SMART_ACTION_SET_EVENT_PHASE, 1, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 0);
2356 AddEvent(
SMART_EVENT_MANA_PCT, 0, 0, e.
action.
installTtemplate.
param5, 1000, 1000, 0,
SMART_ACTION_SET_EVENT_PHASE, 0, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 0);
2357 AddEvent(
SMART_EVENT_MANA_PCT, 0, 0, e.
action.
installTtemplate.
param5, 1000, 1000, 0,
SMART_ACTION_ALLOW_COMBAT_MOVEMENT, 1, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 0);
2362 AddEvent(
SMART_EVENT_UPDATE_IC, 0, 0, 0, e.
action.
installTtemplate.
param2, e.
action.
installTtemplate.
param3, 0,
SMART_ACTION_CAST, e.
action.
installTtemplate.
param1, e.
target.
raw.
param1, 0, 0, 0, 0,
SMART_TARGET_VICTIM, 0, 0, 0, 0);
2363 AddEvent(
SMART_EVENT_JUST_CREATED, 0, 0, 0, 0, 0, 0,
SMART_ACTION_ALLOW_COMBAT_MOVEMENT, 0, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 0);
2371 AddEvent(
SMART_EVENT_DATA_SET, 0, 0, 0, 0, 0, 0,
SMART_ACTION_STORE_TARGET_LIST, 1, 0, 0, 0, 0, 0,
SMART_TARGET_CLOSEST_GAMEOBJECT, e.
action.
installTtemplate.
param1, 10, 0, 0);
2374 AddEvent(
SMART_EVENT_UPDATE,
SMART_EVENT_FLAG_NOT_REPEATABLE, 0, 0, 0, 0, 0,
SMART_ACTION_RESET_GOBJECT, 0, 0, 0, 0, 0, 0,
SMART_TARGET_GAMEOBJECT_DISTANCE, e.
action.
installTtemplate.
param1, 5, 0, 0);
2376 AddEvent(
SMART_EVENT_DATA_SET, 0, 0, 0, 0, 0, 0,
SMART_ACTION_SET_RUN, e.
action.
installTtemplate.
param3, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 0);
2377 AddEvent(
SMART_EVENT_DATA_SET, 0, 0, 0, 0, 0, 0,
SMART_ACTION_SET_EVENT_PHASE, 1, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 0);
2379 AddEvent(
SMART_EVENT_UPDATE,
SMART_EVENT_FLAG_NOT_REPEATABLE, 1000, 1000, 0, 0, 0,
SMART_ACTION_MOVE_FORWARD, e.
action.
installTtemplate.
param4, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 1);
2381 AddEvent(
SMART_EVENT_MOVEMENTINFORM, 0,
POINT_MOTION_TYPE,
SMART_RANDOM_POINT, 0, 0, 0,
SMART_ACTION_SET_DATA, 0, 0, 0, 0, 0, 0,
SMART_TARGET_STORED, 1, 0, 0, 1);
2383 AddEvent(
SMART_EVENT_MOVEMENTINFORM, 0,
POINT_MOTION_TYPE,
SMART_RANDOM_POINT, 0, 0, 0,
SMART_ACTION_FORCE_DESPAWN, e.
action.
installTtemplate.
param2, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 1);
2386 AddEvent(
SMART_EVENT_MOVEMENTINFORM, 0,
POINT_MOTION_TYPE,
SMART_RANDOM_POINT, 0, 0, 0,
SMART_ACTION_TALK, e.
action.
installTtemplate.
param5, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 1);
2394 AddEvent(
SMART_EVENT_GO_STATE_CHANGED, 0, 2, 0, 0, 0, 0,
SMART_ACTION_STORE_TARGET_LIST, 1, 0, 0, 0, 0, 0,
SMART_TARGET_CLOSEST_CREATURE, e.
action.
installTtemplate.
param1, 10, 0, 0);
2396 AddEvent(
SMART_EVENT_GO_STATE_CHANGED, 0, 2, 0, 0, 0, 0,
SMART_ACTION_STORE_TARGET_LIST, 2, 0, 0, 0, 0, 0,
SMART_TARGET_NONE, 0, 0, 0, 0);
2398 AddEvent(
SMART_EVENT_GO_STATE_CHANGED, 0, 2, 0, 0, 0, 0,
SMART_ACTION_SET_DATA, 0, 0, 0, 0, 0, 0,
SMART_TARGET_STORED, 1, 0, 0, 0);
2401 AddEvent(
SMART_EVENT_DATA_SET, 0, 0, 0, 0, 0, 0,
SMART_ACTION_CALL_KILLEDMONSTER, e.
action.
installTtemplate.
param1, 0, 0, 0, 0, 0,
SMART_TARGET_STORED, 2, 0, 0, 0);
2403 AddEvent(
SMART_EVENT_GO_STATE_CHANGED, 0, 2, 0, 0, 0, 0,
SMART_ACTION_CALL_KILLEDMONSTER, e.
action.
installTtemplate.
param1, 0, 0, 0, 0, 0,
SMART_TARGET_STORED, 2, 0, 0, 0);
2412void SmartScript::AddEvent(
SMART_EVENT e,
uint32 event_flags,
uint32 event_param1,
uint32 event_param2,
uint32 event_param3,
uint32 event_param4,
uint32 event_param5,
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)
2414 mInstallEvents.push_back(
CreateEvent(e, event_flags, event_param1, event_param2, event_param3, event_param4, event_param5, action, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, t, target_param1, target_param2, target_param3, phaseMask));
2417SmartScriptHolder SmartScript::CreateEvent(
SMART_EVENT e,
uint32 event_flags,
uint32 event_param1,
uint32 event_param2,
uint32 event_param3,
uint32 event_param4,
uint32 event_param5,
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)
2450 Unit* scriptTrigger = NULL;
2452 scriptTrigger = invoker;
2454 scriptTrigger = tempLastInvoker;
2463 l->push_back(baseObject);
2467 if (
Unit* victim =
me->GetVictim())
2468 l->push_back(victim);
2492 l->push_back(scriptTrigger);
2503 if (
Group* group = player->GetGroup())
2505 for (
GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->
next())
2506 if (
Player* member = groupRef->GetSource())
2507 l->push_back(member);
2513 l->push_back(scriptTrigger);
2521 for (ObjectList::const_iterator itr = units->begin(); itr != units->end(); ++itr)
2526 if (
me &&
me == *itr)
2540 for (ObjectList::const_iterator itr = units->begin(); itr != units->end(); ++itr)
2545 if (
me &&
me == *itr)
2559 for (ObjectList::const_iterator itr = units->begin(); itr != units->end(); ++itr)
2564 if (
go &&
go == *itr)
2578 for (ObjectList::const_iterator itr = units->begin(); itr != units->end(); ++itr)
2583 if (
go &&
go == *itr)
2596 if (!scriptTrigger && !baseObject)
2598 SF_LOG_ERROR(
"sql.sql",
"SMART_TARGET_CREATURE_GUID can not be used without invoker");
2605 l->push_back(target);
2611 if (!scriptTrigger && !baseObject)
2613 SF_LOG_ERROR(
"sql.sql",
"SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker");
2620 l->push_back(target);
2627 if (!units->empty() && baseObject)
2628 for (ObjectList::const_iterator itr = units->begin(); itr != units->end(); ++itr)
2639 for (ObjectList::const_iterator itr = units->begin(); itr != units->end(); ++itr)
2650 l->assign(itr->second->begin(), itr->second->end());
2658 l->push_back(target);
2665 l->push_back(target);
2674 l->push_back(target);
2682 uint64 charmerOrOwnerGuid =
me->GetCharmerOrOwnerGUID();
2684 if (!charmerOrOwnerGuid)
2685 charmerOrOwnerGuid =
me->GetCreatorGUID();
2688 l->push_back(owner);
2697 for (ThreatContainer::StorageType::const_iterator i = threatList.begin(); i != threatList.end(); ++i)
2707 l->push_back(target);
2715 l->push_back(target);
2765 if (
me &&
me->IsInCombat())
2770 if (!
me || !
me->IsInCombat())
2776 if (!
me || !
me->IsInCombat() || !
me->GetMaxHealth())
2786 if (!
me || !
me->IsInCombat() || !
me->GetVictim() || !
me->GetVictim()->GetMaxHealth())
2806 if (!
me || !
me->IsInCombat() || !
me->GetVictim() || !
me->GetVictim()->GetMaxPower(
POWER_MANA))
2816 if (!
me || !
me->IsInCombat() || !
me->GetVictim())
2825 if (!
me || !
me->IsInCombat())
2828 Unit* victim =
me->GetVictim();
2843 if (!
me || !
me->IsInCombat())
2854 if (!
me || !
me->IsInCombat())
2857 std::list<Creature*> pList;
2866 std::list<Creature*> pList;
2886 if (!
me || !
me->GetVictim())
2923 if (
Unit* victim =
me->GetVictim())
2925 if (!victim->HasInArc(
static_cast<float>(
M_PI),
me))
2964 if (!
me ||
me->IsInCombat())
2970 if (
me->IsWithinDistInMap(unit, range) &&
me->IsWithinLOSInMap(unit))
2986 if (!
me || !
me->IsInCombat())
2992 if (
me->IsWithinDistInMap(unit, range) &&
me->IsWithinLOSInMap(unit))
3126 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript: Gossip Select: menu %u action %u", var0, var1);
3170 if (!
me || !
me->IsInCombat())
3193 Unit* target = NULL;
3195 for (ObjectList::const_iterator itr = _targets->begin(); itr != _targets->end(); ++itr)
3197 if (
IsUnit(*itr) &&
me->IsFriendlyTo((*itr)->ToUnit()) && (*itr)->ToUnit()->IsAlive() && (*itr)->ToUnit()->IsInCombat())
3199 uint32 healthPct =
uint32((*itr)->ToUnit()->GetHealthPct());
3204 target = (*itr)->
ToUnit();
3245 if (max > 0 && min > 0)
3249 timer = std::rand() % (max - min + 1) + min;
3253 e.
timer = timer ? timer : 0;
3315 i->enableTimed =
true;
3350 if (i->event_id ==
id)
3366 for (SmartAIEventList::iterator i =
mEvents.begin(); i !=
mEvents.end(); ++i)
3373 bool needCleanup =
true;
3378 if ((*i).enableTimed)
3381 needCleanup =
false;
3390 for (std::list<uint32>::iterator i =
mRemIDs.begin(); i !=
mRemIDs.end(); ++i)
3416 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->
GetEntry());
3418 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->
id);
3421 for (SmartAIEventList::iterator i = e.begin(); i != e.end(); ++i)
3423#ifndef SKYFIRE_DEBUG
3442 SF_LOG_ERROR(
"sql.sql",
"SmartScript: Entry %u has events but no events added to list because of instance flags.", obj->
GetEntry());
3444 SF_LOG_ERROR(
"sql.sql",
"SmartScript: AreaTrigger %u has events but no events added to list because of instance flags. NOTE: triggers can not handle any instance flags.", at->
id);
3480 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::OnInitialize: source is Creature %u",
me->GetEntry());
3485 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::OnInitialize: source is GameObject %u",
go->GetEntry());
3488 SF_LOG_ERROR(
"misc",
"SmartScript::OnInitialize: Unhandled TypeID !WARNING!");
3496 SF_LOG_DEBUG(
"scripts.ai",
"SmartScript::OnInitialize: source is AreaTrigger %u",
trigger->id);
3500 SF_LOG_ERROR(
"misc",
"SmartScript::OnInitialize: !WARNING! Initialized objects are NULL.");
3506 for (SmartAIEventList::iterator i =
mEvents.begin(); i !=
mEvents.end(); ++i)
3521 if (
me->GetVictim())
3574 cell.
Visit(p, grid_unit_searcher, *
me->GetMap(), *
me, range);
3592 cell.
Visit(p, grid_creature_searcher, *
me->GetMap(), *
me, range);
3609 cell.
Visit(p, grid_creature_searcher, *
me->GetMap(), *
me, range);
3620 me->VisitNearbyObject(range, searcher);
3635 delete (*mTargetStorage)[id];
3638 (*mTargetStorage)[id] = targets;
std::list< Condition * > ConditionList
TypeMapContainer< AllGridObjectTypes > GridTypeMapContainer
CoordPair< TOTAL_NUMBER_OF_CELLS_PER_MAP > CellCoord
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
bool IS_PLAYER_GUID(uint64 guid)
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive)
GameObject * GetClosestGameObjectWithEntry(WorldObject *source, uint32 entry, float maxSearchRange)
@ SMART_SCRIPT_TYPE_TIMED_ACTIONLIST
@ SMART_SCRIPT_TYPE_CREATURE
@ SMART_SCRIPT_TYPE_GAMEOBJECT
@ SMART_SCRIPT_TYPE_AREATRIGGER
@ SMARTAI_TEMPLATE_CAGED_GO_PART
@ SMARTAI_TEMPLATE_CAGED_NPC_PART
@ SMARTAI_TEMPLATE_CASTER
@ SMARTAI_TEMPLATE_TURRET
std::vector< SmartScriptHolder > SmartAIEventList
@ SMART_EVENT_FLAG_DIFFICULTY_ALL
@ SMART_EVENT_FLAG_DONT_RESET
@ SMART_EVENT_FLAG_DEBUG_ONLY
@ SMART_EVENT_FLAG_NOT_REPEATABLE
@ SMART_TARGET_CLOSEST_CREATURE
@ SMART_TARGET_CREATURE_DISTANCE
@ SMART_TARGET_HOSTILE_RANDOM_NOT_TOP
@ SMART_TARGET_INVOKER_PARTY
@ SMART_TARGET_CLOSEST_FRIENDLY
@ SMART_TARGET_CLOSEST_GAMEOBJECT
@ SMART_TARGET_GAMEOBJECT_RANGE
@ SMART_TARGET_CREATURE_GUID
@ SMART_TARGET_PLAYER_RANGE
@ SMART_TARGET_GAMEOBJECT_DISTANCE
@ SMART_TARGET_CREATURE_RANGE
@ SMART_TARGET_CLOSEST_PLAYER
@ SMART_TARGET_HOSTILE_RANDOM
@ SMART_TARGET_GAMEOBJECT_GUID
@ SMART_TARGET_HOSTILE_SECOND_AGGRO
@ SMART_TARGET_OWNER_OR_SUMMONER
@ SMART_TARGET_ACTION_INVOKER
@ SMART_TARGET_HOSTILE_LAST_AGGRO
@ SMART_TARGET_ACTION_INVOKER_VEHICLE
@ SMART_TARGET_THREAT_LIST
@ SMART_TARGET_CLOSEST_ENEMY
@ SMART_TARGET_PLAYER_DISTANCE
@ SMART_SCRIPT_RESPAWN_CONDITION_AREA
@ SMART_SCRIPT_RESPAWN_CONDITION_MAP
@ SMART_ACTION_REMOVE_TIMED_EVENT
@ SMART_ACTION_SET_GO_FLAG
@ SMART_ACTION_UPDATE_TEMPLATE
@ SMART_ACTION_STORE_TARGET_LIST
@ SMART_ACTION_SET_HEALTH_REGEN
@ SMART_ACTION_ACTIVATE_GOBJECT
@ SMART_ACTION_FORCE_DESPAWN
@ SMART_ACTION_GAME_EVENT_START
@ SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST
@ SMART_ACTION_SET_INST_DATA64
@ SMART_ACTION_SET_FACTION
@ SMART_ACTION_THREAT_SINGLE_PCT
@ SMART_ACTION_SET_INGAME_PHASE_MASK
@ SMART_ACTION_CLOSE_GOSSIP
@ SMART_ACTION_ADD_GO_FLAG
@ SMART_ACTION_ADD_DYNAMIC_FLAG
@ SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS
@ SMART_ACTION_ATTACK_START
@ SMART_ACTION_SET_UNIT_FLAG
@ SMART_ACTION_CALL_GROUPEVENTHAPPENS
@ SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL
@ SMART_ACTION_INVOKER_CAST
@ SMART_ACTION_JUMP_TO_POS
@ SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST
@ SMART_ACTION_SEND_GOSSIP_MENU
@ SMART_ACTION_FLEE_FOR_ASSIST
@ SMART_ACTION_SIMPLE_TALK
@ SMART_ACTION_ALLOW_COMBAT_MOVEMENT
@ SMART_ACTION_THREAT_ALL_PCT
@ SMART_ACTION_STORE_VARIABLE_DECIMAL
@ SMART_ACTION_SET_HEALTH
@ SMART_ACTION_RESPAWN_TARGET
@ SMART_ACTION_ADD_NPC_FLAG
@ SMART_ACTION_FAIL_QUEST
@ SMART_ACTION_INTERRUPT_SPELL
@ SMART_ACTION_REMOVE_DYNAMIC_FLAG
@ SMART_ACTION_RANDOM_SOUND
@ SMART_ACTION_MOVE_FORWARD
@ SMART_ACTION_SEND_TARGET_TO_TARGET
@ SMART_ACTION_REMOVE_POWER
@ SMART_ACTION_SET_DYNAMIC_FLAG
@ SMART_ACTION_REMOVE_ITEM
@ SMART_ACTION_SEND_GO_CUSTOM_ANIM
@ SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL
@ SMART_ACTION_REMOVE_UNIT_FLAG
@ SMART_ACTION_RANDOM_PHASE
@ SMART_ACTION_SET_EMOTE_STATE
@ SMART_ACTION_CROSS_CAST
@ SMART_ACTION_GAME_EVENT_STOP
@ SMART_ACTION_CALL_KILLEDMONSTER
@ SMART_ACTION_CALL_SCRIPT_RESET
@ SMART_ACTION_COMBAT_STOP
@ SMART_ACTION_AUTO_ATTACK
@ SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL
@ SMART_ACTION_SET_VISIBILITY
@ SMART_ACTION_RANDOM_PHASE_RANGE
@ SMART_ACTION_GO_SET_LOOT_STATE
@ SMART_ACTION_SET_INST_DATA
@ SMART_ACTION_REMOVE_GO_FLAG
@ SMART_ACTION_CALL_FOR_HELP
@ SMART_ACTION_PLAY_EMOTE
@ SMART_ACTION_SET_EVENT_PHASE
@ SMART_ACTION_SET_SHEATH
@ SMART_ACTION_SET_ORIENTATION
@ SMART_ACTION_SET_NPC_FLAG
@ SMART_ACTION_REMOVE_UNIT_FIELD_ANIM_TIER
@ SMART_ACTION_MOVE_TO_POS
@ SMART_ACTION_RANDOM_EMOTE
@ SMART_ACTION_INC_EVENT_PHASE
@ SMART_ACTION_CREATE_TIMED_EVENT
@ SMART_ACTION_RESET_SCRIPT_BASE_OBJECT
@ SMART_ACTION_REMOVE_NPC_FLAG
@ SMART_ACTION_INSTALL_AI_TEMPLATE
@ SMART_ACTION_SUMMON_CREATURE
@ SMART_ACTION_RESET_GOBJECT
@ SMART_ACTION_CALL_TIMED_ACTIONLIST
@ SMART_ACTION_SET_IN_COMBAT_WITH_ZONE
@ SMART_ACTION_SET_UNIT_FIELD_ANIM_TIER
@ SMART_ACTION_SET_HOME_POS
@ SMART_ACTION_SET_ACTIVE
@ SMART_ACTION_SET_RANGED_MOVEMENT
@ SMART_ACTION_ACTIVATE_TAXI
@ SMART_ACTION_SUMMON_CREATURE_GROUP
@ SMART_ACTION_SET_REACT_STATE
@ SMART_ACTION_RANDOM_MOVE
@ SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT
@ SMART_ACTION_TRIGGER_TIMED_EVENT
@ SMART_ACTION_REMOVEAURASFROMSPELL
@ SMART_EVENT_ACTION_DONE
@ SMART_EVENT_SUMMON_DESPAWNED
@ SMART_EVENT_RECEIVE_EMOTE
@ SMART_EVENT_FRIENDLY_HEALTH_PCT
@ SMART_EVENT_RECEIVE_HEAL
@ SMART_EVENT_DUMMY_EFFECT
@ SMART_EVENT_TIMED_EVENT_TRIGGERED
@ SMART_EVENT_CHARMED_TARGET
@ SMART_EVENT_TARGET_MANA_PCT
@ SMART_EVENT_QUEST_COMPLETION
@ SMART_EVENT_JUST_CREATED
@ SMART_EVENT_AREATRIGGER_ONTRIGGER
@ SMART_EVENT_ON_SPELLCLICK
@ SMART_EVENT_MOVEMENTINFORM
@ SMART_EVENT_PASSENGER_REMOVED
@ SMART_EVENT_INSTANCE_PLAYER_ENTER
@ SMART_EVENT_WAYPOINT_PAUSED
@ SMART_EVENT_REACHED_HOME
@ SMART_EVENT_TRANSPORT_ADDCREATURE
@ SMART_EVENT_REWARD_QUEST
@ SMART_EVENT_GO_EVENT_INFORM
@ SMART_EVENT_JUST_SUMMONED
@ SMART_EVENT_WAYPOINT_START
@ SMART_EVENT_SPELLHIT_TARGET
@ SMART_EVENT_GAME_EVENT_START
@ SMART_EVENT_TRANSPORT_REMOVE_PLAYER
@ SMART_EVENT_GOSSIP_HELLO
@ SMART_EVENT_GOSSIP_SELECT
@ SMART_EVENT_CORPSE_REMOVED
@ SMART_EVENT_QUEST_OBJ_COPLETETION
@ SMART_EVENT_PASSENGER_BOARDED
@ SMART_EVENT_TRANSPORT_ADDPLAYER
@ SMART_EVENT_WAYPOINT_ENDED
@ SMART_EVENT_IS_BEHIND_TARGET
@ SMART_EVENT_ACCEPTED_QUEST
@ SMART_EVENT_FRIENDLY_MISSING_BUFF
@ SMART_EVENT_WAYPOINT_RESUMED
@ SMART_EVENT_WAYPOINT_REACHED
@ SMART_EVENT_TARGET_BUFFED
@ SMART_EVENT_QUEST_ACCEPTED
@ SMART_EVENT_FRIENDLY_HEALTH
@ SMART_EVENT_QUEST_REWARDED
@ SMART_EVENT_TRANSPORT_RELOCATE
@ SMART_EVENT_GAME_EVENT_END
@ SMART_EVENT_FOLLOW_COMPLETED
@ SMART_EVENT_WAYPOINT_STOPPED
@ SMART_EVENT_FRIENDLY_IS_CC
@ SMART_EVENT_GO_STATE_CHANGED
@ SMART_EVENT_TARGET_HEALTH_PCT
@ SMART_EVENT_VICTIM_CASTING
@ SMART_EVENT_DAMAGED_TARGET
@ SMART_EVENT_SUMMONED_UNIT
@ SMART_ACTION_PARAM_COUNT
UNORDERED_MAP< uint32, ObjectList * > ObjectListMap
@ SMARTCAST_INTERRUPT_PREVIOUS
@ SMARTCAST_AURA_NOT_PRESENT
std::list< WorldObject * > ObjectList
@ SELECT_TARGET_BOTTOMAGGRO
@ UNIT_FIELD_VIRTUAL_ITEM_ID
@ UNIT_FIELD_NPC_EMOTESTATE
@ OBJECT_FIELD_DYNAMIC_FLAGS
static T * Find(uint64 guid)
uint8 GetSpawnMode() const
static Unit * GetUnit(WorldObject const &, uint64 guid)
static Player * FindPlayer(uint64)
static Unit * FindUnit(uint64)
uint32 GetGUIDLow() const
GameObject * ToGameObject()
static uint32 ChooseDisplayId(CreatureTemplate const *cinfo, CreatureData const *data=NULL)
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
size_t operator()(WorldPacket *data, LocaleConstant locale) const
SkyFireStringTextBuilder(WorldObject *obj, ChatMsg msgtype, int32 id, Language language, uint64 targetGUID)
void SetInvincibilityHpLevel(uint32 level)
bool CheckTimer(SmartScriptHolder const &e) const
SmartAIEventList mStoredEvents
SMARTAI_TEMPLATE mTemplate
Creature * FindCreatureNear(WorldObject *searchObject, uint32 guid) const
void OnUpdate(const uint32 diff)
SmartScriptType mScriptType
ObjectList * GetWorldObjectsInDist(float dist)
void UpdateTimer(SmartScriptHolder &e, uint32 const diff)
void SetScript9(SmartScriptHolder &e, uint32 entry)
SmartScriptHolder CreateEvent(SMART_EVENT e, uint32 event_flags, uint32 event_param1, uint32 event_param2, uint32 event_param3, uint32 event_param4, uint32 event_param5, 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)
void DoFindFriendlyCC(std::list< Creature * > &_list, float range)
void RecalcTimer(SmartScriptHolder &e, uint32 min, uint32 max)
void ProcessEventsFor(SMART_EVENT e, Unit *unit=NULL, uint32 var0=0, uint32 var1=0, bool bvar=false, const SpellInfo *spell=NULL, GameObject *gob=NULL)
Unit * DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
SmartScriptHolder FindLinkedEvent(uint32 link)
bool IsUnit(WorldObject *obj)
ObjectList * GetTargets(SmartScriptHolder const &e, Unit *invoker=NULL)
void OnInitialize(WorldObject *obj, AreaTriggerEntry const *at=NULL)
bool IsPlayer(WorldObject *obj)
void AddEvent(SMART_EVENT e, uint32 event_flags, uint32 event_param1, uint32 event_param2, uint32 event_param3, uint32 event_param4, uint32 event_param5, 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)
Unit * DoFindClosestFriendlyInRange(float range, bool playerOnly)
bool IsCreature(WorldObject *obj)
void FillScript(SmartAIEventList e, WorldObject *obj, AreaTriggerEntry const *at)
GameObject * FindGameObjectNear(WorldObject *searchObject, uint32 guid) const
void OnMoveInLineOfSight(Unit *who)
ObjectList * GetTargetList(uint32 id)
bool IsInPhase(uint32 p) const
SmartAIEventList mInstallEvents
void InitTimer(SmartScriptHolder &e)
AreaTriggerEntry const * trigger
ObjectListMap * mTargetStorage
UNORDERED_MAP< int32, int32 > mStoredDecimals
void DoFindFriendlyMissingBuff(std::list< Creature * > &list, float range, uint32 spellid)
std::list< uint32 > mRemIDs
bool IsGameObject(WorldObject *obj)
void ProcessEvent(SmartScriptHolder &e, Unit *unit=NULL, uint32 var0=0, uint32 var1=0, bool bvar=false, const SpellInfo *spell=NULL, GameObject *gob=NULL)
bool IsSmartGO(GameObject *g=NULL)
void SetPhase(uint32 p=0)
void ProcessTimedAction(SmartScriptHolder &e, uint32 const &min, uint32 const &max, Unit *unit=NULL, uint32 var0=0, uint32 var1=0, bool bvar=false, const SpellInfo *spell=NULL, GameObject *gob=NULL)
void InstallTemplate(SmartScriptHolder const &e)
bool IsSmart(Creature *c=NULL)
WorldObject * GetBaseObject()
SmartAIEventList mTimedActionList
void ProcessAction(SmartScriptHolder &e, Unit *unit=NULL, uint32 var0=0, uint32 var1=0, bool bvar=false, const SpellInfo *spell=NULL, GameObject *gob=NULL)
void StoreTargetList(ObjectList *targets, uint32 id)
void RemoveStoredEvent(uint32 id)
std::list< HostileReference * > StorageType
Vehicle * GetVehicle() const
bool IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
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)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
static Unit * GetUnit(WorldObject &object, uint64 guid)
Vehicle * GetVehicleKit() const
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Unit * GetBase() const
May be called from scripts.
InstanceScript * GetInstanceScript()
std::string const & GetName() const
void VisitNearbyObject(float const &radius, NOTIFIER ¬ifier) const
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime)
bool IsInRange(WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=NULL)
virtual void SetData64(uint32, uint64)
virtual void SetData(uint32, uint32)
CellCoord ComputeCellCoord(float x, float y)
void Visit(CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, WorldObject const &, float) const
uint32 ItemEntry[MAX_EQUIPMENT_ITEMS]
float GetPositionZ() const
float GetPositionX() const
float GetPositionY() const
struct SmartAction::@137136306204214247065175315134144360247331017331::@063217247236027134221310037325112126070263107200 installTtemplate
struct SmartAction::@137136306204214247065175315134144360247331017331::@223221030233146165101047364315320356273243300160 killedMonster
struct SmartAction::@137136306204214247065175315134144360247331017331::@362126153056054377271167251121034140104172033254 sendTargetToTarget
struct SmartAction::@137136306204214247065175315134144360247331017331::@056037146104051216040022366365070022176220102015 setEventPhase
struct SmartAction::@137136306204214247065175315134144360247331017331::@202121053104314201255122102201207263246120035036 setRangedMovement
struct SmartAction::@137136306204214247065175315134144360247331017331::@225326137357300251213255332357005062365342332334 taxi
struct SmartAction::@137136306204214247065175315134144360247331017331::@125305003154321137305003172072215042325305172115 setSwim
struct SmartAction::@137136306204214247065175315134144360247331017331::@032247343121317314325033254113252354347071044324 timedActionList
struct SmartAction::@137136306204214247065175315134144360247331017331::@263337113206264100344005071314123271031160215224 incEventPhase
struct SmartAction::@137136306204214247065175315134144360247331017331::@262062362063376054103076310127135246225346312115 follow
struct SmartAction::@137136306204214247065175315134144360247331017331::@323250253076201247247032355216135323066263226166 summonGO
struct SmartAction::@137136306204214247065175315134144360247331017331::@260014043352000167110056244356272120365357113047 power
struct SmartAction::@137136306204214247065175315134144360247331017331::@211024050222126232204263041344063334075351151253 storeVar
struct SmartAction::@137136306204214247065175315134144360247331017331::@056307337001341304225116105052047116305102131322 ingamePhaseId
struct SmartAction::@137136306204214247065175315134144360247331017331::@023276076022007070341053170160156071313157015060 moveRandom
struct SmartAction::@137136306204214247065175315134144360247331017331::@146025204151373170035336166324347315111301135304 goFlag
struct SmartAction::@137136306204214247065175315134144360247331017331::@322335154115274224237056033042154141310270174273 randTimedActionList
struct SmartAction::@137136306204214247065175315134144360247331017331::@312023305216037355162221347243201252312370300333 unitFlag
struct SmartAction::@137136306204214247065175315134144360247331017331::@170222221015243003166361030047273347230060275030 setInstanceData64
struct SmartAction::@137136306204214247065175315134144360247331017331::@105154066270000205250254221004375132270204111257 faction
struct SmartAction::@137136306204214247065175315134144360247331017331::@237106077034177101205127163210006223365202222163 talk
struct SmartAction::@137136306204214247065175315134144360247331017331::@013257352102053165303132060302205025211375037125 setHealthRegen
struct SmartAction::@137136306204214247065175315134144360247331017331::@232263171056172116357036326052343214356025224311 setRun
struct SmartAction::@137136306204214247065175315134144360247331017331::@275255223343355134011263135140247005064156134156 removeAura
struct SmartAction::@137136306204214247065175315134144360247331017331::@106331226105025351167175306102157241205132176043 threatPCT
struct SmartAction::@137136306204214247065175315134144360247331017331::@017017301336332264150073045027362135176250171251 delunitByte
struct SmartAction::@137136306204214247065175315134144360247331017331::@340117101002077274057262132157002056007011042371 item
struct SmartAction::@137136306204214247065175315134144360247331017331::@321334216220214152324067135252322006365237051372 summonCreature
struct SmartAction::@137136306204214247065175315134144360247331017331::@102027324320366347114036112231276256216375356341 forceDespawn
struct SmartAction::@137136306204214247065175315134144360247331017331::@234064157343222026123004206306000221273052034177 interruptSpellCasting
struct SmartAction::@137136306204214247065175315134144360247331017331::@327043224271174220045213146224240101337012120173 combatMove
struct SmartAction::@137136306204214247065175315134144360247331017331::@253050363250105135033216017175137100101324053136 flee
struct SmartAction::@137136306204214247065175315134144360247331017331::@271373373116125344236343321340152150140162062203 updateTemplate
struct SmartAction::@137136306204214247065175315134144360247331017331::@237127210277144266063211043133264370366070237302 storeTargets
struct SmartAction::@137136306204214247065175315134144360247331017331::@275214002000035051002312305231375170105074073031 react
struct SmartAction::@137136306204214247065175315134144360247331017331::@222323075055020043337006115334025200027336144060 setGoLootState
struct SmartAction::@137136306204214247065175315134144360247331017331::@244305372364075262301351325221332130061212111120 equip
struct SmartAction::@137136306204214247065175315134144360247331017331::@030016163313022245256210315150151222345056203275 randomPhaseRange
struct SmartAction::@137136306204214247065175315134144360247331017331::@364140021337216071013031072126362152213217361022 gameEventStart
struct SmartAction::@137136306204214247065175315134144360247331017331::@231234170206337120370317003230107262076077176377 sethealthpointorpercent
struct SmartAction::@137136306204214247065175315134144360247331017331::@366346013116331267251301000101176066154005153314 wpStart
struct SmartAction::@137136306204214247065175315134144360247331017331::@252203015076101372213105211340142002040360102025 jump
struct SmartAction::@137136306204214247065175315134144360247331017331::@053047050057114047035035162205275317245206006202 visibility
struct SmartAction::@137136306204214247065175315134144360247331017331::@304307032125035107043074211115267356000271173275 invincHP
struct SmartAction::@137136306204214247065175315134144360247331017331::@077320174144025067034346062363121331330116113042 sendGossipMenu
struct SmartAction::@137136306204214247065175315134144360247331017331::@125064266206015146053042115264002074265057332210 RespawnTarget
struct SmartAction::@137136306204214247065175315134144360247331017331::@154353352031206117237307025011150000165343160075 gameEventStop
struct SmartAction::@137136306204214247065175315134144360247331017331::@017204072246217361054270126345157054047267131155 timeEvent
struct SmartAction::@137136306204214247065175315134144360247331017331::@113375321062033017213200334254054264335370016350 setRoot
struct SmartAction::@137136306204214247065175315134144360247331017331::@012013052354341222130370041241340206147214340017 active
struct SmartAction::@137136306204214247065175315134144360247331017331::@070027157377176027211043175361120005242332321041 cast
struct SmartAction::@137136306204214247065175315134144360247331017331::@361253355005363233353246257362125371204257066324 wpStop
struct SmartAction::@137136306204214247065175315134144360247331017331::@072015025131263067117155164031252072143036172206 setFly
struct SmartAction::@137136306204214247065175315134144360247331017331::@034027334375127044264311057312165257123120035111 setSheath
struct SmartAction::@137136306204214247065175315134144360247331017331::@047257325033252011304017203222214205224131346024 randomEmote
struct SmartAction::@137136306204214247065175315134144360247331017331::@146067006045202033167137301332374134247215001225 morphOrMount
struct SmartAction::@137136306204214247065175315134144360247331017331::@134276106155246334274174066250006371264262265141 movie
struct SmartAction::@137136306204214247065175315134144360247331017331::@314010003225126163310372071105334257143315207166 MoveToPos
struct SmartAction::@137136306204214247065175315134144360247331017331::@155372325360324370022313255343031333045270217002 setInstanceData
struct SmartAction::@137136306204214247065175315134144360247331017331::@124325320104077343177176052310130023304351310216 randomSound
struct SmartAction::@137136306204214247065175315134144360247331017331::@036364267355312211235014262213357013044042051306 callHelp
struct SmartAction::@137136306204214247065175315134144360247331017331::@017345322206322315133100210307152010072305326222 teleport
struct SmartAction::@137136306204214247065175315134144360247331017331::@247156106221324315321034033112331371231160171352 setunitByte
struct SmartAction::@137136306204214247065175315134144360247331017331::@110372216333363233013275026147121341347021271102 raw
struct SmartAction::@137136306204214247065175315134144360247331017331::@216226275100333317146042116304160061113317344104 randomPhase
struct SmartAction::@137136306204214247065175315134144360247331017331::@211003267135025237246004137032245170325052026370 sendGoCustomAnim
struct SmartAction::@137136306204214247065175315134144360247331017331::@375336150123327052355224140114304021206245264240 wpPause
struct SmartAction::@137136306204214247065175315134144360247331017331::@231354224040032224162034026304373127302354021157 creatureGroup
struct SmartAction::@137136306204214247065175315134144360247331017331::@073131015240006350100116003135343265143231067154 setData
struct SmartAction::@137136306204214247065175315134144360247331017331::@111103063200063043211267272370026157313266151007 autoAttack
struct SmartEvent::@166073203170024010224000246043245045265275236352::@205334221103210356102216306336035204273105217373 doAction
struct SmartEvent::@166073203170024010224000246043245045265275236352::@035124263137161112271324316211040076034364300254 friendlyHealthPct
struct SmartEvent::@166073203170024010224000246043245045265275236352::@151214011253067366266013227241263175352330107015 spellHit
struct SmartEvent::@166073203170024010224000246043245045265275236352::@153240210013057316073206114055356342200322004153 areatrigger
struct SmartEvent::@166073203170024010224000246043245045265275236352::@331123367372304044150027144120234260063243315361 raw
struct SmartEvent::@166073203170024010224000246043245045265275236352::@071217147231100355344130024153246046254076175303 minMax
struct SmartEvent::@166073203170024010224000246043245045265275236352::@014244365015242120343050241027342311345320231372 kill
struct SmartEvent::@166073203170024010224000246043245045265275236352::@221026305077317174075143035236341220146202106111 summoned
struct SmartEvent::@166073203170024010224000246043245045265275236352::@346027276323067131151203154341341353172275342001 textOver
struct SmartEvent::@166073203170024010224000246043245045265275236352::@202207111237273327363141057053252156066031227127 targetCasting
struct SmartEvent::@166073203170024010224000246043245045265275236352::@362275236245375345071356133116337307370006121222 goStateChanged
struct SmartEvent::@166073203170024010224000246043245045265275236352::@143336307355047137005241062216153351167151345337 transportAddCreature
struct SmartEvent::@166073203170024010224000246043245045265275236352::@374352063271056252122325060177325011004327327320 dummy
struct SmartEvent::@166073203170024010224000246043245045265275236352::@317215266053337235107156201003013251003136307007 dataSet
struct SmartEvent::@166073203170024010224000246043245045265275236352::@334243344311240353276325365000066230155007140117 timedEvent
struct SmartEvent::@166073203170024010224000246043245045265275236352::@126332302352372325113370275237377071315133246044 instancePlayerEnter
struct SmartEvent::@166073203170024010224000246043245045265275236352::@316052106375244313267206021344134155050363137163 gameEvent
struct SmartEvent::@166073203170024010224000246043245045265275236352::@307010223035152345021275132122032265112355252253 eventInform
struct SmartEvent::@166073203170024010224000246043245045265275236352::@257367200352143300221314024050114266124250256202 waypoint
struct SmartEvent::@166073203170024010224000246043245045265275236352::@231361362314252335147144320331135255146044361230 friendlyHealth
struct SmartEvent::@166073203170024010224000246043245045265275236352::@176246375035351301250241104017222341335356255101 minMaxRepeat
struct SmartEvent::@166073203170024010224000246043245045265275236352::@215225270007231027007174002122072040103111365225 aura
struct SmartEvent::@166073203170024010224000246043245045265275236352::@334366012233311313242122122157342315242332057236 gossip
struct SmartEvent::@166073203170024010224000246043245045265275236352::@153222357016331217240244030161351100040203125306 missingBuff
struct SmartEvent::@166073203170024010224000246043245045265275236352::@133146201062172166200111053367224171220224362315 movementInform
struct SmartEvent::@166073203170024010224000246043245045265275236352::@010250233120134241015123153125242336170064340121 friendlyCC
struct SmartEvent::@166073203170024010224000246043245045265275236352::@140352011036232354166330333342335043070367211016 respawn
struct SmartEvent::@166073203170024010224000246043245045265275236352::@206071060360274252071246267136154353111152272204 los
struct SmartEvent::@166073203170024010224000246043245045265275236352::@201273004001225050106107035207231367176035206120 behindTarget
uint32 GetScriptType() const
uint32 GetEventType() const
uint32 GetTargetType() const
SmartScriptType source_type
uint32 GetActionType() const
struct SmartTarget::@333075361354170120173166243340237372226003166270::@110256257245272044322021152036011326202127237137 playerRange
struct SmartTarget::@333075361354170120173166243340237372226003166270::@245074100075004133116202301110122270342210362333 stored
struct SmartTarget::@333075361354170120173166243340237372226003166270::@331304071055133014342035021265106076261007323121 raw
struct SmartTarget::@333075361354170120173166243340237372226003166270::@164140207365237140026212144235174166326315355055 closestAttackable
struct SmartTarget::@333075361354170120173166243340237372226003166270::@252242265355222362137233075236171264264255250353 goDistance
struct SmartTarget::@333075361354170120173166243340237372226003166270::@336062220142255354121274120211064254344004061316 closest
struct SmartTarget::@333075361354170120173166243340237372226003166270::@002214221374016261141032233225077144161065220344 unitGUID
struct SmartTarget::@333075361354170120173166243340237372226003166270::@172360030245270120053010162234377345135043301307 unitDistance
struct SmartTarget::@333075361354170120173166243340237372226003166270::@333153342272102313242245202311020165275131037122 goRange
struct SmartTarget::@333075361354170120173166243340237372226003166270::@262226145054070224013345240063324147141336277263 playerDistance
struct SmartTarget::@333075361354170120173166243340237372226003166270::@350332235033377264000372176067130337053021314362 closestFriendly
struct SmartTarget::@333075361354170120173166243340237372226003166270::@067073135241122173103324205206246325065313214360 unitRange
struct SmartTarget::@333075361354170120173166243340237372226003166270::@163054074026206351133353217237356273245266110331 goGUID