public void ReceiveFormChanges(BinaryReader reader, int fromWho) { int whichPlayer = reader.ReadInt32(); string buffKeyName = reader.ReadString(); int duration = reader.ReadInt32(); if (Main.netMode == NetmodeID.Server) { SendFormChanges(-1, fromWho, whichPlayer, buffKeyName, duration); } else { Player thePlayer = Main.player[whichPlayer]; // handle form removal if duration is 0 if (duration == 0) { Transformations.RemoveTransformation(thePlayer, buffKeyName); } else { // make sure the player has the buff on every client Transformations.AddTransformation(thePlayer, buffKeyName, duration); } } }