Пример #1
0
    // Token: 0x06000749 RID: 1865 RVA: 0x0006194C File Offset: 0x0005FB4C
    public void setAttack(global::Char cFocus)
    {
        this.isBusyAttackSomeOne = true;
        this.mobToAttack         = null;
        this.cFocus = cFocus;
        this.p1     = 0;
        this.p2     = 0;
        this.status = 3;
        this.tick   = 0;
        this.dir    = ((cFocus.cx <= this.x) ? -1 : 1);
        int cx = cFocus.cx;
        int cy = cFocus.cy;

        if (Res.abs(cx - this.x) < this.w * 2 && Res.abs(cy - this.y) < this.h * 2)
        {
            if (this.x < cx)
            {
                this.x = cx - this.w;
            }
            else
            {
                this.x = cx + this.w;
            }
            this.p3 = 0;
        }
        else
        {
            this.p3 = 1;
        }
    }
 // Token: 0x0600027C RID: 636 RVA: 0x000139C0 File Offset: 0x00011BC0
 public MonsterDart(int x, int y, bool isBoss, int dame, int dameMp, global::Char c, int dartType)
 {
     this.info   = GameScr.darts[dartType];
     this.x      = x;
     this.y      = y;
     this.isBoss = isBoss;
     this.dame   = dame;
     this.dameMp = dameMp;
     this.c      = c;
     this.va     = this.info.va;
     this.setAngle(Res.angle(c.cx - x, c.cy - y));
     if (x >= GameScr.cmx && x <= GameScr.cmx + GameCanvas.w)
     {
         SoundMn.gI().mobKame(dartType);
     }
 }
Пример #3
0
    // Token: 0x06000392 RID: 914 RVA: 0x0001BAA8 File Offset: 0x00019CA8
    public PlayerDart(global::Char charBelong, int dartType, SkillPaint sp, int x, int y)
    {
        this.skillPaint = sp;
        this.charBelong = charBelong;
        this.info       = GameScr.darts[dartType];
        this.va         = this.info.va;
        this.x          = x;
        this.y          = y;
        IMapObject mapObject;

        if (charBelong.mobFocus == null)
        {
            IMapObject charFocus = charBelong.charFocus;
            mapObject = charFocus;
        }
        else
        {
            mapObject = charBelong.mobFocus;
        }
        IMapObject mapObject2 = mapObject;

        this.setAngle(Res.angle(mapObject2.getX() - x, mapObject2.getY() - y));
    }
Пример #4
0
 // Token: 0x0600074C RID: 1868 RVA: 0x00061E60 File Offset: 0x00060060
 public void updateMobAttack()
 {
     if (this.tick < 2)
     {
         this.checkFrameTick((this.p3 != 0) ? this.attack2 : this.attack1);
         if (this.x >= GameScr.cmx && this.x <= GameScr.cmx + GameCanvas.w && this.p3 == 0 && GameCanvas.gameTick % 2 == 0)
         {
             SoundMn.gI().charPunch(false, 0.05f);
         }
     }
     if (this.p1 == 0)
     {
         int num  = (this.cFocus == null) ? this.mobToAttack.x : this.cFocus.cx;
         int num2 = (this.cFocus == null) ? this.mobToAttack.y : this.cFocus.cy;
         if (this.x > this.xFirst + (int)Mob.arrMobTemplate[this.templateId].rangeMove)
         {
             this.p1 = 1;
         }
         if (this.x < this.xFirst - (int)Mob.arrMobTemplate[this.templateId].rangeMove)
         {
             this.p1 = 1;
         }
         if (((int)Mob.arrMobTemplate[this.templateId].type == 4 || (int)Mob.arrMobTemplate[this.templateId].type == 5) && !this.isDontMove)
         {
             this.y += (num2 - this.y) / 20;
         }
         this.p2++;
         if (this.p2 > 3 || this.p1 == 1)
         {
             this.p1 = 1;
             if (this.p3 == 0)
             {
                 if (this.cFocus != null)
                 {
                     this.cFocus.doInjure(this.dame, this.dameMp, false, true);
                 }
                 else
                 {
                     this.mobToAttack.setInjure();
                 }
                 this.isBusyAttackSomeOne = false;
             }
             else
             {
                 if (this.cFocus != null)
                 {
                     MonsterDart.addMonsterDart(this.x + this.dir * this.w, this.y, this.checkIsBoss(), this.dame, this.dameMp, this.cFocus, (int)this.getTemplate().dartType);
                 }
                 else
                 {
                     global::Char @char = new global::Char();
                     @char.cx     = this.mobToAttack.x;
                     @char.cy     = this.mobToAttack.y;
                     @char.charID = -100;
                     MonsterDart.addMonsterDart(this.x + this.dir * this.w, this.y, this.checkIsBoss(), this.dame, this.dameMp, @char, (int)this.getTemplate().dartType);
                 }
                 this.isBusyAttackSomeOne = false;
             }
         }
         this.dir = ((this.x >= num) ? -1 : 1);
     }
     else if (this.p1 == 1)
     {
         if ((int)Mob.arrMobTemplate[this.templateId].type != 0 && !this.isDontMove && !this.isIce && !this.isWind)
         {
             this.x += (this.xFirst - this.x) / 4;
             this.y += (this.yFirst - this.y) / 4;
         }
         if (Res.abs(this.xFirst - this.x) < 5 && Res.abs(this.yFirst - this.y) < 5 && this.tick == 2)
         {
             this.status = 2;
             this.p1     = 0;
             this.p2     = 0;
             this.tick   = 0;
         }
     }
 }
