// Token: 0x06000396 RID: 918 RVA: 0x0001C030 File Offset: 0x0001A230
    public void paint(mGraphics g)
    {
        if (!this.isActive)
        {
            return;
        }
        int num       = MonsterDart.findDirIndexFromAngle(360 - this.angle);
        int num2      = (int)MonsterDart.FRAME[num];
        int transform = MonsterDart.TRANSFORM[num];

        for (int i = this.darts.size() / 2; i < this.darts.size(); i++)
        {
            SmallDart smallDart = (SmallDart)this.darts.elementAt(i);
            SmallImage.drawSmallImage(g, (int)this.info.tailBorder[smallDart.index], smallDart.x, smallDart.y, 0, 3);
        }
        int num3 = GameCanvas.gameTick % this.info.headBorder.Length;

        SmallImage.drawSmallImage(g, (int)this.info.headBorder[num3][num2], this.x, this.y, transform, 3);
        for (int j = 0; j < this.darts.size(); j++)
        {
            SmallDart smallDart2 = (SmallDart)this.darts.elementAt(j);
            SmallImage.drawSmallImage(g, (int)this.info.tail[smallDart2.index], smallDart2.x, smallDart2.y, 0, 3);
        }
        SmallImage.drawSmallImage(g, (int)this.info.head[num3][num2], this.x, this.y, transform, 3);
        for (int k = 0; k < this.darts.size(); k++)
        {
            SmallDart smallDart3 = (SmallDart)this.darts.elementAt(k);
            if (Res.abs(MonsterDart.r.nextInt(100)) < (int)this.info.xdPercent)
            {
                SmallImage.drawSmallImage(g, (int)((GameCanvas.gameTick % 2 != 0) ? this.info.xd2[smallDart3.index] : this.info.xd1[smallDart3.index]), smallDart3.x, smallDart3.y, 0, 3);
            }
        }
        g.setColor(16711680);
    }
