else if (Controlled && Commandable)
{
if (IsBonded) //Intentional difference (showing ONLY bonded when bonded instead of bonded & tame)
{
list.Add(1049608); // (bonded)
list.Add(1060662, String.Format("Loyalty Rating\t{0}%", Loyalty.ToString())); // ADD THIS
}
else
{
list.Add(502006); // (tame)
list.Add(1060662, String.Format("Loyalty Rating\t{0}%", Loyalty.ToString())); // ADD THIS
}
}
public class LoyaltyTimer : Timer
{
private static readonly TimeSpan InternalDelay = TimeSpan.FromMinutes(5.0);
public static void Initialize()
{
new LoyaltyTimer().Start();
}
public LoyaltyTimer()
: base(InternalDelay, InternalDelay)
{
m_NextHourlyCheck = DateTime.UtcNow + TimeSpan.FromHours(1.0);
Priority = TimerPriority.FiveSeconds;
}
private DateTime m_NextHourlyCheck;
protected override void OnTick()
{
if (DateTime.UtcNow >= m_NextHourlyCheck)
{
m_NextHourlyCheck = DateTime.UtcNow + TimeSpan.FromHours(1.0);
}
else
{
return;
}
else if (Controlled && Commandable)
{
if (IsBonded) //Intentional difference (showing ONLY bonded when bonded instead of bonded & tame)
{
list.Add(1049608); // (bonded)
}
else
{
list.Add(502006); // (tame)
}
list.Add(1060662, String.Format("Loyalty Rating\t{0}%", Loyalty.ToString())); // ADD THIS
}
Tasanar you could also do it like this then in case you want to change the string (for example) you dont need to do it twice
Code:else if (Controlled && Commandable) { if (IsBonded) //Intentional difference (showing ONLY bonded when bonded instead of bonded & tame) { list.Add(1049608); // (bonded) } else { list.Add(502006); // (tame) } list.Add(1060662, String.Format("Loyalty Rating\t{0}%", Loyalty.ToString())); // ADD THIS }
We use essential cookies to make this site work, and optional cookies to enhance your experience.