Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. using Terraria;
  2. using Terraria.ModLoader;
  3. using DualBlades;
  4.  
  5. namespace DualBlades.Buffs
  6. {
  7. class ZWBuff : ModBuff
  8. {
  9. public override void SetDefaults()
  10. {
  11. DisplayName.SetDefault("Time Stop");
  12. Description.SetDefault("The flow of time is stopped");
  13. Main.buffNoSave[Type] = true;
  14. Main.debuff[Type] = true;
  15. canBeCleared = false;
  16. }
  17. public override void Update(Player player, ref int buffIndex)
  18. {
  19. mod.GetModWorld<DBWorld>().IsTimeStopped = true;
  20. if(player.buffTime[buffIndex] == 0)
  21. {
  22. mod.GetModWorld<DBWorld>().IsTimeStopped = false;
  23. }
  24. if(Main.netMode == 1)
  25. {
  26. ModPacket packet = mod.GetPacket();
  27. packet.Write(mod.GetModWorld<DBWorld>().IsTimeStopped);
  28. packet.Write(player.whoAmI);
  29. packet.Send();
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement