private void OnEntityUpdated() { // clear the existing Controls ClearControls(); // Add the base gump - the semi-naked paper doll. if (true) { int bodyID = 12 + (m_isElf ? 2 : 0) + (m_isFemale ? 1 : 0); // ((Mobile)m_sourceEntity).BodyID; GumpPic paperdoll = (GumpPic)AddControl(new GumpPic(this, 0, 0, bodyID, ((Mobile)m_sourceEntity).Hue)); paperdoll.HandlesMouseInput = true; paperdoll.IsPaperdoll = true; } // Loop through the items on the mobile and create the gump pics. for (int i = 0; i < s_DrawOrder.Length; i++) { Item item = ((Mobile)m_sourceEntity).GetItem((int)s_DrawOrder[i]); if (item == null) { continue; } bool canPickUp = true; switch (s_DrawOrder[i]) { case PaperDollEquipSlots.FacialHair: case PaperDollEquipSlots.Hair: canPickUp = false; break; default: break; } AddControl(new ItemGumplingPaperdoll(this, 0, 0, item)); ((ItemGumplingPaperdoll)LastControl).SlotIndex = (int)i; ((ItemGumplingPaperdoll)LastControl).IsFemale = m_isFemale; ((ItemGumplingPaperdoll)LastControl).CanPickUp = canPickUp; } // If this object has a backpack, add it last. if (((Mobile)m_sourceEntity).GetItem((int)PaperDollEquipSlots.Backpack) != null) { Item backpack = ((Mobile)m_sourceEntity).GetItem((int)PaperDollEquipSlots.Backpack); AddControl(m_Backpack = new GumpPicBackpack(this, -7, 0, backpack)); m_Backpack.HandlesMouseInput = true; m_Backpack.MouseDoubleClickEvent += On_Dblclick_Backpack; } }
private void OnEntityUpdated() { // clear the existing Controls ClearControls(); // Add the base gump - the semi-naked paper doll. if (true) { int bodyID = 12 + (m_isElf ? 2 : 0) + (m_isFemale ? 1 : 0); // ((Mobile)m_sourceEntity).BodyID; GumpPic paperdoll = (GumpPic)AddControl(new GumpPic(this, 0, 0, bodyID, ((Mobile)m_sourceEntity).Hue)); paperdoll.HandlesMouseInput = true; paperdoll.IsPaperdoll = true; } // Loop through the items on the mobile and create the gump pics. for (int i = 0; i < s_DrawOrder.Length; i++) { Item item = ((Mobile)m_sourceEntity).GetItem((int)s_DrawOrder[i]); if (item == null) continue; bool canPickUp = true; switch (s_DrawOrder[i]) { case PaperDollEquipSlots.FacialHair: case PaperDollEquipSlots.Hair: canPickUp = false; break; default: break; } AddControl(new ItemGumplingPaperdoll(this, 0, 0, item)); ((ItemGumplingPaperdoll)LastControl).SlotIndex = (int)i; ((ItemGumplingPaperdoll)LastControl).IsFemale = m_isFemale; ((ItemGumplingPaperdoll)LastControl).CanPickUp = canPickUp; } // If this object has a backpack, add it last. if (((Mobile)m_sourceEntity).GetItem((int)PaperDollEquipSlots.Backpack) != null) { Item backpack = ((Mobile)m_sourceEntity).GetItem((int)PaperDollEquipSlots.Backpack); AddControl(m_Backpack = new GumpPicBackpack(this, -7, 0, backpack)); m_Backpack.HandlesMouseInput = true; m_Backpack.MouseDoubleClickEvent += On_Dblclick_Backpack; } }