// Token: 0x06000550 RID: 1360 RVA: 0x0003D3F4 File Offset: 0x0003B5F4 public new void updateMobAttack() { if ((int)this.type == 0) { if (this.tick == this.attack1.Length - 1) { this.status = 2; } this.dir = ((this.x >= this.charAttack[0].cx) ? -1 : 1); this.checkFrameTick(this.attack1); this.x += (this.charAttack[0].cx - this.x) / 4; this.y += (this.charAttack[0].cy - this.y) / 4; this.xTo = this.x; if (this.tick == 8) { for (int i = 0; i < this.charAttack.Length; i++) { this.charAttack[i].doInjure(this.dameHP[i], 0, false, false); ServerEffect.addServerEffect(102, this.charAttack[i].cx, this.charAttack[i].cy, 1); } } } if ((int)this.type == 1) { if (this.tick == this.attack2.Length - 1) { this.status = 2; } this.dir = ((this.x >= this.charAttack[0].cx) ? -1 : 1); this.checkFrameTick(this.attack2); if (this.tick == 8) { for (int j = 0; j < this.charAttack.Length; j++) { MonsterDart.addMonsterDart(this.x + ((this.dir != 1) ? -45 : 45), this.y - 25, true, this.dameHP[j], 0, this.charAttack[j], 24); } } } if ((int)this.type == 2) { if (this.tick == this.fly.Length - 1) { this.status = 2; } this.dir = ((this.x >= this.charAttack[0].cx) ? -1 : 1); this.checkFrameTick(this.fly); this.x += (this.charAttack[0].cx - this.x) / 4; this.xTo = this.x; this.yTo = this.y; if (this.tick == 12) { for (int k = 0; k < this.charAttack.Length; k++) { this.charAttack[k].doInjure(this.dameHP[k], 0, false, false); ServerEffect.addServerEffect(102, this.charAttack[k].cx, this.charAttack[k].cy, 1); } } } }
// Token: 0x060004FA RID: 1274 RVA: 0x0003B41C File Offset: 0x0003961C private void updateDead() { this.checkFrameTick(this.stand); if (GameCanvas.gameTick % 5 == 0) { ServerEffect.addServerEffect(167, Res.random(this.x - this.getW() / 2, this.x + this.getW() / 2), Res.random(this.getY() + this.getH() / 2, this.getY() + this.getH()), 1); } if (this.x != this.xTo || this.y != this.yTo) { this.x += (this.xTo - this.x) / 4; this.y += (this.yTo - this.y) / 4; } }
// Token: 0x06000521 RID: 1313 RVA: 0x0003C200 File Offset: 0x0003A400 private void updateDead() { this.checkFrameTick((!this.haftBody) ? this.stand : this.stand_1); if (GameCanvas.gameTick % 5 == 0) { ServerEffect.addServerEffect(167, Res.random(this.x - this.getW() / 2, this.x + this.getW() / 2), Res.random(this.getY() + this.getH() / 2, this.getY() + this.getH()), 1); } if (this.x != this.xFirst || this.y != this.yFirst) { this.x += (this.xFirst - this.x) / 4; this.y += (this.yFirst - this.y) / 4; } }
// Token: 0x06000742 RID: 1858 RVA: 0x00060F4C File Offset: 0x0005F14C public void updateSuperEff() { if (this.typeSuperEff == 0 && GameCanvas.gameTick % 25 == 0) { ServerEffect.addServerEffect(114, this, 1); } if (this.typeSuperEff == 1 && GameCanvas.gameTick % 4 == 0) { ServerEffect.addServerEffect(132, this, 1); } if (this.typeSuperEff == 2 && GameCanvas.gameTick % 7 == 0) { ServerEffect.addServerEffect(131, this, 1); } }
// Token: 0x06000324 RID: 804 RVA: 0x00018878 File Offset: 0x00016A78 private void updateAuraItemEff() { this.count++; this.countAura++; if (this.countAura >= 40) { this.countAura = 0; } if (this.count >= this.iDot) { this.count = 0; } if (this.count % 10 == 0 && !GameCanvas.lowGraphic) { ServerEffect.addServerEffect(114, this.x - 5, this.y - 30, 1); } }
// Token: 0x06000502 RID: 1282 RVA: 0x0003B640 File Offset: 0x00039840 public new void updateMobAttack() { if ((int)this.type == 3) { if (this.tick == this.attack1.Length - 1) { this.status = 2; } this.dir = ((this.x >= this.charAttack[0].cx) ? -1 : 1); this.checkFrameTick(this.attack1); this.x += (this.charAttack[0].cx - this.x) / 4; this.y += (this.charAttack[0].cy - this.y) / 4; this.xTo = this.x; if (this.tick == 8) { for (int i = 0; i < this.charAttack.Length; i++) { this.charAttack[i].doInjure(this.dameHP[i], 0, false, false); ServerEffect.addServerEffect(102, this.charAttack[i].cx, this.charAttack[i].cy, 1); } } } if ((int)this.type == 4) { if (this.tick == this.attack2.Length - 1) { this.status = 2; } this.dir = ((this.x >= this.charAttack[0].cx) ? -1 : 1); this.checkFrameTick(this.attack2); if (this.tick == 8) { for (int j = 0; j < this.charAttack.Length; j++) { this.charAttack[j].doInjure(this.dameHP[j], 0, false, false); ServerEffect.addServerEffect(102, this.charAttack[j].cx, this.charAttack[j].cy, 1); } } } }
// 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; } }
// Token: 0x06000282 RID: 642 RVA: 0x00013BA8 File Offset: 0x00011DA8 public override void update() { for (int i = 0; i < (int)this.info.nUpdate; i++) { if (this.info.tail.Length > 0) { this.darts.addElement(new SmallDart(this.x, this.y)); } this.dx = ((this.c == null) ? this.xTo : this.c.cx) - this.x; this.dy = ((this.c == null) ? this.yTo : this.c.cy) - 10 - this.y; int num = 60; if (TileMap.mapID == 0) { num = 600; } this.life++; if ((this.c != null && (this.c.statusMe == 5 || this.c.statusMe == 14)) || this.c == null) { this.x += (((this.c == null) ? this.xTo : this.c.cx) - this.x) / 2; this.y += (((this.c == null) ? this.yTo : this.c.cy) - this.y) / 2; } if ((Res.abs(this.dx) < 16 && Res.abs(this.dy) < 16) || this.life > num) { if (this.c != null && this.c.charID >= 0 && this.dameMp != -1) { if (this.dameMp != -100) { this.c.doInjure(this.dame, this.dameMp, false, true); } else { ServerEffect.addServerEffect(80, this.c, 1); } } Effect2.vEffect2.removeElement(this); if (this.dameMp != -100) { ServerEffect.addServerEffect(81, this.c, 1); if (this.x >= GameScr.cmx && this.x <= GameScr.cmx + GameCanvas.w) { SoundMn.gI().explode_2(); } } } int num2 = Res.angle(this.dx, this.dy); if (global::Math.abs(num2 - this.angle) < 90 || this.dx * this.dx + this.dy * this.dy > 4096) { if (global::Math.abs(num2 - this.angle) < 15) { this.angle = num2; } else if ((num2 - this.angle >= 0 && num2 - this.angle < 180) || num2 - this.angle < -180) { this.angle = Res.fixangle(this.angle + 15); } else { this.angle = Res.fixangle(this.angle - 15); } } if (!this.isSpeedUp && this.va < 8192) { this.va += 1024; } this.vx = this.va * Res.cos(this.angle) >> 10; this.vy = this.va * Res.sin(this.angle) >> 10; this.dx += this.vx; int num3 = this.dx >> 10; this.x += num3; this.dx &= 1023; this.dy += this.vy; int num4 = this.dy >> 10; this.y += num4; this.dy &= 1023; } for (int j = 0; j < this.darts.size(); j++) { SmallDart smallDart = (SmallDart)this.darts.elementAt(j); smallDart.index++; if (smallDart.index >= this.info.tail.Length) { this.darts.removeElementAt(j); } } }
// 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(); }
public void Build() { effects = new List <StatusEffectGroupInfo.Effect>(); if (ServerEffect1 != null) { effects.Add(new StatusEffectGroupInfo.Effect(ServerEffect1, ServerEffect1_Arg1, ServerEffect1_Arg2, ServerEffect1_Arg3)); } if (ServerEffect2 != null) { effects.Add(new StatusEffectGroupInfo.Effect(ServerEffect2, ServerEffect2_Arg1, ServerEffect2_Arg2, ServerEffect2_Arg3)); } if (ServerEffect3 != null) { effects.Add(new StatusEffectGroupInfo.Effect(ServerEffect3, ServerEffect3_Arg1, ServerEffect3_Arg2, ServerEffect3_Arg3)); } if (ServerEffect != null) { string[] strArrays = ServerEffect.Split(new char[] { ',' }); for (int i = 0; i < (int)strArrays.Length; i++) { StatusEffectGroupInfo.Effect effect = new StatusEffectGroupInfo.Effect(strArrays[i]); if (effect.EffectKey != "") { effects.Add(effect); } } } int?serverSide = ServerSide; int valueOrDefault = serverSide.GetValueOrDefault(); if (serverSide.HasValue) { switch (valueOrDefault) { case 0: { statusEffectType = StatusEffectType.Client; goto LabelstatusEffect; } case 1: { int?realTimePeriod = RealTimePeriod; if ((realTimePeriod.GetValueOrDefault() != 1 ? true : !realTimePeriod.HasValue)) { statusEffectType = StatusEffectType.UseRemainTime; goto LabelstatusEffect; } else { statusEffectType = StatusEffectType.UseExpireTime; goto LabelstatusEffect; } } } } statusEffectType = StatusEffectType.DeleteOnLogOut; LabelstatusEffect: statAdder = new Dictionary <string, int>(); foreach (StatusEffectGroupInfo.Effect effect1 in effects) { if (effect1.EffectKey != "stat_adder") { continue; } string argString = effect1.GetArgString(1, null); string str = effect1.GetArgString(2, null); if (argString == null || str == null) { continue; } char[] chrArray = new char[] { ';' }; string[] strArrays1 = argString.Trim().Split(chrArray); string[] strArrays2 = str.Trim().Split(chrArray); if (1 >= (int)strArrays1.Length || (int)strArrays1.Length != (int)strArrays2.Length) { StatAdder.AddOrIncrease <string>(argString, Convert.ToInt32(str)); } else { int num = 0; string[] strArrays3 = strArrays1; for (int j = 0; j < (int)strArrays3.Length; j++) { string str1 = strArrays3[j]; int num1 = num; num = num1 + 1; StatAdder.AddOrIncrease <string>(str1, Convert.ToInt32(strArrays2[num1])); } } } }
// Token: 0x0600052A RID: 1322 RVA: 0x0003C5D8 File Offset: 0x0003A7D8 public new void updateMobAttack() { if ((int)this.type == 7) { if (this.tick > 8) { this.tick = 8; } this.checkFrameTick(this.attack1); if (GameCanvas.gameTick % 4 == 0) { ServerEffect.addServerEffect(70, this.x + ((this.dir != 1) ? -15 : 15), this.y - 40, 1); } } if ((int)this.type == 0) { if (this.tick == this.attack1.Length - 1) { this.status = 2; } this.dir = ((this.x >= this.charAttack[0].cx) ? -1 : 1); this.checkFrameTick(this.attack1); if (this.tick == 8) { for (int i = 0; i < this.charAttack.Length; i++) { MonsterDart.addMonsterDart(this.x + ((this.dir != 1) ? -45 : 45), this.y - 30, true, this.dameHP[i], 0, this.charAttack[i], 24); } } } if ((int)this.type == 1) { if (this.tick == ((!this.haftBody) ? (this.attack2.Length - 1) : (this.attack2_1.Length - 1))) { this.status = 2; } this.dir = ((this.x >= this.charAttack[0].cx) ? -1 : 1); this.checkFrameTick((!this.haftBody) ? this.attack2 : this.attack2_1); this.x += (this.charAttack[0].cx - this.x) / 4; this.y += (this.charAttack[0].cy - this.y) / 4; if (this.tick == 18) { for (int j = 0; j < this.charAttack.Length; j++) { this.charAttack[j].doInjure(this.dameHP[j], 0, false, false); ServerEffect.addServerEffect(102, this.charAttack[j].cx, this.charAttack[j].cy, 1); } } } if ((int)this.type == 8) { } if ((int)this.type == 2) { if (this.tick == ((!this.haftBody) ? (this.attack3.Length - 1) : (this.attack3_1.Length - 1))) { this.status = 2; } this.dir = ((this.x >= this.charAttack[0].cx) ? -1 : 1); this.checkFrameTick((!this.haftBody) ? this.attack3 : this.attack3_1); if (this.tick == 13) { GameScr.shock_scr = 10; this.shock = true; for (int k = 0; k < this.charAttack.Length; k++) { this.charAttack[k].doInjure(this.dameHP[k], 0, false, false); } } } }
// Token: 0x06000842 RID: 2114 RVA: 0x00006E32 File Offset: 0x00005032 public void remove() { ServerEffect.addServerEffect(60, this.cmx, this.cmy + 3 + ((GameCanvas.gameTick % 10 <= 5) ? 0 : 1), 1); }