Esempio n. 1
0
 // Token: 0x06000B8E RID: 2958 RVA: 0x00052F38 File Offset: 0x00051138
 private void SetRandomEvent(RandomEvent ev, Vector3 pos)
 {
     if (this.m_randomEvent != null)
     {
         if (this.m_randomEvent == this.m_activeEvent)
         {
             this.SetActiveEvent(null, true);
         }
         this.m_randomEvent.OnStop();
         this.m_randomEvent = null;
     }
     if (ev != null)
     {
         this.m_randomEvent       = ev.Clone();
         this.m_randomEvent.m_pos = pos;
         this.m_randomEvent.OnStart();
         ZLog.Log("Random event set:" + ev.m_name);
         if (Player.m_localPlayer)
         {
             Player.m_localPlayer.ShowTutorial("randomevent", false);
         }
     }
     if (ZNet.instance.IsServer())
     {
         this.SendCurrentRandomEvent();
     }
 }
Esempio n. 2
0
    // Token: 0x06000B85 RID: 2949 RVA: 0x00052BFC File Offset: 0x00050DFC
    private void SetForcedEvent(string name)
    {
        if (this.m_forcedEvent != null && name != null && this.m_forcedEvent.m_name == name)
        {
            return;
        }
        if (this.m_forcedEvent != null)
        {
            if (this.m_forcedEvent == this.m_activeEvent)
            {
                this.SetActiveEvent(null, true);
            }
            this.m_forcedEvent.OnStop();
            this.m_forcedEvent = null;
        }
        RandomEvent @event = this.GetEvent(name);

        if (@event != null)
        {
            this.m_forcedEvent = @event.Clone();
            this.m_forcedEvent.OnStart();
        }
    }