Amiibo drops: Difference between revisions
→amiibo registering
imported>Leoetlino (→Logic) |
imported>Leoetlino |
||
Line 31: | Line 31: | ||
**If less than 86400 seconds (1 day) have elapsed since the game was launched, don't do anything.{{check}} | **If less than 86400 seconds (1 day) have elapsed since the game was launched, don't do anything.{{check}} | ||
**AmiiboMgr then computes <code>10000 * now.year + 100 * now.month + now.day</code>. If the value is different from AmiiboLastTouchDate (which would mean that a day has elapsed), the AmiiboTouchHistory array is cleared. | **AmiiboMgr then computes <code>10000 * now.year + 100 * now.month + now.day</code>. If the value is different from AmiiboLastTouchDate (which would mean that a day has elapsed), the AmiiboTouchHistory array is cleared. | ||
* | *An entry for the scanned amiibo is inserted into AmiiboTouchHistory. Only the last 100 entries are kept. | ||
* | *For a first time scan, a new entry is inserted into AmiiboTouchHistoryTotal (only the last 200 entries are kept). Otherwise, the scan count is incremented. | ||
*Finally, AmiiboLastTouchDate is set to <code>10000 * now.year + 100 * now.month + now.day</code> to update the last amiibo usage date. | *Finally, AmiiboLastTouchDate is set to <code>10000 * now.year + 100 * now.month + now.day</code> to update the last amiibo usage date. | ||
The format for AmiiboTouchHistory and AmiiboTouchHistoryTotal entries is "%s_%d_%d_%d" (amiibo UID, amiibo value 1, amiibo value 2, scan count) | |||
== Logic == | == Logic == |