faction reset

This commit is contained in:
mark 2006-06-18 16:17:45 +00:00
parent cc74e0d786
commit 197867a825

View file

@ -441,16 +441,22 @@ namespace Server.Factions
public void Capture( Faction f )
{
f.Silver += SilverCaptureBonus;
if ( m_State.Owner == f )
return;
if ( m_State.Owner == null ) // going from unowned to owned
{
LastIncome = DateTime.Now;
f.Silver += SilverCaptureBonus;
}
else if ( f == null ) // going from owned to unowned
{
LastIncome = DateTime.MinValue;
// otherwise changing hands, income timer doesn't change
}
else // otherwise changing hands, income timer doesn't change
{
f.Silver += SilverCaptureBonus;
}
m_State.Owner = f;