Add BlockWeather hook to Angelscript as well.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
b2accd720e
commit
496ebfdfa1
|
@ -338,3 +338,9 @@ void AngelScriptScript::OnFaint(CreatureLib::Battling::Creature* creature, Creat
|
||||||
ctx->SetArgWord(1, static_cast<asWORD>(source));
|
ctx->SetArgWord(1, static_cast<asWORD>(source));
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
void AngelScriptScript::BlockWeather(CreatureLib::Battling::Battle* battle, bool* blockWeather) {
|
||||||
|
CALL_HOOK(BlockWeather, {
|
||||||
|
ctx->SetArgObject(0, (void*)battle);
|
||||||
|
ctx->SetArgAddress(1, blockWeather);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -136,6 +136,7 @@ public:
|
||||||
bool* shareExperience) override;
|
bool* shareExperience) override;
|
||||||
|
|
||||||
void OnFaint(CreatureLib::Battling::Creature* creature, CreatureLib::Battling::DamageSource source) override;
|
void OnFaint(CreatureLib::Battling::Creature* creature, CreatureLib::Battling::DamageSource source) override;
|
||||||
|
void BlockWeather(CreatureLib::Battling::Battle* battle, bool* blockWeather) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef CALL_HOOK
|
#undef CALL_HOOK
|
||||||
|
|
|
@ -166,6 +166,7 @@ public:
|
||||||
|
|
||||||
SCRIPT_HOOK_FUNCTION(OnEndTurn, "void OnEndTurn()");
|
SCRIPT_HOOK_FUNCTION(OnEndTurn, "void OnEndTurn()");
|
||||||
SCRIPT_HOOK_FUNCTION(OnFaint, "void OnFaint(Pokemon@ pokemon, DamageSource damageSource)");
|
SCRIPT_HOOK_FUNCTION(OnFaint, "void OnFaint(Pokemon@ pokemon, DamageSource damageSource)");
|
||||||
|
SCRIPT_HOOK_FUNCTION(BlockWeather, "void BlockWeather(Battle@ battle, bool& result)");
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef SCRIPT_HOOK_FUNCTION
|
#undef SCRIPT_HOOK_FUNCTION
|
||||||
|
|
|
@ -60,6 +60,7 @@ shared abstract class PkmnScript {
|
||||||
|
|
||||||
void ModifyExperienceGain(Pokemon@ faintedMon, Pokemon@ winningMon, uint32& critStage){};
|
void ModifyExperienceGain(Pokemon@ faintedMon, Pokemon@ winningMon, uint32& critStage){};
|
||||||
void DoesShareExperience(Pokemon@ faintedMon, Pokemon@ winningMon, bool& shareExperience){};
|
void DoesShareExperience(Pokemon@ faintedMon, Pokemon@ winningMon, bool& shareExperience){};
|
||||||
|
void BlockWeather(Battle@ battle, bool& blockWeather){};
|
||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
Ensure(r >= 0);
|
Ensure(r >= 0);
|
||||||
|
|
Loading…
Reference in New Issue