Пример #5
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;
        }
    }
Пример #6
0
 // Token: 0x0600029B RID: 667 RVA: 0x00004A44 File Offset: 0x00002C44
 public Arrow(global::Char charBelong, Arrowpaint arrp)
 {
     this.charBelong = charBelong;
     this.arrp       = arrp;
 }
 // Token: 0x06000280 RID: 640 RVA: 0x000049F5 File Offset: 0x00002BF5
 public static void addMonsterDart(int x, int y, bool isBoss, int dame, int dameMp, global::Char c, int dartType)
 {
     Effect2.vEffect2.addElement(new MonsterDart(x, y, isBoss, dame, dameMp, c, dartType));
 }
Пример #8
0
    // Token: 0x06000303 RID: 771 RVA: 0x00017608 File Offset: 0x00015808
    public void addInfo(string s, int Type, global::Char cInfo, bool isChatServer)
    {
        this.type = Type;
        if (GameCanvas.w == 128)
        {
            this.limLeft = 1;
        }
        if (this.infoWaitToShow.size() > 10)
        {
            this.infoWaitToShow.removeElementAt(0);
        }
        if (this.infoWaitToShow.size() > 0 && s.Equals(((InfoItem)this.infoWaitToShow.lastElement()).s))
        {
            Res.outz("return");
            return;
        }
        InfoItem infoItem = new InfoItem(s);

        if (this.type == 0)
        {
            infoItem.speed = s.Length;
        }
        if (infoItem.speed < 70)
        {
            infoItem.speed = 70;
        }
        if (this.type == 1)
        {
            infoItem.speed = 10000000;
        }
        if (this.type == 3)
        {
            infoItem.speed     = 300;
            infoItem.last      = mSystem.currentTimeMillis();
            infoItem.timeCount = s.Length * 10 / 4;
            if (infoItem.timeCount < 150)
            {
                infoItem.timeCount = 150;
            }
            infoItem.maxTime = infoItem.timeCount;
        }
        if (cInfo != null)
        {
            infoItem.charInfo     = cInfo;
            infoItem.isChatServer = isChatServer;
            GameCanvas.panel.addChatMessage(infoItem);
            if (GameCanvas.isTouch && GameCanvas.panel.isViewChatServer)
            {
                GameScr.info2.cmdChat = new Command(mResources.CHAT, this, 1000, infoItem);
            }
        }
        if ((cInfo != null && GameCanvas.panel.isViewChatServer) || cInfo == null)
        {
            this.infoWaitToShow.addElement(infoItem);
        }
        if (this.infoWaitToShow.size() == 1)
        {
            this.info = (InfoItem)this.infoWaitToShow.firstElement();
            this.getInfo();
        }
        if (GameCanvas.isTouch && cInfo != null && GameCanvas.panel.isViewChatServer && GameCanvas.w - 50 > 155 + this.W)
        {
            GameScr.info2.cmdChat.x = GameCanvas.w - this.W - 50;
            GameScr.info2.cmdChat.y = 35;
        }
    }
Пример #9
0
	// Token: 0x060006F6 RID: 1782 RVA: 0x00003584 File Offset: 0x00001784
	public void addInfoWithChar(string s, global::Char c, bool isChatServer)
	{
	}
Пример #10
0
 // Token: 0x0600028D RID: 653 RVA: 0x00003584 File Offset: 0x00001784
 public static void addServerEffectWithTime(int id, global::Char c, int timeLengthInSecond)
 {
 }
Пример #11
0
 // Token: 0x0600028B RID: 651 RVA: 0x00003584 File Offset: 0x00001784
 public static void addServerEffect(int id, global::Char c, int loopCount, int trans)
 {
 }