Commit 2b815203 authored by mercury233's avatar mercury233 Committed by nanahira

fix search Normal Spell

parent 23c52858
......@@ -644,6 +644,7 @@ public class DeckManager : ServantWithCardDescription
getBanFilter(),
currentBanlist,
getTypeFilter(),
getTypeFilter2(),
getRaceFilter(),
getAttributeFilter(),
getCatagoryFilter()
......@@ -714,6 +715,23 @@ public class DeckManager : ServantWithCardDescription
if (UIPopupList_main.value == GameStringManager.get_unsafe(1312))
{
returnValue = (UInt32)CardType.Monster;
}
if (UIPopupList_main.value == GameStringManager.get_unsafe(1313))
{
returnValue = (UInt32)CardType.Spell;
}
if (UIPopupList_main.value == GameStringManager.get_unsafe(1314))
{
returnValue = (UInt32)CardType.Trap;
}
return returnValue;
}
UInt32 getTypeFilter2()
{
UInt32 returnValue = 0;
if (UIPopupList_main.value == GameStringManager.get_unsafe(1312))
{
if (ifType(GameStringManager.get_unsafe(1054)))
{
returnValue |= (UInt32)CardType.Monster + (UInt32)CardType.Normal;
......@@ -777,7 +795,6 @@ public class DeckManager : ServantWithCardDescription
}
if (UIPopupList_main.value == GameStringManager.get_unsafe(1313))
{
returnValue = (UInt32)CardType.Spell;
if (ifType(GameStringManager.get_unsafe(1054)))
{
returnValue |= (UInt32)CardType.Spell;
......@@ -805,7 +822,6 @@ public class DeckManager : ServantWithCardDescription
}
if (UIPopupList_main.value == GameStringManager.get_unsafe(1314))
{
returnValue = (UInt32)CardType.Trap;
if (ifType(GameStringManager.get_unsafe(1054)))
{
returnValue |= (UInt32)CardType.Trap;
......
......@@ -114,6 +114,7 @@ namespace YGOSharp
int getBAN,
Banlist banlist,
uint getTypeFilter,
uint getTypeFilter2,
uint getRaceFilter,
uint getAttributeFilter,
uint getCatagoryFilter
......@@ -132,7 +133,10 @@ namespace YGOSharp
|| card.Id.ToString() == getName
)
{
if (((card.Type & getTypeFilter)) == getTypeFilter || getTypeFilter == 0)
if (((card.Type & getTypeFilter) == getTypeFilter || getTypeFilter == 0)
&& ((card.Type == getTypeFilter2
|| getTypeFilter == (UInt32)CardType.Monster) && (card.Type & getTypeFilter2) == getTypeFilter2
|| getTypeFilter2 == 0))
{
if ((card.Race & getRaceFilter) > 0 || getRaceFilter == 0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment