mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-03-16 11:26:11 +00:00
Remove all articles on save state load
This commit is contained in:
parent
146146f4b9
commit
93155a2788
1 changed files with 15 additions and 0 deletions
|
@ -256,6 +256,21 @@ pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor)
|
|||
};
|
||||
PostureModule::set_pos(module_accessor, &pos);
|
||||
|
||||
// All articles have ID <= 0x25
|
||||
(0..=0x25).for_each(|article_idx| {
|
||||
if ArticleModule::is_exist(
|
||||
module_accessor,
|
||||
article_idx,
|
||||
) {
|
||||
let article: u64 = ArticleModule::get_article(
|
||||
module_accessor,
|
||||
article_idx,
|
||||
);
|
||||
let article_object_id =
|
||||
Article::get_battle_object_id(article as *mut app::Article);
|
||||
ArticleModule::remove_exist_object_id(module_accessor, article_object_id as u32);
|
||||
}
|
||||
});
|
||||
let item_mgr = *(ITEM_MANAGER_ADDR as *mut *mut app::ItemManager);
|
||||
(0..ItemManager::get_num_of_active_item_all(item_mgr)).for_each(|item_idx| {
|
||||
let item = ItemManager::get_active_item(item_mgr, item_idx);
|
||||
|
|
Loading…
Add table
Reference in a new issue