private void apply(YGOSharp.Card card, Texture2D def, string tail) { if (card == null) { return; } string smallstr = ""; if (card.Id != 0) { smallstr = GameStringHelper.getName(card) + GameStringHelper.getSmall(card); smallstr += "\n"; } if (tail == "") { description.Clear(); description.Add(smallstr + card.Desc); } else { description.Clear(); description.Add(smallstr + "[FFD700]" + tail + "[-]" + card.Desc); } picLoader.code = card.Id; picLoader.defaults = def; picLoader.loaded_code = -1; currentCard = card; shiftCardShower(true); Program.go(50, () => { shiftCardShower(true); }); }
internal Card(IDataRecord reader) { this.Str = new string[16]; this.Id = (int)reader.GetInt64(0); this.Ot = reader.GetInt32(1); this.Alias = (int)reader.GetInt64(2); this.Setcode = reader.GetInt64(3); this.Type = (int)reader.GetInt64(4); this.Attack = reader.GetInt32(5); this.Defense = reader.GetInt32(6); this.rAttack = this.Attack; this.rDefense = this.Defense; long Level_raw = reader.GetInt64(7); this.Level = (int)Level_raw & 0xff; this.LScale = (int)((Level_raw >> 0x18) & 0xff); this.RScale = (int)((Level_raw >> 0x10) & 0xff); this.Race = reader.GetInt32(8); this.Attribute = reader.GetInt32(9); this.Category = reader.GetInt64(10); this.Name = reader.GetString(12); this.Desc = reader.GetString(13); for (int ii = 0; ii < 0x10; ii++) { this.Str[ii] = reader.GetString(14 + ii); } this.strSetName = GameStringHelper.getSetName(Setcode); }
internal static void updateSetNames() { foreach (var item in _cards) { Card card = item.Value; card.strSetName = GameStringHelper.getSetName(card.Setcode); } }