Make Ability a trait
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-27 17:47:51 +01:00
parent 996a35ffa4
commit e04f61d9e6
9 changed files with 50 additions and 31 deletions

View File

@@ -260,8 +260,8 @@ extern "C" fn pokemon_is_ability_overriden(ptr: ExternPointer<Arc<Pokemon>>) ->
/// Returns the currently active ability.
#[no_mangle]
extern "C" fn pokemon_active_ability(ptr: ExternPointer<Arc<Pokemon>>) -> IdentifiablePointer<Ability> {
(ptr.as_ref().active_ability() as *const Ability).into()
extern "C" fn pokemon_active_ability(ptr: ExternPointer<Arc<Pokemon>>) -> IdentifiablePointer<Arc<dyn Ability>> {
ptr.as_ref().active_ability().clone().into()
}
/// Whether or not the Pokemon is allowed to gain experience.