Regression fixes, support for new lua arguments for many events

This commit is contained in:
KimLS
2013-06-19 22:56:46 -07:00
parent bb8d11a57b
commit d8a1d84a49
30 changed files with 797 additions and 451 deletions
+17
View File
@@ -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
{
+3
View File
@@ -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:
//////////////////////////