mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
remove AddLoot()
This commit is contained in:
@@ -235,29 +235,6 @@ namespace LuaGameObject
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds an [Item] to the loot of a [GameObject]
|
|
||||||
*
|
|
||||||
* @param uint32 entry : The entry of the [Item]
|
|
||||||
* @param uint32 amount = 1 : amount of the [Item] to add to the loot
|
|
||||||
*/
|
|
||||||
|
|
||||||
int AddLoot(lua_State* L, GameObject* go)
|
|
||||||
{
|
|
||||||
int i = 1;
|
|
||||||
int argAmount = lua_gettop(L);
|
|
||||||
|
|
||||||
while (i + 2 <= argAmount)
|
|
||||||
{
|
|
||||||
uint32 entry = Eluna::CHECKVAL<uint32>(L, ++i);
|
|
||||||
uint32 amount = Eluna::CHECKVAL<uint32>(L, ++i);
|
|
||||||
|
|
||||||
LootStoreItem storeItem(entry, 0, 100, 0, LOOT_MODE_DEFAULT, 0, amount, amount);
|
|
||||||
go->loot.AddItem(storeItem);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves [GameObject] to the database
|
* Saves [GameObject] to the database
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user