Beispiel #1
0
 // Token: 0x06000723 RID: 1827 RVA: 0x0005EF90 File Offset: 0x0005D190
 public new void checkFrameTick(int[] array)
 {
     if ((int)this.skillID == 0)
     {
         if (this.tick == 11)
         {
             this.addFoot = true;
             Effect me = new Effect(19, this.cx, this.cy + 20, 2, 1, -1);
             EffecMn.addEff(me);
         }
         if (this.tick >= array.Length - 1)
         {
             this.skillID = 2;
             return;
         }
     }
     if ((int)this.skillID == 1 && this.tick == array.Length - 1)
     {
         this.skillID = 3;
         this.cy     -= 15;
         return;
     }
     this.tick++;
     if (this.tick > array.Length - 1)
     {
         this.tick = 0;
     }
     this.frame = array[this.tick];
 }
Beispiel #2
0
 // Token: 0x06000242 RID: 578 RVA: 0x0000491A File Offset: 0x00002B1A
 public static void removeEff(int id)
 {
     if (EffecMn.getEffById(id) != null)
     {
         EffecMn.vEff.removeElement(EffecMn.getEffById(id));
     }
 }
 // Token: 0x06000355 RID: 853 RVA: 0x00019B1C File Offset: 0x00017D1C
 public static void paint(mGraphics g, int x, int y)
 {
     if (!MobCapcha.isAttack)
     {
         if (GameCanvas.gameTick % 3 == 0)
         {
             if (global::Char.myCharz().cdir == 1)
             {
                 MobCapcha.cmtoX = x - 20 - GameScr.cmx;
             }
             if (global::Char.myCharz().cdir == -1)
             {
                 MobCapcha.cmtoX = x + 20 - GameScr.cmx;
             }
         }
         MobCapcha.cmtoY = global::Char.myCharz().cy - 40 - GameScr.cmy;
     }
     else
     {
         MobCapcha.delay++;
         if (MobCapcha.delay == 5)
         {
             MobCapcha.isAttack = false;
             MobCapcha.delay    = 0;
         }
         MobCapcha.cmtoX = x - GameScr.cmx;
         MobCapcha.cmtoY = y - GameScr.cmy;
     }
     if (MobCapcha.cmx > x - GameScr.cmx)
     {
         MobCapcha.dir = -1;
     }
     else
     {
         MobCapcha.dir = 1;
     }
     g.drawImage(GameScr.imgCapcha, MobCapcha.cmx, MobCapcha.cmy - 40, 3);
     PopUp.paintPopUp(g, MobCapcha.cmx - 25, MobCapcha.cmy - 70, 50, 20, 16777215, false);
     mFont.tahoma_7b_dark.drawString(g, GameScr.gI().keyInput, MobCapcha.cmx, MobCapcha.cmy - 65, 2);
     if (MobCapcha.isCreateMob)
     {
         MobCapcha.isCreateMob = false;
         EffecMn.addEff(new Effect(18, MobCapcha.cmx + GameScr.cmx, MobCapcha.cmy + GameScr.cmy, 2, 10, -1));
     }
     if (MobCapcha.explode)
     {
         MobCapcha.explode = false;
         EffecMn.addEff(new Effect(18, MobCapcha.cmx + GameScr.cmx, MobCapcha.cmy + GameScr.cmy, 2, 10, -1));
         GameScr.gI().mobCapcha = null;
         MobCapcha.cmtoX = -GameScr.cmx;
         MobCapcha.cmtoY = -GameScr.cmy;
     }
     g.drawRegion(MobCapcha.imgMob, 0, MobCapcha.f * 40, 40, 40, (MobCapcha.dir != 1) ? 2 : 0, MobCapcha.cmx, MobCapcha.cmy + 3 + ((GameCanvas.gameTick % 10 <= 5) ? 0 : 1), 3);
     MobCapcha.moveCamera();
 }
