// Token: 0x060003C7 RID: 967 RVA: 0x0001DEAC File Offset: 0x0001C0AC
 public string getOptionString()
 {
     if (this.optionString == null)
     {
         this.optionString = NinjaUtil.replace(this.optionTemplate.name, "#", string.Empty + this.param);
     }
     return(this.optionString);
 }
    // Token: 0x06000210 RID: 528 RVA: 0x000117D8 File Offset: 0x0000F9D8
    public void paint(mGraphics g, int x, int y)
    {
        mFont mFont = mFont.tahoma_7b_dark;

        if ((int)this.role == 0)
        {
            mFont = mFont.tahoma_7b_red;
        }
        else if ((int)this.role == 1)
        {
            mFont = mFont.tahoma_7b_green;
        }
        else if ((int)this.role == 2)
        {
            mFont = mFont.tahoma_7b_green2;
        }
        if (this.type == 0)
        {
            mFont.drawString(g, this.playerName, x + 3, y + 1, 0);
            if ((int)this.color == 0)
            {
                mFont.tahoma_7_grey.drawString(g, this.chat[0] + ((this.chat.Length <= 1) ? string.Empty : "..."), x + 3, y + 11, 0);
            }
            else
            {
                mFont.tahoma_7_red.drawString(g, this.chat[0] + ((this.chat.Length <= 1) ? string.Empty : "..."), x + 3, y + 11, 0);
            }
            mFont.tahoma_7_grey.drawString(g, NinjaUtil.getTimeAgo(this.timeAgo) + " " + mResources.ago, x + GameCanvas.panel.wScroll - 3, y + 1, mFont.RIGHT);
        }
        if (this.type == 1)
        {
            mFont.drawString(g, string.Concat(new object[]
            {
                this.playerName,
                " (",
                this.recieve,
                "/",
                this.maxCap,
                ")"
            }), x + 3, y + 1, 0);
            mFont.tahoma_7_blue.drawString(g, string.Concat(new string[]
            {
                mResources.request_pea,
                " ",
                NinjaUtil.getTimeAgo(this.timeAgo),
                " ",
                mResources.ago
            }), x + 3, y + 11, 0);
        }
        if (this.type == 2)
        {
            mFont.drawString(g, this.playerName, x + 3, y + 1, 0);
            mFont.tahoma_7_blue.drawString(g, mResources.request_join_clan, x + 3, y + 11, 0);
        }
    }
Exemplo n.º 3
0
 // 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);
     }
 }
Exemplo n.º 4
0
    // Token: 0x06000333 RID: 819 RVA: 0x00018B50 File Offset: 0x00016D50
    public string getOptionShopstring()
    {
        string result = string.Empty;

        if (this.optionTemplate.id == 0 || this.optionTemplate.id == 1 || this.optionTemplate.id == 21 || this.optionTemplate.id == 22 || this.optionTemplate.id == 23 || this.optionTemplate.id == 24 || this.optionTemplate.id == 25 || this.optionTemplate.id == 26)
        {
            int num = this.param - 50 + 1;
            result = string.Concat(new object[]
            {
                NinjaUtil.replace(this.optionTemplate.name, "#", this.param + string.Empty),
                " (",
                num,
                "-",
                this.param,
                ")"
            });
        }
        else if (this.optionTemplate.id == 6 || this.optionTemplate.id == 7 || this.optionTemplate.id == 8 || this.optionTemplate.id == 9 || this.optionTemplate.id == 19)
        {
            int num = this.param - 10 + 1;
            result = string.Concat(new object[]
            {
                NinjaUtil.replace(this.optionTemplate.name, "#", this.param + string.Empty),
                " (",
                num,
                "-",
                this.param,
                ")"
            });
        }
        else if (this.optionTemplate.id == 2 || this.optionTemplate.id == 3 || this.optionTemplate.id == 4 || this.optionTemplate.id == 5 || this.optionTemplate.id == 10 || this.optionTemplate.id == 11 || this.optionTemplate.id == 12 || this.optionTemplate.id == 13 || this.optionTemplate.id == 14 || this.optionTemplate.id == 15 || this.optionTemplate.id == 17 || this.optionTemplate.id == 18 || this.optionTemplate.id == 20)
        {
            int num = this.param - 5 + 1;
            result = string.Concat(new object[]
            {
                NinjaUtil.replace(this.optionTemplate.name, "#", this.param + string.Empty),
                " (",
                num,
                "-",
                this.param,
                ")"
            });
        }
        else if (this.optionTemplate.id == 16)
        {
            int num = this.param - 3 + 1;
            result = string.Concat(new object[]
            {
                NinjaUtil.replace(this.optionTemplate.name, "#", this.param + string.Empty),
                " (",
                num,
                "-",
                this.param,
                ")"
            });
        }
        else
        {
            result = NinjaUtil.replace(this.optionTemplate.name, "#", this.param + string.Empty);
        }
        return(result);
    }
Exemplo n.º 5
0
 // Token: 0x06000332 RID: 818 RVA: 0x00004EDD File Offset: 0x000030DD
 public string getOptiongColor()
 {
     return(NinjaUtil.replace(this.optionTemplate.name, "$", string.Empty));
 }
Exemplo n.º 6
0
 // Token: 0x06000331 RID: 817 RVA: 0x00004EC1 File Offset: 0x000030C1
 public string getOptionName()
 {
     return(NinjaUtil.replace(this.optionTemplate.name, "+#", string.Empty));
 }
Exemplo n.º 7
0
 // Token: 0x06000330 RID: 816 RVA: 0x00004E95 File Offset: 0x00003095
 public string getOptionString()
 {
     return(NinjaUtil.replace(this.optionTemplate.name, "#", this.param + string.Empty));
 }
Exemplo n.º 8
0
 // 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();
 }
Exemplo n.º 9
0
 // Token: 0x06000434 RID: 1076 RVA: 0x00005A07 File Offset: 0x00003C07
 public static string replace(string str, string replacement)
 {
     return(NinjaUtil.replace(str, "#", replacement));
 }