Commit dcb0b354 authored by mercury233's avatar mercury233

fix search Normal Spell

parent 7c0b2ddc
...@@ -642,6 +642,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -642,6 +642,7 @@ public class DeckManager : ServantWithCardDescription
getBanFilter(), getBanFilter(),
currentBanlist, currentBanlist,
getTypeFilter(), getTypeFilter(),
getTypeFilter2(),
getRaceFilter(), getRaceFilter(),
getAttributeFilter(), getAttributeFilter(),
getCatagoryFilter() getCatagoryFilter()
...@@ -712,6 +713,23 @@ public class DeckManager : ServantWithCardDescription ...@@ -712,6 +713,23 @@ public class DeckManager : ServantWithCardDescription
if (UIPopupList_main.value == GameStringManager.get_unsafe(1312)) if (UIPopupList_main.value == GameStringManager.get_unsafe(1312))
{ {
returnValue = (UInt32)CardType.Monster; 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))) if (ifType(GameStringManager.get_unsafe(1054)))
{ {
returnValue |= (UInt32)CardType.Monster + (UInt32)CardType.Normal; returnValue |= (UInt32)CardType.Monster + (UInt32)CardType.Normal;
...@@ -775,7 +793,6 @@ public class DeckManager : ServantWithCardDescription ...@@ -775,7 +793,6 @@ public class DeckManager : ServantWithCardDescription
} }
if (UIPopupList_main.value == GameStringManager.get_unsafe(1313)) if (UIPopupList_main.value == GameStringManager.get_unsafe(1313))
{ {
returnValue = (UInt32)CardType.Spell;
if (ifType(GameStringManager.get_unsafe(1054))) if (ifType(GameStringManager.get_unsafe(1054)))
{ {
returnValue |= (UInt32)CardType.Spell; returnValue |= (UInt32)CardType.Spell;
...@@ -803,7 +820,6 @@ public class DeckManager : ServantWithCardDescription ...@@ -803,7 +820,6 @@ public class DeckManager : ServantWithCardDescription
} }
if (UIPopupList_main.value == GameStringManager.get_unsafe(1314)) if (UIPopupList_main.value == GameStringManager.get_unsafe(1314))
{ {
returnValue = (UInt32)CardType.Trap;
if (ifType(GameStringManager.get_unsafe(1054))) if (ifType(GameStringManager.get_unsafe(1054)))
{ {
returnValue |= (UInt32)CardType.Trap; returnValue |= (UInt32)CardType.Trap;
......
...@@ -105,6 +105,7 @@ namespace YGOSharp ...@@ -105,6 +105,7 @@ namespace YGOSharp
int getBAN, int getBAN,
Banlist banlist, Banlist banlist,
uint getTypeFilter, uint getTypeFilter,
uint getTypeFilter2,
uint getRaceFilter, uint getRaceFilter,
uint getAttributeFilter, uint getAttributeFilter,
uint getCatagoryFilter uint getCatagoryFilter
...@@ -123,7 +124,10 @@ namespace YGOSharp ...@@ -123,7 +124,10 @@ namespace YGOSharp
|| card.Id.ToString() == getName || 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) 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