mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Quest API] Add AddItem() to Perl/Lua. (#2054)
- Add $client->AddItem(item_data) to Perl.
- Add client:AddItem(item_table) to Lua.
- This will allow server operators to add items without needless parameters.
Perl Example:
```pl
my %item_data = (
"item_id" => 1200,
"charges" => 1,
"augment_one" => 49656,
"augment_two" => 49656,
"augment_three" => 49656,
"augment_four" => 49656,
"augment_five" => 49656,
"augment_six" => 49656,
"attuned" => 1,
"slot_id" => quest::getinventoryslotid("general1")
);
$client->AddItem(\%item_data);
```
Lua Example:
```lua
local item_data = {
item_id = 1200,
charges = 1,
augment_one = 49656,
augment_two = 49656,
augment_three = 49656,
augment_four = 49656,
augment_five = 49656,
augment_six = 49656,
attuned = true,
slot_id = Slot.General1
};
e.self:AddItem(item_data);
```
This commit is contained in:
@@ -392,6 +392,7 @@ public:
|
||||
void RemoveItem(uint32 item_id);
|
||||
void RemoveItem(uint32 item_id, uint32 quantity);
|
||||
void SetGMStatus(uint32 newStatus);
|
||||
void AddItem(luabind::object item_table);
|
||||
|
||||
int GetEnvironmentDamageModifier();
|
||||
void SetEnvironmentDamageModifier(int value);
|
||||
|
||||
Reference in New Issue
Block a user