public static string GetValue(Mobile target, string propery) { if (!(target is Character)) { return(""); } GetPropertyEntry entry = (GetPropertyEntry)m_GetEntries[propery]; if (entry != null) { if (entry.GetHandler != null) { GetPropertyEventArgs e = new GetPropertyEventArgs(target, propery); string str = entry.GetHandler(e); EventSink.InvokeGetProperty(e); return(str); } else { return(""); } } else { return(""); } }
public static AccessLevels GetAccessLevel(string property) { GetPropertyEntry entry = (GetPropertyEntry)m_GetEntries[property]; if (entry != null) { return(entry.AccessLevel); } return(AccessLevels.PlayerLevel); }
public static bool HasProperty(string propery) { GetPropertyEntry entry = (GetPropertyEntry)m_GetEntries[propery]; if (entry != null) { if (entry.GetHandler != null) { return(true); } } return(false); }
public int CompareTo(object obj) { if (obj == this) { return(0); } else if (obj == null) { return(1); } GetPropertyEntry e = obj as GetPropertyEntry; if (e == null) { throw new ArgumentException(); } return(m_Property.CompareTo(e.m_Property)); }
public static void Register(string property, AccessLevels access, PropertyEventHandler handler, GetPropertyEventHandler gethandler) { m_Entries[property] = new PropertyEntry(property, handler, access); m_GetEntries[property] = new GetPropertyEntry(property, gethandler, access); }