120 {
122 {
123 Netplay.Clients[
whoAmI].TimeOutTimer = 0;
124 }
125 else
126 {
127 Netplay.Connection.TimeOutTimer = 0;
128 }
130 int num = 0;
134 {
135 return;
136 }
137 Main.ActiveNetDiagnosticsUI.CountReadMessage(
b,
length);
138 if (Main.netMode == 1 && Netplay.Connection.StatusMax > 0)
139 {
140 Netplay.Connection.StatusCount++;
141 }
142 if (Main.verboseNetplay)
143 {
145 {
146 }
148 {
150 }
151 }
152 if (Main.netMode == 2 &&
b != 38 && Netplay.Clients[
whoAmI].State == -1)
153 {
154 NetMessage.TrySendData(2,
whoAmI, -1, Lang.mp[1].ToNetworkText());
155 return;
156 }
157 if (Main.netMode == 2)
158 {
159 if (Netplay.Clients[
whoAmI].State < 10 &&
b > 12 &&
b != 93 &&
b != 16 &&
b != 42 &&
b != 50 &&
b != 38 &&
b != 68 &&
b != 147)
160 {
161 NetMessage.BootPlayer(
whoAmI, Lang.mp[2].ToNetworkText());
162 }
163 if (Netplay.Clients[
whoAmI].State == 0 &&
b != 1)
164 {
165 NetMessage.BootPlayer(
whoAmI, Lang.mp[2].ToNetworkText());
166 }
167 }
169 {
171 }
172 reader.BaseStream.Position = num;
174 {
175 case 1:
176 if (Main.netMode != 2)
177 {
178 break;
179 }
180 if (Main.dedServ && Netplay.IsBanned(Netplay.Clients[
whoAmI].Socket.GetRemoteAddress()))
181 {
182 NetMessage.TrySendData(2,
whoAmI, -1, Lang.mp[3].ToNetworkText());
183 }
184 else
185 {
186 if (Netplay.Clients[
whoAmI].State != 0)
187 {
188 break;
189 }
191 {
192 if (string.IsNullOrEmpty(Netplay.ServerPassword))
193 {
194 Netplay.Clients[
whoAmI].State = 1;
195 NetMessage.TrySendData(3,
whoAmI);
196 }
197 else
198 {
199 Netplay.Clients[
whoAmI].State = -1;
200 NetMessage.TrySendData(37,
whoAmI);
201 }
202 }
203 else
204 {
205 NetMessage.TrySendData(2,
whoAmI, -1, Lang.mp[4].ToNetworkText());
206 }
207 }
208 break;
209 case 2:
210 if (Main.netMode == 1)
211 {
212 Netplay.Disconnect = true;
214 }
215 break;
216 case 3:
217 if (Main.netMode == 1)
218 {
219 if (Netplay.Connection.State == 1)
220 {
221 Netplay.Connection.State = 2;
222 }
225 Netplay.Connection.ServerSpecialFlags[2] =
value5;
226 if (
num142 != Main.myPlayer)
227 {
228 Main.player[
num142] = Main.ActivePlayerFileData.Player;
229 Main.player[Main.myPlayer] =
new Player();
230 }
234 NetMessage.TrySendData(4, -1, -1,
null,
num142);
235 NetMessage.TrySendData(68, -1, -1,
null,
num142);
236 NetMessage.TrySendData(16, -1, -1,
null,
num142);
237 NetMessage.TrySendData(42, -1, -1,
null,
num142);
238 NetMessage.TrySendData(50, -1, -1,
null,
num142);
239 NetMessage.TrySendData(147, -1, -1,
null,
num142,
player12.CurrentLoadoutIndex);
241 {
243 }
259 NetMessage.TrySendData(6);
260 if (Netplay.Connection.State == 2)
261 {
262 Netplay.Connection.State = 3;
263 }
264 }
265 break;
266 case 4:
267 {
269 if (Main.netMode == 2)
270 {
272 }
273 if (
num211 == Main.myPlayer && !Main.ServerSideCharacter)
274 {
275 break;
276 }
283 {
284 player14.hair = 0;
285 }
290 player14.hairColor =
reader.ReadRGB();
291 player14.skinColor =
reader.ReadRGB();
292 player14.eyeColor =
reader.ReadRGB();
293 player14.shirtColor =
reader.ReadRGB();
294 player14.underShirtColor =
reader.ReadRGB();
295 player14.pantsColor =
reader.ReadRGB();
296 player14.shoeColor =
reader.ReadRGB();
298 player14.difficulty = 0;
300 {
301 player14.difficulty = 1;
302 }
304 {
305 player14.difficulty = 2;
306 }
308 {
309 player14.difficulty = 3;
310 }
312 {
313 player14.difficulty = 3;
314 }
319 player14.unlockedBiomeTorches =
bitsByte25[2];
330 if (Main.netMode != 2)
331 {
332 break;
333 }
335 if (Netplay.Clients[
whoAmI].State < 10)
336 {
338 {
340 {
342 }
343 }
344 }
346 {
348 }
350 {
352 }
354 {
356 }
357 else if (
player14.difficulty == 3 && !Main.GameModeInfo.IsJourneyMode)
358 {
360 }
361 else if (
player14.difficulty != 3 && Main.GameModeInfo.IsJourneyMode)
362 {
364 }
365 else
366 {
370 }
371 break;
372 }
373 case 5:
374 {
376 if (Main.netMode == 2)
377 {
379 }
380 if (
num258 == Main.myPlayer && !Main.ServerSideCharacter && !Main.player[
num258].HasLockedInventory())
381 {
382 break;
383 }
386 {
395 Player clientPlayer = Main.clientPlayer;
397 {
400 array4 = clientPlayer.Loadouts[2].Dye;
401 }
403 {
406 array4 = clientPlayer.Loadouts[2].Armor;
407 }
409 {
412 array4 = clientPlayer.Loadouts[1].Dye;
413 }
415 {
418 array4 = clientPlayer.Loadouts[1].Armor;
419 }
421 {
424 array4 = clientPlayer.Loadouts[0].Dye;
425 }
427 {
430 array4 = clientPlayer.Loadouts[0].Armor;
431 }
433 {
436 array4 = clientPlayer.bank4.item;
438 {
439 player17.disableVoidBag = -1;
441 }
442 }
444 {
447 array4 = clientPlayer.bank3.item;
448 }
450 {
452 }
454 {
457 array4 = clientPlayer.bank2.item;
458 }
460 {
463 array4 = clientPlayer.bank.item;
464 }
466 {
469 array4 = clientPlayer.miscDyes;
470 }
472 {
475 array4 = clientPlayer.miscEquips;
476 }
478 {
481 array4 = clientPlayer.dye;
482 }
484 {
487 array4 = clientPlayer.armor;
488 }
489 else
490 {
493 array4 = clientPlayer.inventory;
494 }
496 {
497 player17.trashItem =
new Item();
499 player17.trashItem.stack =
stack7;
501 if (
num258 == Main.myPlayer && !Main.ServerSideCharacter)
502 {
503 clientPlayer.trashItem =
player17.trashItem.Clone();
504 }
505 }
507 {
514 if (
num258 == Main.myPlayer && !Main.ServerSideCharacter)
515 {
517 }
519 {
521 }
522 if (
num258 == Main.myPlayer && Main.netMode == 1)
523 {
524 Main.player[
num258].inventoryChestStack[
num259] =
false;
526 {
528 }
529 }
530 }
531 else
532 {
537 if (
num258 == Main.myPlayer && !Main.ServerSideCharacter)
538 {
540 }
541 }
544 {
546 }
547 break;
548 }
549 }
550 case 6:
551 if (Main.netMode == 2)
552 {
553 if (Netplay.Clients[
whoAmI].State == 1)
554 {
555 Netplay.Clients[
whoAmI].State = 2;
556 }
557 NetMessage.TrySendData(7,
whoAmI);
558 Main.SyncAnInvasion(
whoAmI);
559 }
560 break;
561 case 7:
562 if (Main.netMode == 1)
563 {
601 {
603 }
605 {
607 }
609 {
611 }
613 {
615 }
617 WorldGen.BackgroundsCache.UpdateCache();
619 Main.raining = Main.maxRaining > 0f;
629 if (Main.ServerSideCharacter)
630 {
631 Main.ActivePlayerFileData.MarkAsServerSide();
632 }
644 Main.UpdateTimeRate();
694 NPC.combatBookVolumeTwoWasUsed =
bitsByte21[6];
700 NPC.unlockedSlimeRainbowSpawn =
bitsByte22[3];
719 {
720 Main.StartSlimeRain();
721 }
722 else
723 {
724 Main.StopSlimeRain();
725 }
729 if (Netplay.Connection.State == 3)
730 {
731 Main.windSpeedCurrent = Main.windSpeedTarget;
732 Netplay.Connection.State = 4;
733 }
734 Main.checkHalloween();
735 Main.checkXMas();
736 }
737 break;
738 case 8:
739 {
740 if (Main.netMode != 2)
741 {
742 break;
743 }
744 NetMessage.TrySendData(7,
whoAmI);
749 {
751 }
753 {
755 }
757 {
759 }
760 int num72 = Netplay.GetSectionX(Main.spawnTileX) - 2;
761 int num73 = Netplay.GetSectionY(Main.spawnTileY) - 1;
765 {
767 }
768 if (
num74 >= Main.maxSectionsX)
769 {
770 num74 = Main.maxSectionsX;
771 }
773 {
775 }
776 if (
num75 >= Main.maxSectionsY)
777 {
778 num75 = Main.maxSectionsY;
779 }
783 {
785 {
787 }
788 }
792 {
798 {
800 }
801 if (
num79 >= Main.maxSectionsX)
802 {
803 num79 = Main.maxSectionsX - 1;
804 }
806 {
808 }
809 if (
num80 >= Main.maxSectionsY)
810 {
811 num80 = Main.maxSectionsY - 1;
812 }
814 {
816 {
818 {
821 }
822 }
823 }
824 }
827 if (Netplay.Clients[
whoAmI].State == 2)
828 {
829 Netplay.Clients[
whoAmI].State = 3;
830 }
831 NetMessage.TrySendData(9,
whoAmI, -1, Lang.inter[44].ToNetworkText(),
num76);
835 {
837 {
839 }
840 }
842 {
844 {
846 {
848 }
849 }
850 }
852 {
854 }
856 {
857 if (Main.item[
num88].active)
858 {
859 NetMessage.TrySendData(21,
whoAmI, -1,
null,
num88);
860 NetMessage.TrySendData(22,
whoAmI, -1,
null,
num88);
861 }
862 }
864 {
865 if (Main.npc[
num89].active)
866 {
867 NetMessage.TrySendData(23,
whoAmI, -1,
null,
num89);
868 }
869 }
871 {
872 if (Main.projectile[
num90].active && (Main.projPet[Main.projectile[
num90].type] || Main.projectile[
num90].netImportant))
873 {
874 NetMessage.TrySendData(27,
whoAmI, -1,
null,
num90);
875 }
876 }
878 {
879 NetMessage.TrySendData(83,
whoAmI, -1,
null,
num91);
880 }
881 NetMessage.TrySendData(57,
whoAmI);
882 NetMessage.TrySendData(103);
883 NetMessage.TrySendData(101,
whoAmI);
884 NetMessage.TrySendData(136,
whoAmI);
885 NetMessage.TrySendData(49,
whoAmI);
886 Main.BestiaryTracker.OnPlayerJoining(
whoAmI);
888 Main.PylonSystem.OnPlayerJoining(
whoAmI);
889 break;
890 }
891 case 9:
892 if (Main.netMode == 1)
893 {
901 }
902 break;
903 case 10:
904 if (Main.netMode == 1)
905 {
907 }
908 break;
909 case 11:
910 if (Main.netMode == 1)
911 {
913 }
914 break;
915 case 12:
916 {
918 if (Main.netMode == 2)
919 {
921 }
929 {
930 player6.dead = true;
931 }
934 if (Main.netMode != 2 || Netplay.Clients[
whoAmI].State < 3)
935 {
936 break;
937 }
938 if (Netplay.Clients[
whoAmI].State == 3)
939 {
940 Netplay.Clients[
whoAmI].State = 10;
941 NetMessage.buffer[
whoAmI].broadcast =
true;
942 NetMessage.SyncConnectedPlayer(
whoAmI);
943 bool flag4 = NetMessage.DoesPlayerSlotCountAsAHost(
whoAmI);
945 if (NetMessage.DoesPlayerSlotCountAsAHost(
whoAmI))
946 {
948 }
951 NetMessage.TrySendData(129,
whoAmI);
952 NetMessage.greetPlayer(
whoAmI);
953 if (Main.player[
num92].unlockedBiomeTorches)
954 {
956 nPC2.SetDefaults(664);
957 Main.BestiaryTracker.Kills.RegisterKill(
nPC2);
958 }
959 }
960 else
961 {
963 }
964 break;
965 }
966 case 13:
967 {
969 if (
num138 != Main.myPlayer || Main.ServerSideCharacter)
970 {
971 if (Main.netMode == 2)
972 {
974 }
986 player10.direction = (
bitsByte7[6] ? 1 : (-1));
988 {
989 player10.pulley = true;
990 player10.pulleyDir = (byte)((!
bitsByte8[1]) ? 1
u : 2
u);
991 }
992 else
993 {
994 player10.pulley = false;
995 }
996 player10.vortexStealthActive =
bitsByte8[3];
997 player10.gravDir = (
bitsByte8[4] ? 1 : (-1));
1001 player10.position =
reader.ReadVector2();
1003 {
1004 player10.velocity =
reader.ReadVector2();
1005 }
1006 else
1007 {
1009 }
1011 {
1012 player10.PotionOfReturnOriginalUsePosition =
reader.ReadVector2();
1013 player10.PotionOfReturnHomePosition =
reader.ReadVector2();
1014 }
1015 else
1016 {
1017 player10.PotionOfReturnOriginalUsePosition = null;
1018 player10.PotionOfReturnHomePosition = null;
1019 }
1020 player10.tryKeepingHoveringUp =
bitsByte9[0];
1021 player10.IsVoidVaultEnabled =
bitsByte9[1];
1022 player10.sitting.isSitting =
bitsByte9[2];
1023 player10.downedDD2EventAnyDifficulty =
bitsByte9[3];
1024 player10.isPettingAnimal =
bitsByte9[4];
1025 player10.isTheAnimalBeingPetSmall =
bitsByte9[5];
1026 player10.tryKeepingHoveringDown =
bitsByte9[7];
1028 player10.autoReuseAllWeapons =
bitsByte10[1];
1030 player10.isOperatingAnotherEntity =
bitsByte10[3];
1032 if (Main.netMode == 2 && Netplay.Clients[
whoAmI].State == 10)
1033 {
1035 }
1036 }
1037 break;
1038 }
1039 case 14:
1040 {
1043 if (Main.netMode != 1)
1044 {
1045 break;
1046 }
1047 bool active = Main.player[
num253].active;
1049 {
1050 if (!Main.player[
num253].active)
1051 {
1053 }
1054 Main.player[
num253].active =
true;
1055 }
1056 else
1057 {
1058 Main.player[
num253].active =
false;
1059 }
1060 if (active != Main.player[
num253].active)
1061 {
1062 if (Main.player[
num253].active)
1063 {
1065 }
1066 else
1067 {
1069 }
1070 }
1071 break;
1072 }
1073 case 16:
1074 {
1076 if (
num139 != Main.myPlayer || Main.ServerSideCharacter)
1077 {
1078 if (Main.netMode == 2)
1079 {
1081 }
1086 {
1087 player11.statLifeMax = 100;
1088 }
1089 player11.dead = player11.statLife <= 0;
1090 if (Main.netMode == 2)
1091 {
1093 }
1094 }
1095 break;
1096 }
1097 case 17:
1098 {
1106 {
1107 break;
1108 }
1110 {
1112 }
1113 if (Main.netMode == 2)
1114 {
1116 {
1117 if (
b7 == 0 ||
b7 == 2 ||
b7 == 4)
1118 {
1119 Netplay.Clients[
whoAmI].SpamDeleteBlock += 1f;
1120 }
1121 if (
b7 == 1 ||
b7 == 3)
1122 {
1123 Netplay.Clients[
whoAmI].SpamAddBlock += 1f;
1124 }
1125 }
1126 if (!Netplay.Clients[
whoAmI].TileSections[Netplay.GetSectionX(
num176), Netplay.GetSectionY(
num177)])
1127 {
1129 }
1130 }
1132 {
1134 if (Main.netMode == 1 && !
flag9)
1135 {
1137 }
1138 }
1141 {
1144 {
1147 }
1149 }
1151 {
1153 }
1155 {
1157 }
1159 {
1161 }
1163 {
1165 }
1167 {
1169 }
1171 {
1173 }
1175 {
1177 }
1179 {
1181 }
1183 {
1185 }
1187 {
1189 }
1191 {
1193 }
1195 {
1197 }
1199 {
1201 }
1203 {
1205 }
1207 {
1209 }
1211 {
1213 }
1215 {
1216 case 18:
1220 return;
1221 case 19:
1225 return;
1226 case 20:
1228 {
1232 if (Main.netMode == 2)
1233 {
1235 }
1236 }
1237 return;
1238 case 21:
1240 break;
1241 }
1243 {
1245 }
1247 {
1250 }
1251 if (Main.netMode == 2)
1252 {
1254 {
1256 }
1258 {
1260 }
1261 }
1262 break;
1263 }
1264 case 18:
1265 if (Main.netMode == 1)
1266 {
1271 }
1272 break;
1273 case 19:
1274 {
1279 {
1282 {
1283 case 0:
1285 break;
1286 case 1:
1288 break;
1289 case 2:
1291 break;
1292 case 3:
1294 break;
1295 case 4:
1297 break;
1298 case 5:
1300 break;
1301 }
1302 if (Main.netMode == 2)
1303 {
1305 }
1306 }
1307 break;
1308 }
1309 case 20:
1310 {
1317 {
1318 break;
1319 }
1322 {
1324 }
1325 if (MessageBuffer.OnTileChangeReceived != null)
1326 {
1328 }
1334 {
1336 {
1338 {
1340 }
1349 if (Main.netMode != 2)
1350 {
1351 tile4.liquid = (byte)(
flag14 ? 1
u : 0
u);
1352 }
1360 {
1362 }
1364 {
1366 }
1368 {
1371 if (Main.tileFrameImportant[
tile4.type])
1372 {
1375 }
1377 {
1378 tile4.frameX = -1;
1379 tile4.frameY = -1;
1380 }
1383 {
1385 }
1387 {
1389 }
1391 {
1393 }
1395 }
1402 {
1404 }
1406 {
1409 }
1410 }
1411 }
1413 if (Main.netMode == 2)
1414 {
1416 }
1417 break;
1418 }
1419 case 21:
1420 case 90:
1421 case 145:
1422 case 148:
1423 {
1431 bool shimmered = false;
1432 float shimmerTime = 0f;
1433 int timeLeftInWhichTheItemCannotBeTakenByEnemies = 0;
1435 {
1438 }
1440 {
1441 timeLeftInWhichTheItemCannotBeTakenByEnemies =
reader.
ReadByte();
1442 }
1443 if (Main.netMode == 1)
1444 {
1446 {
1447 Main.item[
num105].active =
false;
1448 break;
1449 }
1456 item2.newAndShiny = newAndShiny;
1461 item2.active = true;
1462 item2.shimmered = shimmered;
1463 item2.shimmerTime = shimmerTime;
1465 {
1466 item2.instanced = true;
1467 item2.playerIndexTheItemIsReservedFor = Main.myPlayer;
1468 item2.keepTime = 600;
1469 }
1470 item2.timeLeftInWhichTheItemCannotBeTakenByEnemies = timeLeftInWhichTheItemCannotBeTakenByEnemies;
1471 item2.wet = Collision.WetCollision(
item2.position,
item2.width,
item2.height);
1473 }
1474 else
1475 {
1476 if (Main.timeItemSlotCannotBeReusedFor[
num105] > 0)
1477 {
1478 break;
1479 }
1481 {
1483 {
1484 Main.item[
num105].active =
false;
1485 NetMessage.TrySendData(21, -1, -1,
null,
num105);
1486 }
1487 break;
1488 }
1491 {
1493 }
1495 {
1499 }
1506 item4.active = true;
1507 item4.playerIndexTheItemIsReservedFor = Main.myPlayer;
1508 item4.timeLeftInWhichTheItemCannotBeTakenByEnemies = timeLeftInWhichTheItemCannotBeTakenByEnemies;
1510 {
1511 item4.shimmered = shimmered;
1512 item4.shimmerTime = shimmerTime;
1513 }
1515 {
1516 NetMessage.TrySendData(
b, -1, -1,
null,
num105);
1518 {
1520 Main.item[
num105].ownTime = 100;
1521 }
1523 }
1524 else
1525 {
1527 }
1528 }
1529 break;
1530 }
1531 case 22:
1532 {
1535 if (Main.netMode != 2 || Main.item[
num42].playerIndexTheItemIsReservedFor ==
whoAmI)
1536 {
1537 Main.item[
num42].playerIndexTheItemIsReservedFor =
num43;
1538 if (
num43 == Main.myPlayer)
1539 {
1540 Main.item[
num42].keepTime = 15;
1541 }
1542 else
1543 {
1544 Main.item[
num42].keepTime = 0;
1545 }
1546 if (Main.netMode == 2)
1547 {
1548 Main.item[
num42].playerIndexTheItemIsReservedFor = 255;
1549 Main.item[
num42].keepTime = 15;
1550 NetMessage.TrySendData(22, -1, -1,
null,
num42);
1551 }
1552 }
1553 break;
1554 }
1555 case 23:
1556 {
1557 if (Main.netMode != 1)
1558 {
1559 break;
1560 }
1566 {
1568 }
1573 {
1575 {
1577 }
1578 else
1579 {
1581 }
1582 }
1584 int? playerCountForMultiplayerDifficultyOverride = 1;
1586 {
1588 }
1591 {
1593 }
1596 {
1598 {
1602 };
1603 }
1607 {
1608 nPC5.netOffset += nPC5.position -
vector5;
1609 }
1611 {
1612 nPC5.netOffset *= 0f;
1614 {
1616 }
1617 nPC5.active = true;
1619 {
1620 playerCountForMultiplayerDifficultyOverride = playerCountForMultiplayerDifficultyOverride,
1621 strengthMultiplierOverride =
value8
1622 });
1623 }
1628 nPC5.directionY = (
bitsByte11[1] ? 1 : (-1));
1629 nPC5.spriteDirection = (
bitsByte11[6] ? 1 : (-1));
1631 {
1633 }
1634 else
1635 {
1637 }
1639 {
1640 nPC5.active = false;
1641 }
1643 if (
nPC5.SpawnedFromStatue)
1644 {
1645 nPC5.value = 0f;
1646 }
1648 {
1650 }
1652 {
1654 }
1656 {
1658 }
1660 {
1662 }
1664 {
1665 NPC.deerclopsBoss =
num155;
1666 }
1668 {
1670 }
1671 break;
1672 }
1673 case 24:
1674 {
1677 if (Main.netMode == 2)
1678 {
1680 }
1683 if (Main.netMode == 2)
1684 {
1686 NetMessage.TrySendData(23, -1, -1,
null,
num120);
1687 }
1688 break;
1689 }
1690 case 27:
1691 {
1708 {
1710 }
1712 if (Main.netMode == 2)
1713 {
1715 {
1717 }
1718 else
1719 {
1721 if (Main.projHostile[
num36])
1722 {
1723 break;
1724 }
1725 }
1726 }
1728 for (
int n = 0;
n < 1000;
n++)
1729 {
1730 if (Main.projectile[
n].owner ==
num35 && Main.projectile[
n].identity ==
num34 && Main.projectile[
n].active)
1731 {
1733 break;
1734 }
1735 }
1737 {
1739 {
1740 if (!Main.projectile[
num39].active)
1741 {
1743 break;
1744 }
1745 }
1746 }
1748 {
1749 num38 = Projectile.FindOldestProjectile();
1750 }
1751 Projectile projectile = Main.projectile[
num38];
1752 if (!projectile.active || projectile.type !=
num36)
1753 {
1754 projectile.SetDefaults(
num36);
1755 if (Main.netMode == 2)
1756 {
1757 Netplay.Clients[
whoAmI].SpamProjectile += 1f;
1758 }
1759 }
1760 projectile.identity =
num34;
1761 projectile.position = position;
1763 projectile.type =
num36;
1765 projectile.bannerIdToRespondTo = bannerIdToRespondTo;
1766 projectile.originalDamage = originalDamage;
1768 projectile.owner =
num35;
1770 {
1772 }
1774 {
1775 projectile.projUUID =
num37;
1777 }
1778 projectile.ProjectileFixDesperation();
1779 if (Main.netMode == 2)
1780 {
1781 NetMessage.TrySendData(27, -1,
whoAmI,
null,
num38);
1782 }
1783 break;
1784 }
1785 case 28:
1786 {
1792 if (Main.netMode == 2)
1793 {
1795 {
1797 }
1799 }
1801 {
1803 }
1804 else
1805 {
1806 Main.npc[
num190].life = 0;
1807 Main.npc[
num190].HitEffect();
1808 Main.npc[
num190].active =
false;
1809 }
1810 if (Main.netMode != 2)
1811 {
1812 break;
1813 }
1815 if (Main.npc[
num190].life <= 0)
1816 {
1817 NetMessage.TrySendData(23, -1, -1,
null,
num190);
1818 }
1819 else
1820 {
1821 Main.npc[
num190].netUpdate =
true;
1822 }
1823 if (Main.npc[
num190].realLife >= 0)
1824 {
1825 if (Main.npc[Main.npc[
num190].realLife].life <= 0)
1826 {
1827 NetMessage.TrySendData(23, -1, -1,
null, Main.npc[
num190].realLife);
1828 }
1829 else
1830 {
1831 Main.npc[Main.npc[
num190].realLife].netUpdate =
true;
1832 }
1833 }
1834 break;
1835 }
1836 case 29:
1837 {
1840 if (Main.netMode == 2)
1841 {
1843 }
1845 {
1847 {
1848 Main.projectile[
num100].Kill();
1849 break;
1850 }
1851 }
1852 if (Main.netMode == 2)
1853 {
1855 }
1856 break;
1857 }
1858 case 30:
1859 {
1861 if (Main.netMode == 2)
1862 {
1864 }
1867 if (Main.netMode == 2)
1868 {
1872 }
1873 break;
1874 }
1875 case 31:
1876 {
1877 if (Main.netMode != 2)
1878 {
1879 break;
1880 }
1885 {
1887 {
1889 }
1892 if (Main.myPlayer ==
whoAmI)
1893 {
1894 Main.recBigList = false;
1895 }
1898 {
1903 }
1904 }
1905 break;
1906 }
1907 case 32:
1908 {
1915 {
1916 if (Main.chest[
num164] ==
null)
1917 {
1918 Main.chest[
num164] =
new Chest();
1919 }
1921 {
1923 }
1928 }
1929 break;
1930 }
1931 case 33:
1932 {
1937 string name =
string.Empty;
1939 {
1941 {
1943 }
1944 else if (
num5 != 255)
1945 {
1947 }
1948 }
1949 if (Main.netMode == 1)
1950 {
1951 Player player = Main.player[Main.myPlayer];
1952 if (player.chest == -1)
1953 {
1954 Main.playerInventory = true;
1956 }
1957 else if (player.chest !=
num2 &&
num2 != -1)
1958 {
1959 Main.playerInventory = true;
1961 Main.recBigList = false;
1962 }
1963 else if (player.chest != -1 &&
num2 == -1)
1964 {
1966 Main.recBigList = false;
1967 }
1968 player.chest =
num2;
1969 player.chestX =
num3;
1970 player.chestY =
num4;
1972 if (Main.tile[
num3,
num4].frameX >= 36 && Main.tile[
num3,
num4].frameX < 72)
1973 {
1975 }
1976 }
1977 else
1978 {
1980 {
1981 int chest = Main.player[
whoAmI].chest;
1982 Chest
chest2 = Main.chest[chest];
1985 }
1989 }
1990 break;
1991 }
1992 case 34:
1993 {
1999 if (Main.netMode == 2)
2000 {
2002 }
2003 if (Main.netMode == 2)
2004 {
2006 {
2007 case 0:
2008 {
2011 {
2014 }
2015 else
2016 {
2018 }
2019 break;
2020 }
2021 case 1:
2023 {
2025 if (tile.frameX % 36 != 0)
2026 {
2028 }
2029 if (tile.frameY % 36 != 0)
2030 {
2032 }
2035 if (!tile.active())
2036 {
2038 }
2039 break;
2040 }
2041 goto default;
2042 default:
2044 {
2045 case 2:
2046 {
2049 {
2052 }
2053 else
2054 {
2056 }
2057 break;
2058 }
2059 case 3:
2061 {
2063 num203 -= tile2.frameX % 54 / 18;
2064 if (
tile2.frameY % 36 != 0)
2065 {
2067 }
2070 if (!
tile2.active())
2071 {
2073 }
2074 break;
2075 }
2076 goto default;
2077 default:
2079 {
2080 case 4:
2081 {
2084 {
2087 }
2088 else
2089 {
2091 }
2092 break;
2093 }
2094 case 5:
2096 {
2098 if (
tile3.frameX % 36 != 0)
2099 {
2101 }
2102 if (
tile3.frameY % 36 != 0)
2103 {
2105 }
2108 if (!
tile3.active())
2109 {
2111 }
2112 }
2113 break;
2114 }
2115 break;
2116 }
2117 break;
2118 }
2119 break;
2120 }
2122 {
2123 case 0:
2125 {
2127 break;
2128 }
2131 break;
2132 case 2:
2134 {
2136 break;
2137 }
2140 break;
2141 case 4:
2143 {
2145 break;
2146 }
2149 break;
2150 default:
2153 break;
2154 }
2155 break;
2156 }
2157 case 35:
2158 {
2160 if (Main.netMode == 2)
2161 {
2163 }
2165 if (
num146 != Main.myPlayer || Main.ServerSideCharacter)
2166 {
2168 }
2169 if (Main.netMode == 2)
2170 {
2172 }
2173 break;
2174 }
2175 case 36:
2176 {
2178 if (Main.netMode == 2)
2179 {
2181 }
2189 if (Main.netMode == 2)
2190 {
2192 {
2194 }
2196 }
2197 break;
2198 }
2199 case 37:
2200 if (Main.netMode == 1)
2201 {
2202 if (Main.autoPass)
2203 {
2204 NetMessage.TrySendData(38);
2205 Main.autoPass = false;
2206 }
2207 else
2208 {
2209 Netplay.ServerPassword = "";
2210 Main.menuMode = 31;
2211 }
2212 }
2213 break;
2214 case 38:
2215 if (Main.netMode == 2)
2216 {
2218 {
2219 Netplay.Clients[
whoAmI].State = 1;
2220 NetMessage.TrySendData(3,
whoAmI);
2221 }
2222 else
2223 {
2224 NetMessage.TrySendData(2,
whoAmI, -1, Lang.mp[1].ToNetworkText());
2225 }
2226 }
2227 break;
2228 case 39:
2229 if (Main.netMode == 1)
2230 {
2232 Main.item[
num23].playerIndexTheItemIsReservedFor = 255;
2233 NetMessage.TrySendData(22, -1, -1,
null,
num23);
2234 }
2235 break;
2236 case 40:
2237 {
2239 if (Main.netMode == 2)
2240 {
2242 }
2245 if (Main.netMode == 2)
2246 {
2248 }
2249 break;
2250 }
2251 case 41:
2252 {
2254 if (Main.netMode == 2)
2255 {
2257 }
2261 player15.itemRotation = itemRotation;
2262 player15.itemAnimation = itemAnimation;
2264 if (Main.netMode == 2)
2265 {
2267 }
2268 if (Main.netMode == 1)
2269 {
2271 if (
item6.UseSound !=
null)
2272 {
2274 }
2275 }
2276 break;
2277 }
2278 case 42:
2279 {
2281 if (Main.netMode == 2)
2282 {
2284 }
2285 else if (Main.myPlayer ==
num202 && !Main.ServerSideCharacter)
2286 {
2287 break;
2288 }
2291 Main.player[
num202].statMana = statMana;
2292 Main.player[
num202].statManaMax = statManaMax;
2293 break;
2294 }
2295 case 43:
2296 {
2298 if (Main.netMode == 2)
2299 {
2301 }
2303 if (
num151 != Main.myPlayer)
2304 {
2306 }
2307 if (Main.netMode == 2)
2308 {
2310 }
2311 break;
2312 }
2313 case 45:
2314 {
2316 if (Main.netMode == 2)
2317 {
2319 }
2325 if (Main.netMode != 2)
2326 {
2327 break;
2328 }
2332 {
2334 }
2336 {
2338 {
2340 }
2341 }
2342 break;
2343 }
2344 case 46:
2345 if (Main.netMode == 2)
2346 {
2351 {
2353 }
2354 }
2355 break;
2356 case 47:
2357 {
2365 {
2366 string text2 =
null;
2367 if (Main.sign[
num8] !=
null)
2368 {
2370 }
2372 Main.sign[
num8].x = x;
2373 Main.sign[
num8].y = y;
2376 {
2379 }
2380 if (Main.netMode == 1 &&
num9 == Main.myPlayer && Main.sign[
num8] !=
null && !
bitsByte[0])
2381 {
2382 Main.playerInventory = false;
2383 Main.player[Main.myPlayer].SetTalkNPC(-1,
fromNet:
true);
2384 Main.npcChatCornerItem = 0;
2385 Main.editSign = false;
2387 Main.player[Main.myPlayer].sign =
num8;
2388 Main.npcChatText = Main.sign[
num8].text;
2389 }
2390 }
2391 break;
2392 }
2393 case 48:
2394 {
2399 if (Main.netMode == 2 && Netplay.SpamCheck)
2400 {
2402 int num240 = (int)(Main.player[
num239].position.X + (
float)(Main.player[
num239].width / 2));
2403 int num241 = (int)(Main.player[
num239].position.Y + (
float)(Main.player[
num239].height / 2));
2410 {
2411 Netplay.Clients[
whoAmI].SpamWater += 1f;
2412 }
2413 }
2415 {
2417 }
2419 {
2422 if (Main.netMode == 2)
2423 {
2426 {
2428 }
2429 }
2430 break;
2431 }
2432 }
2433 case 49:
2434 if (Netplay.Connection.State == 6)
2435 {
2436 Netplay.Connection.State = 10;
2438 }
2439 break;
2440 case 50:
2441 {
2443 if (Main.netMode == 2)
2444 {
2446 }
2447 else if (
num180 == Main.myPlayer && !Main.ServerSideCharacter)
2448 {
2449 break;
2450 }
2453 {
2456 {
2458 }
2459 else
2460 {
2462 }
2463 }
2464 if (Main.netMode == 2)
2465 {
2467 }
2468 break;
2469 }
2470 case 51:
2471 {
2475 {
2476 case 1:
2477 NPC.SpawnSkeletron(
b8);
2478 break;
2479 case 2:
2480 if (Main.netMode == 2)
2481 {
2482 NetMessage.TrySendData(51, -1,
whoAmI,
null,
b8, (
int)
b9);
2483 }
2484 else
2485 {
2487 }
2488 break;
2489 case 3:
2490 if (Main.netMode == 2)
2491 {
2492 Main.Sundialing();
2493 }
2494 break;
2495 case 4:
2496 Main.npc[
b8].BigMimicSpawnSmoke();
2497 break;
2498 case 5:
2499 if (Main.netMode == 2)
2500 {
2502 nPC6.SetDefaults(664);
2503 Main.BestiaryTracker.Kills.RegisterKill(
nPC6);
2504 }
2505 break;
2506 case 6:
2507 if (Main.netMode == 2)
2508 {
2509 Main.Moondialing();
2510 }
2511 break;
2512 }
2513 break;
2514 }
2515 case 52:
2516 {
2521 {
2523 if (Main.netMode == 2)
2524 {
2527 }
2528 }
2530 {
2532 if (Main.netMode == 2)
2533 {
2536 }
2537 }
2539 {
2541 if (Main.netMode == 2)
2542 {
2545 }
2546 }
2547 break;
2548 }
2549 case 53:
2550 {
2555 if (Main.netMode == 2)
2556 {
2557 NetMessage.TrySendData(54, -1, -1,
null,
num122);
2558 }
2559 break;
2560 }
2561 case 54:
2562 if (Main.netMode == 1)
2563 {
2567 {
2570 }
2571 }
2572 break;
2573 case 55:
2574 {
2579 {
2580 if (Main.netMode == 1 &&
num48 == Main.myPlayer)
2581 {
2583 }
2584 else if (Main.netMode == 2)
2585 {
2587 }
2588 }
2589 break;
2590 }
2591 case 56:
2592 {
2595 {
2596 if (Main.netMode == 1)
2597 {
2601 Main.npc[
num27].townNpcVariationIndex = townNpcVariationIndex;
2602 }
2603 else if (Main.netMode == 2)
2604 {
2605 NetMessage.TrySendData(56,
whoAmI, -1,
null,
num27);
2606 }
2607 }
2608 break;
2609 }
2610 case 57:
2611 if (Main.netMode == 1)
2612 {
2616 }
2617 break;
2618 case 58:
2619 {
2621 if (Main.netMode == 2)
2622 {
2624 }
2626 if (Main.netMode == 2)
2627 {
2629 break;
2630 }
2634 {
2635 case 4057:
2636 case 4372:
2637 case 4715:
2639 break;
2640 case 4673:
2642 break;
2643 default:
2644 {
2645 Main.musicPitch =
num257;
2648 {
2650 }
2652 {
2654 }
2656 break;
2657 }
2658 }
2659 break;
2660 }
2661 case 59:
2662 {
2668 if (Main.netMode == 2)
2669 {
2671 }
2672 break;
2673 }
2674 case 60:
2675 {
2681 {
2683 break;
2684 }
2686 bool isLikeATownNPC =
nPC7.isLikeATownNPC;
2687 if (Main.netMode == 1)
2688 {
2689 nPC7.homeless =
b16 == 1;
2692 }
2693 if (!isLikeATownNPC)
2694 {
2695 break;
2696 }
2697 if (Main.netMode == 1)
2698 {
2700 {
2701 case 1:
2703 break;
2704 case 2:
2706 break;
2707 }
2708 }
2710 {
2712 }
2713 else
2714 {
2716 }
2717 break;
2718 }
2719 case 61:
2720 {
2723 if (Main.netMode != 2)
2724 {
2725 break;
2726 }
2728 {
2730 {
2732 }
2733 }
2735 {
2737 {
2739 Main.startPumpkinMoon();
2740 NetMessage.TrySendData(7);
2741 NetMessage.TrySendData(78, -1, -1, null, 0, 1f, 2f, 1f);
2742 }
2743 }
2745 {
2747 {
2749 Main.startSnowMoon();
2750 NetMessage.TrySendData(7);
2751 NetMessage.TrySendData(78, -1, -1, null, 0, 1f, 1f, 1f);
2752 }
2753 }
2755 {
2756 if (Main.dayTime && !Main.eclipse)
2757 {
2758 if (Main.remixWorld)
2759 {
2761 }
2762 else
2763 {
2765 }
2766 Main.eclipse = true;
2767 NetMessage.TrySendData(7);
2768 }
2769 }
2771 {
2772 Main.invasionDelay = 0;
2773 Main.StartInvasion(4);
2774 NetMessage.TrySendData(7);
2775 NetMessage.TrySendData(78, -1, -1, null, 0, 1f, Main.invasionType + 3);
2776 }
2778 {
2779 if (
NPC.downedGolemBoss && Main.hardMode && !
NPC.AnyDanger() && !
NPC.AnyoneNearCultists())
2780 {
2782 NetMessage.TrySendData(7);
2783 }
2784 }
2786 {
2787 if (!Main.dayTime && !Main.bloodMoon)
2788 {
2790 Main.bloodMoon = true;
2791 if (Main.GetMoonPhase() ==
MoonPhase.Empty)
2792 {
2793 Main.moonPhase = 5;
2794 }
2796 NetMessage.TrySendData(7);
2797 }
2798 }
2800 {
2802 NPC.combatBookWasUsed = true;
2803 NetMessage.TrySendData(7);
2804 }
2806 {
2807 NPC.UnlockOrExchangePet(
ref NPC.boughtCat, 637,
"Misc.LicenseCatUsed",
num216);
2808 }
2810 {
2811 NPC.UnlockOrExchangePet(
ref NPC.boughtDog, 638,
"Misc.LicenseDogUsed",
num216);
2812 }
2814 {
2815 NPC.UnlockOrExchangePet(
ref NPC.boughtBunny, 656,
"Misc.LicenseBunnyUsed",
num216);
2816 }
2818 {
2819 NPC.UnlockOrExchangePet(
ref NPC.unlockedSlimeBlueSpawn, 670,
"Misc.LicenseSlimeUsed",
num216);
2820 }
2822 {
2824 }
2826 {
2828 NPC.combatBookVolumeTwoWasUsed = true;
2829 NetMessage.TrySendData(7);
2830 }
2832 {
2834 NPC.peddlersSatchelWasUsed = true;
2835 NetMessage.TrySendData(7);
2836 }
2838 {
2841 {
2843 }
2844 if (
num217 > 0 && Main.invasionType == 0)
2845 {
2846 Main.invasionDelay = 0;
2847 Main.StartInvasion(
num217);
2848 }
2849 NetMessage.TrySendData(78, -1, -1, null, 0, 1f, Main.invasionType + 3);
2850 }
2851 break;
2852 }
2853 case 62:
2854 {
2857 if (Main.netMode == 2)
2858 {
2860 }
2862 {
2863 Main.player[
num166].NinjaDodge();
2864 }
2866 {
2867 Main.player[
num166].ShadowDodge();
2868 }
2870 {
2871 Main.player[
num166].BrainOfConfusionDodge();
2872 }
2873 if (Main.netMode == 2)
2874 {
2876 }
2877 break;
2878 }
2879 case 63:
2880 {
2886 {
2888 }
2889 else
2890 {
2892 }
2893 if (Main.netMode == 2)
2894 {
2896 }
2897 break;
2898 }
2899 case 64:
2900 {
2906 {
2908 }
2909 else
2910 {
2912 }
2913 if (Main.netMode == 2)
2914 {
2916 }
2917 break;
2918 }
2919 case 65:
2920 {
2923 if (Main.netMode == 2)
2924 {
2926 }
2932 {
2934 }
2936 {
2938 }
2941 {
2943 }
2946 {
2948 }
2950 {
2952 }
2954 {
2955 case 0:
2957 break;
2958 case 1:
2960 break;
2961 case 2:
2962 {
2964 if (Main.netMode != 2)
2965 {
2966 break;
2967 }
2969 NetMessage.TrySendData(65, -1, -1,
null, 0,
num51,
vector.X,
vector.Y,
num52,
flag2.ToInt(),
num54);
2971 float num56 = 9999f;
2973 {
2975 {
2978 {
2981 }
2982 }
2983 }
2985 {
2987 }
2988 break;
2989 }
2990 }
2991 if (Main.netMode == 2 &&
num53 == 0)
2992 {
2993 NetMessage.TrySendData(65, -1,
whoAmI,
null,
num53,
num51,
vector.X,
vector.Y,
num52,
flag2.ToInt(),
num54);
2994 }
2995 break;
2996 }
2997 case 66:
2998 {
3002 {
3004 player3.statLife +=
num31;
3006 {
3007 player3.statLife =
player3.statLifeMax2;
3008 }
3010 if (Main.netMode == 2)
3011 {
3013 }
3014 }
3015 break;
3016 }
3017 case 68:
3019 break;
3020 case 69:
3021 {
3025 if (Main.netMode == 1)
3026 {
3028 {
3031 {
3036 }
3038 {
3039 break;
3040 }
3042 }
3043 }
3044 else
3045 {
3047 {
3048 break;
3049 }
3051 {
3054 {
3055 break;
3056 }
3057 }
3060 {
3062 }
3063 }
3064 break;
3065 }
3066 case 70:
3067 if (Main.netMode == 2)
3068 {
3071 if (Main.netMode == 2)
3072 {
3074 }
3076 {
3078 }
3079 }
3080 break;
3081 case 71:
3082 if (Main.netMode == 2)
3083 {
3089 }
3090 break;
3091 case 72:
3092 if (Main.netMode == 1)
3093 {
3095 {
3097 }
3098 }
3099 break;
3100 case 73:
3102 {
3103 case 0:
3104 Main.player[
whoAmI].TeleportationPotion();
3105 break;
3106 case 1:
3107 Main.player[
whoAmI].MagicConch();
3108 break;
3109 case 2:
3110 Main.player[
whoAmI].DemonConch();
3111 break;
3112 case 3:
3113 Main.player[
whoAmI].Shellphone_Spawn();
3114 break;
3115 }
3116 break;
3117 case 74:
3118 if (Main.netMode == 1)
3119 {
3122 }
3123 break;
3124 case 75:
3125 if (Main.netMode == 2)
3126 {
3128 if (!Main.anglerWhoFinishedToday.Contains(
name2))
3129 {
3130 Main.anglerWhoFinishedToday.
Add(
name2);
3131 }
3132 }
3133 break;
3134 case 76:
3135 {
3137 if (
num171 != Main.myPlayer || Main.ServerSideCharacter)
3138 {
3139 if (Main.netMode == 2)
3140 {
3142 }
3146 if (Main.netMode == 2)
3147 {
3149 }
3150 }
3151 break;
3152 }
3153 case 77:
3154 {
3159 Animation.NewTemporaryAnimation(
type9, tileType,
x11,
y11);
3160 break;
3161 }
3162 case 78:
3163 if (Main.netMode == 1)
3164 {
3166 }
3167 break;
3168 case 79:
3169 {
3177 if (Main.netMode == 2)
3178 {
3179 Netplay.Clients[
whoAmI].SpamAddBlock += 1f;
3180 if (!
WorldGen.InWorld(
x9,
y9, 10) || !Netplay.Clients[
whoAmI].TileSections[Netplay.GetSectionX(
x9), Netplay.GetSectionY(
y9)])
3181 {
3182 break;
3183 }
3184 }
3186 if (Main.netMode == 2)
3187 {
3189 }
3190 break;
3191 }
3192 case 80:
3193 if (Main.netMode == 1)
3194 {
3198 {
3201 }
3202 }
3203 break;
3204 case 81:
3205 if (Main.netMode == 1)
3206 {
3210 }
3211 break;
3212 case 119:
3213 if (Main.netMode == 1)
3214 {
3218 }
3219 break;
3220 case 82:
3222 break;
3223 case 83:
3224 if (Main.netMode == 1)
3225 {
3229 {
3231 }
3232 }
3233 break;
3234 case 84:
3235 {
3237 if (Main.netMode == 2)
3238 {
3240 }
3242 Main.player[
num102].stealth = stealth;
3243 if (Main.netMode == 2)
3244 {
3246 }
3247 break;
3248 }
3249 case 85:
3250 {
3253 if (Main.netMode == 2 &&
num97 < 255)
3254 {
3256 }
3257 break;
3258 }
3259 case 86:
3260 {
3261 if (Main.netMode != 1)
3262 {
3263 break;
3264 }
3267 {
3269 {
3272 }
3273 }
3274 else
3275 {
3277 tileEntity.ID =
num67;
3280 }
3281 break;
3282 }
3283 case 87:
3284 if (Main.netMode == 2)
3285 {
3290 {
3292 }
3293 }
3294 break;
3295 case 88:
3296 {
3297 if (Main.netMode != 1)
3298 {
3299 break;
3300 }
3303 {
3304 break;
3305 }
3309 {
3311 }
3313 {
3315 }
3317 {
3319 }
3321 {
3323 }
3325 {
3327 }
3329 {
3331 }
3333 {
3335 }
3337 {
3340 {
3342 }
3344 {
3346 }
3348 {
3350 }
3352 {
3354 }
3356 {
3358 }
3360 {
3362 }
3363 }
3364 break;
3365 }
3366 case 89:
3367 if (Main.netMode == 2)
3368 {
3375 }
3376 break;
3377 case 91:
3378 {
3379 if (Main.netMode != 1)
3380 {
3381 break;
3382 }
3386 {
3388 {
3390 }
3391 break;
3392 }
3396 int metadata = 0;
3398 {
3400 }
3403 {
3404 Main.player[
num187].emoteTime = 360;
3405 }
3407 {
3409 {
3411 }
3412 else
3413 {
3418 }
3422 break;
3423 }
3424 }
3425 case 92:
3426 {
3432 {
3433 if (Main.netMode == 1)
3434 {
3437 }
3438 else
3439 {
3442 }
3443 }
3444 break;
3445 }
3446 case 95:
3447 {
3450 if (Main.netMode != 2)
3451 {
3452 break;
3453 }
3455 {
3457 {
3458 Main.projectile[
num170].Kill();
3459 NetMessage.TrySendData(29, -1, -1,
null, Main.projectile[
num170].identity, (
int)
num168);
3460 break;
3461 }
3462 }
3463 break;
3464 }
3465 case 96:
3466 {
3476 if (Main.netMode == 2)
3477 {
3479 }
3480 break;
3481 }
3482 case 97:
3483 if (Main.netMode == 1)
3484 {
3486 }
3487 break;
3488 case 98:
3489 if (Main.netMode == 1)
3490 {
3492 }
3493 break;
3494 case 99:
3495 {
3497 if (Main.netMode == 2)
3498 {
3500 }
3501 Main.player[
num141].MinionRestTargetPoint =
reader.ReadVector2();
3502 if (Main.netMode == 2)
3503 {
3505 }
3506 break;
3507 }
3508 case 115:
3509 {
3511 if (Main.netMode == 2)
3512 {
3514 }
3516 if (Main.netMode == 2)
3517 {
3519 }
3520 break;
3521 }
3522 case 100:
3523 {
3529 int lastPortalColorIndex =
num130 + ((
num130 % 2 == 0) ? 1 : (-1));
3530 obj3.lastPortalColorIndex = lastPortalColorIndex;
3533 obj3.netOffset *= 0f;
3534 break;
3535 }
3536 case 101:
3537 if (Main.netMode != 2)
3538 {
3543 if (
NPC.ShieldStrengthTowerSolar < 0)
3544 {
3545 NPC.ShieldStrengthTowerSolar = 0;
3546 }
3547 if (
NPC.ShieldStrengthTowerVortex < 0)
3548 {
3549 NPC.ShieldStrengthTowerVortex = 0;
3550 }
3551 if (
NPC.ShieldStrengthTowerNebula < 0)
3552 {
3553 NPC.ShieldStrengthTowerNebula = 0;
3554 }
3555 if (
NPC.ShieldStrengthTowerStardust < 0)
3556 {
3557 NPC.ShieldStrengthTowerStardust = 0;
3558 }
3559 if (
NPC.ShieldStrengthTowerSolar >
NPC.LunarShieldPowerMax)
3560 {
3561 NPC.ShieldStrengthTowerSolar =
NPC.LunarShieldPowerMax;
3562 }
3563 if (
NPC.ShieldStrengthTowerVortex >
NPC.LunarShieldPowerMax)
3564 {
3565 NPC.ShieldStrengthTowerVortex =
NPC.LunarShieldPowerMax;
3566 }
3567 if (
NPC.ShieldStrengthTowerNebula >
NPC.LunarShieldPowerMax)
3568 {
3569 NPC.ShieldStrengthTowerNebula =
NPC.LunarShieldPowerMax;
3570 }
3571 if (
NPC.ShieldStrengthTowerStardust >
NPC.LunarShieldPowerMax)
3572 {
3573 NPC.ShieldStrengthTowerStardust =
NPC.LunarShieldPowerMax;
3574 }
3575 }
3576 break;
3577 case 102:
3578 {
3582 if (Main.netMode == 2)
3583 {
3586 break;
3587 }
3590 {
3593 {
3594 continue;
3595 }
3599 {
3606 float num64 = 0.005f;
3608 {
3609 case 179:
3611 break;
3612 case 173:
3614 break;
3615 case 176:
3617 break;
3618 }
3620 {
3624 Main.dust[
num66].noGravity =
true;
3628 }
3629 }
3631 }
3632 break;
3633 }
3634 case 103:
3635 if (Main.netMode == 1)
3636 {
3639 }
3640 break;
3641 case 104:
3642 if (Main.netMode == 1 && Main.npcShop > 0)
3643 {
3644 Item[]
item = Main.instance.shop[Main.npcShop].item;
3652 {
3659 }
3660 }
3661 break;
3662 case 105:
3663 if (Main.netMode != 1)
3664 {
3669 }
3670 break;
3671 case 106:
3672 if (Main.netMode == 1)
3673 {
3677 }
3678 break;
3679 case 107:
3680 if (Main.netMode == 1)
3681 {
3686 }
3687 break;
3688 case 108:
3689 if (Main.netMode == 1)
3690 {
3698 if (
num32 == Main.myPlayer)
3699 {
3701 }
3702 }
3703 break;
3704 case 109:
3705 if (Main.netMode == 2)
3706 {
3717 }
3718 break;
3719 case 110:
3720 {
3721 if (Main.netMode != 1)
3722 {
3723 break;
3724 }
3728 if (
num20 == Main.myPlayer)
3729 {
3732 {
3734 }
3735 player2.wireOperationsCooldown = 0;
3736 }
3737 break;
3738 }
3739 case 111:
3740 if (Main.netMode == 2)
3741 {
3743 }
3744 break;
3745 case 112:
3746 {
3753 {
3754 case 1:
3755 if (Main.netMode == 1)
3756 {
3758 }
3759 if (Main.netMode == 2)
3760 {
3762 }
3763 break;
3764 case 2:
3766 break;
3767 }
3768 break;
3769 }
3770 case 113:
3771 {
3774 if (Main.netMode == 2 && !Main.snowMoon && !Main.pumpkinMoon)
3775 {
3777 {
3779 }
3781 }
3782 break;
3783 }
3784 case 114:
3785 if (Main.netMode == 1)
3786 {
3788 }
3789 break;
3790 case 116:
3791 if (Main.netMode == 1)
3792 {
3794 }
3795 break;
3796 case 117:
3797 {
3800 {
3809 if (Main.netMode == 2)
3810 {
3812 }
3813 }
3814 break;
3815 }
3816 case 118:
3817 {
3819 if (Main.netMode == 2)
3820 {
3822 }
3828 if (Main.netMode == 2)
3829 {
3831 }
3832 break;
3833 }
3834 case 120:
3835 {
3837 if (Main.netMode == 2)
3838 {
3840 }
3843 {
3846 }
3847 break;
3848 }
3849 case 121:
3850 {
3852 if (Main.netMode == 2)
3853 {
3855 }
3860 {
3863 }
3865 {
3868 break;
3869 }
3871 {
3873 }
3875 {
3877 }
3878 else
3879 {
3882 }
3883 if (Main.netMode == 2)
3884 {
3886 }
3887 break;
3888 }
3889 case 122:
3890 {
3893 if (Main.netMode == 2)
3894 {
3896 }
3897 if (Main.netMode == 2)
3898 {
3900 {
3901 Main.player[
num154].tileEntityAnchor.Clear();
3903 break;
3904 }
3906 {
3909 }
3910 }
3911 if (Main.netMode == 1)
3912 {
3915 {
3917 }
3919 {
3921 }
3922 }
3923 break;
3924 }
3925 case 123:
3926 if (Main.netMode == 2)
3927 {
3934 }
3935 break;
3936 case 124:
3937 {
3939 if (Main.netMode == 2)
3940 {
3942 }
3947 {
3950 }
3952 {
3955 break;
3956 }
3958 {
3960 }
3962 {
3964 }
3965 else
3966 {
3969 }
3970 if (Main.netMode == 2)
3971 {
3973 }
3974 break;
3975 }
3976 case 125:
3977 {
3982 if (Main.netMode == 2)
3983 {
3985 }
3986 if (Main.netMode == 1)
3987 {
3989 }
3990 if (Main.netMode == 2)
3991 {
3993 }
3994 break;
3995 }
3996 case 126:
3997 if (Main.netMode == 1)
3998 {
3999 NPC.RevengeManager.AddMarkerFromReader(
reader);
4000 }
4001 break;
4002 case 127:
4003 {
4005 if (Main.netMode == 1)
4006 {
4008 }
4009 break;
4010 }
4011 case 128:
4012 {
4018 if (Main.netMode == 2)
4019 {
4021 }
4022 else
4023 {
4025 }
4026 break;
4027 }
4028 case 129:
4029 if (Main.netMode == 1)
4030 {
4031 Main.FixUIScale();
4032 Main.TrySetPreparationState(Main.WorldPreparationState.ProcessingData);
4033 }
4034 break;
4035 case 130:
4036 {
4037 if (Main.netMode != 2)
4038 {
4039 break;
4040 }
4045 {
4046 if (
NPC.unlockedSlimeRedSpawn)
4047 {
4048 break;
4049 }
4050 NPC.unlockedSlimeRedSpawn = true;
4051 NetMessage.TrySendData(7);
4052 }
4058 int netID =
nPC3.netID;
4061 {
4062 Main.npc[
num96].SetDefaults(netID);
4063 NetMessage.TrySendData(23, -1, -1,
null,
num96);
4064 }
4066 {
4067 WorldGen.CheckAchievement_RealEstateAndTownSlimes();
4068 }
4069 break;
4070 }
4071 case 131:
4072 if (Main.netMode == 1)
4073 {
4079 {
4083 }
4084 }
4085 break;
4086 case 132:
4087 if (Main.netMode == 1)
4088 {
4097 }
4098 break;
4099 case 133:
4100 if (Main.netMode == 2)
4101 {
4108 }
4109 break;
4110 case 134:
4111 {
4119 if (Main.netMode == 2)
4120 {
4122 }
4124 obj2.ladyBugLuckTimeLeft = ladyBugLuckTimeLeft;
4125 obj2.torchLuck = torchLuck;
4126 obj2.luckPotion = luckPotion;
4128 obj2.equipmentBasedLuckBonus = equipmentBasedLuckBonus;
4129 obj2.coinLuck = coinLuck;
4130 obj2.RecalculateLuck();
4131 if (Main.netMode == 2)
4132 {
4133 NetMessage.SendData(134, -1,
num41,
null,
num41);
4134 }
4135 break;
4136 }
4137 case 135:
4138 {
4140 if (Main.netMode == 1)
4141 {
4142 Main.player[
num33].immuneAlpha = 255;
4143 }
4144 break;
4145 }
4146 case 136:
4147 {
4148 for (
int l = 0;
l < 2;
l++)
4149 {
4150 for (
int m = 0;
m < 3;
m++)
4151 {
4153 }
4154 }
4155 break;
4156 }
4157 case 137:
4158 if (Main.netMode == 2)
4159 {
4163 {
4165 }
4166 }
4167 break;
4168 case 139:
4169 if (Main.netMode != 2)
4170 {
4173 Main.countsAsHostForGameplay[
num26] = flag;
4174 }
4175 break;
4176 case 140:
4177 {
4181 {
4182 case 0:
4183 if (Main.netMode == 1)
4184 {
4186 }
4187 break;
4188 case 1:
4189 if (Main.netMode == 2)
4190 {
4192 }
4193 break;
4194 case 2:
4195 if (Main.netMode == 2)
4196 {
4198 }
4199 break;
4200 }
4201 break;
4202 }
4203 case 141:
4204 {
4210 if (Main.netMode == 2)
4211 {
4213 }
4214 else
4215 {
4217 }
4218 break;
4219 }
4220 case 142:
4221 {
4223 if (Main.netMode == 2)
4224 {
4226 }
4228 obj.piggyBankProjTracker.TryReading(
reader);
4230 if (Main.netMode == 2)
4231 {
4232 NetMessage.TrySendData(142, -1,
whoAmI,
null,
num18);
4233 }
4234 break;
4235 }
4236 case 143:
4237 if (Main.netMode == 2)
4238 {
4240 }
4241 break;
4242 case 144:
4243 if (Main.netMode == 2)
4244 {
4245 NPC.HaveDryadDoStardewAnimation();
4246 }
4247 break;
4248 case 146:
4250 {
4251 case 0:
4253 break;
4254 case 1:
4255 {
4259 break;
4260 }
4261 case 2:
4262 {
4264 Main.npc[
num12].SetNetShimmerEffect();
4265 break;
4266 }
4267 }
4268 break;
4269 case 147:
4270 {
4272 if (Main.netMode == 2)
4273 {
4275 }
4277 Main.player[
num6].TrySwitchingLoadout(
num7);
4279 if (Main.netMode == 2)
4280 {
4282 }
4283 break;
4284 }
4285 default:
4286 if (Netplay.Clients[
whoAmI].State == 0)
4287 {
4288 NetMessage.BootPlayer(
whoAmI, Lang.mp[2].ToNetworkText());
4289 }
4290 break;
4291 case 15:
4292 case 25:
4293 case 26:
4294 case 44:
4295 case 67:
4296 case 93:
4297 break;
4298 }
4299 }
static float Clamp(float value, float min, float max)
void Add(TKey key, TValue value)
static bool IsDefined(Type enumType, object value)
virtual bool ReadBoolean()
virtual string ReadString()
virtual ulong ReadUInt64()
virtual float ReadSingle()
virtual sbyte ReadSByte()
virtual ushort ReadUInt16()
virtual Stream BaseStream
virtual short ReadInt16()
virtual byte[] ReadBytes(int count)
virtual uint ReadUInt32()
static byte Max(byte val1, byte val2)
static void PlaySound(int type, Vector2 position, int style=1)
static void SendChatMessageToClient(NetworkText text, Color color, int playerId)
static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer=-1)
static PlayerDeathReason FromReader(BinaryReader reader)
static Dictionary< int, TileEntity > ByID
static Dictionary< Point16, TileEntity > ByPosition
static bool IsOccupied(int id, out int interactingPlayer)
static void PlaceEntityNet(int x, int y, int type)
static TileEntity Read(BinaryReader reader, bool networkSend=false)
static void SetInteractionAnchor(Player player, int x, int y, int id)
static void NotifyProgressionEvent(int eventID)
static void HandleSpecialEvent(Player player, int eventID)
static void NotifyNPCKilledDirect(Player player, int npcNetID)
static readonly CreativePowerManager Instance
static void ToggleManualParty()
static void SetRemainingTimeDirect(int time)
static bool WouldFailSpawningHere(int x, int y)
static void SummonCrystal(int x, int y, int whoAsks)
static void WipeEntities()
static void FailureMessage(int client)
static void AttemptToSkipWaitTime()
static void PutBallInCup_TextAndEffects(Point hitLocation, int plr, int numberOfHits, int projid)
static void CreateFromNet(MessageSource source, byte variation, Vector2 position, Vector2 velocity)
static void SyncPortalsOnPlayerJoin(int plr, int fluff, List< Point > dontInclude, out List< Point > portalSections)
static void TryPlacing(int x, int y, int netid, int prefix, int stack)
static void TryPlacing(int x, int y, int netid, int prefix, int stack)
static void TryPlacing(int x, int y, int netid, int prefix, int stack)
static void CheckForNPCsToReactToEmoteBubble(int emoteID, Player player)
static Dictionary< int, EmoteBubble > byID
static WorldUIAnchor DeserializeNetAnchor(int type, int meta)
static int NewBubble(int emoticon, WorldUIAnchor bubbleAnchor, int time)
static void OnBubbleChange(int bubbleID)
static readonly int Count
static MultiToolMode ToolMode
static readonly short Count
static bool[] NeverAppearsAsNewInInventory
static readonly short Count
static readonly byte Count
static bool[] MPAllowedEnemies
static readonly short Count
static readonly int Bank1_0
static readonly int Loadout1_Armor_0
static readonly int Misc0
static readonly int Loadout3_Dye_0
static readonly int Loadout2_Dye_0
static readonly int Loadout1_Dye_0
static readonly int MiscDye0
static readonly int Loadout3_Armor_0
static readonly int Loadout2_Armor_0
static readonly int Bank3_0
static readonly int Bank2_0
static readonly int Armor0
static readonly int Bank4_0
static readonly int TrashItem
static readonly int Inventory0
static readonly int Count
static Dictionary< ushort, LegacySoundStyle > SoundByIndex
static readonly LegacySoundStyle Item1
static readonly LegacySoundStyle Item47
static readonly LegacySoundStyle Item26
static readonly LegacySoundStyle Item35
static string GetTextValue(string key)
static NetworkText FromLiteral(string text)
static NetworkText FromKey(string key, params object[] substitutions)
static NetworkText Deserialize(BinaryReader reader)
static void TrySendingItemArray(int plr, Item[] array, int slotStartIndex)
static void ReadAccessoryVisibility(BinaryReader reader, bool[] hideVisibleAccessory)
float[] ReUseTemporaryNPCAI()
float[] ReUseTemporaryProjectileAI()
static readonly NetManager Instance
static bool HighlightNewItems
static float DistanceSquared(Vector2 value1, Vector2 value2)