More Cleanups

This commit is contained in:
hondacrx
2021-06-08 12:56:09 -04:00
parent 302a1f293c
commit 52e43853fe
58 changed files with 223 additions and 257 deletions
+3 -3
View File
@@ -62,7 +62,7 @@ namespace Game.Conditions
{
// don't allow 0 items (it's checked during table load)
Cypher.Assert(ConditionValue2 != 0);
bool checkBank = ConditionValue3 != 0 ? true : false;
bool checkBank = ConditionValue3 != 0;
condMeets = player.HasItemCount(ConditionValue1, ConditionValue2, checkBank);
}
break;
@@ -176,7 +176,7 @@ namespace Game.Conditions
condMeets = (uint)Player.GetDrunkenstateByValue(player.GetDrunkValue()) >= ConditionValue1;
break;
case ConditionTypes.NearCreature:
condMeets = obj.FindNearestCreature(ConditionValue1, ConditionValue2, ConditionValue3 == 0 ? true : false) != null;
condMeets = obj.FindNearestCreature(ConditionValue1, ConditionValue2, ConditionValue3 == 0) != null;
break;
case ConditionTypes.NearGameobject:
condMeets = obj.FindNearestGameObject(ConditionValue1, ConditionValue2) != null;
@@ -550,7 +550,7 @@ namespace Game.Conditions
ss.Append(" (Unknown)");
}
ss.Append("]");
ss.Append(']');
return ss.ToString();
}
+2 -3
View File
@@ -1529,7 +1529,7 @@ namespace Game
}
case ConditionTypes.StandState:
{
bool valid = false;
bool valid;
switch (cond.ConditionValue1)
{
case 0:
@@ -1677,8 +1677,7 @@ namespace Game
public static uint GetPlayerConditionLfgValue(Player player, PlayerConditionLfgStatus status)
{
Group group = player.GetGroup();
if (group = null)
if (player.GetGroup() == null)
return 0;
switch (status)