Core/SmartAI: some error checks for actionlists, and enabled lists for GOs

--HG--
branch : trunk
This commit is contained in:
Rat
2010-12-07 20:25:45 +01:00
parent bb09a4a50f
commit cebf8590e3
4 changed files with 53 additions and 7 deletions
+10 -1
View File
@@ -790,8 +790,10 @@ void SmartAI::SetFollow(Unit* target, float dist, float angle, uint32 credit, ui
mFollowCreditType = creditType;
}
void SmartAI::SetScript9(SmartScriptHolder &e, uint32 entry)
void SmartAI::SetScript9(SmartScriptHolder &e, uint32 entry, Unit* invoker)
{
if (invoker)
GetScript()->mLastInvoker = invoker;
GetScript()->SetScript9(e, entry);
}
/*
@@ -889,6 +891,13 @@ void SmartGameObjectAI::SetData(uint32 id, uint32 value)
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, NULL, id, value);
}
void SmartGameObjectAI::SetScript9(SmartScriptHolder &e, uint32 entry, Unit* invoker)
{
if (invoker)
GetScript()->mLastInvoker = invoker;
GetScript()->SetScript9(e, entry);
}
class SmartTrigger : public AreaTriggerScript
{
public: