| 2226 | } |
| 2227 | |
| 2228 | void SaveHotkeys(SaveWriter &saveWriter, const Player &player) |
| 2229 | { |
| 2230 | SaveHelper file(saveWriter, "hotkeys", HotkeysSize()); |
| 2231 | |
| 2232 | // Write the number of spell hotkeys |
| 2233 | file.WriteLE<uint8_t>(static_cast<uint8_t>(NumHotkeys)); |
| 2234 | |
| 2235 | // Write the spell hotkeys |
| 2236 | for (auto &spellId : player._pSplHotKey) { |
| 2237 | file.WriteLE<int32_t>(static_cast<int8_t>(spellId)); |
| 2238 | } |
| 2239 | for (auto &spellType : player._pSplTHotKey) { |
| 2240 | file.WriteLE<uint8_t>(static_cast<uint8_t>(spellType)); |
| 2241 | } |
| 2242 | |
| 2243 | // Write the selected spell last |
| 2244 | file.WriteLE<int32_t>(static_cast<int8_t>(player._pRSpell)); |
| 2245 | file.WriteLE<uint8_t>(static_cast<uint8_t>(player._pRSplType)); |
| 2246 | } |
| 2247 | |
| 2248 | void LoadHeroItems(Player &player) |
| 2249 | { |
no test coverage detected