mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
* basic evolving items framework created * Implement evolving tab in the inventory window * Implement experience and number of kills * Move zone evolving map to a evolvingitemsmanager class * rework gm commands * rework GetInventory * wip * wip loot testing * Fix Duplicate Message * reworked evolving item looting, swapping, etc * reworked const functions for evolving methods * Functioning Player Trade of evolving items test item_id is 89550 * First pass of Final Result link working * First pass of item upgrading when reaching 100% * Add strings and logic for displaying the evolving item xp transfer window in Corathus * Prototype of xp transfer window sending items * WIP for evolve xp transfer * WIP for evolve xp transfer. First tests passed * XP Transfer Cleanup * XP Transfer Cleanup * Add Rule for evolving items equip timer/ default is 30 secs * Add logging and player events Add logging and player events * Formatting * Database updates * Updates for linux build * Perl/Cleanup * Command cleanup * Lua * Added a crash condition check if final item id is blank or not found. * Review Changes Updates to resolve review comments and a rebase. * migrate to content_db for items_evolving_details migrate to content_db for items_evolving_details * Simplify, don't hit database unless evolving * Update 2025_01_19_items_evolving_details.sql * Update client.cpp * Update manifest with items_evolving_details * character_id vs char_id * Remove _Struct from structs * Remove license header in evolving.cpp * Move evolving constants from eq_constants.h to evolving.h since it is more specific * Update database_schema.h * General cleanup * Be more specific with `evolving_items` vs `evolving` --------- Co-authored-by: Kinglykrab <kinglykrab@gmail.com> Co-authored-by: Akkadius <akkadius1@gmail.com>
115 lines
3.1 KiB
C++
115 lines
3.1 KiB
C++
#ifndef EQEMU_LUA_ITEMINST_H
|
|
#define EQEMU_LUA_ITEMINST_H
|
|
#ifdef LUA_EQEMU
|
|
|
|
#include "lua_ptr.h"
|
|
|
|
// Forward declaration
|
|
class Lua_Item;
|
|
|
|
namespace EQ
|
|
{
|
|
class ItemInstance;
|
|
}
|
|
|
|
namespace luabind {
|
|
struct scope;
|
|
}
|
|
|
|
luabind::scope lua_register_iteminst();
|
|
|
|
class Lua_ItemInst : public Lua_Ptr<EQ::ItemInstance>
|
|
{
|
|
typedef EQ::ItemInstance NativeType;
|
|
public:
|
|
Lua_ItemInst(int item_id);
|
|
Lua_ItemInst(int item_id, int charges);
|
|
Lua_ItemInst() : Lua_Ptr(nullptr), cloned_(false) { }
|
|
Lua_ItemInst(EQ::ItemInstance *d) : Lua_Ptr(d), cloned_(false) { }
|
|
Lua_ItemInst(EQ::ItemInstance *d, bool cloned) : Lua_Ptr(d), cloned_(cloned) { }
|
|
Lua_ItemInst& operator=(const Lua_ItemInst& o);
|
|
Lua_ItemInst(const Lua_ItemInst& o);
|
|
virtual ~Lua_ItemInst();
|
|
|
|
operator EQ::ItemInstance*() {
|
|
return reinterpret_cast<EQ::ItemInstance*>(GetLuaPtrData());
|
|
}
|
|
|
|
bool IsType(int item_class);
|
|
bool IsStackable();
|
|
bool IsEquipable(uint16 race_bitmask, uint16 class_bitmask);
|
|
bool IsEquipable(int16 slot_id);
|
|
bool IsAugmentable();
|
|
int GetAugmentType();
|
|
bool IsExpendable();
|
|
Lua_ItemInst GetItem(uint8 slot_id);
|
|
Lua_Item GetItem();
|
|
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();
|
|
uint32 GetID();
|
|
uint32 GetItemScriptID();
|
|
int GetCharges();
|
|
void SetCharges(int charges);
|
|
uint32 GetPrice();
|
|
void SetPrice(uint32 price);
|
|
void SetColor(uint32 color);
|
|
uint32 GetColor();
|
|
bool IsInstNoDrop();
|
|
bool IsAttuned();
|
|
void SetInstNoDrop(bool flag);
|
|
void SetAttuned(bool flag);
|
|
std::string GetCustomDataString();
|
|
void SetCustomData(const std::string &identifier, const std::string &value);
|
|
void SetCustomData(const std::string &identifier, int value);
|
|
void SetCustomData(const std::string &identifier, float value);
|
|
void SetCustomData(const std::string &identifier, bool value);
|
|
std::string GetCustomData(const std::string& identifier);
|
|
void DeleteCustomData(const std::string& identifier);
|
|
void SetScaling(bool v);
|
|
void SetScale(double scale_factor);
|
|
uint32 GetExp();
|
|
void SetExp(uint32 exp);
|
|
void AddExp(uint32 exp);
|
|
int8 GetMaxEvolveLvl();
|
|
Lua_ItemInst Clone();
|
|
void SetTimer(std::string name, uint32 time);
|
|
void StopTimer(std::string name);
|
|
void ClearTimers();
|
|
bool ContainsAugmentByID(uint32 item_id);
|
|
int CountAugmentByID(uint32 item_id);
|
|
int GetTaskDeliveredCount();
|
|
int RemoveTaskDeliveredItems();
|
|
std::string GetName();
|
|
void ItemSay(const char* text);
|
|
void ItemSay(const char* text, uint8 language_id);
|
|
luabind::object GetAugmentIDs(lua_State* L);
|
|
std::string GetItemLink();
|
|
void AddEvolveAmount(uint64 amount);
|
|
uint32 GetAugmentEvolveUniqueID(uint8 slot_id);
|
|
bool GetEvolveActivated();
|
|
uint64 GetEvolveAmount();
|
|
uint32 GetEvolveCharacterID();
|
|
bool GetEvolveEquipped();
|
|
uint32 GetEvolveFinalItemID();
|
|
uint32 GetEvolveItemID();
|
|
int8 GetEvolveLevel();
|
|
uint32 GetEvolveLoreID();
|
|
float GetEvolveProgression();
|
|
uint64 GetEvolveUniqueID();
|
|
bool IsEvolving();
|
|
void SetEvolveAmount(uint64 amount);
|
|
void SetEvolveProgression(float amount);
|
|
|
|
private:
|
|
bool cloned_;
|
|
};
|
|
|
|
#endif
|
|
#endif
|