27 luaL_error(L,
"Invalid locale index (%d)", loc_idx);
33 std::string name = temp->
Name1;
39 char*
const* suffix = NULL;
40 if (itemRandPropId < 0)
44 suffix = (
char*
const*)itemRandEntry->
nameSuffix[loc_idx];
50 suffix = (
char*
const*)itemRandEntry->
nameSuffix[loc_idx];
63 std::ostringstream oss;
65 "|Hitem:" << temp->
ItemId <<
":" <<
74 sEluna->Push(L, oss.str());
107 bool soulbound = luaL_checkbool(L, 1);
173 bool mail = luaL_optbool(L, 1,
false);
192 uint32 count = luaL_checkunsigned(L, 1);
229 uint32 quest = luaL_checkunsigned(L, 1);
275 uint32 enchant = luaL_checkunsigned(L, 1);
285 luaL_error(L,
"Invalid enchantment slot (%d)", slot);
309 luaL_error(L,
"Invalid enchantment slot (%d)", slot);
334 uint32 enchant_slot = luaL_checkunsigned(L, 1);
346 uint32 index = luaL_checkunsigned(L, 1);
349 luaL_error(L,
"Invalid index (%d)", index);
359 uint32 index = luaL_checkunsigned(L, 1);
362 luaL_error(L,
"Invalid index (%d)", index);
476 sEluna->Push(L, bag->GetBagSize());
DBCStorage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore(SpellItemEnchantmentfmt)
DBCStorage< ItemRandomSuffixEntry > sItemRandomSuffixStore(ItemRandomSuffixfmt)
DBCStorage< ItemRandomPropertiesEntry > sItemRandomPropertiesStore(ItemRandomPropertiesfmt)
@ SOCK_ENCHANTMENT_SLOT_3
@ SOCK_ENCHANTMENT_SLOT_2
@ MAX_INSPECTED_ENCHANTMENT_SLOT
#define MAX_ITEM_PROTO_SPELLS
uint32 GUID_LOPART(uint64 x)
const uint32 ItemQualityColors[MAX_ITEM_QUALITY]
Skyfire::AutoPtr< Transaction, Skyfire::Mutex > SQLTransaction
bool IsCurrencyToken() const
void SetEnchantment(EnchantmentSlot slot, uint32 id, uint32 duration, uint32 charges, uint64 caster=0)
void SetBinding(bool val)
uint32 GetEnchantmentId(EnchantmentSlot slot) const
void SetOwnerGUID(uint64 guid)
bool IsBoundAccountWide() const
bool CanBeTraded(bool mail=false, bool trade=false) const
virtual void SaveToDB(SQLTransaction &trans)
void SetCount(uint32 value)
int32 GetItemRandomPropertyId() const
ItemTemplate const * GetTemplate() const
uint32 GetItemSuffixFactor() const
bool IsBindedNotWith(Player const *player) const
Player * GetOwner() const
bool hasQuest(uint32 quest_id) const
bool IsBoundByEnchant() const
void ClearEnchantment(EnchantmentSlot slot)
uint64 GetOwnerGUID() const
bool IsNotEmptyBag() const
uint32 GetMaxStackCount() const
bool IsConjuredConsumable() const
static void GetLocaleString(const StringVector &data, int loc_idx, std::string &value)
void ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool apply_dur=true, bool ignore_condition=false)
int IsArmorVellum(lua_State *L, Item *item)
int IsBoundByEnchant(lua_State *L, Item *item)
int IsConjuredConsumable(lua_State *L, Item *item)
int IsWeaponVellum(lua_State *L, Item *item)
int IsNotBoundToPlayer(lua_State *L, Item *item)
int IsNotEmptyBag(lua_State *L, Item *item)
int SetBinding(lua_State *L, Item *item)
int GetMaxStackCount(lua_State *L, Item *item)
int GetAllowableRace(lua_State *L, Item *item)
int GetSubClass(lua_State *L, Item *item)
int GetCount(lua_State *L, Item *item)
int GetSlot(lua_State *L, Item *item)
int SetEnchantment(lua_State *L, Item *item)
int IsLocked(lua_State *L, Item *item)
int GetItemLink(lua_State *L, Item *item)
int IsPotion(lua_State *L, Item *item)
int GetOwnerGUID(lua_State *L, Item *item)
int GetBuyCount(lua_State *L, Item *item)
int GetGUIDLow(lua_State *L, Item *item)
int IsCurrencyToken(lua_State *L, Item *item)
int GetName(lua_State *L, Item *item)
int IsBoundAccountWide(lua_State *L, Item *item)
int IsRefundExpired(lua_State *L, Item *item)
int IsBag(lua_State *L, Item *item)
int GetClass(lua_State *L, Item *item)
int GetRandomSuffix(lua_State *L, Item *item)
int GetQuality(lua_State *L, Item *item)
int HasQuest(lua_State *L, Item *item)
int IsInTrade(lua_State *L, Item *item)
int GetBagSlot(lua_State *L, Item *item)
int CanBeTraded(lua_State *L, Item *item)
int GetOwner(lua_State *L, Item *item)
int IsSoulBound(lua_State *L, Item *item)
int GetDisplayId(lua_State *L, Item *item)
int SaveToDB(lua_State *L, Item *item)
int IsEquipped(lua_State *L, Item *item)
int ClearEnchantment(lua_State *L, Item *item)
int GetSpellTrigger(lua_State *L, Item *item)
int IsInBag(lua_State *L, Item *item)
int SetOwner(lua_State *L, Item *item)
int GetItemSet(lua_State *L, Item *item)
int GetItemLevel(lua_State *L, Item *item)
int SetCount(lua_State *L, Item *item)
int GetBuyPrice(lua_State *L, Item *item)
int GetStatsCount(lua_State *L, Item *item)
int GetSellPrice(lua_State *L, Item *item)
int GetInventoryType(lua_State *L, Item *item)
int GetEnchantmentId(lua_State *L, Item *item)
int GetGUID(lua_State *L, Item *item)
int IsBroken(lua_State *L, Item *item)
int GetRequiredLevel(lua_State *L, Item *item)
int GetSpellId(lua_State *L, Item *item)
int GetRandomProperty(lua_State *L, Item *item)
int GetBagSize(lua_State *L, Item *item)
int GetAllowableClass(lua_State *L, Item *item)
_Spell Spells[MAX_ITEM_PROTO_SPELLS]