Eonirr

Untitled

May 16th, 2025
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. weaponDots.text = string.Join("\n", dots.Select(dot =>
  2. {
  3. string color = ColorUtility.ToHtmlStringRGBA(dot.damageTextColor);
  4. string formattedDescription;
  5.  
  6. if (dot.applySlow)
  7. {
  8. formattedDescription = string.Format(dot.dotDescription,
  9. $"<color=#{color}>{dot.damagePerTickPct}</color>",
  10. $"<color=#{color}>{dot.tickCooldown}</color>",
  11. $"<color=#{color}>{dot.dotMaxTime}</color>",
  12. $"<color=#{color}>{dot.slowAmount}</color>",
  13. $"<color=#{color}>{dot.slowTime}</color>"
  14. );
  15. }
  16. else if (dot.applyResistanceDebuff)
  17. {
  18. formattedDescription = string.Format(dot.dotDescription,
  19. $"<color=#{color}>{dot.damagePerTickPct}</color>",
  20. $"<color=#{color}>{dot.tickCooldown}</color>",
  21. $"<color=#{color}>{dot.dotMaxTime}</color>",
  22. $"<color=#{color}>{dot.resistanceDebuffAmount}</color>",
  23. $"<color=#{color}>{dot.resistanceDebuffTime}</color>"
  24. );
  25. }
  26. else
  27. {
  28. formattedDescription = string.Format(dot.dotDescription,
  29. $"<color=#{color}>{dot.damagePerTickPct}</color>",
  30. $"<color=#{color}>{dot.tickCooldown}</color>",
  31. $"<color=#{color}>{dot.dotMaxTime}</color>"
  32. );
  33. }
  34.  
  35. return $"<color=#{color}>- {dot.dotName}</color>\n<indent=2.5%><color=white>{formattedDescription}</color></indent>";
  36. }));
Advertisement
Add Comment
Please, Sign In to add comment