Changes between Initial Version and Version 1 of Ticket #3424


Ignore:
Timestamp:
Sep 17, 2015, 2:10:10 AM (9 years ago)
Author:
elexis
Comment:

fcxSanya implemented Looter.js in r9391 and r11279.

We should clean this code before adding more code, like #2732.

  • added comments
  • removed reundancy by summing up the looted resources and then transfering them and updating the statistics only once)
  • not 100% sure about the call to ApplyValueModificationsToEntity. In my testing it gave the same results, so we might not need to update resources with the return value. In doubt, revert that line.
  • conditional operator to improve readability
  • let instead of var

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3424

    • Property Keywords patch review added
    • Property Type defectenhancement
  • Ticket #3424 – Description

    initial v1  
    1 cmpStatisticsTracker.IncreaseLootCollectedCounter(resourcesToAdd); is called identically twice, and there are some other things that can be cleaned.
     1`cmpStatisticsTracker.IncreaseLootCollectedCounter(resourcesToAdd);` is called identically twice, and there are some other things that can be cleaned.