public void SetInfo(DeckCard dcard) { cid = dcard.BaseId; level = dcard.Level; lastCell = -1; skills = new List<MonsterSkill>(); string effectName = ""; if (cid > 0) { card = CardAssistant.GetCard(cid); virtualRegion.SetRegionInfo(3, CardConfigManager.GetCardConfig(cid).Quality+1); var jobId = CardConfigManager.GetCardConfig(cid).JobId; if (jobId > 0) { jobId = ConfigData.GetJobConfig(jobId).JobIndex; } virtualRegion.SetRegionInfo(4, jobId); card.SetData(dcard); if (card.GetCardType() == CardTypes.Monster) { MonsterCard monsterCard = card as MonsterCard; if (monsterCard != null) { CheckMonster(monsterCard, ref effectName); } } } string nowEffectName = ""; if (coverEffect != null) { nowEffectName = coverEffect.Name; } if (effectName != nowEffectName) { if (effectName == "") { coverEffect = null; } else { coverEffect = new CoverEffect(EffectBook.GetEffect(effectName), new Point(X + 20, Y + 20), new Size(160, 180)); } } tooltip.Hide(parent); if (Invalidate != null) { Invalidate(); } }
public CardDetail(UserControl control, int x, int y, int height) { card = SpecialCards.NullCard; parent = control; X = x; Y = y; Width = 200; Height = height; virtualRegion = new VirtualRegion(control); virtualRegion.AddRegion(new SubVirtualRegion(1, x + 60, y + 170, 24, 24, 1)); virtualRegion.AddRegion(new SubVirtualRegion(2, x + 88, y + 170, 24, 24, 2)); virtualRegion.AddRegion(new PictureRegion(3, x + 116, y + 170, 24, 24, 3, VirtualRegionCellType.CardQual, 0)); virtualRegion.AddRegion(new PictureRegion(4, x + 146, y + 25, 24, 24, 4, VirtualRegionCellType.Job, 0)); virtualRegion.RegionEntered += new VirtualRegion.VRegionEnteredEventHandler(virtualRegion_RegionEntered); virtualRegion.RegionLeft += new VirtualRegion.VRegionLeftEventHandler(virtualRegion_RegionLeft); }