Beispiel #4
0
 // Token: 0x06000722 RID: 1826 RVA: 0x0005EF2C File Offset: 0x0005D12C
 public void eat(int id)
 {
     this.effEat = new Effect(105, this.cx, this.cy + 20, 2, 1, -1);
     EffecMn.addEff(this.effEat);
     if (id == global::Char.myCharz().charID)
     {
         this.focus = global::Char.myCharz();
     }
     else
     {
         this.focus = GameScr.findCharInMap(id);
     }
 }
        // Token: 0x0600052F RID: 1327 RVA: 0x0003C91C File Offset: 0x0003AB1C
        public override void paint(mGraphics g)
        {
            if (BigBoss.data == null)
            {
                return;
            }
            if (this.isShadown && this.status != 0)
            {
                this.paintShadow(g);
            }
            g.translate(0, GameCanvas.transY);
            BigBoss.data.paintFrame(g, this.frame, this.x, this.y + this.fy, (this.dir != 1) ? 1 : 0, 2);
            g.translate(0, -GameCanvas.transY);
            int num = (int)((long)this.hp * 50L / (long)this.maxHp);

            if (num != 0)
            {
                g.setColor(0);
                g.fillRect(this.x - 27, this.y - 112, 54, 8);
                g.setColor(16711680);
                g.setClip(this.x - 25, this.y - 110, num, 4);
                g.fillRect(this.x - 25, this.y - 110, 50, 4);
                g.setClip(0, 0, 3000, 3000);
            }
            if (this.shock)
            {
                Res.outz("type= " + this.type);
                this.tShock++;
                Effect me = new Effect(((int)this.type != 2) ? 22 : 19, this.x + this.tShock * 50, this.y + 25, 2, 1, -1);
                EffecMn.addEff(me);
                Effect me2 = new Effect(((int)this.type != 2) ? 22 : 19, this.x - this.tShock * 50, this.y + 25, 2, 1, -1);
                EffecMn.addEff(me2);
                if (this.tShock == 50)
                {
                    this.tShock = 0;
                    this.shock  = false;
                }
            }
        }
Beispiel #6
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);
     }
 }
