Commit 74e1072e authored by mercury233's avatar mercury233

fix getSetName

parent 2b482758
......@@ -461,26 +461,29 @@ public class GameStringHelper
public static string getSetName(long Setcode)
{
var setcodes = new int[4];
for(var j = 0; j < 4; j++)
{
setcodes[j] = (int)((Setcode >> j * 16) & 0xffff);
}
var returnValue = new List<string>();
var lastBaseType = 0xfff;
for (var i = 0; i < GameStringManager.xilies.Count; i++)
{
var currentHash = GameStringManager.xilies[i].hashCode;
if (CardsManager.IfSetCard(currentHash, Setcode))
for(var j = 0; j < 4; j++)
{
if ((lastBaseType & currentHash) == lastBaseType)
returnValue.RemoveAt(returnValue.Count - 1);
lastBaseType = currentHash & 0xfff;
var setArray = GameStringManager.xilies[i].content.Split('\t');
var setString = setArray[0];
//if (setArray.Length > 1)
//{
// setString += "[sup]" + setArray[1] + "[/sup]";
//}
returnValue.Add(setString);
if (currentHash == setcodes[j])
{
var setArray = GameStringManager.xilies[i].content.Split('\t');
var setString = setArray[0];
//if (setArray.Length > 1)
//{
// setString += "[sup]" + setArray[1] + "[/sup]";
//}
returnValue.Add(setString);
}
}
}
return string.Join("|", returnValue.ToArray());
return String.Join("|", returnValue.ToArray());
}
}
\ No newline at end of file
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