Esempio n. 1
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);
                }
            }
        }