Beispiel #7
0
    // Token: 0x06000743 RID: 1859 RVA: 0x00060FC4 File Offset: 0x0005F1C4
    public virtual void update()
    {
        if (this.blindEff && GameCanvas.gameTick % 5 == 0)
        {
            ServerEffect.addServerEffect(113, this.x, this.y, 1);
        }
        if (this.sleepEff && GameCanvas.gameTick % 10 == 0)
        {
            EffecMn.addEff(new Effect(41, this.x, this.y, 3, 1, 1));
        }
        if (!GameCanvas.lowGraphic && this.status != 1 && this.status != 0 && !GameCanvas.lowGraphic && GameCanvas.gameTick % (15 + this.mobId * 2) == 0)
        {
            for (int i = 0; i < GameScr.vCharInMap.size(); i++)
            {
                global::Char @char = (global::Char)GameScr.vCharInMap.elementAt(i);
                if (@char != null && @char.isFlyAndCharge && @char.cf == 32)
                {
                    global::Char char2 = new global::Char();
                    char2.cx = @char.cx;
                    char2.cy = @char.cy - @char.ch;
                    if (@char.cgender == 0)
                    {
                        MonsterDart.addMonsterDart(this.x + this.dir * this.w, this.y, this.checkIsBoss(), -100, -100, char2, 25);
                    }
                }
            }
            if (global::Char.myCharz().isFlyAndCharge&& global::Char.myCharz().cf == 32)
            {
                global::Char char3 = new global::Char();
                char3.cx = global::Char.myCharz().cx;
                char3.cy = global::Char.myCharz().cy - global::Char.myCharz().ch;
                if (global::Char.myCharz().cgender == 0)
                {
                    MonsterDart.addMonsterDart(this.x + this.dir * this.w, this.y, this.checkIsBoss(), -100, -100, char3, 25);
                }
            }
        }
        if (this.holdEffID != 0 && GameCanvas.gameTick % 5 == 0)
        {
            EffecMn.addEff(new Effect(this.holdEffID, this.x, this.y + 24, 3, 5, 1));
        }
        if (this.isFreez)
        {
            if (GameCanvas.gameTick % 5 == 0)
            {
                ServerEffect.addServerEffect(113, this.x, this.y, 1);
            }
            long num = mSystem.currentTimeMillis();
            if (num - this.last >= 1000L)
            {
                this.seconds--;
                this.last = num;
                if (this.seconds < 0)
                {
                    this.isFreez = false;
                    this.seconds = 0;
                }
            }
            if (this.templateId >= 58 && this.templateId <= 65)
            {
                if (GameCanvas.gameTick % 20 > 5)
                {
                    this.frame = 1;
                }
                else
                {
                    this.frame = 15;
                }
            }
            else if (GameCanvas.gameTick % 20 > 5)
            {
                this.frame = 11;
            }
            else
            {
                this.frame = 10;
            }
        }
        if (!this.isUpdate())
        {
            return;
        }
        if (this.isShadown)
        {
            this.updateShadown();
        }
        if (this.vMobMove == null && (int)Mob.arrMobTemplate[this.templateId].rangeMove != 0)
        {
            return;
        }
        if (this.status != 3 && this.isBusyAttackSomeOne)
        {
            if (this.cFocus != null)
            {
                this.cFocus.doInjure(this.dame, this.dameMp, false, true);
            }
            else if (this.mobToAttack != null)
            {
                this.mobToAttack.setInjure();
            }
            this.isBusyAttackSomeOne = false;
        }
        if ((int)this.levelBoss > 0)
        {
            this.updateSuperEff();
        }
        switch (this.status)
        {
        case 1:
            this.isDisable  = false;
            this.isDontMove = false;
            this.isFire     = false;
            this.isIce      = false;
            this.isWind     = false;
            this.y         += this.p1;
            if (GameCanvas.gameTick % 2 == 0)
            {
                if (this.p2 > 1)
                {
                    this.p2--;
                }
                else if (this.p2 < -1)
                {
                    this.p2++;
                }
            }
            this.x += this.p2;
            if (this.templateId >= 58 && this.templateId <= 65)
            {
                this.frame = 15;
            }
            else
            {
                this.frame = 11;
            }
            if (this.isDie)
            {
                this.isDie = false;
                if (this.isMobMe)
                {
                    for (int j = 0; j < GameScr.vMob.size(); j++)
                    {
                        if (((Mob)GameScr.vMob.elementAt(j)).mobId == this.mobId)
                        {
                            GameScr.vMob.removeElementAt(j);
                        }
                    }
                }
                this.p1         = 0;
                this.p2         = 0;
                this.x          = (this.y = 0);
                this.hp         = this.getTemplate().hp;
                this.status     = 0;
                this.timeStatus = 0;
                return;
            }
            if ((TileMap.tileTypeAtPixel(this.x, this.y) & 2) == 2)
            {
                this.p1 = ((this.p1 <= 4) ? (-this.p1) : -4);
                if (this.p3 == 0)
                {
                    this.p3 = 16;
                }
            }
            else
            {
                this.p1++;
            }
            if (this.p3 > 0)
            {
                this.p3--;
                if (this.p3 == 0)
                {
                    this.isDie = true;
                }
            }
            break;

        case 2:
            if (this.holdEffID != 0)
            {
                return;
            }
            if (this.isFreez)
            {
                return;
            }
            if (this.blindEff)
            {
                return;
            }
            if (this.sleepEff)
            {
                return;
            }
            this.timeStatus = 0;
            this.updateMobStandWait();
            break;

        case 3:
            if (this.holdEffID != 0)
            {
                return;
            }
            if (this.blindEff)
            {
                return;
            }
            if (this.sleepEff)
            {
                return;
            }
            if (this.isFreez)
            {
                return;
            }
            this.updateMobAttack();
            break;

        case 4:
            if (this.holdEffID != 0)
            {
                return;
            }
            if (this.blindEff)
            {
                return;
            }
            if (this.sleepEff)
            {
                return;
            }
            if (this.isFreez)
            {
                return;
            }
            this.timeStatus = 0;
            this.p1++;
            if (this.p1 > 40 + this.mobId % 5)
            {
                this.y     -= 2;
                this.status = 5;
                this.p1     = 0;
            }
            break;

        case 5:
            if (this.holdEffID != 0)
            {
                return;
            }
            if (this.blindEff)
            {
                return;
            }
            if (this.sleepEff)
            {
                return;
            }
            if (this.isFreez)
            {
                if ((int)Mob.arrMobTemplate[this.templateId].type == 4)
                {
                    this.ty++;
                    this.wt++;
                    this.fy += (this.wy ? -1 : 1);
                    if (this.wt == 10)
                    {
                        this.wt = 0;
                        this.wy = !this.wy;
                    }
                }
                return;
            }
            this.timeStatus = 0;
            this.updateMobWalk();
            break;

        case 6:
            this.timeStatus = 0;
            this.p1++;
            this.y += this.p1;
            if (this.y >= this.yFirst)
            {
                this.y      = this.yFirst;
                this.p1     = 0;
                this.status = 5;
            }
            break;

        case 7:
            this.updateInjure();
            break;
        }
    }
