public void doAction() { switch (this.actionClass) { case 0: this.nextEvent.checkEvent(); return; case 1: { string key = this.parameters[0].returnString(null); int num = this.parameters[1].returnInt(null); switch (this.actionType) { case 0: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { FengGameManagerMKII.intVariables.Add(key, num); return; } FengGameManagerMKII.intVariables[key] = num; return; case 1: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) + num; return; case 2: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) - num; return; case 3: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) * num; return; case 4: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) / num; return; case 5: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) % num; return; case 6: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } FengGameManagerMKII.intVariables[key] = (int)Math.Pow((double)((int)FengGameManagerMKII.intVariables[key]), (double)num); return; case 12: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { FengGameManagerMKII.intVariables.Add(key, UnityEngine.Random.Range(num, this.parameters[2].returnInt(null))); return; } FengGameManagerMKII.intVariables[key] = UnityEngine.Random.Range(num, this.parameters[2].returnInt(null)); return; } return; } case 2: { string str2 = this.parameters[0].returnString(null); bool flag = this.parameters[1].returnBool(null); switch (this.actionType) { case 11: if (!FengGameManagerMKII.boolVariables.ContainsKey(str2)) { this.callException("Variable not found: " + str2); return; } FengGameManagerMKII.boolVariables[str2] = !((bool)FengGameManagerMKII.boolVariables[str2]); return; case 12: if (!FengGameManagerMKII.boolVariables.ContainsKey(str2)) { FengGameManagerMKII.boolVariables.Add(str2, Convert.ToBoolean(UnityEngine.Random.Range(0, 2))); return; } FengGameManagerMKII.boolVariables[str2] = Convert.ToBoolean(UnityEngine.Random.Range(0, 2)); return; case 0: if (!FengGameManagerMKII.boolVariables.ContainsKey(str2)) { FengGameManagerMKII.boolVariables.Add(str2, flag); return; } FengGameManagerMKII.boolVariables[str2] = flag; return; } return; } case 3: { string str3 = this.parameters[0].returnString(null); switch (this.actionType) { case 7: { string str4 = string.Empty; for (int i = 1; i < this.parameters.Length; i++) { str4 = str4 + this.parameters[i].returnString(null); } if (!FengGameManagerMKII.stringVariables.ContainsKey(str3)) { FengGameManagerMKII.stringVariables.Add(str3, str4); return; } FengGameManagerMKII.stringVariables[str3] = str4; return; } case 8: { string str5 = this.parameters[1].returnString(null); if (!FengGameManagerMKII.stringVariables.ContainsKey(str3)) { this.callException("No Variable"); return; } FengGameManagerMKII.stringVariables[str3] = ((string)FengGameManagerMKII.stringVariables[str3]) + str5; return; } case 9: this.parameters[1].returnString(null); if (!FengGameManagerMKII.stringVariables.ContainsKey(str3)) { this.callException("No Variable"); return; } FengGameManagerMKII.stringVariables[str3] = ((string)FengGameManagerMKII.stringVariables[str3]).Replace(this.parameters[1].returnString(null), this.parameters[2].returnString(null)); return; case 0: { string str6 = this.parameters[1].returnString(null); if (!FengGameManagerMKII.stringVariables.ContainsKey(str3)) { FengGameManagerMKII.stringVariables.Add(str3, str6); return; } FengGameManagerMKII.stringVariables[str3] = str6; return; } } return; } case 4: { string str7 = this.parameters[0].returnString(null); float num3 = this.parameters[1].returnFloat(null); switch (this.actionType) { case 0: if (!FengGameManagerMKII.floatVariables.ContainsKey(str7)) { FengGameManagerMKII.floatVariables.Add(str7, num3); return; } FengGameManagerMKII.floatVariables[str7] = num3; return; case 1: if (!FengGameManagerMKII.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } FengGameManagerMKII.floatVariables[str7] = ((float)FengGameManagerMKII.floatVariables[str7]) + num3; return; case 2: if (!FengGameManagerMKII.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } FengGameManagerMKII.floatVariables[str7] = ((float)FengGameManagerMKII.floatVariables[str7]) - num3; return; case 3: if (!FengGameManagerMKII.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } FengGameManagerMKII.floatVariables[str7] = ((float)FengGameManagerMKII.floatVariables[str7]) * num3; return; case 4: if (!FengGameManagerMKII.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } FengGameManagerMKII.floatVariables[str7] = ((float)FengGameManagerMKII.floatVariables[str7]) / num3; return; case 5: if (!FengGameManagerMKII.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } FengGameManagerMKII.floatVariables[str7] = ((float)FengGameManagerMKII.floatVariables[str7]) % num3; return; case 6: if (!FengGameManagerMKII.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } FengGameManagerMKII.floatVariables[str7] = (float)Math.Pow((double)((int)FengGameManagerMKII.floatVariables[str7]), (double)num3); return; case 12: if (!FengGameManagerMKII.floatVariables.ContainsKey(str7)) { FengGameManagerMKII.floatVariables.Add(str7, UnityEngine.Random.Range(num3, this.parameters[2].returnFloat(null))); return; } FengGameManagerMKII.floatVariables[str7] = UnityEngine.Random.Range(num3, this.parameters[2].returnFloat(null)); return; } return; } case 5: { string str8 = this.parameters[0].returnString(null); PhotonPlayer player = this.parameters[1].returnPlayer(null); if (this.actionType != 0) { break; } if (FengGameManagerMKII.playerVariables.ContainsKey(str8)) { FengGameManagerMKII.playerVariables[str8] = player; return; } FengGameManagerMKII.playerVariables.Add(str8, player); return; } case 6: { string str9 = this.parameters[0].returnString(null); TITAN titan = this.parameters[1].returnTitan(null); if (this.actionType != 0) { break; } if (FengGameManagerMKII.titanVariables.ContainsKey(str9)) { FengGameManagerMKII.titanVariables[str9] = titan; return; } FengGameManagerMKII.titanVariables.Add(str9, titan); return; } case 7: { PhotonPlayer targetPlayer = this.parameters[0].returnPlayer(null); switch (this.actionType) { case 0: { int iD = targetPlayer.ID; if (FengGameManagerMKII.heroHash.ContainsKey(iD)) { HERO hero = (HERO)FengGameManagerMKII.heroHash[iD]; hero.markDie(); hero.photonView.RPC("netDie2", PhotonTargets.All, new object[] { -1, this.parameters[1].returnString(null) + " " }); return; } this.callException("Player Not Alive"); return; } case 1: FengGameManagerMKII.instance.photonView.RPC("respawnHeroInNewRound", targetPlayer, new object[0]); return; case 2: FengGameManagerMKII.instance.photonView.RPC("spawnPlayerAtRPC", targetPlayer, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) }); return; case 3: { int num5 = targetPlayer.ID; if (FengGameManagerMKII.heroHash.ContainsKey(num5)) { HERO hero2 = (HERO)FengGameManagerMKII.heroHash[num5]; hero2.photonView.RPC("moveToRPC", targetPlayer, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) }); return; } this.callException("Player Not Alive"); return; } case 4: { targetPlayer.kills = this.parameters[1].returnInt(null); return; } case 5: { targetPlayer.deaths = this.parameters[1].returnInt(null); return; } case 6: { targetPlayer.max_dmg = this.parameters[1].returnInt(null); return; } case 7: { targetPlayer.total_dmg = this.parameters[1].returnInt(null); return; } case 8: { targetPlayer.name2 = this.parameters[1].returnString(null); return; } case 9: { targetPlayer.guildName = this.parameters[1].returnString(null); return; } case 10: { targetPlayer.RCteam = this.parameters[1].returnInt(null); return; } case 11: { targetPlayer.customInt = this.parameters[1].returnInt(null); return; } case 12: { targetPlayer.customBool = this.parameters[1].returnBool(null); return; } case 13: { targetPlayer.customString = this.parameters[1].returnString(null); return; } case 14: { targetPlayer.RCteam = (int)this.parameters[1].returnFloat(null); return; } } return; } case 8: switch (this.actionType) { case 0: { TITAN titan2 = this.parameters[0].returnTitan(null); object[] parameters = new object[] { this.parameters[1].returnPlayer(null).ID, this.parameters[2].returnInt(null) }; titan2.photonView.RPC("titanGetHit", titan2.photonView.owner, parameters); return; } case 1: FengGameManagerMKII.instance.spawnTitanAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null)); return; case 2: FengGameManagerMKII.instance.spawnTitanAtAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null), this.parameters[4].returnFloat(null), this.parameters[5].returnFloat(null), this.parameters[6].returnFloat(null)); return; case 3: { TITAN titan3 = this.parameters[0].returnTitan(null); int num6 = this.parameters[1].returnInt(null); titan3.currentHealth = num6; if (titan3.maxHealth == 0) { titan3.maxHealth = titan3.currentHealth; } titan3.photonView.RPC("labelRPC", PhotonTargets.AllBuffered, new object[] { titan3.currentHealth, titan3.maxHealth }); return; } case 4: { TITAN titan4 = this.parameters[0].returnTitan(null); if (titan4.photonView.isMine) { titan4.moveTo(this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null)); return; } titan4.photonView.RPC("moveToRPC", titan4.photonView.owner, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) }); return; } } return; case 9: switch (this.actionType) { case 0: FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { this.parameters[0].returnString(null), string.Empty }); return; case 1: FengGameManagerMKII.instance.gameWin2(); if (this.parameters[0].returnBool(null)) { FengGameManagerMKII.intVariables.Clear(); FengGameManagerMKII.boolVariables.Clear(); FengGameManagerMKII.stringVariables.Clear(); FengGameManagerMKII.floatVariables.Clear(); FengGameManagerMKII.playerVariables.Clear(); FengGameManagerMKII.titanVariables.Clear(); } return; case 2: FengGameManagerMKII.instance.gameLose2(); if (this.parameters[0].returnBool(null)) { FengGameManagerMKII.intVariables.Clear(); FengGameManagerMKII.boolVariables.Clear(); FengGameManagerMKII.stringVariables.Clear(); FengGameManagerMKII.floatVariables.Clear(); FengGameManagerMKII.playerVariables.Clear(); FengGameManagerMKII.titanVariables.Clear(); } return; case 3: if (this.parameters[0].returnBool(null)) { FengGameManagerMKII.intVariables.Clear(); FengGameManagerMKII.boolVariables.Clear(); FengGameManagerMKII.stringVariables.Clear(); FengGameManagerMKII.floatVariables.Clear(); FengGameManagerMKII.playerVariables.Clear(); FengGameManagerMKII.titanVariables.Clear(); } FengGameManagerMKII.instance.restartGame2(false); return; } return; default: return; } }
public void doAction() { switch (this.actionClass) { case 0: this.nextEvent.checkEvent(); break; case 1: { string key = this.parameters[0].returnString(null); int num2 = this.parameters[1].returnInt(null); switch (this.actionType) { case 0: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { FengGameManagerMKII.intVariables.Add(key, num2); } else { FengGameManagerMKII.intVariables[key] = num2; } return; case 1: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); } else { FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) + num2; } return; case 2: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); } else { FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) - num2; } return; case 3: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); } else { FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) * num2; } return; case 4: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); } else { FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) / num2; } return; case 5: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); } else { FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) % num2; } return; case 6: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); } else { FengGameManagerMKII.intVariables[key] = (int)Math.Pow((double)((int)FengGameManagerMKII.intVariables[key]), (double)num2); } return; case 12: if (!FengGameManagerMKII.intVariables.ContainsKey(key)) { FengGameManagerMKII.intVariables.Add(key, UnityEngine.Random.Range(num2, this.parameters[2].returnInt(null))); } else { FengGameManagerMKII.intVariables[key] = UnityEngine.Random.Range(num2, this.parameters[2].returnInt(null)); } return; } break; } case 2: { string str2 = this.parameters[0].returnString(null); bool flag2 = this.parameters[1].returnBool(null); switch (this.actionType) { case 11: if (!FengGameManagerMKII.boolVariables.ContainsKey(str2)) { this.callException("Variable not found: " + str2); } else { FengGameManagerMKII.boolVariables[str2] = !((bool)FengGameManagerMKII.boolVariables[str2]); } return; case 12: if (!FengGameManagerMKII.boolVariables.ContainsKey(str2)) { FengGameManagerMKII.boolVariables.Add(str2, Convert.ToBoolean(UnityEngine.Random.Range(0, 2))); } else { FengGameManagerMKII.boolVariables[str2] = Convert.ToBoolean(UnityEngine.Random.Range(0, 2)); } return; case 0: if (!FengGameManagerMKII.boolVariables.ContainsKey(str2)) { FengGameManagerMKII.boolVariables.Add(str2, flag2); } else { FengGameManagerMKII.boolVariables[str2] = flag2; } return; } break; } case 3: { string str3 = this.parameters[0].returnString(null); switch (this.actionType) { case 7: { string str5 = string.Empty; for (int i = 1; i < this.parameters.Length; i++) { str5 = str5 + this.parameters[i].returnString(null); } if (!FengGameManagerMKII.stringVariables.ContainsKey(str3)) { FengGameManagerMKII.stringVariables.Add(str3, str5); } else { FengGameManagerMKII.stringVariables[str3] = str5; } return; } case 8: { string str6 = this.parameters[1].returnString(null); if (!FengGameManagerMKII.stringVariables.ContainsKey(str3)) { this.callException("No Variable"); } else { FengGameManagerMKII.stringVariables[str3] = ((string)FengGameManagerMKII.stringVariables[str3]) + str6; } return; } case 9: { string str7 = this.parameters[1].returnString(null); if (!FengGameManagerMKII.stringVariables.ContainsKey(str3)) { this.callException("No Variable"); } else { FengGameManagerMKII.stringVariables[str3] = ((string)FengGameManagerMKII.stringVariables[str3]).Replace(this.parameters[1].returnString(null), this.parameters[2].returnString(null)); } return; } case 0: { string str4 = this.parameters[1].returnString(null); if (!FengGameManagerMKII.stringVariables.ContainsKey(str3)) { FengGameManagerMKII.stringVariables.Add(str3, str4); } else { FengGameManagerMKII.stringVariables[str3] = str4; } return; } } break; } case 4: { string str9 = this.parameters[0].returnString(null); float num4 = this.parameters[1].returnFloat(null); switch (this.actionType) { case 0: if (!FengGameManagerMKII.floatVariables.ContainsKey(str9)) { FengGameManagerMKII.floatVariables.Add(str9, num4); } else { FengGameManagerMKII.floatVariables[str9] = num4; } return; case 1: if (!FengGameManagerMKII.floatVariables.ContainsKey(str9)) { this.callException("No Variable"); } else { FengGameManagerMKII.floatVariables[str9] = ((float)FengGameManagerMKII.floatVariables[str9]) + num4; } return; case 2: if (!FengGameManagerMKII.floatVariables.ContainsKey(str9)) { this.callException("No Variable"); } else { FengGameManagerMKII.floatVariables[str9] = ((float)FengGameManagerMKII.floatVariables[str9]) - num4; } return; case 3: if (!FengGameManagerMKII.floatVariables.ContainsKey(str9)) { this.callException("No Variable"); } else { FengGameManagerMKII.floatVariables[str9] = ((float)FengGameManagerMKII.floatVariables[str9]) * num4; } return; case 4: if (!FengGameManagerMKII.floatVariables.ContainsKey(str9)) { this.callException("No Variable"); } else { FengGameManagerMKII.floatVariables[str9] = ((float)FengGameManagerMKII.floatVariables[str9]) / num4; } return; case 5: if (!FengGameManagerMKII.floatVariables.ContainsKey(str9)) { this.callException("No Variable"); } else { FengGameManagerMKII.floatVariables[str9] = ((float)FengGameManagerMKII.floatVariables[str9]) % num4; } return; case 6: if (!FengGameManagerMKII.floatVariables.ContainsKey(str9)) { this.callException("No Variable"); } else { FengGameManagerMKII.floatVariables[str9] = (float)Math.Pow((double)((int)FengGameManagerMKII.floatVariables[str9]), (double)num4); } return; case 12: if (!FengGameManagerMKII.floatVariables.ContainsKey(str9)) { FengGameManagerMKII.floatVariables.Add(str9, UnityEngine.Random.Range(num4, this.parameters[2].returnFloat(null))); } else { FengGameManagerMKII.floatVariables[str9] = UnityEngine.Random.Range(num4, this.parameters[2].returnFloat(null)); } return; } break; } case 5: { string str10 = this.parameters[0].returnString(null); PhotonPlayer player = this.parameters[1].returnPlayer(null); if (this.actionType == 0) { if (!FengGameManagerMKII.playerVariables.ContainsKey(str10)) { FengGameManagerMKII.playerVariables.Add(str10, player); } else { FengGameManagerMKII.playerVariables[str10] = player; } break; } break; } case 6: { string str11 = this.parameters[0].returnString(null); TITAN titan = this.parameters[1].returnTitan(null); if (this.actionType == 0) { if (!FengGameManagerMKII.titanVariables.ContainsKey(str11)) { FengGameManagerMKII.titanVariables.Add(str11, titan); } else { FengGameManagerMKII.titanVariables[str11] = titan; } break; } break; } case 7: { PhotonPlayer targetPlayer = this.parameters[0].returnPlayer(null); switch (this.actionType) { case 0: { int iD = targetPlayer.ID; if (FengGameManagerMKII.heroHash.ContainsKey(iD)) { HERO hero = (HERO)FengGameManagerMKII.heroHash[iD]; hero.markDie(); hero.photonView.RPC("netDie2", PhotonTargets.All, new object[] { -1, this.parameters[1].returnString(null) + " " }); } else { this.callException("Player Not Alive"); } return; } case 1: FengGameManagerMKII.instance.photonView.RPC("respawnHeroInNewRound", targetPlayer, new object[0]); return; case 2: FengGameManagerMKII.instance.photonView.RPC("spawnPlayerAtRPC", targetPlayer, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) }); return; case 3: { int num6 = targetPlayer.ID; if (FengGameManagerMKII.heroHash.ContainsKey(num6)) { HERO hero2 = (HERO)FengGameManagerMKII.heroHash[num6]; hero2.photonView.RPC("moveToRPC", targetPlayer, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) }); } else { this.callException("Player Not Alive"); } return; } case 4: { Hashtable propertiesToSet = new Hashtable(); propertiesToSet.Add(PhotonPlayerProperty.kills, this.parameters[1].returnInt(null)); targetPlayer.SetCustomProperties(propertiesToSet); return; } case 5: { Hashtable hashtable2 = new Hashtable(); hashtable2.Add(PhotonPlayerProperty.deaths, this.parameters[1].returnInt(null)); targetPlayer.SetCustomProperties(hashtable2); return; } case 6: { Hashtable hashtable3 = new Hashtable(); hashtable3.Add(PhotonPlayerProperty.max_dmg, this.parameters[1].returnInt(null)); targetPlayer.SetCustomProperties(hashtable3); return; } case 7: { Hashtable hashtable4 = new Hashtable(); hashtable4.Add(PhotonPlayerProperty.total_dmg, this.parameters[1].returnInt(null)); targetPlayer.SetCustomProperties(hashtable4); return; } case 8: { Hashtable hashtable5 = new Hashtable(); hashtable5.Add(PhotonPlayerProperty.name, this.parameters[1].returnString(null)); targetPlayer.SetCustomProperties(hashtable5); return; } case 9: { Hashtable hashtable6 = new Hashtable(); hashtable6.Add(PhotonPlayerProperty.guildName, this.parameters[1].returnString(null)); targetPlayer.SetCustomProperties(hashtable6); return; } case 10: { Hashtable hashtable7 = new Hashtable(); hashtable7.Add(PhotonPlayerProperty.RCteam, this.parameters[1].returnInt(null)); targetPlayer.SetCustomProperties(hashtable7); return; } case 11: { Hashtable hashtable8 = new Hashtable(); hashtable8.Add(PhotonPlayerProperty.customInt, this.parameters[1].returnInt(null)); targetPlayer.SetCustomProperties(hashtable8); return; } case 12: { Hashtable hashtable9 = new Hashtable(); hashtable9.Add(PhotonPlayerProperty.customBool, this.parameters[1].returnBool(null)); targetPlayer.SetCustomProperties(hashtable9); return; } case 13: { Hashtable hashtable10 = new Hashtable(); hashtable10.Add(PhotonPlayerProperty.customString, this.parameters[1].returnString(null)); targetPlayer.SetCustomProperties(hashtable10); return; } case 14: { Hashtable hashtable11 = new Hashtable(); hashtable11.Add(PhotonPlayerProperty.RCteam, this.parameters[1].returnFloat(null)); targetPlayer.SetCustomProperties(hashtable11); return; } } break; } case 8: switch (this.actionType) { case 0: { TITAN titan2 = this.parameters[0].returnTitan(null); object[] parameters = new object[] { this.parameters[1].returnPlayer(null).ID, this.parameters[2].returnInt(null) }; titan2.photonView.RPC("titanGetHit", titan2.photonView.owner, parameters); return; } case 1: FengGameManagerMKII.instance.spawnTitanAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null)); return; case 2: FengGameManagerMKII.instance.spawnTitanAtAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null), this.parameters[4].returnFloat(null), this.parameters[5].returnFloat(null), this.parameters[6].returnFloat(null)); return; case 3: { TITAN titan3 = this.parameters[0].returnTitan(null); int num7 = this.parameters[1].returnInt(null); titan3.currentHealth = num7; if (titan3.maxHealth == 0) { titan3.maxHealth = titan3.currentHealth; } titan3.photonView.RPC("labelRPC", PhotonTargets.AllBuffered, new object[] { titan3.currentHealth, titan3.maxHealth }); return; } case 4: { TITAN titan4 = this.parameters[0].returnTitan(null); if (titan4.photonView.isMine) { titan4.moveTo(this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null)); } else { titan4.photonView.RPC("moveToRPC", titan4.photonView.owner, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) }); } return; } } break; case 9: switch (this.actionType) { case 0: FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { this.parameters[0].returnString(null), string.Empty }); return; case 1: FengGameManagerMKII.instance.gameWin2(); if (this.parameters[0].returnBool(null)) { FengGameManagerMKII.intVariables.Clear(); FengGameManagerMKII.boolVariables.Clear(); FengGameManagerMKII.stringVariables.Clear(); FengGameManagerMKII.floatVariables.Clear(); FengGameManagerMKII.playerVariables.Clear(); FengGameManagerMKII.titanVariables.Clear(); } return; case 2: FengGameManagerMKII.instance.gameLose2(); if (this.parameters[0].returnBool(null)) { FengGameManagerMKII.intVariables.Clear(); FengGameManagerMKII.boolVariables.Clear(); FengGameManagerMKII.stringVariables.Clear(); FengGameManagerMKII.floatVariables.Clear(); FengGameManagerMKII.playerVariables.Clear(); FengGameManagerMKII.titanVariables.Clear(); } return; case 3: if (this.parameters[0].returnBool(null)) { FengGameManagerMKII.intVariables.Clear(); FengGameManagerMKII.boolVariables.Clear(); FengGameManagerMKII.stringVariables.Clear(); FengGameManagerMKII.floatVariables.Clear(); FengGameManagerMKII.playerVariables.Clear(); FengGameManagerMKII.titanVariables.Clear(); } FengGameManagerMKII.instance.restartGame2(false); return; } break; } }
public void doAction() { switch (this.actionClass) { case 0: this.nextEvent.checkEvent(); return; case 1: { string key = this.parameters[0].returnString(null); int num2 = this.parameters[1].returnInt(null); switch (this.actionType) { case 0: if (!RCManager.intVariables.ContainsKey(key)) { RCManager.intVariables.Add(key, num2); return; } RCManager.intVariables[key] = num2; return; case 1: if (!RCManager.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } RCManager.intVariables[key] = (int)RCManager.intVariables[key] + num2; return; case 2: if (!RCManager.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } RCManager.intVariables[key] = (int)RCManager.intVariables[key] - num2; return; case 3: if (!RCManager.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } RCManager.intVariables[key] = (int)RCManager.intVariables[key] * num2; return; case 4: if (!RCManager.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } RCManager.intVariables[key] = (int)RCManager.intVariables[key] / num2; return; case 5: if (!RCManager.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } RCManager.intVariables[key] = (int)RCManager.intVariables[key] % num2; return; case 6: if (!RCManager.intVariables.ContainsKey(key)) { this.callException("Variable not found: " + key); return; } RCManager.intVariables[key] = (int)Math.Pow((double)((int)RCManager.intVariables[key]), (double)num2); return; case 7: case 8: case 9: case 10: case 11: break; case 12: if (!RCManager.intVariables.ContainsKey(key)) { RCManager.intVariables.Add(key, UnityEngine.Random.Range(num2, this.parameters[2].returnInt(null))); return; } RCManager.intVariables[key] = UnityEngine.Random.Range(num2, this.parameters[2].returnInt(null)); return; default: return; } break; } case 2: { string str2 = this.parameters[0].returnString(null); bool flag2 = this.parameters[1].returnBool(null); int num3 = this.actionType; if (num3 != 0) { if (num3 != 11) { if (num3 != 12) { return; } if (!RCManager.boolVariables.ContainsKey(str2)) { RCManager.boolVariables.Add(str2, Convert.ToBoolean(UnityEngine.Random.Range(0, 2))); return; } RCManager.boolVariables[str2] = Convert.ToBoolean(UnityEngine.Random.Range(0, 2)); return; } else { if (!RCManager.boolVariables.ContainsKey(str2)) { this.callException("Variable not found: " + str2); return; } RCManager.boolVariables[str2] = !(bool)RCManager.boolVariables[str2]; return; } } else { if (!RCManager.boolVariables.ContainsKey(str2)) { RCManager.boolVariables.Add(str2, flag2); return; } RCManager.boolVariables[str2] = flag2; return; } } case 3: { string str3 = this.parameters[0].returnString(null); int num4 = this.actionType; if (num4 != 0) { switch (num4) { case 7: { string str4 = string.Empty; for (int i = 1; i < this.parameters.Length; i++) { str4 += this.parameters[i].returnString(null); } if (!RCManager.stringVariables.ContainsKey(str3)) { RCManager.stringVariables.Add(str3, str4); return; } RCManager.stringVariables[str3] = str4; return; } case 8: { string str5 = this.parameters[1].returnString(null); if (!RCManager.stringVariables.ContainsKey(str3)) { this.callException("No Variable"); return; } RCManager.stringVariables[str3] = (string)RCManager.stringVariables[str3] + str5; return; } case 9: this.parameters[1].returnString(null); if (!RCManager.stringVariables.ContainsKey(str3)) { this.callException("No Variable"); return; } RCManager.stringVariables[str3] = ((string)RCManager.stringVariables[str3]).Replace(this.parameters[1].returnString(null), this.parameters[2].returnString(null)); return; default: return; } } else { string str6 = this.parameters[1].returnString(null); if (!RCManager.stringVariables.ContainsKey(str3)) { RCManager.stringVariables.Add(str3, str6); return; } RCManager.stringVariables[str3] = str6; return; } } case 4: { string str7 = this.parameters[0].returnString(null); float num5 = this.parameters[1].returnFloat(null); switch (this.actionType) { case 0: if (!RCManager.floatVariables.ContainsKey(str7)) { RCManager.floatVariables.Add(str7, num5); return; } RCManager.floatVariables[str7] = num5; return; case 1: if (!RCManager.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } RCManager.floatVariables[str7] = (float)RCManager.floatVariables[str7] + num5; return; case 2: if (!RCManager.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } RCManager.floatVariables[str7] = (float)RCManager.floatVariables[str7] - num5; return; case 3: if (!RCManager.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } RCManager.floatVariables[str7] = (float)RCManager.floatVariables[str7] * num5; return; case 4: if (!RCManager.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } RCManager.floatVariables[str7] = (float)RCManager.floatVariables[str7] / num5; return; case 5: if (!RCManager.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } RCManager.floatVariables[str7] = (float)RCManager.floatVariables[str7] % num5; return; case 6: if (!RCManager.floatVariables.ContainsKey(str7)) { this.callException("No Variable"); return; } RCManager.floatVariables[str7] = (float)Math.Pow((double)((int)RCManager.floatVariables[str7]), (double)num5); return; case 7: case 8: case 9: case 10: case 11: break; case 12: if (!RCManager.floatVariables.ContainsKey(str7)) { RCManager.floatVariables.Add(str7, UnityEngine.Random.Range(num5, this.parameters[2].returnFloat(null))); return; } RCManager.floatVariables[str7] = UnityEngine.Random.Range(num5, this.parameters[2].returnFloat(null)); return; default: return; } break; } case 5: { string str8 = this.parameters[0].returnString(null); PhotonPlayer player = this.parameters[1].returnPlayer(null); if (this.actionType == 0) { if (!RCManager.playerVariables.ContainsKey(str8)) { RCManager.playerVariables.Add(str8, player); return; } RCManager.playerVariables[str8] = player; return; } break; } case 6: { string str9 = this.parameters[0].returnString(null); TITAN titan = this.parameters[1].returnTitan(null); if (this.actionType == 0) { if (!RCManager.titanVariables.ContainsKey(str9)) { RCManager.titanVariables.Add(str9, titan); return; } RCManager.titanVariables[str9] = titan; return; } break; } case 7: { PhotonPlayer targetPlayer = this.parameters[0].returnPlayer(null); switch (this.actionType) { case 0: { int iD = targetPlayer.ID; if (RCManager.heroHash.ContainsKey(iD)) { HERO hero = (HERO)RCManager.heroHash[iD]; hero.markDie(); hero.BasePV.RPC("netDie2", PhotonTargets.All, new object[] { -1, this.parameters[1].returnString(null) + " " }); return; } this.callException("Player Not Alive"); return; } case 1: FengGameManagerMKII.FGM.BasePV.RPC("respawnHeroInNewRound", targetPlayer, new object[0]); return; case 2: FengGameManagerMKII.FGM.BasePV.RPC("spawnPlayerAtRPC", targetPlayer, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) }); return; case 3: { int num6 = targetPlayer.ID; if (RCManager.heroHash.ContainsKey(num6)) { ((HERO)RCManager.heroHash[num6]).BasePV.RPC("moveToRPC", targetPlayer, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) }); return; } this.callException("Player Not Alive"); return; } case 4: targetPlayer.SetCustomProperties(new Hashtable { { "kills", this.parameters[1].returnInt(null) } }); return; case 5: targetPlayer.SetCustomProperties(new Hashtable { { "deaths", this.parameters[1].returnInt(null) } }); return; case 6: targetPlayer.SetCustomProperties(new Hashtable { { "max_dmg", this.parameters[1].returnInt(null) } }); return; case 7: targetPlayer.SetCustomProperties(new Hashtable { { "total_dmg", this.parameters[1].returnInt(null) } }); return; case 8: targetPlayer.SetCustomProperties(new Hashtable { { "name", this.parameters[1].returnString(null) } }); return; case 9: targetPlayer.SetCustomProperties(new Hashtable { { "guildName", this.parameters[1].returnString(null) } }); return; case 10: targetPlayer.SetCustomProperties(new Hashtable { { "RCteam", this.parameters[1].returnInt(null) } }); return; case 11: targetPlayer.SetCustomProperties(new Hashtable { { "customInt", this.parameters[1].returnInt(null) } }); return; case 12: targetPlayer.SetCustomProperties(new Hashtable { { "customBool", this.parameters[1].returnBool(null) } }); return; case 13: targetPlayer.SetCustomProperties(new Hashtable { { "customString", this.parameters[1].returnString(null) } }); return; case 14: targetPlayer.SetCustomProperties(new Hashtable { { "RCteam", this.parameters[1].returnFloat(null) } }); return; default: return; } } case 8: switch (this.actionType) { case 0: { TITAN titan2 = this.parameters[0].returnTitan(null); object[] parameters = new object[] { this.parameters[1].returnPlayer(null).ID, this.parameters[2].returnInt(null) }; titan2.BasePV.RPC("titanGetHit", titan2.BasePV.owner, parameters); return; } case 1: FengGameManagerMKII.FGM.SpawnTitanAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null)); return; case 2: FengGameManagerMKII.FGM.SpawnTitanAtAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null), this.parameters[4].returnFloat(null), this.parameters[5].returnFloat(null), this.parameters[6].returnFloat(null)); return; case 3: { TITAN titan3 = this.parameters[0].returnTitan(null); int num7 = this.parameters[1].returnInt(null); titan3.currentHealth = num7; if (titan3.maxHealth == 0) { titan3.maxHealth = titan3.currentHealth; } titan3.BasePV.RPC("labelRPC", PhotonTargets.AllBuffered, new object[] { titan3.currentHealth, titan3.maxHealth }); return; } case 4: { TITAN titan4 = this.parameters[0].returnTitan(null); if (titan4.BasePV.IsMine) { titan4.moveTo(this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null)); return; } titan4.BasePV.RPC("moveToRPC", titan4.BasePV.owner, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) }); return; } default: return; } case 9: switch (this.actionType) { case 0: FengGameManagerMKII.FGM.BasePV.RPC("Chat", PhotonTargets.All, new object[] { this.parameters[0].returnString(null), string.Empty }); return; case 1: FengGameManagerMKII.FGM.GameWin(); if (this.parameters[0].returnBool(null)) { RCManager.intVariables.Clear(); RCManager.boolVariables.Clear(); RCManager.stringVariables.Clear(); RCManager.floatVariables.Clear(); RCManager.playerVariables.Clear(); RCManager.titanVariables.Clear(); } return; case 2: FengGameManagerMKII.FGM.GameLose(); if (this.parameters[0].returnBool(null)) { RCManager.intVariables.Clear(); RCManager.boolVariables.Clear(); RCManager.stringVariables.Clear(); RCManager.floatVariables.Clear(); RCManager.playerVariables.Clear(); RCManager.titanVariables.Clear(); } return; case 3: if (this.parameters[0].returnBool(null)) { RCManager.intVariables.Clear(); RCManager.boolVariables.Clear(); RCManager.stringVariables.Clear(); RCManager.floatVariables.Clear(); RCManager.playerVariables.Clear(); RCManager.titanVariables.Clear(); } FengGameManagerMKII.FGM.RestartGame(false, false); return; default: return; } default: return; } }