Exemple #2
0
 // Token: 0x060003E2 RID: 994 RVA: 0x0001E49C File Offset: 0x0001C69C
 public static void drawSmallImage(mGraphics g, int id, int f, int x, int y, int w, int h, int transform, int anchor)
 {
     if (SmallImage.imgbig == null)
     {
         Small small = SmallImage.imgNew[id];
         if (small == null)
         {
             SmallImage.createImage(id);
         }
         else
         {
             g.drawRegion(small.img, 0, f * w, w, h, transform, x, y, anchor);
         }
         return;
     }
     if (SmallImage.smallImg != null)
     {
         if (id >= SmallImage.smallImg.Length || SmallImage.smallImg[id] == null || SmallImage.smallImg[id][1] >= 256 || SmallImage.smallImg[id][3] >= 256 || SmallImage.smallImg[id][2] >= 256 || SmallImage.smallImg[id][4] >= 256)
         {
             Small small2 = SmallImage.imgNew[id];
             if (small2 == null)
             {
                 SmallImage.createImage(id);
             }
             else
             {
                 small2.paint(g, transform, f, x, y, w, h, anchor);
             }
         }
         else if (SmallImage.smallImg[id][0] != 4 && SmallImage.imgbig[SmallImage.smallImg[id][0]] != null)
         {
             g.drawRegion(SmallImage.imgbig[SmallImage.smallImg[id][0]], 0, f * w, w, h, transform, x, y, anchor);
         }
         else
         {
             Small small3 = SmallImage.imgNew[id];
             if (small3 == null)
             {
                 SmallImage.createImage(id);
             }
             else
             {
                 small3.paint(g, transform, f, x, y, w, h, anchor);
             }
         }
     }
     else if (GameCanvas.currentScreen != GameScr.gI())
     {
         Small small4 = SmallImage.imgNew[id];
         if (small4 == null)
         {
             SmallImage.createImage(id);
         }
         else
         {
             small4.paint(g, transform, f, x, y, w, h, anchor);
         }
     }
 }
    // Token: 0x0600029F RID: 671 RVA: 0x00014700 File Offset: 0x00012900
    public void paint(mGraphics g)
    {
        int dx   = this.axTo - this.ax;
        int num  = this.ayTo - this.ay;
        int num2 = Arrow.findDirIndexFromAngle(Res.angle(dx, -num));

        SmallImage.drawSmallImage(g, this.arrp.imgId[(int)Arrow.FRAME[num2]], this.ax, this.ay, Arrow.TRANSFORM[num2], mGraphics.VCENTER | mGraphics.HCENTER);
    }
 // Token: 0x060008AC RID: 2220 RVA: 0x0007E2EC File Offset: 0x0007C4EC
 public void paintIcon(mGraphics g)
 {
     g.translate(-this.cmx, 0);
     PopUp.paintPopUp(g, this.x, this.y - 17, this.w, this.h + 17, -1, true);
     mFont.tahoma_7b_dark.drawString(g, mResources.select_clan_icon, this.x + this.w / 2, this.y - 7, 2);
     if (this.lastSelect >= 0 && this.lastSelect <= ClanImage.vClanImage.size() - 1)
     {
         ClanImage clanImage = (ClanImage)ClanImage.vClanImage.elementAt(this.lastSelect);
         if (clanImage.idImage != null)
         {
             global::Char.myCharz().paintBag(g, clanImage.idImage, GameCanvas.w / 2, this.y + 45, 1, false);
         }
     }
     global::Char.myCharz().paintCharBody(g, GameCanvas.w / 2, this.y + 45, 1, global::Char.myCharz().cf, false);
     g.setClip(this.x, this.y + this.disStart, this.w, this.h - this.disStart - 10);
     if (TabClanIcon.scrMain != null)
     {
         g.translate(0, -TabClanIcon.scrMain.cmy);
     }
     for (int i = 0; i < this.nItem; i++)
     {
         int num  = this.x + 10;
         int num2 = this.y + i * this.WIDTH + this.disStart;
         if (num2 + this.WIDTH - ((TabClanIcon.scrMain == null) ? 0 : TabClanIcon.scrMain.cmy) >= this.y + this.disStart && num2 - ((TabClanIcon.scrMain == null) ? 0 : TabClanIcon.scrMain.cmy) <= this.y + this.disStart + this.h)
         {
             ClanImage clanImage2 = (ClanImage)ClanImage.vClanImage.elementAt(i);
             mFont     mFont      = mFont.tahoma_7_grey;
             if (i == this.lastSelect)
             {
                 mFont = mFont.tahoma_7_blue;
             }
             if (clanImage2.name != null)
             {
                 mFont.drawString(g, clanImage2.name, num + 20, num2, 0);
             }
             if (clanImage2.xu > 0)
             {
                 mFont.drawString(g, clanImage2.xu + " " + mResources.XU, num + this.w - 20, num2, mFont.RIGHT);
             }
             else if (clanImage2.luong > 0)
             {
                 mFont.drawString(g, clanImage2.luong + " " + mResources.LUONG, num + this.w - 20, num2, mFont.RIGHT);
             }
             else
             {
                 mFont.drawString(g, mResources.free, num + this.w - 20, num2, mFont.RIGHT);
             }
             if (clanImage2.idImage != null)
             {
                 SmallImage.drawSmallImage(g, (int)clanImage2.idImage[0], num, num2, 0, 0);
             }
         }
     }
     g.translate(0, -g.getTranslateY());
     g.setClip(0, 0, GameCanvas.w, GameCanvas.h);
     GameCanvas.paintz.paintCmdBar(g, this.left, this.center, this.right);
 }
    // Token: 0x06000345 RID: 837 RVA: 0x00019214 File Offset: 0x00017414
    public void paint(mGraphics g, int x, int y)
    {
        SmallImage.drawSmallImage(g, (int)this.idIcon, x, y, 0, 3);
        string st = string.Empty;

        st = this.minute + "'";
        if (this.minute == 0)
        {
            st = this.second + "s";
        }
        mFont.tahoma_7b_white.drawString(g, st, x, y + 15, 2, mFont.tahoma_7b_dark);
    }
 protected override void Dispose(bool disposing)
 {
     if (disposing && RibbonDesigner.Current == null)
     {
         RemoveHandlers();
         if (SmallImage != null)
             SmallImage.Dispose();
         if (FlashSmallImage != null)
             FlashSmallImage.Dispose();
     }
     base.Dispose(disposing);
 }
        public bool Equals(ShortcutIconState other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(BackgroundColor == other.BackgroundColor &&
                   ForegroundText == other.ForegroundText &&
                   ShowNameOnSquare150X150Logo == other.ShowNameOnSquare150X150Logo &&
                   MediumImage.Equals(other.MediumImage) &&
                   SmallImage.Equals(other.SmallImage));
        }
 public void Dispose()
 {
     OriginalImage?.Dispose();
     OriginalImage = null;
     BigImage?.Dispose();
     BigImage = null;
     SmallImage?.Dispose();
     SmallImage = null;
     TinyImage?.Dispose();
     TinyImage = null;
     XtraTinyImage?.Dispose();
     XtraTinyImage = null;
 }
    // Token: 0x06000360 RID: 864 RVA: 0x0001A1F8 File Offset: 0x000183F8
    public void paintHead(mGraphics g, int xStart, int yStart)
    {
        Part part = GameScr.parts[this.template.headId];

        if (this.cdir == 1)
        {
            SmallImage.drawSmallImage(g, (int)part.pi[global::Char.CharInfo[this.cf][0][0]].id, GameCanvas.w - 31 - g.getTranslateX(), 2 - g.getTranslateY(), 0, 0);
        }
        else
        {
            SmallImage.drawSmallImage(g, (int)part.pi[global::Char.CharInfo[this.cf][0][0]].id, GameCanvas.w - 31 - g.getTranslateX(), 2 - g.getTranslateY(), 2, 24);
        }
    }
        public override async void OnNavigatedTo(string parameter, NavigationMode mode, IDictionary <string, object> state)
        {
            JsonObject data = JsonObject.Parse(parameter);

            TileTitle  = data.GetNamedString("tile_title");
            PageHeader = data.GetNamedString("header");
            Action     = data.GetNamedString("action");
            m_id       = data.GetNamedString("id");
            if (mode == NavigationMode.Back)
            {
                int key = (int)state["key"];
                var d   = (JsonObject)TempDataStore.GetInstance().GetObject(key);
                SetImageData(d.GetNamedObject("logo"), m_logoImage);
                SetImageData(d.GetNamedObject("small"), m_smallImage);
                SetImageData(d.GetNamedObject("wide"), m_wideImage);
                SetImageData(d.GetNamedObject("large"), m_largeImage);
                UseDarkText = d.GetNamedBoolean("use_dark");
            }
            else
            {
                await WideImage.SetImageSource("");

                await SmallImage.SetImageSource("");

                await LogoImage.SetImageSource("");

                await LargeImage.SetImageSource("");

                string uri = "";
                if (data.ContainsKey("image_wide_url"))
                {
                    uri = data.GetNamedString("image_wide_url");
                    await WideImage.SetImageSource(uri);
                }
                if (uri != "")
                {
                    if (WideImage.ImageSource == null)
                    {
                        await WideImage.SetImageSource(uri);
                    }
                    if (LogoImage.ImageSource == null)
                    {
                        await LogoImage.SetImageSource(uri);
                    }
                    //if (String.IsNullOrEmpty(SmallImage.ImageSource))
                    //    await SmallImage.SetImageSource(uri);
                    //if (String.IsNullOrEmpty(LargeImage.ImageSource))
                    //    await LargeImage.SetImageSource(uri);
                }
            }
        }
