mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Regression fixes, support for new lua arguments for many events
This commit is contained in:
@@ -632,6 +632,23 @@ std::string ItemInst::GetCustomData(std::string identifier) {
|
||||
return "";
|
||||
}
|
||||
|
||||
void ItemInst::SetTimer(std::string name, uint32 time) {
|
||||
Timer t(time);
|
||||
t.Start(time, false);
|
||||
m_timers[name] = t;
|
||||
}
|
||||
|
||||
void ItemInst::StopTimer(std::string name) {
|
||||
auto iter = m_timers.find(name);
|
||||
if(iter != m_timers.end()) {
|
||||
m_timers.erase(iter);
|
||||
}
|
||||
}
|
||||
|
||||
void ItemInst::ClearTimers() {
|
||||
m_timers.clear();
|
||||
}
|
||||
|
||||
// Retrieve item at specified position within bag
|
||||
ItemInst* Inventory::GetItem(int16 slot_id, uint8 bagidx) const
|
||||
{
|
||||
|
||||
@@ -380,6 +380,9 @@ public:
|
||||
inline void SetSerialNumber(int32 id) { m_SerialNumber = id; }
|
||||
|
||||
std::map<std::string, Timer>& GetTimers() { return m_timers; }
|
||||
void SetTimer(std::string name, uint32 time);
|
||||
void StopTimer(std::string name);
|
||||
void ClearTimers();
|
||||
|
||||
protected:
|
||||
//////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user