Ejemplo n.º 1
0
        public override void OnSceneComplete(Player player, uint sceneInstanceID, SceneTemplate sceneTemplate)
        {
            SmartScript smartScript = new SmartScript();

            smartScript.OnInitialize(sceneTemplate);
            smartScript.ProcessEventsFor(SmartEvents.SceneComplete, player);
        }
Ejemplo n.º 2
0
        public override void OnSceneTriggerEvent(Player player, uint sceneInstanceID, SceneTemplate sceneTemplate, string triggerName)
        {
            SmartScript smartScript = new SmartScript();

            smartScript.OnInitialize(sceneTemplate);
            smartScript.ProcessEventsFor(SmartEvents.SceneTrigger, player, 0, 0, false, null, null, triggerName);
        }
Ejemplo n.º 3
0
        // Called when a quest status change
        public override void OnQuestStatusChange(Player player, Quest quest, QuestStatus oldStatus, QuestStatus newStatus)
        {
            SmartScript smartScript = new SmartScript();

            smartScript.OnInitialize(quest);
            switch (newStatus)
            {
            case QuestStatus.Incomplete:
                smartScript.ProcessEventsFor(SmartEvents.QuestAccepted, player);
                break;

            case QuestStatus.Complete:
                smartScript.ProcessEventsFor(SmartEvents.QuestCompletion, player);
                break;

            case QuestStatus.Failed:
                smartScript.ProcessEventsFor(SmartEvents.QuestFail, player);
                break;

            case QuestStatus.Rewarded:
                smartScript.ProcessEventsFor(SmartEvents.QuestRewarded, player);
                break;

            case QuestStatus.None:
            default:
                break;
            }
        }
Ejemplo n.º 4
0
 // Called when a quest objective data change
 public override void OnQuestObjectiveChange(Player player, Quest quest, QuestObjective objective, int oldAmount, int newAmount)
 {
     if (player.IsQuestObjectiveComplete(objective))
     {
         SmartScript smartScript = new SmartScript();
         smartScript.OnInitialize(quest);
         smartScript.ProcessEventsFor(SmartEvents.QuestObjCompletion, player, objective.Id);
     }
 }
Ejemplo n.º 5
0
        // Called when a quest objective data change
        public override void OnQuestObjectiveChange(Player player, Quest quest, QuestObjective objective, int oldAmount, int newAmount)
        {
            ushort slot = player.FindQuestSlot(quest.Id);

            if (slot < SharedConst.MaxQuestLogSize && player.IsQuestObjectiveComplete(slot, quest, objective))
            {
                SmartScript smartScript = new SmartScript();
                smartScript.OnInitialize(quest);
                smartScript.ProcessEventsFor(SmartEvents.QuestObjCompletion, player, objective.Id);
            }
        }
Ejemplo n.º 6
0
        public override bool OnTrigger(Player player, AreaTriggerRecord trigger, bool entered)
        {
            if (!player.IsAlive())
            {
                return(false);
            }

            Log.outDebug(LogFilter.ScriptsAi, "AreaTrigger {0} is using SmartTrigger script", trigger.Id);
            SmartScript script = new SmartScript();

            script.OnInitialize(trigger);
            script.ProcessEventsFor(SmartEvents.AreatriggerOntrigger, player, trigger.Id);
            return(true);
        }