CODE |
public override void AddNameProperties( ObjectPropertyList list ) { base.AddNameProperties(list); XmlPoints a = (XmlPoints)XmlAttach.FindAttachment(this, typeof(XmlPoints)); if (a != null) { list.Add(1070722, "Kills {0} / Deaths {1}", a.Kills, a.Deaths); } } |
CODE |
public override void AddNameProperties( ObjectPropertyList list ) { base.AddNameProperties(list); XmlPoints a = (XmlPoints)XmlAttach.FindAttachment(this, typeof(XmlPoints)); if (a != null) { list.Add(1070722, "Kills {0} / Deaths {1} : Rank={2}", a.Kills, a.Deaths, a.Rank); } } |
QUOTE |
private static void UpdateRanking(Mobile m, XmlPoints attachment) { if(RankList == null) RankList = new ArrayList(); // flag the rank list for updating on the next attempt to retrieve a rank needsupdate = true; bool found = false; // rank the entries for(int i= 0; i<RankList.Count;i++) { RankEntry p = RankList[i] as RankEntry; // found a match if(p != null && p.Killer == m) { // update the entry with the new points value p.PointsAttachment = attachment; found = true; break; } } // a new entry so add it if(!found) { RankList.Add(new RankEntry(m, attachment)); } // if points statistics are being displayed in player name properties, then update them if(m != null) m.InvalidateProperties(); } |