Core/SmartAI: added ACTION_ACTIVATE_TAXI

--HG--
branch : trunk
This commit is contained in:
Rat
2010-11-19 20:23:08 +01:00
parent 5cd3904059
commit 67fa59fb68
3 changed files with 20 additions and 2 deletions

View File

@@ -1138,6 +1138,15 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
SetScript9(e, urand(e.action.randTimedActionList.entry1, e.action.randTimedActionList.entry2));
break;
}
case SMART_ACTION_ACTIVATE_TAXI:
{
ObjectList* targets = GetTargets(e, unit);
if (!targets) return;
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
if (IsPlayer((*itr)))
(*itr)->ToPlayer()->ActivateTaxiPathTo(e.action.taxi.id);
break;
}
default:
sLog.outErrorDb("SmartScript::ProcessAction: Unhandled Action type %u", e.GetActionType());
break;