Example #1
0
        internal bool InvokeGameStatueSpawn(int within200, int within600, int worldWide, int x, int y, int type, bool npc)
        {
            StatueSpawnEventArgs args = new StatueSpawnEventArgs
            {
                Within200 = within200,
                Within600 = within600,
                WorldWide = worldWide,
                X         = x,
                Y         = y,
                Type      = type,
                Npc       = npc
            };

            this.GameStatueSpawn.Invoke(args);
            return(args.Handled);
        }
Example #2
0
 /// <summary>OnStatueSpawn - Fired when a statue spawns.</summary>
 /// <param name="args">args - The StatueSpawnEventArgs object.</param>
 private void OnStatueSpawn(StatueSpawnEventArgs args)
 {
     if (args.Within200 < Config.StatueSpawn200 && args.Within600 < Config.StatueSpawn600 && args.WorldWide < Config.StatueSpawnWorld)
     {
         args.Handled = true;
     }
     else
     {
         args.Handled = false;
     }
 }
Example #3
0
		internal bool InvokeGameStatueSpawn(int within200, int within600, int worldWide, int x, int y, int type, bool npc)
		{
			StatueSpawnEventArgs args = new StatueSpawnEventArgs
			{
				Within200 = within200,
				Within600 = within600,
				WorldWide = worldWide,
				X = x,
				Y = y,
				Type = type,
				Npc = npc
			};

			this.GameStatueSpawn.Invoke(args);
			return args.Handled;
		}
Example #4
0
 /// <summary>
 /// GameStatueSpawn callback.
 /// </summary>
 /// <param name="args"></param>
 private void OnGameStatueSpawn(StatueSpawnEventArgs args)
 {
     lock (this.m_AddonsLock)
     {
         this.m_Addons.ForEach(a =>
             {
                 var ret = a.Value.InvokeEvent("GameStatueSpawn", args);
                 if (ret != null && ret.Length >= 1)
                 {
                     bool result;
                     if (bool.TryParse(ret[0].ToString(), out result) && result)
                         args.Handled = true;
                 }
             });
     }
 }