Esempio n. 1
0
        private void PC_SpellCastAttempting(int spellID, int target, int skill)
        {
            REPlugin.Instance.InvokeOperationSafely(() =>
            {
                var eventArgs = new SpellCastAttemptingEventArgs(spellID, target, skill);
                if (this._enableEventDebugLogging)
                {
                    REPlugin.Instance.Debug.WriteObject(eventArgs);
                }

                if (this.SpellCastAttempting != null)
                {
                    this.SpellCastAttempting(uTank2.PluginCore.PC, eventArgs);
                }
            });
        }
Esempio n. 2
0
        internal void WriteObject(SpellCastAttemptingEventArgs obj)
        {
            if (ActiveSettings.Instance.DebugLevel == DebugLevel.None)
                return;

            lock (this._writeLock)
            {
                using (StreamWriter stream = new StreamWriter(this._currentPath, true))
                {
                    this.LogRawMessage(this.FormatWithPrefix("SpellCastAttemptingEventArgs"), stream);
                    this.LogRawMessage(string.Format("  SpellId = {0}", obj.SpellId), stream);
                    this.LogRawMessage(string.Format("  Target = {0}", obj.Target), stream);
                    this.LogRawMessage(string.Format("  Skill = {0}", obj.Skill), stream);

                    //this.WriteCurrentStateStuff(stream, false);

                    this.LogRawMessage("", stream);
                }
            }
        }