Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Terraria;
- using Terraria.ModLoader;
- using DualBlades;
- namespace DualBlades.Buffs
- {
- class ZWBuff : ModBuff
- {
- public override void SetDefaults()
- {
- DisplayName.SetDefault("Time Stop");
- Description.SetDefault("The flow of time is stopped");
- Main.buffNoSave[Type] = true;
- Main.debuff[Type] = true;
- canBeCleared = false;
- }
- public override void Update(Player player, ref int buffIndex)
- {
- mod.GetModWorld<DBWorld>().IsTimeStopped = true;
- if(player.buffTime[buffIndex] == 0)
- {
- mod.GetModWorld<DBWorld>().IsTimeStopped = false;
- }
- if(Main.netMode == 1)
- {
- ModPacket packet = mod.GetPacket();
- packet.Write(mod.GetModWorld<DBWorld>().IsTimeStopped);
- packet.Write(player.whoAmI);
- packet.Send();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement