/// <summary> /// Occurs when the actor is spawned /// </summary> public override void OnSpawn() { //Get the z coordinate this.stance = (byte)StancePosition.Reborn; this.Position = this.currentzone.GetZ(this.Position); //Reload battlestatus Singleton.Templates.FillByTemplate(this.ModelId, this); //Set a random yaw this.Yaw = new Rotator((ushort)random.Next(0, ushort.MaxValue), 0); //Reload damage table damagetable = new DamageCollection(); //Dispose loot windo if (collection != null) collection.Dispose(); collection = null; }
/// <summary> /// Set's the initial spawn coords of the specified point. /// </summary> /// <param name="startpoint">Startpoint</param> public override void OnInitialize(Point startpoint) { this.RespawnOrigin = startpoint; //Create hate & damage table hatetable = new HateCollection(); damagetable = new DamageCollection(); //Clear collection table collection = null; //Load skill rotator string file = Server.SecurePath("~/mobskills/{0}.xml", this.ModelId); string defaultfile = Server.SecurePath("~/mobskills/default.xml"); if (File.Exists(file)) skills = SkillRotatorCollection.CreateFromFile(file); else if (File.Exists(defaultfile)) skills = SkillRotatorCollection.CreateFromFile(defaultfile); else skills = SkillRotatorCollection.Empty; //Call base base.OnInitialize(startpoint); }