Exemple #11
0
        /// <summary>
        /// When overridden in a derived class, is invoked whenever application code or internal processes call <see cref="M:System.Windows.FrameworkElement.ApplyTemplate"/>.
        /// </summary>
        public override void OnApplyTemplate()
        {
            _flashOn            = (Template.Resources["FlashOn"] as Storyboard).Clone();
            _flashOn.Completed += Flash_Completed;
            _flashOff           = (Template.Resources["FlashOff"] as Storyboard).Clone();
            _largeImage         = GetTemplateChild("PART_LargeImage") as LargeImage;
            _largeNews          = GetTemplateChild("PART_LargeNews") as LargeNews;
            _largeTweet         = GetTemplateChild("PART_LargeTweet") as LargeTweet;
            _smallImage         = GetTemplateChild("PART_SmallImage") as SmallImage;
            _smallNews          = GetTemplateChild("PART_SmallNews") as SmallNews;
            _smallTweet         = GetTemplateChild("PART_SmallTweet") as SmallTweet;

            base.OnApplyTemplate();
        }
Exemple #12
0
        public bool Equals(ShortcutItemState other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(BackgroundColor == other?.BackgroundColor &&
                   ForegroundText == other?.ForegroundText &&
                   ShowNameOnSquare150X150Logo == other?.ShowNameOnSquare150X150Logo &&
                   MediumImage.Equals(other.MediumImage) &&
                   SmallImage.Equals(other.SmallImage) &&
                   UseSystemAccentColor == other.UseSystemAccentColor &&
                   TileIconifierColorSelection == other.TileIconifierColorSelection &&
                   TileIconifierCreatedWithUpgrade == other.TileIconifierCreatedWithUpgrade);
        }
Exemple #13
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         RemoveHandlers();
         if (SmallImage != null)
         {
             SmallImage.Dispose();
         }
         if (FlashSmallImage != null)
         {
             FlashSmallImage.Dispose();
         }
     }
     base.Dispose(disposing);
 }
