Guest User

Untitled

a guest
Jun 22nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public static void handlePrayerDrain(Client c) {
  2. c.usingPrayer = false;
  3. double toRemove = 0.0;
  4. for (int j = 0; j < prayerData.length; j++) {
  5. if (c.prayerActive[j]) {
  6. toRemove += prayerData[j]/20;
  7. c.usingPrayer = true;
  8. }
  9. }
  10. if (toRemove > 0) {
  11. toRemove /= (1 + (0.035 * c.playerBonus[11]));
  12. }
  13. c.prayerPoint -= toRemove;
  14. if (c.prayerPoint <= 0) {
  15. c.prayerPoint = 1.0 + c.prayerPoint;
  16. reducePrayerLevel(c);
  17. }
  18. }
Add Comment
Please, Sign In to add comment