From 197867a825d8bb2af405a482db3df1acd0a70afe Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 18 Jun 2006 16:17:45 +0000 Subject: [PATCH] faction reset --- Scripts/Engines/Factions/Core/Town.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Scripts/Engines/Factions/Core/Town.cs b/Scripts/Engines/Factions/Core/Town.cs index b72ab9a43..4df12f4ef 100644 --- a/Scripts/Engines/Factions/Core/Town.cs +++ b/Scripts/Engines/Factions/Core/Town.cs @@ -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;