示例#1
0
 private Image GetTerrainImage(int monType, double[] attrAtk, double[] attrDef)
 {//todo
     ControlPlus.TipImage tipData = new ControlPlus.TipImage();
     tipData.AddTextNewLine("属性:" + HSTypes.I2Attr(monType), "White", 20);
     for (int i = 0; i <= 6; i++)
     {
         tipData.AddTextNewLine("Vs", "Yellow", 16);
         tipData.AddImageXY(HSIcons.GetIconsByEName("atr" + i), 0, 0, 32, 32, 23, 20 + i * 16 + 1, 14, 14);
         //  tipData.AddText(string.Format("    AT={0}%",100+attrAtk[i]*100), attrAtk[i]==0?"White": attrAtk[i]>0?"Lime": "Red");
         tipData.AddTextOff(string.Format("DF={0}%", 100 + attrDef[i] * 100), attrDef[i] == 0 ? "White" : attrDef[i] > 0 ? "Lime" : "Red", 50);
     }
     return(tipData.Image);
 }
示例#2
0
        private void virtualRegion_RegionEntered(int id, int x, int y, int key)
        {
            if (cid == -1 || !Enabled)
            {
                return;
            }

            if (id == 3)
            {
                Image image = DrawTool.GetImageByString("品质:" + HSTypes.I2Quality(key - 1), 100);
                tooltip.Show(image, parent, x, y);
                return;
            }
            else if (id == 4)
            {
                if (key > 0)
                {
                    Image image = DrawTool.GetImageByString("职业限定:" + ConfigData.GetJobConfig(key + JobConfig.Indexer.NewBie).Name, 100);
                    tooltip.Show(image, parent, x, y);
                }
                return;
            }

            var cardType = card.GetCardType();

            if (cardType == CardTypes.Monster)
            {
                MonsterConfig monsterConfig = ConfigData.GetMonsterConfig(cid);
                if (id == 1)
                {
                    Image image = DrawTool.GetImageByString("种族:" + HSTypes.I2CardTypeSub(monsterConfig.Type), 100);
                    tooltip.Show(image, parent, x, y);
                }
                else
                {
                    Image image = GetTerrainImage(monsterConfig.Attr, monsterConfig.BuffImmune, monsterConfig.AttrDef);
                    tooltip.Show(image, parent, x, y);
                }
            }
            else if (cardType == CardTypes.Weapon)
            {
                WeaponConfig weaponConfig = ConfigData.GetWeaponConfig(cid);
                if (id == 1)
                {
                    Image image = DrawTool.GetImageByString("类型:" + HSTypes.I2CardTypeSub(weaponConfig.Type) + HSTypes.I2CardTypeDesSub(weaponConfig.Type), 150);
                    tooltip.Show(image, parent, x, y);
                }
                else
                {
                    Image image = DrawTool.GetImageByString("属性:" + HSTypes.I2Attr(weaponConfig.Attr), 100);
                    tooltip.Show(image, parent, x, y);
                }
            }
            else if (cardType == CardTypes.Spell)
            {
                SpellConfig spellConfig = ConfigData.GetSpellConfig(cid);
                if (id == 1)
                {
                    Image image = DrawTool.GetImageByString("类型:" + HSTypes.I2CardTypeSub(spellConfig.Type), 100);
                    tooltip.Show(image, parent, x, y);
                }
                else
                {
                    Image image = DrawTool.GetImageByString("属性:" + HSTypes.I2Attr(spellConfig.Attr), 100);
                    tooltip.Show(image, parent, x, y);
                }
            }
        }