mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 12:36:36 +00:00
[Quest API] Add missing Item Methods to Perl/Lua. (#3464)
# Perl - Add `$questitem->AddEXP(exp)`. - Add `$questitem->ClearTimers()`. - Add `$questitem->Clone()`. - Add `$questitem->DeleteCustomData(identifier)`. - Add `$questitem->GetAugmentItemID(slot_id)`. - Add `$questitem->GetAugmentType()`. - Add `$questitem->GetColor()`. - Add `$questitem->GetCustomData(identifier)`. - Add `$questitem->GetCustomDataString()`. - Add `$questitem->GetEXP()`. - Add `$questitem->GetItem(slot_id)`. - Add `$questitem->GetItemID(slot_id)`. - Add `$questitem->GetItemScriptID()`. - Add `$questitem->GetKillsNeeded()`. - Add `$questitem->GetMaxEvolveLevel()`. - Add `$questitem->GetPrice()`. - Add `$questitem->GetTotalItemCount()`. - Add `$questitem->IsAmmo()`. - Add `$questitem->IsAugmentable()`. - Add `$questitem->IsAugmented()`. - Add `$questitem->IsEquipable(slot_id)`. - Add `$questitem->IsEquipable(race_bitmask, class_bitmask)`. - Add `$questitem->IsExpendable()`. - Add `$questitem->IsInstanceNoDrop()`. - Add `$questitem->IsWeapon()`. - Add `$questitem->SetAttuned(is_attuned)`. - Add `$questitem->SetColor(color)`. - Add `$questitem->SetCustomData(identifier, bool_value)`. - Add `$questitem->SetCustomData(identifier, float_value)`. - Add `$questitem->SetCustomData(identifier, int_value)`. - Add `$questitem->SetCustomData(identifier, string_value)`. - Add `$questitem->SetEXP(exp)`. - Add `$questitem->SetInstanceNoDrop(is_attuned)`. - Add `$questitem->SetPrice(price)`. - Add `$questitem->SetScaling(is_scaling)`. - Add `$questitem->SetTimer(timer_name, timer)`. - Add `$questitem->StopTimer(timer_name)`. # Lua - Add `iteminst:GetName()`. - Add `iteminst:IsAttuned()`. - Add `iteminst:ItemSay(text)`. - Add `iteminst:ItemSay(text, language_id)`. - Add `iteminst:SetAttuned(is_attuned)`. # Notes - Cleaned up return types and parameter types that were mismatched. - Removed `SetItem` from Lua as it wasn't used. - Removed unused parameter in `GetUnscaledItem` in Lua. - I plan to add Perl ItemData support after this makes its way in, so the missing methods like the `GetItem` overload will be added then.
This commit is contained in:
+14
-11
@@ -37,19 +37,18 @@ public:
|
||||
|
||||
bool IsType(int item_class);
|
||||
bool IsStackable();
|
||||
bool IsEquipable(int race, int class_);
|
||||
bool IsEquipable(int slot_id);
|
||||
bool IsEquipable(uint16 race_bitmask, uint16 class_bitmask);
|
||||
bool IsEquipable(int16 slot_id);
|
||||
bool IsAugmentable();
|
||||
int GetAugmentType();
|
||||
bool IsExpendable();
|
||||
Lua_ItemInst GetItem(int slot);
|
||||
Lua_ItemInst GetItem(uint8 slot_id);
|
||||
Lua_Item GetItem();
|
||||
void SetItem(Lua_Item item);
|
||||
Lua_Item GetUnscaledItem(int slot);
|
||||
uint32 GetItemID(int slot);
|
||||
int GetTotalItemCount();
|
||||
Lua_ItemInst GetAugment(int slot);
|
||||
uint32 GetAugmentItemID(int slot);
|
||||
Lua_Item GetUnscaledItem();
|
||||
uint32 GetItemID(uint8 slot_id);
|
||||
uint8 GetTotalItemCount();
|
||||
Lua_ItemInst GetAugment(uint8 slot_id);
|
||||
uint32 GetAugmentItemID(uint8 slot_id);
|
||||
bool IsAugmented();
|
||||
bool IsWeapon();
|
||||
bool IsAmmo();
|
||||
@@ -75,8 +74,8 @@ public:
|
||||
uint32 GetExp();
|
||||
void SetExp(uint32 exp);
|
||||
void AddExp(uint32 exp);
|
||||
int GetMaxEvolveLvl();
|
||||
uint32 GetKillsNeeded(int current_level);
|
||||
int8 GetMaxEvolveLvl();
|
||||
uint32 GetKillsNeeded(uint8 current_level);
|
||||
Lua_ItemInst Clone();
|
||||
void SetTimer(std::string name, uint32 time);
|
||||
void StopTimer(std::string name);
|
||||
@@ -85,6 +84,10 @@ public:
|
||||
int CountAugmentByID(uint32 item_id);
|
||||
int GetTaskDeliveredCount();
|
||||
int RemoveTaskDeliveredItems();
|
||||
std::string GetName();
|
||||
bool IsAttuned();
|
||||
void ItemSay(const char* text);
|
||||
void ItemSay(const char* text, uint8 language_id);
|
||||
|
||||
private:
|
||||
bool cloned_;
|
||||
|
||||
Reference in New Issue
Block a user