Core/SmartAI: use Target types where possible, instead of simple self target
- removed some obsolete comments - added errorlog if a special action uses a non-smart scripted creature --HG-- branch : trunk
This commit is contained in:
@@ -125,61 +125,97 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_PLAY_EMOTE:
|
||||
if (me)
|
||||
me->HandleEmoteCommand(e.action.emote.emote);
|
||||
break;
|
||||
{
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (targets)
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
if (IsUnit((*itr)))
|
||||
(*itr)->ToUnit()->HandleEmoteCommand(e.action.emote.emote);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SOUND:
|
||||
if (me)
|
||||
sCreatureTextMgr.SendSound(me, e.action.sound.sound, CHAT_TYPE_SAY, 0, TextRange(e.action.sound.range), Team(NULL), false);
|
||||
break;
|
||||
{
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (targets)
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
if (IsCreature((*itr)))
|
||||
sCreatureTextMgr.SendSound((*itr)->ToCreature(), e.action.sound.sound, CHAT_TYPE_SAY, 0, TextRange(e.action.sound.range), Team(NULL), false);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_FACTION:
|
||||
{
|
||||
if (!me) return;
|
||||
if (e.action.faction.factionID)
|
||||
me->setFaction(e.action.faction.factionID);
|
||||
else
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (targets)
|
||||
{
|
||||
if (CreatureInfo const* ci = GetCreatureTemplateStore(me->GetEntry()))
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
{
|
||||
if (me->getFaction() != ci->faction_A)
|
||||
me->setFaction(ci->faction_A);
|
||||
if (IsCreature((*itr)))
|
||||
{
|
||||
if (e.action.faction.factionID)
|
||||
(*itr)->ToCreature()->setFaction(e.action.faction.factionID);
|
||||
else
|
||||
{
|
||||
if (CreatureInfo const* ci = GetCreatureTemplateStore((*itr)->ToCreature()->GetEntry()))
|
||||
{
|
||||
if ((*itr)->ToCreature()->getFaction() != ci->faction_A)
|
||||
(*itr)->ToCreature()->setFaction(ci->faction_A);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL:
|
||||
{
|
||||
if (!me) return;
|
||||
if (e.action.morphOrMount.creature || e.action.morphOrMount.model)
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets) return;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
{
|
||||
//set model based on entry from creature_template
|
||||
if (e.action.morphOrMount.creature)
|
||||
if (!IsCreature((*itr)))
|
||||
continue;
|
||||
|
||||
if (e.action.morphOrMount.creature || e.action.morphOrMount.model)
|
||||
{
|
||||
if (CreatureInfo const* ci = GetCreatureTemplateStore(e.action.morphOrMount.creature))
|
||||
//set model based on entry from creature_template
|
||||
if (e.action.morphOrMount.creature)
|
||||
{
|
||||
uint32 display_id = sObjectMgr.ChooseDisplayId(0, ci);
|
||||
me->SetDisplayId(display_id);
|
||||
if (CreatureInfo const* ci = GetCreatureTemplateStore(e.action.morphOrMount.creature))
|
||||
{
|
||||
uint32 display_id = sObjectMgr.ChooseDisplayId(0, ci);
|
||||
(*itr)->ToCreature()->SetDisplayId(display_id);
|
||||
}
|
||||
}
|
||||
//if no param1, then use value from param2 (modelId)
|
||||
else
|
||||
(*itr)->ToCreature()->SetDisplayId(e.action.morphOrMount.model);
|
||||
}
|
||||
//if no param1, then use value from param2 (modelId)
|
||||
else
|
||||
me->SetDisplayId(e.action.morphOrMount.model);
|
||||
(*itr)->ToCreature()->DeMorph();
|
||||
}
|
||||
else
|
||||
me->DeMorph();
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_FAIL_QUEST:
|
||||
{
|
||||
if (!unit || !unit->ToPlayer()) return;//return if no player
|
||||
unit->ToPlayer()->FailQuest(e.action.quest.quest);
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets) return;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
{
|
||||
if (IsPlayer((*itr)))
|
||||
(*itr)->ToPlayer()->FailQuest(e.action.quest.quest);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_ADD_QUEST:
|
||||
{
|
||||
if (!unit || !unit->ToPlayer()) return;//return if no player
|
||||
if (const Quest* q = sObjectMgr.GetQuestTemplate(e.action.quest.quest))
|
||||
unit->ToPlayer()->AddQuest(q, NULL);
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets) return;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
{
|
||||
if (IsPlayer((*itr)))
|
||||
if (const Quest* q = sObjectMgr.GetQuestTemplate(e.action.quest.quest))
|
||||
(*itr)->ToPlayer()->AddQuest(q, NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_REACT_STATE:
|
||||
@@ -190,7 +226,8 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
case SMART_ACTION_RANDOM_EMOTE:
|
||||
{
|
||||
if (!me) return;
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets) return;
|
||||
uint32 emotes[SMART_ACTION_PARAM_COUNT];
|
||||
emotes[0] = e.action.randomEmote.emote1;
|
||||
emotes[1] = e.action.randomEmote.emote2;
|
||||
@@ -208,7 +245,9 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
|
||||
count++;
|
||||
}
|
||||
}
|
||||
me->HandleEmoteCommand(temp[urand(0, count)]);
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
if (IsUnit((*itr)))
|
||||
(*itr)->ToUnit()->HandleEmoteCommand(temp[urand(0, count)]);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_THREAT_ALL_PCT:
|
||||
@@ -242,12 +281,12 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
case SMART_ACTION_SEND_CASTCREATUREORGO:
|
||||
{
|
||||
if (!me) return;
|
||||
if (!GetBaseObject()) return;
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets) return;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
if (IsPlayer((*itr)))
|
||||
(*itr)->ToPlayer()->CastedCreatureOrGO(e.action.castedCreatureOrGO.creature, me->GetGUID(), e.action.castedCreatureOrGO.spell);
|
||||
(*itr)->ToPlayer()->CastedCreatureOrGO(e.action.castedCreatureOrGO.creature, GetBaseObject()->GetGUID(), e.action.castedCreatureOrGO.spell);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_CAST:
|
||||
@@ -299,20 +338,29 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
case SMART_ACTION_SET_EMOTE_STATE:
|
||||
{
|
||||
if (!me) return;
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, e.action.emote.emote);
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets) return;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
if (IsUnit((*itr)))
|
||||
(*itr)->ToUnit()->SetUInt32Value(UNIT_NPC_EMOTESTATE, e.action.emote.emote);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_UNIT_FLAG:
|
||||
{
|
||||
if (!me) return;
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, e.action.unitFlag.flag);
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets) return;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
if (IsUnit((*itr)))
|
||||
(*itr)->ToUnit()->SetFlag(UNIT_FIELD_FLAGS, e.action.unitFlag.flag);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_REMOVE_UNIT_FLAG:
|
||||
{
|
||||
if (!me) return;
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, e.action.unitFlag.flag);
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets) return;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
if (IsUnit((*itr)))
|
||||
(*itr)->ToUnit()->RemoveFlag(UNIT_FIELD_FLAGS, e.action.unitFlag.flag);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_AUTO_ATTACK:
|
||||
@@ -523,22 +571,27 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
case SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL:
|
||||
{
|
||||
if (!me) return;
|
||||
if (e.action.morphOrMount.creature || e.action.morphOrMount.model)
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets) return;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
{
|
||||
if (e.action.morphOrMount.creature > 0)
|
||||
if(!IsUnit((*itr))) continue;
|
||||
if (e.action.morphOrMount.creature || e.action.morphOrMount.model)
|
||||
{
|
||||
if (CreatureInfo const* cInfo = GetCreatureTemplateStore(e.action.morphOrMount.creature))
|
||||
if (e.action.morphOrMount.creature > 0)
|
||||
{
|
||||
uint32 display_id = sObjectMgr.ChooseDisplayId(0, cInfo);
|
||||
me->Mount(display_id);
|
||||
if (CreatureInfo const* cInfo = GetCreatureTemplateStore(e.action.morphOrMount.creature))
|
||||
{
|
||||
uint32 display_id = sObjectMgr.ChooseDisplayId(0, cInfo);
|
||||
(*itr)->ToUnit()->Mount(display_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
(*itr)->ToUnit()->Mount(e.action.morphOrMount.model);
|
||||
}
|
||||
else
|
||||
me->Mount(e.action.morphOrMount.model);
|
||||
(*itr)->ToUnit()->Unmount();
|
||||
}
|
||||
else
|
||||
me->Unmount();
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL:
|
||||
|
||||
@@ -107,9 +107,12 @@ class SmartScript
|
||||
}
|
||||
bool IsSmart(Creature* c = NULL)
|
||||
{
|
||||
if (c && c->GetAIName() != "SmartAI") return false;
|
||||
if (!me || me->GetAIName() != "SmartAI") return false;
|
||||
return true;
|
||||
bool smart = true;
|
||||
if (c && c->GetAIName() != "SmartAI") smart = false;
|
||||
if (!me || me->GetAIName() != "SmartAI") smart = false;
|
||||
if (!smart)
|
||||
sLog.outErrorDb("SmartScript: Action target creature(entry: %u) is not using SmartAI, action skipped to prevent crash.", c?c->GetEntry():(me?me->GetEntry():0));
|
||||
return smart;
|
||||
}
|
||||
ObjectList* GetTargetList(uint32 id)
|
||||
{
|
||||
|
||||
@@ -344,88 +344,88 @@ enum SMART_SCRIPT_RESPAWN_CONDITION
|
||||
|
||||
enum SMART_ACTION
|
||||
{
|
||||
SMART_ACTION_NONE = 0, //1 // No action
|
||||
SMART_ACTION_TALK = 1, //1 // groupID from creature_text
|
||||
SMART_ACTION_SET_FACTION = 2, //1 // FactionId (or 0 for default)
|
||||
SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL = 3, //1 // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph)
|
||||
SMART_ACTION_SOUND = 4, //1 // SoundId, TextRange
|
||||
SMART_ACTION_PLAY_EMOTE = 5, //1 // EmoteId
|
||||
SMART_ACTION_FAIL_QUEST = 6, //1 //QuestID
|
||||
SMART_ACTION_ADD_QUEST = 7, //1 //QuestID
|
||||
SMART_ACTION_SET_REACT_STATE = 8, //1 // state
|
||||
SMART_ACTION_ACTIVATE_GOBJECT = 9, //1 // Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_RANDOM_EMOTE = 10, //1 // EmoteId1, EmoteId2, EmoteId3...
|
||||
SMART_ACTION_CAST = 11, //1 // SpellId, CastFlags, Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_SUMMON_CREATURE = 12, //1 // CreatureID,summonType, duration in ms, storageID, attackInvoker, Target(place), TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_THREAT_SINGLE_PCT = 13, //1 // Threat%, Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_THREAT_ALL_PCT = 14, //1 // Threat%
|
||||
SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS = 15, //1 // QuestID, Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_SEND_CASTCREATUREORGO = 16, //1 // QuestID, SpellId, Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_SET_EMOTE_STATE = 17, //1 // emoteID
|
||||
SMART_ACTION_SET_UNIT_FLAG = 18, //1 // Flags (may be more than one field OR'd together), Target
|
||||
SMART_ACTION_REMOVE_UNIT_FLAG = 19, //1 // Flags (may be more than one field OR'd together), Target
|
||||
SMART_ACTION_AUTO_ATTACK = 20, //1 // AllowAttackState (0 = stop attack, anything else means continue attacking)
|
||||
SMART_ACTION_ALLOW_COMBAT_MOVEMENT = 21, //1 // AllowCombatMovement (0 = stop combat based movement, anything else continue attacking)
|
||||
SMART_ACTION_SET_EVENT_PHASE = 22, //1 // Phase
|
||||
SMART_ACTION_INC_EVENT_PHASE = 23, //1 // Value (may be negative to decrement phase, should not be 0)
|
||||
SMART_ACTION_EVADE = 24, //1 // No Params
|
||||
SMART_ACTION_FLEE_FOR_ASSIST = 25, //1 // No Params
|
||||
SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, //1 // QuestID
|
||||
SMART_ACTION_CALL_CASTEDCREATUREORGO = 27, //1 // CreatureId, SpellId
|
||||
SMART_ACTION_REMOVEAURASFROMSPELL = 28, //1 // Spellid, Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_FOLLOW = 29, //1 // Distance, Angle, EndCreatureEntry, credit, creditType (0monsterkill,1event) Target(uses first found), TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_RANDOM_PHASE = 30, //1 // PhaseId1, PhaseId2, PhaseId3...
|
||||
SMART_ACTION_RANDOM_PHASE_RANGE = 31, //1 // PhaseMin, PhaseMax
|
||||
SMART_ACTION_RESET_GOBJECT = 32, //1 // Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_CALL_KILLEDMONSTER = 33, //1 // CreatureId, Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_SET_INST_DATA = 34, //1 // Field, Data
|
||||
SMART_ACTION_SET_INST_DATA64 = 35, //1 // Field, Target(uses first found), TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_UPDATE_TEMPLATE = 36, //1 // Entry, Team
|
||||
SMART_ACTION_DIE = 37, //1 // No Params
|
||||
SMART_ACTION_SET_IN_COMBAT_WITH_ZONE = 38, //1 // No Params
|
||||
SMART_ACTION_CALL_FOR_HELP = 39, //1 // Radius
|
||||
SMART_ACTION_SET_SHEATH = 40, //1 // Sheath (0-passive,1-melee,2-ranged)
|
||||
SMART_ACTION_FORCE_DESPAWN = 41, //1 // timer
|
||||
SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL = 42, //1 // MinHpValue(+pct, -flat)
|
||||
SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL = 43, //1 // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to unmount)
|
||||
SMART_ACTION_SET_INGAME_PHASE_MASK = 44, //1 // mask
|
||||
SMART_ACTION_NONE = 0, // No action
|
||||
SMART_ACTION_TALK = 1, // groupID from creature_text
|
||||
SMART_ACTION_SET_FACTION = 2, // FactionId (or 0 for default)
|
||||
SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL = 3, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph)
|
||||
SMART_ACTION_SOUND = 4, // SoundId, TextRange
|
||||
SMART_ACTION_PLAY_EMOTE = 5, // EmoteId
|
||||
SMART_ACTION_FAIL_QUEST = 6, // QuestID
|
||||
SMART_ACTION_ADD_QUEST = 7, // QuestID
|
||||
SMART_ACTION_SET_REACT_STATE = 8, // state
|
||||
SMART_ACTION_ACTIVATE_GOBJECT = 9, //
|
||||
SMART_ACTION_RANDOM_EMOTE = 10, // EmoteId1, EmoteId2, EmoteId3...
|
||||
SMART_ACTION_CAST = 11, // SpellId, CastFlags
|
||||
SMART_ACTION_SUMMON_CREATURE = 12, // CreatureID,summonType, duration in ms, storageID, attackInvoker,
|
||||
SMART_ACTION_THREAT_SINGLE_PCT = 13, // Threat%
|
||||
SMART_ACTION_THREAT_ALL_PCT = 14, // Threat%
|
||||
SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS = 15, // QuestID
|
||||
SMART_ACTION_SEND_CASTCREATUREORGO = 16, // QuestID, SpellId
|
||||
SMART_ACTION_SET_EMOTE_STATE = 17, // emoteID
|
||||
SMART_ACTION_SET_UNIT_FLAG = 18, // Flags (may be more than one field OR'd together), Target
|
||||
SMART_ACTION_REMOVE_UNIT_FLAG = 19, // Flags (may be more than one field OR'd together), Target
|
||||
SMART_ACTION_AUTO_ATTACK = 20, // AllowAttackState (0 = stop attack, anything else means continue attacking)
|
||||
SMART_ACTION_ALLOW_COMBAT_MOVEMENT = 21, // AllowCombatMovement (0 = stop combat based movement, anything else continue attacking)
|
||||
SMART_ACTION_SET_EVENT_PHASE = 22, // Phase
|
||||
SMART_ACTION_INC_EVENT_PHASE = 23, // Value (may be negative to decrement phase, should not be 0)
|
||||
SMART_ACTION_EVADE = 24, // No Params
|
||||
SMART_ACTION_FLEE_FOR_ASSIST = 25, // No Params
|
||||
SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, // QuestID
|
||||
SMART_ACTION_CALL_CASTEDCREATUREORGO = 27, // CreatureId, SpellId
|
||||
SMART_ACTION_REMOVEAURASFROMSPELL = 28, // Spellid
|
||||
SMART_ACTION_FOLLOW = 29, // Distance, Angle, EndCreatureEntry, credit, creditType (0monsterkill,1event)
|
||||
SMART_ACTION_RANDOM_PHASE = 30, // PhaseId1, PhaseId2, PhaseId3...
|
||||
SMART_ACTION_RANDOM_PHASE_RANGE = 31, // PhaseMin, PhaseMax
|
||||
SMART_ACTION_RESET_GOBJECT = 32, //
|
||||
SMART_ACTION_CALL_KILLEDMONSTER = 33, // CreatureId,
|
||||
SMART_ACTION_SET_INST_DATA = 34, // Field, Data
|
||||
SMART_ACTION_SET_INST_DATA64 = 35, // Field,
|
||||
SMART_ACTION_UPDATE_TEMPLATE = 36, // Entry, Team
|
||||
SMART_ACTION_DIE = 37, // No Params
|
||||
SMART_ACTION_SET_IN_COMBAT_WITH_ZONE = 38, // No Params
|
||||
SMART_ACTION_CALL_FOR_HELP = 39, // Radius
|
||||
SMART_ACTION_SET_SHEATH = 40, // Sheath (0-passive,1-melee,2-ranged)
|
||||
SMART_ACTION_FORCE_DESPAWN = 41, // timer
|
||||
SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL = 42, // MinHpValue(+pct, -flat)
|
||||
SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL = 43, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to unmount)
|
||||
SMART_ACTION_SET_INGAME_PHASE_MASK = 44, // mask
|
||||
|
||||
SMART_ACTION_SET_DATA = 45, //1 // Field, Data (only creature TODO)
|
||||
SMART_ACTION_MOVE_FORWARD = 46, //1 // distance
|
||||
SMART_ACTION_SET_VISIBILITY = 47, //1 // on/off
|
||||
SMART_ACTION_SET_ACTIVE = 48, //1 // No Params
|
||||
SMART_ACTION_ATTACK_START = 49, //1 // Target(uses first found), TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_SUMMON_GO = 50, //1 // GameObjectID, DespawnTime in ms, Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_KILL_UNIT = 51, //1 // Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_WP_LOAD = 52, //1 // pathID
|
||||
SMART_ACTION_WP_START = 53, //1 // run/walk, pathID, canRepeat, Target(used for escort quests), TargetVar1, TargetVar2, TargetVar3 + uses xyzo, quest, despawntime
|
||||
SMART_ACTION_WP_PAUSE = 54, //1 // time
|
||||
SMART_ACTION_WP_STOP = 55, //1 // despawnTime, quest, fail?
|
||||
SMART_ACTION_ADD_ITEM = 56, //1 // itemID, count, Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_REMOVE_ITEM = 57, //1 // itemID, count, Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_INSTALL_AI_TEMPLATE = 58, //1 // AITemplateID
|
||||
SMART_ACTION_SET_RUN = 59, //1 // 0/1
|
||||
SMART_ACTION_SET_FLY = 60, //1 // 0/1
|
||||
SMART_ACTION_SET_SWIMM = 61, //1 // 0/1
|
||||
SMART_ACTION_TELEPORT = 62, //1 // mapID, Target, TargetVar1, TargetVar2, TargetVar3 + uses xyzo
|
||||
SMART_ACTION_STORE_VARIABLE_DECIMAL = 63, //1 // varID, number
|
||||
SMART_ACTION_STORE_TARGET_LIST = 64, //1 // varID, Target, TargetVar1, TargetVar2, TargetVar3
|
||||
SMART_ACTION_WP_RESUME = 65, //1 // none
|
||||
SMART_ACTION_SET_ORIENTATION = 66, //1 // Target, TargetVar1, TargetVar2, TargetVar3, orientation (used if target -1 or 0)
|
||||
SMART_ACTION_SET_DATA = 45, // Field, Data (only creature TODO)
|
||||
SMART_ACTION_MOVE_FORWARD = 46, // distance
|
||||
SMART_ACTION_SET_VISIBILITY = 47, // on/off
|
||||
SMART_ACTION_SET_ACTIVE = 48, // No Params
|
||||
SMART_ACTION_ATTACK_START = 49, //
|
||||
SMART_ACTION_SUMMON_GO = 50, // GameObjectID, DespawnTime in ms,
|
||||
SMART_ACTION_KILL_UNIT = 51, //
|
||||
SMART_ACTION_WP_LOAD = 52, // pathID
|
||||
SMART_ACTION_WP_START = 53, // run/walk, pathID, canRepeat, quest, despawntime, reactState
|
||||
SMART_ACTION_WP_PAUSE = 54, // time
|
||||
SMART_ACTION_WP_STOP = 55, // despawnTime, quest, fail?
|
||||
SMART_ACTION_ADD_ITEM = 56, // itemID, count
|
||||
SMART_ACTION_REMOVE_ITEM = 57, // itemID, count
|
||||
SMART_ACTION_INSTALL_AI_TEMPLATE = 58, // AITemplateID
|
||||
SMART_ACTION_SET_RUN = 59, // 0/1
|
||||
SMART_ACTION_SET_FLY = 60, // 0/1
|
||||
SMART_ACTION_SET_SWIMM = 61, // 0/1
|
||||
SMART_ACTION_TELEPORT = 62, // mapID,
|
||||
SMART_ACTION_STORE_VARIABLE_DECIMAL = 63, // varID, number
|
||||
SMART_ACTION_STORE_TARGET_LIST = 64, // varID,
|
||||
SMART_ACTION_WP_RESUME = 65, // none
|
||||
SMART_ACTION_SET_ORIENTATION = 66, //
|
||||
|
||||
SMART_ACTION_CREATE_TIMED_EVENT = 67, //1 // id, InitialMin, InitialMax, RepeatMin(only if it repeats), RepeatMax(only if it repeats), chance
|
||||
SMART_ACTION_PLAYMOVIE = 68, //1 // entry
|
||||
SMART_ACTION_MOVE_TO_POS = 69, //1 // xyz
|
||||
SMART_ACTION_RESPAWN_TARGET = 70, //1 // Target, TargetVar1, TargetVar2, TargetVar3,
|
||||
SMART_ACTION_EQUIP = 71, //1 // entry slot1,slot2,slot3
|
||||
SMART_ACTION_CLOSE_GOSSIP = 72, //1 // none
|
||||
SMART_ACTION_TRIGGER_TIMED_EVENT = 73, //1 // id(>1)
|
||||
SMART_ACTION_REMOVE_TIMED_EVENT = 74, //1 // id(>1)
|
||||
SMART_ACTION_ADD_AURA = 75, //1 // spellid, targets
|
||||
SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT = 76, //1 // target(first found used), WARNING: CAN CRASH CORE, do not use if you dont know what you are doing
|
||||
SMART_ACTION_RESET_SCRIPT_BASE_OBJECT = 77, //1 // none
|
||||
SMART_ACTION_CALL_SCRIPT_RESET = 78, //1 // none
|
||||
SMART_ACTION_ENTER_VEHICLE = 79, //1 // seatID, first vehicle target is used
|
||||
SMART_ACTION_CREATE_TIMED_EVENT = 67, // id, InitialMin, InitialMax, RepeatMin(only if it repeats), RepeatMax(only if it repeats), chance
|
||||
SMART_ACTION_PLAYMOVIE = 68, // entry
|
||||
SMART_ACTION_MOVE_TO_POS = 69, // xyz
|
||||
SMART_ACTION_RESPAWN_TARGET = 70, //
|
||||
SMART_ACTION_EQUIP = 71, // entry slot1,slot2,slot3
|
||||
SMART_ACTION_CLOSE_GOSSIP = 72, // none
|
||||
SMART_ACTION_TRIGGER_TIMED_EVENT = 73, // id(>1)
|
||||
SMART_ACTION_REMOVE_TIMED_EVENT = 74, // id(>1)
|
||||
SMART_ACTION_ADD_AURA = 75, // spellid, targets
|
||||
SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT = 76, // WARNING: CAN CRASH CORE, do not use if you dont know what you are doing
|
||||
SMART_ACTION_RESET_SCRIPT_BASE_OBJECT = 77, // none
|
||||
SMART_ACTION_CALL_SCRIPT_RESET = 78, // none
|
||||
SMART_ACTION_ENTER_VEHICLE = 79, // seatID
|
||||
SMART_ACTION_END = 80,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user