public override void Action(CommandCaller caller, string input, string[] args)
        {
            SimplePlayer player = Main.LocalPlayer.GetModPlayer <SimplePlayer>();

            int damage = int.Parse(args[0]);
            int hp     = int.Parse(args[1]);

            player.SetMultiplierDamageHP(damage, hp);
        }
示例#2
0
        public override void HandlePacket(BinaryReader reader, int whoAmI)
        {
            Message msg = (Message)reader.ReadByte();
            Dictionary <DataTag, object> tags = new Dictionary <DataTag, object>();

            foreach (DataTag tag in dataTags[msg])
            {
                tags.Add(tag, tag.read(reader));
            }

            if (msg == Message.AddXP && Main.netMode == 1)
            {
                SimplePlayer character = Main.LocalPlayer.GetModPlayer <SimplePlayer>();
                character.AddXP(Convert.ToDouble(tags[DataTag.amount_double]));
            }
        }