コード例 #1
0
ファイル: SmartAI.cpp プロジェクト: AdrElecTro/TrinityCore
 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
0
ファイル: SmartAI.cpp プロジェクト: lasyan3/TrinityCore
        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
0
        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
0
        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
0
ファイル: SmartAI.cpp プロジェクト: Carbenium/TrinityCore
 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
0
ファイル: SmartAI.cpp プロジェクト: Carbenium/TrinityCore
 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);
 }