public virtual void Carve(Mobile from, Item item) { if (OpenedBy == null && IsAccessibleTo(from)) { OpenedBy = from; m_Timer ??= new DecayTimer(this); if (!m_Timer.Running) { m_Timer.Start(); } m_Timer.StartDissolving(); PlagueBeastBackpack pack = new PlagueBeastBackpack(); AddItem(pack); pack.Initialize(); foreach (NetState state in GetClientsInRange(12)) { Mobile m = state.Mobile; if (m?.Player == true && m != from) { PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1071919, from.Name, m.NetState); // * ~1_VAL~ slices through the plague beast's amorphous tissue * } } from.LocalOverheadMessage(MessageType.Regular, 0x21, 1071904); // * You slice through the plague beast's amorphous tissue * Timer.DelayCall(TimeSpan.Zero, pack.Open, from); } }
public virtual bool Carve(Mobile from, Item item) { if (m_OpenedBy == null && IsAccessibleTo(from)) { m_OpenedBy = from; if (m_Timer == null) m_Timer = new DecayTimer(this); if (!m_Timer.Running) m_Timer.Start(); m_Timer.StartDissolving(); PlagueBeastBackpack pack = new PlagueBeastBackpack(); AddItem(pack); pack.Initialize(); foreach (NetState state in GetClientsInRange(12)) { Mobile m = state.Mobile; if (m != null && m.Player && m != from) PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1071919, from.Name, m.NetState); // * ~1_VAL~ slices through the plague beast's amorphous tissue * } from.LocalOverheadMessage(MessageType.Regular, 0x21, 1071904); // * You slice through the plague beast's amorphous tissue * Timer.DelayCall<Mobile>(TimeSpan.Zero, new TimerStateCallback<Mobile>(pack.Open), from); return true; } return false; }