5using Microsoft.Xna.Framework.Graphics.PackedVector;
127 Netplay.Connection.TimeOutTimer = 0;
172 reader.BaseStream.Position = num;
212 Netplay.Disconnect =
true;
221 Netplay.Connection.State = 2;
262 Netplay.Connection.State = 3;
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;
301 player14.difficulty = 1;
305 player14.difficulty = 2;
309 player14.difficulty = 3;
313 player14.difficulty = 3;
319 player14.unlockedBiomeTorches =
bitsByte25[2];
439 player17.disableVoidBag = -1;
497 player17.trashItem =
new Item();
499 player17.trashItem.stack =
stack7;
503 clientPlayer.trashItem =
player17.trashItem.Clone();
619 Main.raining = Main.maxRaining > 0f;
694 NPC.combatBookVolumeTwoWasUsed =
bitsByte21[6];
700 NPC.unlockedSlimeRainbowSpawn =
bitsByte22[3];
732 Netplay.Connection.State = 4;
803 num79 = Main.maxSectionsX - 1;
811 num80 = Main.maxSectionsY - 1;
956 nPC2.SetDefaults(664);
986 player10.direction = (
bitsByte7[6] ? 1 : (-1));
989 player10.pulley =
true;
990 player10.pulleyDir = (byte)((!
bitsByte8[1]) ? 1
u : 2
u);
994 player10.pulley =
false;
996 player10.vortexStealthActive =
bitsByte8[3];
997 player10.gravDir = (
bitsByte8[4] ? 1 : (-1));
1001 player10.position =
reader.ReadVector2();
1004 player10.velocity =
reader.ReadVector2();
1012 player10.PotionOfReturnOriginalUsePosition =
reader.ReadVector2();
1013 player10.PotionOfReturnHomePosition =
reader.ReadVector2();
1017 player10.PotionOfReturnOriginalUsePosition =
null;
1018 player10.PotionOfReturnHomePosition =
null;
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];
1087 player11.statLifeMax = 100;
1089 player11.dead = player11.statLife <= 0;
1117 if (
b7 == 0 ||
b7 == 2 ||
b7 == 4)
1121 if (
b7 == 1 ||
b7 == 3)
1351 tile4.liquid = (byte)(
flag14 ? 1
u : 0
u);
1431 bool shimmered =
false;
1432 float shimmerTime = 0f;
1433 int timeLeftInWhichTheItemCannotBeTakenByEnemies = 0;
1441 timeLeftInWhichTheItemCannotBeTakenByEnemies =
reader.
ReadByte();
1456 item2.newAndShiny = newAndShiny;
1461 item2.active =
true;
1462 item2.shimmered = shimmered;
1463 item2.shimmerTime = shimmerTime;
1466 item2.instanced =
true;
1468 item2.keepTime = 600;
1470 item2.timeLeftInWhichTheItemCannotBeTakenByEnemies = timeLeftInWhichTheItemCannotBeTakenByEnemies;
1506 item4.active =
true;
1508 item4.timeLeftInWhichTheItemCannotBeTakenByEnemies = timeLeftInWhichTheItemCannotBeTakenByEnemies;
1511 item4.shimmered = shimmered;
1512 item4.shimmerTime = shimmerTime;
1584 int? playerCountForMultiplayerDifficultyOverride = 1;
1608 nPC5.netOffset += nPC5.position -
vector5;
1612 nPC5.netOffset *= 0f;
1620 playerCountForMultiplayerDifficultyOverride = playerCountForMultiplayerDifficultyOverride,
1621 strengthMultiplierOverride =
value8
1628 nPC5.directionY = (
bitsByte11[1] ? 1 : (-1));
1629 nPC5.spriteDirection = (
bitsByte11[6] ? 1 : (-1));
1640 nPC5.active =
false;
1643 if (
nPC5.SpawnedFromStatue)
1665 NPC.deerclopsBoss =
num155;
1728 for (
int n = 0;
n < 1000;
n++)
1760 projectile.identity =
num34;
1761 projectile.position = position;
1763 projectile.type =
num36;
1765 projectile.bannerIdToRespondTo = bannerIdToRespondTo;
1766 projectile.originalDamage = originalDamage;
1768 projectile.owner =
num35;
1775 projectile.projUUID =
num37;
1894 Main.recBigList =
false;
1937 string name =
string.Empty;
1944 else if (
num5 != 255)
1952 if (player.
chest == -1)
1954 Main.playerInventory =
true;
1959 Main.playerInventory =
true;
1961 Main.recBigList =
false;
1963 else if (player.
chest != -1 &&
num2 == -1)
1966 Main.recBigList =
false;
1968 player.chest =
num2;
1969 player.chestX =
num3;
1970 player.chestY =
num4;
2025 if (tile.
frameX % 36 != 0)
2029 if (tile.
frameY % 36 != 0)
2063 num203 -= tile2.frameX % 54 / 18;
2064 if (
tile2.frameY % 36 != 0)
2070 if (!
tile2.active())
2098 if (
tile3.frameX % 36 != 0)
2102 if (
tile3.frameY % 36 != 0)
2108 if (!
tile3.active())
2205 Main.autoPass =
false;
2209 Netplay.ServerPassword =
"";
2261 player15.itemRotation = itemRotation;
2262 player15.itemAnimation = itemAnimation;
2271 if (
item6.UseSound !=
null)
2366 string text2 =
null;
2382 Main.playerInventory =
false;
2384 Main.npcChatCornerItem = 0;
2385 Main.editSign =
false;
2436 Netplay.Connection.State = 10;
2502 nPC6.SetDefaults(664);
2601 Main.
npc[
num27].townNpcVariationIndex = townNpcVariationIndex;
2645 Main.musicPitch =
num257;
2686 bool isLikeATownNPC =
nPC7.isLikeATownNPC;
2689 nPC7.homeless =
b16 == 1;
2693 if (!isLikeATownNPC)
2766 Main.eclipse =
true;
2772 Main.invasionDelay = 0;
2790 Main.bloodMoon =
true;
2802 NPC.combatBookWasUsed =
true;
2828 NPC.combatBookVolumeTwoWasUsed =
true;
2834 NPC.peddlersSatchelWasUsed =
true;
2846 Main.invasionDelay = 0;
2969 NetMessage.
TrySendData(65, -1, -1,
null, 0,
num51,
vector.X,
vector.Y,
num52,
flag2.ToInt(),
num54);
2971 float num56 = 9999f;
2993 NetMessage.
TrySendData(65, -1,
whoAmI,
null,
num53,
num51,
vector.X,
vector.Y,
num52,
flag2.ToInt(),
num54);
3004 player3.statLife +=
num31;
3007 player3.statLife =
player3.statLifeMax2;
3277 tileEntity.ID =
num67;
3529 int lastPortalColorIndex =
num130 + ((
num130 % 2 == 0) ? 1 : (-1));
3530 obj3.lastPortalColorIndex = lastPortalColorIndex;
3533 obj3.netOffset *= 0f;
3545 NPC.ShieldStrengthTowerSolar = 0;
3549 NPC.ShieldStrengthTowerVortex = 0;
3553 NPC.ShieldStrengthTowerNebula = 0;
3557 NPC.ShieldStrengthTowerStardust = 0;
3606 float num64 = 0.005f;
3674 HalfVector2
halfVector =
default(HalfVector2);
3735 player2.wireOperationsCooldown = 0;
4050 NPC.unlockedSlimeRedSpawn =
true;
4058 int netID =
nPC3.netID;
4124 obj2.ladyBugLuckTimeLeft = ladyBugLuckTimeLeft;
4125 obj2.torchLuck = torchLuck;
4126 obj2.luckPotion = luckPotion;
4128 obj2.equipmentBasedLuckBonus = equipmentBasedLuckBonus;
4129 obj2.coinLuck = coinLuck;
4130 obj2.RecalculateLuck();
4148 for (
int l = 0;
l < 2;
l++)
4150 for (
int m = 0;
m < 3;
m++)
4228 obj.piggyBankProjTracker.TryReading(
reader);
4304 for (
int i = 0; i < hideVisibleAccessory.Length; i++)
4306 hideVisibleAccessory[i] = (num & (1 << i)) != 0;
4312 for (
int i = 0; i <
array.Length; i++)
static float Clamp(float value, float min, float max)
static unsafe void Clear(Array array)
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 NewTemporaryAnimation(int type, ushort tileType, int x, int y)
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 int UsingChest(int i)
static int[] dresserItemSpawn
static int[] chestItemSpawn
static int[] chestItemSpawn2
static void ServerPlaceItem(int plr, int slot)
static bool Unlock(int X, int Y)
static int FindChest(int X, int Y)
static void DestroyChestDirect(int X, int Y, int id)
static bool Lock(int X, int Y)
static bool WetCollision(Vector2 Position, int Width, int Height)
static int NewText(Rectangle location, Color color, int amount, bool dramatic=false, bool dot=false)
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 int NewDust(Vector2 Position, int Width, int Height, int Type, float SpeedX=0f, float SpeedY=0f, int Alpha=0, Color newColor=default(Color), float Scale=1f)
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 void ClearAllTilesAtThisLocation(int x, int y)
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 void ShimmerEffect(Vector2 shimmerPositon)
static int NewItem(IEntitySource source, Vector2 pos, Vector2 randomBox, int Type, int Stack=1, bool noBroadcast=false, int prefixGiven=0, bool noGrabDelay=false, bool reverseLookup=false)
static LocalizedText[] inter
static LocalizedText[] misc
static LocalizedText[] mp
static string GetTextValue(string key)
static NetworkText FromLiteral(string text)
static NetworkText FromKey(string key, params object[] substitutions)
static NetworkText Deserialize(BinaryReader reader)
static bool verboseNetplay
static MoonPhase GetMoonPhase()
static float windSpeedTarget
static bool[] npcCatchable
static bool[] projHostile
static bool[] countsAsHostForGameplay
static void SyncAnInvasion(int toWho)
static int[,] projectileIdentity
static void ReportInvasionProgress(int progress, int progressMax, int icon, int progressWave)
static int[] caveBackStyle
static void checkHalloween()
static void startSnowMoon()
static TeleportPylonsSystem PylonSystem
static void StartInvasion(int type=1)
static void StopSlimeRain(bool announce=true)
static Player clientPlayer
static List< string > anglerWhoFinishedToday
static BestiaryUnlocksTracker BestiaryTracker
static PlayerFileData ActivePlayerFileData
static Projectile[] projectile
static GameModeData GameModeInfo
static Microsoft.Xna.Framework.Color[] teamColor
static void Moondialing()
static int multiplayerNPCSmoothingRange
static void UpdateTimeRate()
static void TrySetPreparationState(WorldPreparationState state)
static void NewTextMultiline(string text, bool force=false, Microsoft.Xna.Framework.Color c=default(Microsoft.Xna.Framework.Color), int WidthLimit=-1)
static int[] timeItemSlotCannotBeReusedFor
static void startPumpkinMoon()
static bool[] tileFrameImportant
static bool ServerSideCharacter
static INetDiagnosticsUI ActiveNetDiagnosticsUI
static void StartSlimeRain(bool announce=true)
static TileChangeReceivedEvent OnTileChangeReceived
float[] _temporaryProjectileAI
MemoryStream readerStream
static void TrySendingItemArray(int plr, Item[] array, int slotStartIndex)
static void ReadAccessoryVisibility(BinaryReader reader, bool[] hideVisibleAccessory)
float[] ReUseTemporaryNPCAI()
void GetData(int start, int length, out int messageType)
float[] ReUseTemporaryProjectileAI()
MemoryStream writerStream
static bool FrameTrack(int i, int j, bool pound, bool mute=false)
static CoinLossRevengeSystem RevengeManager
static int ShieldStrengthTowerNebula
static void CatchNPC(int i, int who=-1)
static readonly int maxBuffs
static int ShieldStrengthTowerSolar
static void HaveDryadDoStardewAnimation()
static bool unlockedSlimeBlueSpawn
static int[,] cavernMonsterType
static void SpawnFaelings(int plr)
static bool unlockedSlimeRedSpawn
static int LunarShieldPowerMax
static int ShieldStrengthTowerStardust
static int ReleaseNPC(int x, int y, int Type, int Style, int who)
static int ShieldStrengthTowerVortex
static bool AnyDanger(bool quickBossNPCCheck=false, bool ignorePillarsAndMoonlordCountdown=false)
static bool AnyNPCs(int Type)
static void TransformCopperSlime(int npcIndex)
static void FairyEffects(Vector2 Position, int type)
static void SpawnSkeletron(int onWho)
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
static void SpawnOnPlayer(int plr, int Type)
static bool SpawnMechQueen(int onWhichPlayer)
static bool AnyoneNearCultists()
static bool downedGolemBoss
static void UnlockOrExchangePet(ref bool petBoughtFlag, int npcType, string textKeyForLicense, int netMessageData)
static void TransformElderSlime(int npcIndex)
static void SendData(int msgType, int remoteClient=-1, int ignoreClient=-1, NetworkText text=null, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
static void SendPlayerHurt(int playerTargetIndex, PlayerDeathReason reason, int damage, int direction, bool critical, bool pvp, int hitContext, int remoteClient=-1, int ignoreClient=-1)
static void greetPlayer(int plr)
static bool TrySendData(int msgType, int remoteClient=-1, int ignoreClient=-1, NetworkText text=null, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
static bool DoesPlayerSlotCountAsAHost(int plr)
static void SendTileSquare(int whoAmi, int tileX, int tileY, int xSize, int ySize, TileChangeType changeType=TileChangeType.None)
static MessageBuffer[] buffer
static void BootPlayer(int plr, NetworkText msg)
static void DecompressTileBlock(Stream stream)
static void SendPlayerDeath(int playerTargetIndex, PlayerDeathReason reason, int damage, int direction, bool pvp, int remoteClient=-1, int ignoreClient=-1)
static void SendObjectPlacement(int whoAmi, int x, int y, int type, int style, int alternative, int random, int direction)
static void SendSection(int whoAmi, int sectionX, int sectionY)
static void SyncConnectedPlayer(int plr)
static readonly NetManager Instance
static bool IsBanned(RemoteAddress address)
static RemoteClient[] Clients
static int GetSectionX(int x)
static int GetSectionY(int y)
static string ServerPassword
static RemoteServer Connection
static void PlayerDisconnect(int playerIndex)
static void PlayerConnect(int playerIndex)
static readonly int maxBuffs
EquipmentLoadout[] Loadouts
void ProjectileFixDesperation()
void SetDefaults(int Type)
static int FindOldestProjectile()
static void FindRecipes(bool canDelayCheck=false)
static void CheckSection(int playerIndex, Vector2 position, int fluff=1)
static int ReadSign(int i, int j, bool CreateIfMissing=true)
static void TextSign(int i, string text)
static bool HighlightNewItems
static void PoofOfSmoke(Vector2 position)
static bool Actuate(int i, int j)
static void MassWireOperation(Point ps, Point pe, Player master)
static void PokeLogicGate(int lampX, int lampY)
static void SetCurrentUser(int plr=-1)
static void HitSwitch(int i, int j)
static void StartImpendingDoom(int countdownTime)
static bool IsChestRigged(int x, int y)
static void CheckAchievement_RealEstateAndTownSlimes()
static bool PlaceWire2(int i, int j)
static TownRoomManager TownManager
static bool OpenDoor(int i, int j, int direction)
static void TreeGrowFX(int x, int y, int height, int treeGore, bool hitTree=false)
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static void moveRoom(int x, int y, int n)
static bool KillWire3(int i, int j)
static bool PlaceTile(int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
static void setBG(int bg, int style)
static bool PoundTile(int i, int j)
static TreeTopsInfo TreeTops
static bool CloseDoor(int i, int j, bool forced=false)
static bool ShiftTallGate(int x, int y, bool closing, bool forced=false)
static bool KillWire4(int i, int j)
static void RangeFrame(int startX, int startY, int endX, int endY)
static bool PlaceWire3(int i, int j)
static bool paintWall(int x, int y, byte color, bool broadCast=false)
static void SectionTileFrame(int sectionStartX, int sectionStartY, int sectionEndXInclusive, int sectionEndYInclusive)
static void PlaceDresserDirect(int x, int y, ushort type, int style, int id)
static bool ShiftTrapdoor(int x, int y, bool playerAbove, int onlyCloseOrOpen=-1)
static bool KillWire(int i, int j)
static bool PlaceWire4(int i, int j)
static bool SlopeTile(int i, int j, int slope=0, bool noEffects=false)
static bool paintTile(int x, int y, byte color, bool broadCast=false)
static bool KillWire2(int i, int j)
static void UnlockDoor(int i, int j)
static void KillWall(int i, int j, bool fail=false)
static bool PlaceWire(int i, int j)
static void PlaceWall(int i, int j, int type, bool mute=false)
static void ToggleGemLock(int i, int j, bool on)
static bool PlaceObject(int x, int y, int type, bool mute=false, int style=0, int alternate=0, int random=-1, int direction=-1)
static BackgroundChangeFlashInfo BackgroundsCache
static bool paintCoatWall(int x, int y, byte paintCoatId, bool broadcast=false)
static bool ReplaceWall(int x, int y, ushort targetWall)
static bool InWorld(int x, int y, int fluff=0)
static void ShootFromCannon(int x, int y, int angle, int ammo, int Damage, float KnockBack, int owner, bool fromWire)
static bool PlaceActuator(int i, int j)
static void SquareTileFrame(int i, int j, bool resetFrame=true)
static bool paintCoatTile(int x, int y, byte paintCoatId, bool broadcast=false)
static bool ReplaceTile(int x, int y, ushort targetType, int targetStyle)
static void PlaceChestDirect(int x, int y, ushort type, int style, int id)
static int PlaceChest(int x, int y, ushort type=21, bool notNearOtherChests=false, int style=0)
static bool CheckTileBreakability2_ShouldTileSurvive(int x, int y)
static void kickOut(int n)
static bool KillActuator(int i, int j)
delegate void TileChangeReceivedEvent(int x, int y, int count, TileChangeType type)
static float DistanceSquared(Vector2 value1, Vector2 value2)