protected override void OnTick() { if (shapeshift) { Container pack = m_Shapeshifter.Backpack; Item animalskin = m_Shapeshifter.FindItemOnLayer(Layer.InnerTorso); if (animalskin != null && animalskin is CustomShapeshifterArmor) { animalskin.Delete(); } Item animalweapon = m_Shapeshifter.FindItemOnLayer(Layer.TwoHanded); if (animalweapon != null && animalweapon is CustomShapeshifterWeapon) { animalweapon.Delete(); } for (int i = 1; i < 30; i++) { Item item = m_Shapeshifter.FindItemOnLayer((Layer)i); if ((item != null) && (pack != null) && (i != 9 && i != 11 && i != 15 && i != 16 && i != 21 && i < 24)) { pack.DropItem(item); } } m_Shapeshifter.Shapeshifted = true; //if (formhue != 0) m_Shapeshifter.Hue = formhue; m_Shapeshifter.EquipItem(new CustomShapeshifterArmor(formgroup, formname, formhue, m_Shapeshifter)); m_Shapeshifter.EquipItem(new CustomShapeshifterWeapon(formgroup, formname, formhue, m_Shapeshifter)); m_Shapeshifter.SendMessage("You speak now an animal language."); m_Shapeshifter.CurrentLanguage = TeiravonMobile.LLupine; Infravision(m_Shapeshifter); if (m_Shapeshifter.CantWalk == true) { m_Shapeshifter.CantWalk = false; } m_Shapeshifter.Shapeshift(true, m_Shapeshifter.ShapeshiftSlot[slotnumber]); } else { m_Shapeshifter.Shapeshift(false, 0); m_Shapeshifter.Shapeshifted = false; m_Shapeshifter.ShapeshiftNext = DateTime.Now + TimeSpan.FromSeconds(3.0); Item animalskin = m_Shapeshifter.FindItemOnLayer(Layer.InnerTorso); if (animalskin != null && animalskin is CustomShapeshifterArmor) { animalskin.Delete(); } Item animalweapon = m_Shapeshifter.FindItemOnLayer(Layer.TwoHanded); if (animalweapon != null && animalweapon is CustomShapeshifterWeapon) { animalweapon.Delete(); } m_Shapeshifter.Hue = m_Shapeshifter.ShapeshiftHue; m_Shapeshifter.SendMessage("Your language is now Common."); m_Shapeshifter.CurrentLanguage = TeiravonMobile.LCommon; m_Shapeshifter.NameMod = null; } }