public bool method_82(GameClient Session, RoomItem RoomItem_0, bool bool_13, string string_10) { if (bool_13) { RoomItem_0.Interactor.OnPlace(Session, RoomItem_0); string text = RoomItem_0.GetBaseItem().InteractionType.ToLower(); if (text != null && text == "dimmer" && this.MoodlightData == null) { this.MoodlightData = new MoodlightData(RoomItem_0.uint_0); RoomItem_0.ExtraData = this.MoodlightData.GenerateExtraData(); } if (!this.hashtable_3.ContainsKey(RoomItem_0.uint_0)) { this.hashtable_3.Add(RoomItem_0.uint_0, RoomItem_0); if (RoomItem_0.Boolean_2) { this.hashtable_0.Add(RoomItem_0.uint_0, RoomItem_0); } else { if (!this.hashtable_4.Contains(RoomItem_0.uint_0)) { this.hashtable_4.Add(RoomItem_0.uint_0, RoomItem_0); } } } ServerMessage Message5_ = new ServerMessage(Outgoing.AddWallItemToRoom); // Updated RoomItem_0.Serialize(Message5_); Message5_.AppendString(this.Owner); this.SendMessage(Message5_, null); } else { if (!this.hashtable_2.Contains(RoomItem_0.uint_0)) { this.hashtable_2.Add(RoomItem_0.uint_0, RoomItem_0); } } if (!bool_13) { RoomItem_0.string_7 = string_10; ServerMessage Message5_ = new ServerMessage(Outgoing.UpdateWallItemOnRoom); RoomItem_0.Serialize(Message5_); this.SendMessage(Message5_, null); } return true; }
public bool method_79(GameClient Session, RoomItem RoomItem_0, int int_17, int int_18, int int_19, bool bool_13, bool bool_14, bool bool_15) { //TODO HOFFENTLICH GEHT DAS .___. Dictionary<int, AffectedTile> dictionary = this.method_94(RoomItem_0.GetBaseItem().Length, RoomItem_0.GetBaseItem().Width, int_17, int_18, int_19); bool result; if (!this.method_92(int_17, int_18)) { result = false; } else { foreach (AffectedTile current in dictionary.Values) { if (!this.method_92(current.Int32_0, current.Int32_1)) { result = false; return result; } } double num = this.RoomModel.double_1[int_17, int_18]; if (!bool_14) { if (RoomItem_0.int_3 == int_19 && RoomItem_0.GetX == int_17 && RoomItem_0.Int32_1 == int_18 && RoomItem_0.Double_0 != num) { if (RoomItem_0.GetBaseItem().InteractionType != "stackfield") { result = false; return result; } } if (this.RoomModel.squareState[int_17, int_18] != SquareState.OPEN && this.RoomModel.squareState[int_17, int_18] != SquareState.GROUPGATE) { if (RoomItem_0.GetBaseItem().InteractionType != "stackfield") { result = false; return result; } } foreach (AffectedTile current in dictionary.Values) { if (this.RoomModel.squareState[current.Int32_0, current.Int32_1] != SquareState.OPEN && this.RoomModel.squareState[int_17, int_18] != SquareState.GROUPGATE) { if (RoomItem_0.GetBaseItem().InteractionType != "stackfield") { result = false; return result; } } } if (RoomItem_0.GetBaseItem().IsSeat || RoomItem_0.Boolean_0) { goto IL_1FE; } if (this.method_97(int_17, int_18) && !RoomItem_0.GetBaseItem().Walkable) { if (RoomItem_0.GetBaseItem().InteractionType != "stackfield") { result = false; ServerMessage Testing = new ServerMessage(Outgoing.ObjectUpdate); // Updated RoomItem_0.Serialize(Testing); Session.SendMessage(Testing); return result; } } using (Dictionary<int, AffectedTile>.ValueCollection.Enumerator enumerator = dictionary.Values.GetEnumerator()) { while (enumerator.MoveNext()) { AffectedTile current = enumerator.Current; if (this.method_97(current.Int32_0, current.Int32_1) && !RoomItem_0.GetBaseItem().Walkable) { if (RoomItem_0.GetBaseItem().InteractionType != "stackfield") { result = false; return result; } } } goto IL_1FE; } } if (this.RoomModel.squareState[int_17, int_18] != SquareState.OPEN) { if (RoomItem_0.GetBaseItem().InteractionType != "stackfield") { result = false; return result; } } if ((!bool_15 || !RoomItem_0.GetBaseItem().Walkable) && this.method_97(int_17, int_18)) { if (RoomItem_0.GetBaseItem().InteractionType != "stackfield") { result = false; return result; } } else if (!RoomItem_0.GetBaseItem().Walkable) { if (!bool_15 && this.method_97(int_17, int_18)) { if (RoomItem_0.GetBaseItem().InteractionType != "stackfield") { result = false; return result; } } } IL_1FE: List<RoomItem> list = this.method_93(int_17, int_18); List<RoomItem> list2 = new List<RoomItem>(); List<RoomItem> list3 = new List<RoomItem>(); foreach (AffectedTile current in dictionary.Values) { List<RoomItem> list4 = this.method_93(current.Int32_0, current.Int32_1); if (list4 != null) { list2.AddRange(list4); } } if (list == null) { list = new List<RoomItem>(); } list3.AddRange(list); list3.AddRange(list2); int num2 = 0; bool containsStackField = false; double stackFieldHeight = 0.0; foreach (RoomItem current23 in list3) { if (current23.GetBaseItem().InteractionType == "stackfield") { containsStackField = true; stackFieldHeight = current23.Double_0; goto nextStep; } } nextStep: foreach (RoomItem current2 in list3) { if (current2 != null && current2.uint_0 != RoomItem_0.uint_0 && current2.GetBaseItem() != null) { if (!current2.GetBaseItem().Stackable) { if (RoomItem_0.GetBaseItem().InteractionType != "stackfield" && !containsStackField) { result = false; ServerMessage Testing = new ServerMessage(Outgoing.ObjectUpdate); // Updated RoomItem_0.Serialize(Testing); Session.SendMessage(Testing); return result; } } if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "wf_trg_timer" && current2.GetBaseItem().InteractionType.ToLower() == "wf_trg_timer") { result = false; return result; } if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "ball") { if (current2.GetBaseItem().InteractionType.ToLower() == "blue_goal") { num2 = 11; ProgressFootballAchievement(RoomItem_0); } if (current2.GetBaseItem().InteractionType.ToLower() == "red_goal") { num2 = 5; ProgressFootballAchievement(RoomItem_0); } if (current2.GetBaseItem().InteractionType.ToLower() == "yellow_goal") { num2 = 14; ProgressFootballAchievement(RoomItem_0); } if (current2.GetBaseItem().InteractionType.ToLower() == "green_goal") { num2 = 8; ProgressFootballAchievement(RoomItem_0); } } } } if (num2 > 0) { this.method_89(num2, RoomItem_0, false, Session); } if (!RoomItem_0.Boolean_0) { if (RoomItem_0.int_3 != int_19 && RoomItem_0.GetX == int_17 && RoomItem_0.Int32_1 == int_18) { num = RoomItem_0.Double_0; } foreach (RoomItem current2 in list3) { if (current2.uint_0 != RoomItem_0.uint_0 && current2.Double_1 > num) { num = current2.Double_1; } } } if (int_19 != 0 && int_19 != 2 && int_19 != 4 && int_19 != 6 && int_19 != 8 && RoomItem_0.GetBaseItem().InteractionType != "mannequin" && RoomItem_0.GetBaseItem().InteractionType != "gld_furni") { int_19 = 0; } Dictionary<int, AffectedTile> dictionary2 = new Dictionary<int, AffectedTile>(); dictionary2 = this.method_94(RoomItem_0.GetBaseItem().Length, RoomItem_0.GetBaseItem().Width, RoomItem_0.GetX, RoomItem_0.Int32_1, RoomItem_0.int_3); int num3 = 0; int num4 = 0; if (!bool_13) { num3 = RoomItem_0.GetX; num4 = RoomItem_0.Int32_1; } RoomItem_0.int_3 = int_19; if (containsStackField) num = stackFieldHeight; RoomItem_0.SetPosition(int_17, int_18, num); if (!bool_14 && Session != null) { RoomItem_0.Interactor.OnPlace(Session, RoomItem_0); } if (bool_13) { if (this.hashtable_1.Contains(RoomItem_0.uint_0)) { this.hashtable_1.Remove(RoomItem_0.uint_0); } if (this.hashtable_3.Contains(RoomItem_0.uint_0)) { result = false; ServerMessage Testing = new ServerMessage(Outgoing.ObjectUpdate); // Updated RoomItem_0.Serialize(Testing); Session.SendMessage(Testing); return result; } this.hashtable_3.Add(RoomItem_0.uint_0, RoomItem_0); if (RoomItem_0.Boolean_2) { if (this.hashtable_0.Contains(RoomItem_0.uint_0)) { this.hashtable_0.Remove(RoomItem_0.uint_0); } this.hashtable_0.Add(RoomItem_0.uint_0, RoomItem_0); } else { if (this.hashtable_4.Contains(RoomItem_0.uint_0)) { this.hashtable_4.Remove(RoomItem_0.uint_0); } this.hashtable_4.Add(RoomItem_0.uint_0, RoomItem_0); } ServerMessage Message5_ = new ServerMessage(Outgoing.ObjectAdd); // Updated RoomItem_0.Serialize(Message5_); Message5_.AppendString(this.Owner); this.SendMessage(Message5_, null); string text = RoomItem_0.GetBaseItem().InteractionType.ToLower(); switch (text) { case "bb_patch": this.list_5.Add(RoomItem_0); if (RoomItem_0.ExtraData == "5") { this.list_6.Add(RoomItem_0); } else { if (RoomItem_0.ExtraData == "8") { this.list_7.Add(RoomItem_0); } else { if (RoomItem_0.ExtraData == "11") { this.list_9.Add(RoomItem_0); } else { if (RoomItem_0.ExtraData == "14") { this.list_8.Add(RoomItem_0); } } } } break; case "blue_score": this.list_12.Add(RoomItem_0); break; case "green_score": this.list_13.Add(RoomItem_0); break; case "red_score": this.list_10.Add(RoomItem_0); break; case "yellow_score": this.list_11.Add(RoomItem_0); break; case "stickiepole": this.list_3.Add(RoomItem_0); break; case "wf_trg_onsay": case "wf_trg_enterroom": case "wf_trg_furnistate": case "wf_trg_onfurni": case "wf_trg_offfurni": case "wf_trg_gameend": case "wf_trg_gamestart": case "wf_trg_atscore": case "wf_trg_bot_reached_stf": if (!this.list_14.Contains(RoomItem_0)) { this.list_14.Add(RoomItem_0); } break; case "wf_trg_attime": if (RoomItem_0.string_2.Length <= 0) { RoomItem_0.string_2 = "10"; } if (!this.list_14.Contains(RoomItem_0)) { this.list_14.Add(RoomItem_0); } RoomItem_0.bool_0 = true; RoomItem_0.ReqUpdate(1); break; case "wf_trg_timer": if (RoomItem_0.string_2.Length <= 0) { RoomItem_0.string_2 = "10"; } if (!this.list_14.Contains(RoomItem_0)) { this.list_14.Add(RoomItem_0); } RoomItem_0.bool_0 = true; RoomItem_0.ReqUpdate(1); break; case "wf_act_saymsg": case "wf_act_kick_user": case "wf_act_moveuser": case "wf_act_togglefurni": case "wf_act_givepoints": case "wf_act_moverotate": case "wf_act_matchfurni": case "wf_act_give_phx": case "wf_act_bot_follow_avatar": case "wf_act_bot_give_handitem": case "wf_act_bot_talk": case "wf_act_bot_talk_to_avatar": case "wf_act_bot_clothes": case "wf_act_yt": case "wf_act_img": if (!this.list_15.Contains(RoomItem_0)) { this.list_15.Add(RoomItem_0); } break; case "wf_cnd_trggrer_on_frn": case "wf_cnd_furnis_hv_avtrs": case "wf_cnd_has_furni_on": case "wf_cnd_match_snapshot": case "wf_cnd_time_more_than": case "wf_cnd_time_less_than": case "wf_cnd_phx": case "wf_cnd_user_count_in": case "wf_cnd_not_user_count": case "wf_cnd_actor_in_group": case "wf_cnd_actor_in_team": case "wf_cnd_has_handitem": case "wf_cnd_not_furni_on": case "wf_cnd_not_hv_avtrs": case "wf_cnd_not_in_group": case "wf_cnd_not_in_team": case "wf_cnd_not_match_snap": case "wf_cnd_has_purse": case "wf_cnd_hasnot_purse": if (!this.list_16.Contains(RoomItem_0)) { this.list_16.Add(RoomItem_0); } break; case "freeze_tile": this.GetFreeze().AddFreezeTile(RoomItem_0); break; case "freeze_ice_block": this.GetFreeze().AddFreezeBlock(RoomItem_0); break; case "freeze_exit": RoomItem exitTeleport = this.GetFreeze().ExitTeleport; if (exitTeleport == null) { this.GetFreeze().ExitTeleport = RoomItem_0; } break; case "freeze_blue_gate": this.GetGameManager().AddFreezeGate(RoomItem_0); break; case "freeze_red_gate": this.GetGameManager().AddFreezeGate(RoomItem_0); break; case "freeze_green_gate": this.GetGameManager().AddFreezeGate(RoomItem_0); break; case "freeze_yellow_gate": this.GetGameManager().AddFreezeGate(RoomItem_0); break; case "freeze_blue_score": this.GetGameManager().AddFreezeScoreboard(RoomItem_0); break; case "freeze_red_score": this.GetGameManager().AddFreezeScoreboard(RoomItem_0); break; case "freeze_green_score": this.GetGameManager().AddFreezeScoreboard(RoomItem_0); break; case "freeze_yellow_score": this.GetGameManager().AddFreezeScoreboard(RoomItem_0); break; } } else { if (!this.hashtable_2.Contains(RoomItem_0.uint_0) && !this.hashtable_3.ContainsKey(RoomItem_0.uint_0)) { this.hashtable_2.Add(RoomItem_0.uint_0, RoomItem_0); } if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "wf_act_give_phx" && Session != null) { string text2 = RoomItem_0.string_2.Split(new char[] { ':' })[0].ToLower(); if (!Essential.GetGame().GetRoleManager().HasSuperWiredFXFuse(text2, Session)) { RoomItem_0.string_2 = ""; } } if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "wf_cnd_phx" && Session != null) { string text2 = RoomItem_0.string_2.Split(new char[] { ':' })[0].ToLower(); if (!Essential.GetGame().GetRoleManager().HasSuperWiredcndFuse(text2, Session)) { RoomItem_0.string_2 = ""; } } ServerMessage Message5_ = new ServerMessage(Outgoing.ObjectUpdate); // Updated RoomItem_0.Serialize(Message5_); this.SendMessage(Message5_, null); } this.method_22(); if (!bool_14) { this.method_87(this.method_43(int_17, int_18), true, true); foreach (AffectedTile current in dictionary.Values) { this.method_87(this.method_43(current.Int32_0, current.Int32_1), true, true); } if (num3 > 0 || num4 > 0) { this.method_87(this.method_43(num3, num4), true, true); } foreach (AffectedTile current in dictionary2.Values) { this.method_87(this.method_43(current.Int32_0, current.Int32_1), true, true); } } result = true; } return result; }