Advertisement
kolton

Untitled

Dec 17th, 2011
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Unit.prototype.getStatEx = function (ID, subID) {
  2. var i, stats;
  3.  
  4. subID = subID || 0;
  5.  
  6. switch (ID) {
  7. case 31:
  8. if (arguments.length < 2) {
  9. break;
  10. }
  11. case 16:
  12. case 17:
  13. case 18:
  14. stats = this.getStat(-1);
  15.  
  16. for (i = 0; i < stats.length; i += 1) {
  17. if (stats[i][0] === ID && stats[i][1] === subID) {
  18. return stats[i][2];
  19. }
  20. }
  21.  
  22. return 0;
  23. }
  24.  
  25. return this.getStat(ID, subID);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement