Added removeallitem
This commit is contained in:
parent
113f8de9b1
commit
73953b3e39
2 changed files with 12 additions and 0 deletions
|
@ -2321,3 +2321,9 @@
|
|||
.macro togglefakertc
|
||||
callnative Script_ToggleFakeRtc
|
||||
.endm
|
||||
|
||||
@ Remove all of specified item from the player's bag
|
||||
.macro removeallitem itemId:req
|
||||
callnative RemoveAllItem
|
||||
.2byte \itemId
|
||||
.endm
|
||||
|
|
|
@ -2473,3 +2473,9 @@ void ScriptSetDoubleBattleFlag(struct ScriptContext *ctx)
|
|||
{
|
||||
sIsScriptedWildDouble = TRUE;
|
||||
}
|
||||
|
||||
void RemoveAllItem(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
RemoveBagItem(itemId, CountTotalItemQuantityInBag(itemId));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue