Commit dcb0b354 authored by mercury233's avatar mercury233

fix search Normal Spell

parent 7c0b2ddc
......@@ -642,6 +642,7 @@ public class DeckManager : ServantWithCardDescription
getBanFilter(),
currentBanlist,
getTypeFilter(),
getTypeFilter2(),
getRaceFilter(),
getAttributeFilter(),
getCatagoryFilter()
......@@ -712,6 +713,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;
......@@ -775,7 +793,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;
......@@ -803,7 +820,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;
......
......@@ -105,6 +105,7 @@ namespace YGOSharp
int getBAN,
Banlist banlist,
uint getTypeFilter,
uint getTypeFilter2,
uint getRaceFilter,
uint getAttributeFilter,
uint getCatagoryFilter
......@@ -123,7 +124,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