Amiibo drops: Difference between revisions
→Notes on AmiiboMgr
imported>Leoetlino m (→Logic) |
imported>Leoetlino |
||
Line 22: | Line 22: | ||
== Notes on AmiiboMgr == | == Notes on AmiiboMgr == | ||
amiibo code call [[AmiiboMgr]]::registerAmiibo{{un}}<ref>0x710064B564 on Switch 1.5.0</ref> every time an amiibo is used. | |||
**First, AmiiboMgr determines if it should reset its daily amiibo use history (stored in the AmiiboTouchHistory flag)<ref>0x710064B3C8</ref>. | * [[AIDef:Action/CreateEpona]] calls it after Epona has been spawned. | ||
* [[AIDef:AI/WolfLinkAmiibo]] too, after spawning Wolf Link. | |||
* [[AIDef:Action/ItemAmiiboSelectDropTable]] registers an amiibo as soon as it is scanned. | |||
=== registerAmiibo === | |||
*First, AmiiboMgr determines if it should reset its daily amiibo use history (stored in the AmiiboTouchHistory flag)<ref>0x710064B3C8</ref>. | |||
**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. | |||
*AmiiboTouchHistoryTotal (which stores the last 200 used amiibos) is updated too. Exactly what happens is currently unknown. | |||
*Finally, AmiiboLastTouchDate is set to <code>10000 * now.year + 100 * now.month + now.day</code>. | |||
== Logic == | == Logic == |