Skip to content

Commit

Permalink
修正錯誤
Browse files Browse the repository at this point in the history
  • Loading branch information
luiges90 committed Jan 10, 2018
1 parent a6d59c9 commit d59b27f
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions WorldOfTheThreeKingdoms/GameObjects/Troop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12059,7 +12059,15 @@ public int Defence
{
get //县令防御力加成公式
{
float mayorFactor = Math.Min(1, this.StartingArchitecture.MayorOnDutyDays / 90.0f);
float mayorFactor;
if (this.StartingArchitecture != null)
{
mayorFactor = Math.Min(1, this.StartingArchitecture.MayorOnDutyDays / 90.0f);
}
else
{
mayorFactor = 0;
}
float mayorRate = 1;
float leaderRate = 1;
if (BuffAvail())
Expand Down Expand Up @@ -12772,7 +12780,14 @@ public int Offence
{
get
{ //县令加成公式
float mayorFactor = Math.Min(1, this.StartingArchitecture.MayorOnDutyDays / 90.0f);
float mayorFactor;
if (this.StartingArchitecture != null)
{
mayorFactor = Math.Min(1, this.StartingArchitecture.MayorOnDutyDays / 90.0f);
} else
{
mayorFactor = 0;
}
float mayorRate = 1;
float leaderRate = 1;
if (BuffAvail())
Expand Down

0 comments on commit d59b27f

Please sign in to comment.