Adds GetLastUsedAttackOnTargetWrapper wrapper function to Angelscript.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
47e3919734
commit
ea3bc7ee33
|
@ -61,6 +61,10 @@ const HistoryElement* GetLastUsedAttackWrapper(const HistoryHolder* holder, u32
|
|||
return holder->GetLastUsedAttack(maxTurns).GetValue();
|
||||
}
|
||||
|
||||
const HistoryElement* GetLastUsedAttackOnTargetWrapper(const HistoryHolder* holder, Creature* target, u32 maxTurns) {
|
||||
return holder->GetLastUsedAttackOnTarget(target, maxTurns).GetValue();
|
||||
}
|
||||
|
||||
const HistoryElement* GetLastDamageOnTargetWrapper(const HistoryHolder* holder, const Creature* c, u32 maxTurns) {
|
||||
return holder->GetLastDamageOnTarget(c, maxTurns).GetValue();
|
||||
}
|
||||
|
@ -72,6 +76,10 @@ void RegisterBattleHistory::RegisterHistoryHolder(asIScriptEngine* engine) {
|
|||
Ensure(engine->RegisterObjectMethod("BattleHistory",
|
||||
"const AttackUseHistory@ GetLastUsedAttack(uint maxTurns = 0) const",
|
||||
asFunctionPtr(GetLastUsedAttackWrapper), asCALL_CDECL_OBJFIRST) >= 0);
|
||||
Ensure(engine->RegisterObjectMethod(
|
||||
"BattleHistory",
|
||||
"const AttackUseHistory@ GetLastUsedAttackOnTarget(Pokemon@ target, uint maxTurns = 0) const",
|
||||
asFunctionPtr(GetLastUsedAttackOnTargetWrapper), asCALL_CDECL_OBJFIRST) >= 0);
|
||||
Ensure(engine->RegisterObjectMethod(
|
||||
"BattleHistory", "const DamageHistory@ GetLastDamageOnTarget(Pokemon@ target, uint maxTurns = 0) const",
|
||||
asFunctionPtr(GetLastDamageOnTargetWrapper), asCALL_CDECL_OBJFIRST) >= 0);
|
||||
|
|
Loading…
Reference in New Issue