public override void OnResponse(GameClient sender, RelayInfo info) { if (m_Deed.Deleted) { return; } if (info.ButtonID != 1) { m_From.SendLocalizedMessage(1013009); // You decide not to change your hairstyle. return; } int[] switches = info.Switches; if (switches.Length == 0) { return; } if (m_From is PlayerMobile) { PlayerMobile pm = (PlayerMobile)m_From; pm.SetHairMods(-1, -1); // clear any hairmods (disguise kit, incognito) } m_From.HairItemID = switches[0]; m_Deed.Delete(); }
public override void OnResponse(NetState sender, RelayInfo info) { if (m_Deed.Deleted) { return; } Item newHair = null; switch (info.ButtonID) { case 0: return; case 2: newHair = new ShortHair(); break; case 3: newHair = new LongHair(); break; case 4: newHair = new PonyTail(); break; case 5: newHair = new Mohawk(); break; case 6: newHair = new PageboyHair(); break; case 7: newHair = new ReceedingHair(); break; case 8: newHair = new TwoPigTails(); break; case 9: newHair = new KrisnaHair(); break; } if (m_From is PlayerMobile) { PlayerMobile pm = (PlayerMobile)m_From; pm.SetHairMods(-1, -1); // clear any hairmods (disguise kit, incognito) } Item oldHair = m_From.FindItemOnLayer(Layer.Hair); if (oldHair != null) { oldHair.Delete(); } if (newHair != null) { if (oldHair != null) { newHair.Hue = oldHair.Hue; } m_From.AddItem(newHair); } m_Deed.Delete(); }
public override void OnResponse(NetState sender, RelayInfo info) { if (m_Deed.Deleted) { return; } if (info.ButtonID > 0) { int itemID = 0; switch (info.ButtonID) { case 2: itemID = 0x203B; break; case 3: itemID = 0x203C; break; case 4: itemID = 0x203D; break; case 5: itemID = 0x2044; break; case 6: itemID = 0x2045; break; case 7: itemID = m_From.Female ? 0x2046 : 0x2048; break; case 8: itemID = 0x2049; break; case 9: itemID = 0x204A; break; } if (m_From is PlayerMobile) { PlayerMobile pm = (PlayerMobile)m_From; pm.SetHairMods(-1, -1); // clear any hairmods (disguise kit, incognito) } m_From.HairItemID = itemID; m_From.PlaySound(0x248); m_Deed.Delete(); } }