[Quest API] Add SummonItemIntoInventory() to Perl/Lua (#3797)

* [Quest API] Add SummonItemIntoInventory() to Perl/Lua

# Perl
- Add `$client->SummonItemIntoInventory(item_data)`.

## Example
```pl
sub EVENT_SAY {
	if ($text=~/#a/i) {
		my %item_data = (
			"item_id" => 32557,
			"charges" => 1
		);
		$client->SummonItemIntoInventory(\%item_data);
	}
}
```

# Lua
- Add `client:SummonItemIntoInventory(item_data)`.

## Example
```lua
function event_say(e)
	if e.message:find("#a") then
		local item_data = {
			"item_id" = 32557,
			"charges" = 1
		}
		e.self:SummonItemIntoInventory(item_data)
	end
end
```

* Update effects.cpp
This commit is contained in:
Alex King
2023-12-22 03:45:40 -05:00
committed by GitHub
parent 267c280db8
commit f3ef8a0993
6 changed files with 132 additions and 18 deletions
+1
View File
@@ -486,6 +486,7 @@ public:
void AddRadiantCrystals(uint32 amount);
void RemoveEbonCrystals(uint32 amount);
void RemoveRadiantCrystals(uint32 amount);
void SummonItemIntoInventory(luabind::object item_table);
void ApplySpell(int spell_id);
void ApplySpell(int spell_id, int duration);