changed boons to bool since all boons go to 5 people
This commit is contained in:
parent
2a26e7f8b5
commit
c14e676029
4 changed files with 44 additions and 52 deletions
|
@ -134,10 +134,10 @@ namespace Lieb.Data
|
|||
|
||||
foreach(GuildWars2Build build in signedUpUsers.Values)
|
||||
{
|
||||
Alac += build.Alacrity;
|
||||
Quick += build.Quickness;
|
||||
Heal += build.Heal;
|
||||
Might += build.Might;
|
||||
Alac += build.Alacrity ? 5 : 0;
|
||||
Quick += build.Quickness ? 5 : 0;
|
||||
Heal += build.Heal ? 5 : 0;
|
||||
Might += build.Might ? 5 : 0;
|
||||
}
|
||||
if(Alac > 10)
|
||||
{
|
||||
|
@ -186,15 +186,14 @@ namespace Lieb.Data
|
|||
{
|
||||
foreach (var userBuild in signedUpUsers)
|
||||
{
|
||||
if(userBuild.Value.Alacrity > 0 && currentAlac > 10)
|
||||
if(userBuild.Value.Alacrity && currentAlac > 10)
|
||||
{
|
||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Alacrity == 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => !b.GuildWars2Build.Alacrity).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
if (newBuild != null)
|
||||
{
|
||||
currentAlac -= userBuild.Value.Alacrity;
|
||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||
currentAlac += signedUpUsers[userBuild.Key].Alacrity;
|
||||
currentAlac -= 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -204,15 +203,14 @@ namespace Lieb.Data
|
|||
{
|
||||
foreach (var userBuild in signedUpUsers)
|
||||
{
|
||||
if (userBuild.Value.Alacrity == 00 && currentAlac < 10)
|
||||
if (!userBuild.Value.Alacrity && currentAlac < 10)
|
||||
{
|
||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Alacrity > 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Alacrity).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
if (newBuild != null)
|
||||
{
|
||||
currentAlac -= userBuild.Value.Alacrity;
|
||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||
currentAlac += signedUpUsers[userBuild.Key].Alacrity;
|
||||
currentAlac += 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -222,15 +220,14 @@ namespace Lieb.Data
|
|||
{
|
||||
foreach (var userBuild in signedUpUsers)
|
||||
{
|
||||
if (userBuild.Value.Quickness > 0 && currentQuick > 10)
|
||||
if (userBuild.Value.Quickness && currentQuick > 10)
|
||||
{
|
||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Quickness == 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => !b.GuildWars2Build.Quickness).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
if (newBuild != null)
|
||||
{
|
||||
currentQuick -= userBuild.Value.Quickness;
|
||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||
currentQuick += signedUpUsers[userBuild.Key].Quickness;
|
||||
currentQuick -=5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -240,15 +237,14 @@ namespace Lieb.Data
|
|||
{
|
||||
foreach (var userBuild in signedUpUsers)
|
||||
{
|
||||
if (userBuild.Value.Quickness == 00 && currentQuick < 10)
|
||||
if (!userBuild.Value.Quickness && currentQuick < 10)
|
||||
{
|
||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Quickness > 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Quickness).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
if (newBuild != null)
|
||||
{
|
||||
currentQuick -= userBuild.Value.Quickness;
|
||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||
currentQuick += signedUpUsers[userBuild.Key].Quickness;
|
||||
currentQuick += 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -258,15 +254,14 @@ namespace Lieb.Data
|
|||
{
|
||||
foreach (var userBuild in signedUpUsers)
|
||||
{
|
||||
if (userBuild.Value.Might > 0 && currentMight > 10)
|
||||
if (userBuild.Value.Might && currentMight > 10)
|
||||
{
|
||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Might == 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => !b.GuildWars2Build.Might).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
if (newBuild != null)
|
||||
{
|
||||
currentMight -= userBuild.Value.Might;
|
||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||
currentMight += signedUpUsers[userBuild.Key].Might;
|
||||
currentMight -=5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -276,15 +271,14 @@ namespace Lieb.Data
|
|||
{
|
||||
foreach (var userBuild in signedUpUsers)
|
||||
{
|
||||
if (userBuild.Value.Might == 00 && currentMight < 10)
|
||||
if (!userBuild.Value.Might && currentMight < 10)
|
||||
{
|
||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Might > 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Might).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
if (newBuild != null)
|
||||
{
|
||||
currentMight -= userBuild.Value.Might;
|
||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||
currentMight += signedUpUsers[userBuild.Key].Might;
|
||||
currentMight += 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -294,15 +288,14 @@ namespace Lieb.Data
|
|||
{
|
||||
foreach (var userBuild in signedUpUsers)
|
||||
{
|
||||
if (userBuild.Value.Heal > 0 && currentHeal > 10)
|
||||
if (userBuild.Value.Heal && currentHeal > 10)
|
||||
{
|
||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Heal == 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => !b.GuildWars2Build.Heal).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
if (newBuild != null)
|
||||
{
|
||||
currentHeal -= userBuild.Value.Heal;
|
||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||
currentHeal += signedUpUsers[userBuild.Key].Heal;
|
||||
currentHeal -= 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -312,15 +305,14 @@ namespace Lieb.Data
|
|||
{
|
||||
foreach (var userBuild in signedUpUsers)
|
||||
{
|
||||
if (userBuild.Value.Heal == 00 && currentHeal < 10)
|
||||
if (!userBuild.Value.Heal && currentHeal < 10)
|
||||
{
|
||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Heal > 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Heal).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||
if (newBuild != null)
|
||||
{
|
||||
currentHeal -= userBuild.Value.Heal;
|
||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||
currentHeal += signedUpUsers[userBuild.Key].Heal;
|
||||
currentHeal += 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,26 +24,26 @@
|
|||
|
||||
<p>
|
||||
<label>
|
||||
Might:
|
||||
<InputNumber @bind-Value="_build.Might" />
|
||||
<InputCheckbox @bind-Value="_build.Might" />
|
||||
Might
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
Quickness:
|
||||
<InputNumber @bind-Value="_build.Quickness" />
|
||||
<InputCheckbox @bind-Value="_build.Quickness" />
|
||||
Quickness
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
Alacrity:
|
||||
<InputNumber @bind-Value="_build.Alacrity" />
|
||||
<InputCheckbox @bind-Value="_build.Alacrity" />
|
||||
Alacrity
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
Heal:
|
||||
<InputNumber @bind-Value="_build.Heal" />
|
||||
<InputCheckbox @bind-Value="_build.Heal" />
|
||||
Heal
|
||||
</label>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
</td>
|
||||
<td>@build.Class.ToString()</td>
|
||||
<td>@build.EliteSpecialization.ToString()</td>
|
||||
<td>@build.Might.ToString()</td>
|
||||
<td>@build.Heal.ToString()</td>
|
||||
<td>@build.Quickness.ToString()</td>
|
||||
<td>@build.Alacrity.ToString()</td>
|
||||
<td><input type="checkbox" checked="@(build.Might)" disabled="disabled" /></td>
|
||||
<td><input type="checkbox" checked="@(build.Heal)" disabled="disabled" /></td>
|
||||
<td><input type="checkbox" checked="@(build.Quickness)" disabled="disabled" /></td>
|
||||
<td><input type="checkbox" checked="@(build.Alacrity)" disabled="disabled" /></td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
|
|
@ -70,10 +70,10 @@
|
|||
<td>@build.BuildName</td>
|
||||
<td>@build.Class.ToString()</td>
|
||||
<td>@build.EliteSpecialization.ToString()</td>
|
||||
<td><input type="checkbox" checked="@(build.Might > 0)" disabled="true" /></td>
|
||||
<td><input type="checkbox" checked="@(build.Heal > 0)" disabled="true" /></td>
|
||||
<td><input type="checkbox" checked="@(build.Quickness > 0)" disabled="true" /></td>
|
||||
<td><input type="checkbox" checked="@(build.Alacrity > 0)" disabled="true" /></td>
|
||||
<td><input type="checkbox" checked="@(build.Might)" disabled="true" /></td>
|
||||
<td><input type="checkbox" checked="@(build.Heal)" disabled="true" /></td>
|
||||
<td><input type="checkbox" checked="@(build.Quickness)" disabled="true" /></td>
|
||||
<td><input type="checkbox" checked="@(build.Alacrity)" disabled="true" /></td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue