Initialization

From WCell Wiki
Jump to: navigation, search
		[Initialization(InitializationPass.Second)]
		public static void FixConeOfCold()
		{
			// Cone of cold is missing Range
			SpellLineId.MageConeOfCold.Apply(spell =>
			{
				spell.Range.MaxDist = 10;
			});
		}

		[Initialization]
		[DependentInitialization(typeof(GOMgr))]
		public static void InitGOs()
		{
                    // do something to GOs
		}

		[Initialization]
		[DependentInitialization(typeof(NPCMgr))]
		[DependentInitialization(typeof(ItemMgr))]
		public static void InitNPCs()
		{
		    // do something to NPCs and Items
		}

NOTE: These methods can be declared in any public Type, as far as it still is a part of the Addon's project and has the aforementioned attribute.

Add content