本文整理汇总了C++中SmartScript类的典型用法代码示例。如果您正苦于以下问题:C++ SmartScript类的具体用法?C++ SmartScript怎么用?C++ SmartScript使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SmartScript类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnTrigger
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
{
sLog->outDebug(LOG_FILTER_DATABASE_AI, "AreaTrigger %u is using SmartTrigger script", trigger->id);
SmartScript script;
script.OnInitialize(NULL, trigger);
script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->id);
return true;
}
示例2: OnTrigger
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) override
{
if (!player->IsAlive())
return false;
TC_LOG_DEBUG("scripts.ai", "AreaTrigger %u is using SmartTrigger script", trigger->id);
SmartScript script;
script.OnInitialize(nullptr, trigger);
script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->id);
return true;
}
示例3: OnTrigger
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
{
if (!player->IsAlive())
return false;
TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "AreaTrigger %u is using SmartTrigger script", trigger->id);
SmartScript script;
script.OnInitialize(NULL, trigger);
script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->id);
return true;
}
示例4: OnTrigger
bool OnTrigger(Player* player, AreaTrigger const* trigger)
{
if (!player->IsAlive())
return false;
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_DATABASE_AI, "AreaTrigger %u is using SmartTrigger script", trigger->entry);
#endif
SmartScript script;
script.OnInitialize(NULL, trigger);
script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->entry);
return true;
}
示例5: OnSceneComplete
void OnSceneComplete(Player* player, uint32 /*sceneInstanceID*/, SceneTemplate const* sceneTemplate) override
{
SmartScript smartScript;
smartScript.OnInitialize(nullptr, nullptr, sceneTemplate);
smartScript.ProcessEventsFor(SMART_EVENT_SCENE_COMPLETE, player);
}
示例6: OnSceneTriggerEvent
void OnSceneTriggerEvent(Player* player, uint32 /*sceneInstanceID*/, SceneTemplate const* sceneTemplate, std::string const& triggerName) override
{
SmartScript smartScript;
smartScript.OnInitialize(nullptr, nullptr, sceneTemplate);
smartScript.ProcessEventsFor(SMART_EVENT_SCENE_TRIGGER, player, 0, 0, false, nullptr, nullptr, triggerName);
}