Exemple #14
0
 // Token: 0x060003E1 RID: 993 RVA: 0x0001E328 File Offset: 0x0001C528
 public static void drawSmallImage(mGraphics g, int id, int x, int y, int transform, int anchor)
 {
     if (SmallImage.imgbig == null)
     {
         Small small = SmallImage.imgNew[id];
         if (small == null)
         {
             SmallImage.createImage(id);
         }
         else
         {
             g.drawRegion(small, 0, 0, mGraphics.getImageWidth(small.img), mGraphics.getImageHeight(small.img), transform, x, y, anchor);
         }
         return;
     }
     if (SmallImage.smallImg != null)
     {
         if (id >= SmallImage.smallImg.Length || SmallImage.smallImg[id][1] >= 256 || SmallImage.smallImg[id][3] >= 256 || SmallImage.smallImg[id][2] >= 256 || SmallImage.smallImg[id][4] >= 256)
         {
             Small small2 = SmallImage.imgNew[id];
             if (small2 == null)
             {
                 SmallImage.createImage(id);
             }
             else
             {
                 small2.paint(g, transform, x, y, anchor);
             }
         }
         else if (SmallImage.imgbig[SmallImage.smallImg[id][0]] != null)
         {
             g.drawRegion(SmallImage.imgbig[SmallImage.smallImg[id][0]], SmallImage.smallImg[id][1], SmallImage.smallImg[id][2], SmallImage.smallImg[id][3], SmallImage.smallImg[id][4], transform, x, y, anchor);
         }
     }
     else if (GameCanvas.currentScreen != GameScr.gI())
     {
         Small small3 = SmallImage.imgNew[id];
         if (small3 == null)
         {
             SmallImage.createImage(id);
         }
         else
         {
             small3.paint(g, transform, x, y, anchor);
         }
     }
 }
 // Token: 0x06000321 RID: 801 RVA: 0x00018590 File Offset: 0x00016790
 public void paint(mGraphics g)
 {
     if (this.isAuraItem())
     {
         g.drawImage(TileMap.bong, this.x + 3, this.y, mGraphics.VCENTER | mGraphics.HCENTER);
         if ((int)this.status <= 0)
         {
             if (this.countAura < 10)
             {
                 g.drawImage(ItemMap.imageAuraItem1, this.x, this.y + (int)this.status + 3, mGraphics.BOTTOM | mGraphics.HCENTER);
             }
             else
             {
                 g.drawImage(ItemMap.imageAuraItem2, this.x, this.y + (int)this.status + 3, mGraphics.BOTTOM | mGraphics.HCENTER);
             }
         }
         else if (this.countAura < 10)
         {
             g.drawImage(ItemMap.imageAuraItem1, this.x, this.y + 3, mGraphics.BOTTOM | mGraphics.HCENTER);
         }
         else
         {
             g.drawImage(ItemMap.imageAuraItem2, this.x, this.y + 3, mGraphics.BOTTOM | mGraphics.HCENTER);
         }
     }
     else if (!this.isAuraItem())
     {
         if (GameCanvas.gameTick % 4 == 0)
         {
             g.drawImage(ItemMap.imageFlare, this.x, this.y + (int)this.status + 13, mGraphics.BOTTOM | mGraphics.HCENTER);
         }
         if ((int)this.status <= 0)
         {
             SmallImage.drawSmallImage(g, (int)this.template.iconID, this.x, this.y + (int)this.status + 3, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
         }
         else
         {
             SmallImage.drawSmallImage(g, (int)this.template.iconID, this.x, this.y + 3, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
         }
         if (global::Char.myCharz().itemFocus != null && global::Char.myCharz().itemFocus.Equals(this) && (int)this.status != 2)
         {
             g.drawRegion(Mob.imgHP, 0, 24, 9, 6, 0, this.x, this.y - 17, 3);
         }
     }
 }
Exemple #16
0
        public void Save()
        {
            var product = new ProductProperties[1];

            product[0] = new ProductProperties()
            {
                InteropID                        = InteropID,
                NewInteropID                     = NewInteropID,
                ProductID                        = ID,
                Name                             = Name,
                UNSPSC                           = UNSPSC,
                UnitOfMeasure                    = UnitOfMeasure,
                Description                      = Description,
                Type                             = Type,
                StandardOrders                   = StandardOrders,
                ReplenishmentOrders              = ReplenishmentOrders,
                PriceRequests                    = PriceRequests,
                QuantityMultiplier               = QuantityMultiplier,
                ShipWeight                       = ShipWeight,
                TrackInventory                   = TrackInventory,
                AllowOrdersToExceedInventory     = AllowOrdersToExceedInventory,
                UseVariantLevelInventoryTracking = UseVariantLevelInventoryTracking,
                InventoryNotificationPoint       = InventoryNotificationPoint,
                DisplayInventoryToBuyer          = DisplayInventoryToBuyer,
                SmallImage                       = SmallImage == null ? null : SmallImage.ToFile(),
                LargeImage                       = LargeImage == null ? null : LargeImage.ToFile(),
                Active                           = Active
            };
            var error = _product.SaveProducts(product, this.SharedSecret);

            if (error.Length > 0)
            {
                throw new Exception(error[0].InteropID + " failed: " + error[0].ErrorMessage);
            }
            Variants.ForEach(v => v.Save(product[0]));
            PriceSchedules.ForEach(p => p.Save(product[0]));
            if (TrackInventory)
            {
                UpdateInventory();
            }
            PriceScheduleAssignments.ForEach(p => p.Save(this.InteropID));
        }
 // Token: 0x0600034D RID: 845 RVA: 0x000194C0 File Offset: 0x000176C0
 public override void paint(mGraphics g)
 {
     if (this.id == 0)
     {
         return;
     }
     SmallImage.drawSmallImage(g, this.id, this.cx, this.cy, 0, StaticObj.BOTTOM_HCENTER);
     if (global::Char.myCharz().npcFocus != null && global::Char.myCharz().npcFocus.Equals(this))
     {
         g.drawRegion(Mob.imgHP, 0, 0, 9, 6, 0, this.cx, this.cy - SmallImage.smallImg[this.id][4] - 1, mGraphics.BOTTOM | mGraphics.HCENTER);
         if (this.name != null)
         {
             mFont.tahoma_7b_white.drawString(g, this.name, this.cx, this.cy - SmallImage.smallImg[this.id][4] - 20, mFont.CENTER, mFont.tahoma_7_grey);
         }
     }
     else if (this.name != null)
     {
         mFont.tahoma_7b_white.drawString(g, this.name, this.cx, this.cy - SmallImage.smallImg[this.id][4] - 17, mFont.CENTER, mFont.tahoma_7_grey);
     }
     try
     {
         for (int i = 0; i < this.currPeas; i++)
         {
             g.drawImage(MagicTree.pea, this.cx + this.peaPostionX[i] - SmallImage.smallImg[this.id][3] / 2, this.cy + this.peaPostionY[i] - SmallImage.smallImg[this.id][4], 0);
         }
     }
     catch (Exception ex)
     {
     }
     if (this.indexEffTask >= 0 && this.effTask != null && (int)this.cTypePk == 0)
     {
         SmallImage.drawSmallImage(g, this.effTask.arrEfInfo[this.indexEffTask].idImg, this.cx + this.effTask.arrEfInfo[this.indexEffTask].dx + SmallImage.smallImg[this.id][3] / 2 + 5, this.cy - 15 + this.effTask.arrEfInfo[this.indexEffTask].dy, 0, mGraphics.VCENTER | mGraphics.HCENTER);
         if (GameCanvas.gameTick % 2 == 0)
         {
             this.indexEffTask++;
             if (this.indexEffTask >= this.effTask.arrEfInfo.Length)
             {
                 this.indexEffTask = 0;
             }
         }
     }
 }
 // Token: 0x06000325 RID: 805 RVA: 0x00018900 File Offset: 0x00016B00
 public void paintAuraItemEff(mGraphics g)
 {
     if (!GameCanvas.lowGraphic && this.isAuraItem())
     {
         for (int i = 0; i < this.yArg.Length; i++)
         {
             if (this.count == i)
             {
                 if (this.countAura <= 20)
                 {
                     g.drawImage(ItemMap.imageAuraItem3, this.xDot[i], this.yDot[i] + 3, mGraphics.BOTTOM | mGraphics.HCENTER);
                 }
                 else
                 {
                     SmallImage.drawSmallImage(g, (int)this.template.iconID, this.xDot[i], this.yDot[i] + 3, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
                 }
             }
         }
     }
 }
    // Token: 0x060003C4 RID: 964 RVA: 0x0001DE04 File Offset: 0x0001C004
    public void paint(int x, int y, mGraphics g)
    {
        SmallImage.drawSmallImage(g, this.template.iconId, x, y, 0, StaticObj.VCENTER_HCENTER);
        long num  = mSystem.currentTimeMillis();
        long num2 = num - this.lastTimeUseThisSkill;

        if (num2 < (long)this.coolDown)
        {
            g.setColor(2721889, 0.7f);
            if (this.paintCanNotUseSkill && GameCanvas.gameTick % 6 > 2)
            {
                g.setColor(876862);
            }
            int num3 = (int)(num2 * 20L / (long)this.coolDown);
            g.fillRect(x - 10, y - 10 + num3, 20, 20 - num3);
        }
        else
        {
            this.paintCanNotUseSkill = false;
        }
    }
Exemple #20
0
        /// <summary>
        /// When overridden in a derived class, is invoked whenever application code or internal processes call <see cref="M:System.Windows.FrameworkElement.ApplyTemplate"/>.
        /// </summary>
        public override void OnApplyTemplate()
        {
            _smallImage = GetTemplateChild("PART_SmallImage") as SmallImage;
            _smallNews  = GetTemplateChild("PART_SmallNews") as SmallNews;
            _smallTweet = GetTemplateChild("PART_SmallTweet") as SmallTweet;
            _banBtn     = GetTemplateChild("PART_BanBtn") as SurfaceButton;
            _deleteBtn  = GetTemplateChild("PART_DeleteBtn") as SurfaceButton;

            _banBtn.Click    += AdminBtn_Click;
            _deleteBtn.Click += AdminBtn_Click;

            _breaking = (Template.Resources["Breaking"] as Storyboard).Clone();

            _parentProxy = this.FindVisualParent <ItemProxy>();

            if (_parentProxy != null)
            {
                _smallImage.Image.ImageLoaded += (sender, e) => _parentProxy.IsEnabled = true;
            }

            base.OnApplyTemplate();
        }
Exemple #21
0
 // Token: 0x06000752 RID: 1874 RVA: 0x0006288C File Offset: 0x00060A8C
 public virtual void paint(mGraphics g)
 {
     if (this.isShadown && this.status != 0)
     {
         this.paintShadow(g);
     }
     if (!this.isPaint())
     {
         return;
     }
     if (this.status == 1 && this.p3 > 0 && GameCanvas.gameTick % 3 == 0)
     {
         return;
     }
     g.translate(0, GameCanvas.transY);
     if (!this.changBody)
     {
         Mob.arrMobTemplate[this.templateId].data.paintFrame(g, this.frame, this.x, this.y + this.fy, (this.dir != 1) ? 1 : 0, 2);
     }
     else
     {
         SmallImage.drawSmallImage(g, (int)this.smallBody, this.x, this.y + this.fy - 14, 0, 3);
     }
     g.translate(0, -GameCanvas.transY);
     if (global::Char.myCharz().mobFocus != null && global::Char.myCharz().mobFocus.Equals(this) && this.status != 1)
     {
         int num = (int)((long)this.hp * 100L / (long)this.maxHp) / 10 - 1;
         if (num < 0)
         {
             num = 0;
         }
         if (num > 9)
         {
             num = 9;
         }
         g.drawRegion(Mob.imgHP, 0, 6 * (9 - num), 9, 6, 0, this.x, this.y - this.h - 10, 3);
     }
 }
 // Token: 0x060008AA RID: 2218 RVA: 0x000071B0 File Offset: 0x000053B0
 public void hide()
 {
     this.cmtoX = this.x + this.w;
     SmallImage.clearHastable();
 }
 // Token: 0x06000361 RID: 865 RVA: 0x0001A2A0 File Offset: 0x000184A0
 public override void paint(mGraphics g)
 {
     if (global::Char.isLoadingMap)
     {
         return;
     }
     if (this.isHide)
     {
         return;
     }
     if (!base.isPaint())
     {
         return;
     }
     if (this.statusMe == 15)
     {
         return;
     }
     if ((int)this.cTypePk != 0)
     {
         base.paint(g);
         return;
     }
     if (this.template == null)
     {
         return;
     }
     if (this.template.npcTemplateId != 4 && this.template.npcTemplateId != 51 && this.template.npcTemplateId != 50)
     {
         g.drawImage(TileMap.bong, this.cx, this.cy, 3);
     }
     if (this.template.npcTemplateId == 3)
     {
         SmallImage.drawSmallImage(g, 265, this.cx, this.cy, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
         if (global::Char.myCharz().npcFocus != null && global::Char.myCharz().npcFocus.Equals(this))
         {
             if (ChatPopup.currChatPopup == null)
             {
                 g.drawRegion(Mob.imgHP, 0, 0, 9, 6, 0, this.cx, this.cy - this.ch + 4, mGraphics.BOTTOM | mGraphics.HCENTER);
             }
         }
         this.dyEff = 60;
     }
     else if (this.template.npcTemplateId != 4)
     {
         if (this.template.npcTemplateId == 50 || this.template.npcTemplateId == 51)
         {
             if (this.duahau != null)
             {
                 if (this.template.npcTemplateId == 50 && Npc.mabuEff)
                 {
                     Npc.tMabuEff++;
                     if (GameCanvas.gameTick % 3 == 0)
                     {
                         Effect me = new Effect(19, this.cx + Res.random(-50, 50), this.cy, 2, 1, -1);
                         EffecMn.addEff(me);
                     }
                     if (GameCanvas.gameTick % 15 == 0)
                     {
                         Effect me2 = new Effect(18, this.cx + Res.random(-5, 5), this.cy + Res.random(-90, 0), 2, 1, -1);
                         EffecMn.addEff(me2);
                     }
                     if (Npc.tMabuEff == 100)
                     {
                         GameScr.gI().activeSuperPower(this.cx, this.cy);
                     }
                     if (Npc.tMabuEff == 110)
                     {
                         Npc.mabuEff = false;
                         this.template.npcTemplateId = 4;
                     }
                 }
                 int num = 0;
                 if (SmallImage.imgNew[this.duahau[this.duaHauIndex]] != null && SmallImage.imgNew[this.duahau[this.duaHauIndex]].img != null)
                 {
                     num = mGraphics.getImageHeight(SmallImage.imgNew[this.duahau[this.duaHauIndex]].img);
                 }
                 SmallImage.drawSmallImage(g, this.duahau[this.duaHauIndex], this.cx + Res.random(-1, 1), this.cy, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
                 if (global::Char.myCharz().npcFocus != null && global::Char.myCharz().npcFocus.Equals(this))
                 {
                     if (ChatPopup.currChatPopup == null)
                     {
                         g.drawRegion(Mob.imgHP, 0, 0, 9, 6, 0, this.cx, this.cy - this.ch - 9 + 16 - num, mGraphics.BOTTOM | mGraphics.HCENTER);
                     }
                     mFont.tahoma_7b_white.drawString(g, NinjaUtil.getTime(this.seconds), this.cx, this.cy - this.ch - 16 - mFont.tahoma_7.getHeight() - 20 - num + 16, mFont.CENTER, mFont.tahoma_7b_dark);
                 }
                 else
                 {
                     mFont.tahoma_7b_white.drawString(g, NinjaUtil.getTime(this.seconds), this.cx, this.cy - this.ch - 8 - mFont.tahoma_7.getHeight() - 20 - num + 16, mFont.CENTER, mFont.tahoma_7b_dark);
                 }
             }
         }
         else if (this.template.npcTemplateId == 6)
         {
             SmallImage.drawSmallImage(g, 545, this.cx, this.cy + 5, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
             if (global::Char.myCharz().npcFocus != null && global::Char.myCharz().npcFocus.Equals(this))
             {
                 if (ChatPopup.currChatPopup == null)
                 {
                     g.drawRegion(Mob.imgHP, 0, 0, 9, 6, 0, this.cx, this.cy - this.ch - 9, mGraphics.BOTTOM | mGraphics.HCENTER);
                 }
             }
             mFont.tahoma_7b_white.drawString(g, TileMap.zoneID + string.Empty, this.cx, this.cy - this.ch + 19 - mFont.tahoma_7.getHeight(), mFont.CENTER);
         }
         else
         {
             int  headId = this.template.headId;
             int  legId  = this.template.legId;
             int  bodyId = this.template.bodyId;
             Part part   = GameScr.parts[headId];
             Part part2  = GameScr.parts[legId];
             Part part3  = GameScr.parts[bodyId];
             if (this.cdir == 1)
             {
                 SmallImage.drawSmallImage(g, (int)part.pi[global::Char.CharInfo[this.cf][0][0]].id, this.cx + global::Char.CharInfo[this.cf][0][1] + (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dx, this.cy - global::Char.CharInfo[this.cf][0][2] + (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dy, 0, 0);
                 SmallImage.drawSmallImage(g, (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].id, this.cx + global::Char.CharInfo[this.cf][1][1] + (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dx, this.cy - global::Char.CharInfo[this.cf][1][2] + (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dy, 0, 0);
                 SmallImage.drawSmallImage(g, (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].id, this.cx + global::Char.CharInfo[this.cf][2][1] + (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dx, this.cy - global::Char.CharInfo[this.cf][2][2] + (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dy, 0, 0);
             }
             else
             {
                 SmallImage.drawSmallImage(g, (int)part.pi[global::Char.CharInfo[this.cf][0][0]].id, this.cx - global::Char.CharInfo[this.cf][0][1] - (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dx, this.cy - global::Char.CharInfo[this.cf][0][2] + (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dy, 2, 24);
                 SmallImage.drawSmallImage(g, (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].id, this.cx - global::Char.CharInfo[this.cf][1][1] - (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dx, this.cy - global::Char.CharInfo[this.cf][1][2] + (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dy, 2, 24);
                 SmallImage.drawSmallImage(g, (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].id, this.cx - global::Char.CharInfo[this.cf][2][1] - (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dx, this.cy - global::Char.CharInfo[this.cf][2][2] + (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dy, 2, 24);
             }
             if (TileMap.mapID != 51)
             {
                 int num2 = 15;
                 if (this.template.npcTemplateId == 47)
                 {
                     num2 = 47;
                 }
                 if (global::Char.myCharz().npcFocus != null && global::Char.myCharz().npcFocus.Equals(this))
                 {
                     if (ChatPopup.currChatPopup == null)
                     {
                         g.drawRegion(Mob.imgHP, 0, 0, 9, 6, 0, this.cx, this.cy - this.ch - (num2 - 8), mGraphics.BOTTOM | mGraphics.HCENTER);
                     }
                 }
                 else if (this.template.npcTemplateId == 47)
                 {
                 }
             }
             this.dyEff = 65;
         }
     }
     if (this.indexEffTask >= 0 && this.effTask != null && (int)this.cTypePk == 0)
     {
         SmallImage.drawSmallImage(g, this.effTask.arrEfInfo[this.indexEffTask].idImg, this.cx + this.effTask.arrEfInfo[this.indexEffTask].dx, this.cy + this.effTask.arrEfInfo[this.indexEffTask].dy - this.dyEff, 0, mGraphics.VCENTER | mGraphics.HCENTER);
         if (GameCanvas.gameTick % 2 == 0)
         {
             this.indexEffTask++;
             if (this.indexEffTask >= this.effTask.arrEfInfo.Length)
             {
                 this.indexEffTask = 0;
             }
         }
     }
     if (this.chatInfo != null)
     {
         this.chatInfo.paint(g, this.cx, this.cy - this.ch, this.cdir);
     }
 }
Exemple #24
0
 // Token: 0x06000840 RID: 2112 RVA: 0x000797BC File Offset: 0x000779BC
 public void paint(mGraphics g)
 {
     SmallImage.drawSmallImage(g, (int)this.smallID, this.f, this.cmx, this.cmy + 3 + ((GameCanvas.gameTick % 10 <= 5) ? 0 : 1), 32, 32, (this.dir != 1) ? 2 : 0, StaticObj.VCENTER_HCENTER);
 }
    // Token: 0x0600061A RID: 1562 RVA: 0x0004B974 File Offset: 0x00049B74
    public override void paint(mGraphics g)
    {
        if (global::Char.isLoadingMap)
        {
            return;
        }
        GameCanvas.paintBGGameScr(g);
        g.translate(-GameScr.cmx, -GameScr.cmy);
        if (!GameCanvas.lowGraphic)
        {
            for (int i = 0; i < MapTemplate.vCurrItem[CreateCharScr.indexGender].size(); i++)
            {
                BgItem bgItem = (BgItem)MapTemplate.vCurrItem[CreateCharScr.indexGender].elementAt(i);
                if (bgItem.idImage != -1 && (int)bgItem.layer == 1)
                {
                    bgItem.paint(g);
                }
            }
        }
        TileMap.paintTilemap(g);
        int num = 30;

        if (GameCanvas.w == 128)
        {
            num = 20;
        }
        int num2 = CreateCharScr.hairID[CreateCharScr.indexGender][CreateCharScr.indexHair];
        int num3 = CreateCharScr.defaultLeg[CreateCharScr.indexGender];
        int num4 = CreateCharScr.defaultBody[CreateCharScr.indexGender];

        g.drawImage(TileMap.bong, this.cx, this.cy + this.dy, 3);
        Part part  = GameScr.parts[num2];
        Part part2 = GameScr.parts[num3];
        Part part3 = GameScr.parts[num4];

        SmallImage.drawSmallImage(g, (int)part.pi[global::Char.CharInfo[this.cf][0][0]].id, this.cx + global::Char.CharInfo[this.cf][0][1] + (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dx, this.cy - global::Char.CharInfo[this.cf][0][2] + (int)part.pi[global::Char.CharInfo[this.cf][0][0]].dy + this.dy, 0, 0);
        SmallImage.drawSmallImage(g, (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].id, this.cx + global::Char.CharInfo[this.cf][1][1] + (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dx, this.cy - global::Char.CharInfo[this.cf][1][2] + (int)part2.pi[global::Char.CharInfo[this.cf][1][0]].dy + this.dy, 0, 0);
        SmallImage.drawSmallImage(g, (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].id, this.cx + global::Char.CharInfo[this.cf][2][1] + (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dx, this.cy - global::Char.CharInfo[this.cf][2][2] + (int)part3.pi[global::Char.CharInfo[this.cf][2][0]].dy + this.dy, 0, 0);
        if (!GameCanvas.lowGraphic)
        {
            for (int j = 0; j < MapTemplate.vCurrItem[CreateCharScr.indexGender].size(); j++)
            {
                BgItem bgItem2 = (BgItem)MapTemplate.vCurrItem[CreateCharScr.indexGender].elementAt(j);
                if (bgItem2.idImage != -1 && (int)bgItem2.layer == 3)
                {
                    bgItem2.paint(g);
                }
            }
        }
        g.translate(-g.getTranslateX(), -g.getTranslateY());
        if (GameCanvas.w < 200)
        {
            GameCanvas.paintz.paintFrame(GameScr.popupX, GameScr.popupY, GameScr.popupW, GameScr.popupH, g);
            SmallImage.drawSmallImage(g, (int)part.pi[global::Char.CharInfo[0][0][0]].id, GameCanvas.w / 2 + global::Char.CharInfo[0][0][1] + (int)part.pi[global::Char.CharInfo[0][0][0]].dx, GameScr.popupY + 30 + 3 * num - global::Char.CharInfo[0][0][2] + (int)part.pi[global::Char.CharInfo[0][0][0]].dy + this.dy, 0, 0);
            SmallImage.drawSmallImage(g, (int)part2.pi[global::Char.CharInfo[0][1][0]].id, GameCanvas.w / 2 + global::Char.CharInfo[0][1][1] + (int)part2.pi[global::Char.CharInfo[0][1][0]].dx, GameScr.popupY + 30 + 3 * num - global::Char.CharInfo[0][1][2] + (int)part2.pi[global::Char.CharInfo[0][1][0]].dy + this.dy, 0, 0);
            SmallImage.drawSmallImage(g, (int)part3.pi[global::Char.CharInfo[0][2][0]].id, GameCanvas.w / 2 + global::Char.CharInfo[0][2][1] + (int)part3.pi[global::Char.CharInfo[0][2][0]].dx, GameScr.popupY + 30 + 3 * num - global::Char.CharInfo[0][2][2] + (int)part3.pi[global::Char.CharInfo[0][2][0]].dy + this.dy, 0, 0);
            for (int k = 0; k < mResources.MENUNEWCHAR.Length; k++)
            {
                if (CreateCharScr.selected == k)
                {
                    g.drawRegion(GameScr.arrow, 0, 0, 13, 16, 2, GameScr.popupX + 10 + ((GameCanvas.gameTick % 7 <= 3) ? 0 : 1), GameScr.popupY + 35 + k * num, StaticObj.VCENTER_HCENTER);
                    g.drawRegion(GameScr.arrow, 0, 0, 13, 16, 0, GameScr.popupX + GameScr.popupW - 10 - ((GameCanvas.gameTick % 7 <= 3) ? 0 : 1), GameScr.popupY + 35 + k * num, StaticObj.VCENTER_HCENTER);
                }
                mFont.tahoma_7b_dark.drawString(g, mResources.MENUNEWCHAR[k], GameScr.popupX + 20, GameScr.popupY + 30 + k * num, 0);
            }
            mFont.tahoma_7b_dark.drawString(g, mResources.MENUGENDER[CreateCharScr.indexGender], GameScr.popupX + 70, GameScr.popupY + 30 + 1 * num, mFont.LEFT);
            mFont.tahoma_7b_dark.drawString(g, mResources.hairStyleName[CreateCharScr.indexGender][CreateCharScr.indexHair], GameScr.popupX + 55, GameScr.popupY + 30 + 2 * num, mFont.LEFT);
            CreateCharScr.tAddName.paint(g);
        }
        else
        {
            if (!Main.isPC)
            {
                if (mGraphics.addYWhenOpenKeyBoard != 0)
                {
                    this.yButton = 110;
                    this.disY    = 60;
                    if (GameCanvas.w > GameCanvas.h)
                    {
                        this.yButton = GameScr.popupY + 30 + 3 * num + (int)part3.pi[global::Char.CharInfo[0][2][0]].dy + this.dy - 15;
                        this.disY    = 35;
                    }
                }
                else
                {
                    this.yButton = 110;
                    this.disY    = 60;
                    if (GameCanvas.w > GameCanvas.h)
                    {
                        this.yButton = 100;
                        this.disY    = 45;
                    }
                }
                CreateCharScr.tAddName.y = this.yButton - CreateCharScr.tAddName.height - this.disY + 5;
            }
            else
            {
                this.yButton = 110;
                this.disY    = 60;
                if (GameCanvas.w > GameCanvas.h)
                {
                    this.yButton = 100;
                    this.disY    = 45;
                }
                CreateCharScr.tAddName.y = this.yBegin;
            }
            for (int l = 0; l < 3; l++)
            {
                int num5 = 78;
                if (l != CreateCharScr.indexGender)
                {
                    g.drawImage(GameScr.imgLbtn, GameCanvas.w / 2 - num5 + l * num5, this.yButton, 3);
                }
                else
                {
                    if (CreateCharScr.selected == 1)
                    {
                        g.drawRegion(GameScr.arrow, 0, 0, 13, 16, 4, GameCanvas.w / 2 - num5 + l * num5, this.yButton - 20 + ((GameCanvas.gameTick % 7 <= 3) ? 0 : 1), StaticObj.VCENTER_HCENTER);
                    }
                    g.drawImage(GameScr.imgLbtnFocus, GameCanvas.w / 2 - num5 + l * num5, this.yButton, 3);
                }
                mFont.tahoma_7b_dark.drawString(g, mResources.MENUGENDER[l], GameCanvas.w / 2 - num5 + l * num5, this.yButton - 5, mFont.CENTER);
            }
            for (int m = 0; m < 3; m++)
            {
                int num6 = 78;
                if (m != CreateCharScr.indexHair)
                {
                    g.drawImage(GameScr.imgLbtn, GameCanvas.w / 2 - num6 + m * num6, this.yButton + this.disY, 3);
                }
                else
                {
                    if (CreateCharScr.selected == 2)
                    {
                        g.drawRegion(GameScr.arrow, 0, 0, 13, 16, 4, GameCanvas.w / 2 - num6 + m * num6, this.yButton + this.disY - 20 + ((GameCanvas.gameTick % 7 <= 3) ? 0 : 1), StaticObj.VCENTER_HCENTER);
                    }
                    g.drawImage(GameScr.imgLbtnFocus, GameCanvas.w / 2 - num6 + m * num6, this.yButton + this.disY, 3);
                }
                mFont.tahoma_7b_dark.drawString(g, mResources.hairStyleName[CreateCharScr.indexGender][m], GameCanvas.w / 2 - num6 + m * num6, this.yButton + this.disY - 5, mFont.CENTER);
            }
            CreateCharScr.tAddName.paint(g);
        }
        g.setClip(0, 0, GameCanvas.w, GameCanvas.h);
        mFont.tahoma_7b_white.drawString(g, mResources.server + " " + LoginScr.serverName, 5, 5, 0, mFont.tahoma_7b_dark);
        if (!TouchScreenKeyboard.visible)
        {
            base.paint(g);
        }
    }
Exemple #26
0
 public bool SmallImageBytesEqual(ShortcutItemState other)
 {
     return(SmallImage.Equals(other.SmallImage));
 }