Beispiel #8
0
 // Token: 0x06000727 RID: 1831 RVA: 0x0005F20C File Offset: 0x0005D40C
 public override void update()
 {
     if (this.focus != null)
     {
         if (this.effEat.t >= 30)
         {
             this.effEat.x        += (this.cx - this.effEat.x) / 4;
             this.effEat.y        += (this.cy - this.effEat.y) / 4;
             this.focus.cx         = this.effEat.x;
             this.focus.cy         = this.effEat.y;
             this.focus.isMabuHold = true;
         }
         else
         {
             this.effEat.trans = ((this.effEat.x <= this.focus.cx) ? 0 : 1);
             this.effEat.x    += (this.focus.cx - this.effEat.x) / 3;
             this.effEat.y    += (this.focus.cy - this.effEat.y) / 3;
         }
     }
     if ((int)this.skillID != -1)
     {
         if ((int)this.skillID == 0 && this.addFoot && GameCanvas.gameTick % 2 == 0)
         {
             this.dx += ((this.xTo <= this.cx) ? -30 : 30);
             EffecMn.addEff(new Effect(103, this.cx + this.dx, this.cy + 20, 2, 1, -1)
             {
                 trans = ((this.xTo <= this.cx) ? 1 : 0)
             });
             if ((this.cdir == 1 && this.cx + this.dx >= this.xTo) || (this.cdir == -1 && this.cx + this.dx <= this.xTo))
             {
                 this.addFoot = false;
                 this.skillID = -1;
                 this.dx      = 0;
                 this.tick    = 0;
                 this.cdir    = this.lastDir;
                 for (int i = 0; i < this.charAttack.Length; i++)
                 {
                     this.charAttack[i].doInjure(this.damageAttack[i], 0, false, false);
                 }
             }
         }
         if ((int)this.skillID == 3)
         {
             this.xTo = this.charAttack[this.pIndex].cx;
             this.yTo = this.charAttack[this.pIndex].cy;
             this.cx += (this.xTo - this.cx) / 3;
             this.cy += (this.yTo - this.cy) / 3;
             if (GameCanvas.gameTick % 5 == 0)
             {
                 Effect me = new Effect(19, this.cx, this.cy, 2, 1, -1);
                 EffecMn.addEff(me);
             }
             if (Res.abs(this.cx - this.xTo) <= 20 && Res.abs(this.cy - this.yTo) <= 20)
             {
                 this.cx = this.xTo;
                 this.cy = this.yTo;
                 this.charAttack[this.pIndex].doInjure(this.damageAttack[this.pIndex], 0, false, false);
                 this.pIndex++;
                 if (this.pIndex == this.charAttack.Length)
                 {
                     this.skillID = -1;
                     this.pIndex  = 0;
                 }
             }
         }
         return;
     }
     base.update();
 }