mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user