mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 20:02:25 +01:00
@@ -1865,19 +1865,26 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!targets)
|
||||
break;
|
||||
|
||||
ObjectList* storedTargets = GetTargetList(e.action.sendTargetToTarget.id);
|
||||
if (!storedTargets)
|
||||
{
|
||||
delete targets;
|
||||
return;
|
||||
}
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
if (IsCreature(*itr))
|
||||
{
|
||||
if (SmartAI* ai = CAST_AI(SmartAI, (*itr)->ToCreature()->AI()))
|
||||
ai->GetScript()->StoreTargetList(GetTargetList(e.action.sendTargetToTarget.id), e.action.sendTargetToTarget.id);
|
||||
ai->GetScript()->StoreTargetList(new ObjectList(*storedTargets), e.action.sendTargetToTarget.id); // store a copy of target list
|
||||
else
|
||||
sLog->outErrorDb("SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping");
|
||||
}
|
||||
else if (IsGameObject(*itr))
|
||||
{
|
||||
if (SmartGameObjectAI* ai = CAST_AI(SmartGameObjectAI, (*itr)->ToGameObject()->AI()))
|
||||
ai->GetScript()->StoreTargetList(GetTargetList(e.action.sendTargetToTarget.id), e.action.sendTargetToTarget.id);
|
||||
ai->GetScript()->StoreTargetList(new ObjectList(*storedTargets), e.action.sendTargetToTarget.id); // store a copy of target list
|
||||
else
|
||||
sLog->outErrorDb("SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping");
|
||||
}
|
||||
|
||||
@@ -266,7 +266,6 @@ struct CreatureData
|
||||
// `creature_addon` table
|
||||
struct CreatureAddon
|
||||
{
|
||||
uint32 guidOrEntry;
|
||||
uint32 path_id;
|
||||
uint32 mount;
|
||||
uint32 bytes1;
|
||||
|
||||
Reference in New Issue
Block a user