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 ...@@ -644,6 +644,7 @@ public class DeckManager : ServantWithCardDescription
getBanFilter(), getBanFilter(),
currentBanlist, currentBanlist,
getTypeFilter(), getTypeFilter(),
getTypeFilter2(),
getRaceFilter(), getRaceFilter(),
getAttributeFilter(), getAttributeFilter(),
getCatagoryFilter() getCatagoryFilter()
...@@ -714,6 +715,23 @@ public class DeckManager : ServantWithCardDescription ...@@ -714,6 +715,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;
...@@ -777,7 +795,6 @@ public class DeckManager : ServantWithCardDescription ...@@ -777,7 +795,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;
...@@ -805,7 +822,6 @@ public class DeckManager : ServantWithCardDescription ...@@ -805,7 +822,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;
......
...@@ -114,6 +114,7 @@ namespace YGOSharp ...@@ -114,6 +114,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
...@@ -132,7 +133,10 @@ namespace YGOSharp ...@@ -132,7 +133,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