public static void HeritageTransform(NetState state, PacketReader reader) { Mobile m = state.Mobile; if (reader.Size == 5) { m.SendLocalizedMessage(1073645); // You may try this again later... } else if (reader.Size == 15 && HeritageQuester.Check(m)) { bool proceed = false; if (HeritageQuester.IsPending(m)) { proceed = true; HeritageQuester quester = HeritageQuester.Pending(m); m.Race = quester.Race; quester.CheckCompleted(m, true); // removes done quests if (m.Race == Race.Elf) { m.SendLocalizedMessage(1073653); // You are now fully initiated into the Elven culture. } else if (m.Race == Race.Human) { m.SendLocalizedMessage(1073654); // You are now fully human. } } else if (RaceChangeToken.IsPending(m)) { Race race = RaceChangeToken.GetPendingRace(m); if (race != null) { m.Race = race; proceed = true; m.SendLocalizedMessage(1111914); // You have successfully changed your race. RaceChangeToken.OnRaceChange(m); } } if (proceed) { m.Hue = reader.ReadUInt16(); m.HairItemID = reader.ReadUInt16(); m.HairHue = reader.ReadUInt16(); m.FacialHairItemID = reader.ReadUInt16(); m.FacialHairHue = reader.ReadUInt16(); } } HeritageQuester.RemovePending(m); RaceChangeToken.RemovePending(m); }
public static void HeritageTransform(NetState state, PacketReader reader) { Mobile m = state.Mobile; if (reader.Size == 5) { m.SendLocalizedMessage(1073645); // You may try this again later... HeritageQuester.RemovePending(m); } else if (reader.Size == 15) { if (HeritageQuester.IsPending(m)) { HeritageQuester quester = HeritageQuester.Pending(m); m.Race = quester.Race; m.Hue = reader.ReadUInt16(); m.HairItemID = reader.ReadUInt16(); m.HairHue = reader.ReadUInt16(); m.FacialHairItemID = reader.ReadUInt16(); m.FacialHairHue = reader.ReadUInt16(); HeritageQuester.RemovePending(m); quester.CheckCompleted(m, true); // removes done quests if (m.Race == Race.Elf) { m.SendLocalizedMessage(1073653); // You are now fully initiated into the Elven culture. } else if (m.Race == Race.Human) { m.SendLocalizedMessage(1073654); // You are now fully human. } } } }