// 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); } }
// Token: 0x0600034E RID: 846 RVA: 0x00019734 File Offset: 0x00017934 public override void update() { this.p.isPaint = MagicTree.isPaint; this.cur = mSystem.currentTimeMillis(); if (this.cur - this.last >= 1000L) { this.seconds--; this.last = this.cur; if (this.seconds < 0) { this.seconds = 0; } } if (!this.isUpdate) { if (this.currPeas < this.maxPeas && this.seconds == 0) { this.waitToUpdate = true; } } else if (this.seconds == 0) { this.isUpdate = false; this.waitToUpdate = true; } if (this.waitToUpdate) { this.delay++; if (this.delay == 20) { this.delay = 0; this.waitToUpdate = false; Service.gI().getMagicTree(2); } } this.num = ((this.peaPostionX == null) ? 0 : (this.peaPostionX.Length * this.currPeas / this.maxPeas)); if (this.isUpdateTree) { this.isUpdateTree = false; if ((this.seconds >= 0 && this.currPeas < this.maxPeas) || (this.seconds >= 0 && this.isUpdate) || this.isPeasEffect) { this.p.updateXYWH(new string[] { this.isUpdate ? mResources.UPGRADING : (this.currPeas + "/" + this.maxPeas), NinjaUtil.getTime(this.seconds) }, this.cx, this.cy - 20 - SmallImage.smallImg[this.id][4]); } else if (this.currPeas == this.maxPeas && !this.isUpdate) { this.p.updateXYWH(new string[] { mResources.can_harvest, this.currPeas + "/" + this.maxPeas }, this.cx, this.cy - 20 - SmallImage.smallImg[this.id][4]); } } if ((this.seconds >= 0 && this.currPeas < this.maxPeas) || (this.seconds >= 0 && this.isUpdate)) { this.p.says[this.p.says.Length - 1] = NinjaUtil.getTime(this.seconds); } if (this.isPeasEffect) { this.p.isPaint = false; ServerEffect.addServerEffect(98, this.cx + this.peaPostionX[this.currPeas - 1] - SmallImage.smallImg[this.id][3] / 2, this.cy + this.peaPostionY[this.currPeas - 1] - SmallImage.smallImg[this.id][4], 1); this.currPeas--; if (GameCanvas.gameTick % 2 == 0) { SoundMn.gI().HP_MPup(); } if (this.currPeas == this.remainPeas) { this.p.isPaint = true; this.isUpdateTree = true; this.isPeasEffect = false; } } base.update(); }