aboutsummaryrefslogtreecommitdiff
path: root/src/game/Debugcmds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Debugcmds.cpp')
-rw-r--r--src/game/Debugcmds.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp
index a3faf1ec746..69b3bcb1284 100644
--- a/src/game/Debugcmds.cpp
+++ b/src/game/Debugcmds.cpp
@@ -37,6 +37,7 @@
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "SpellMgr.h"
+#include "ScriptCalls.h"
bool ChatHandler::HandleDebugSendSpellFailCommand(const char* args)
{
@@ -845,6 +846,28 @@ bool ChatHandler::HandleDebugSetItemFlagCommand(const char* args)
return true;
}
+bool ChatHandler::HandleDebugItemExpireCommand(const char* args)
+{
+ if (!*args)
+ return false;
+
+ char* e = strtok((char*)args, " ");
+ if (!e)
+ return false;
+
+ uint32 guid = (uint32)atoi(e);
+
+ Item *i = m_session->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
+
+ if (!i)
+ return false;
+
+ m_session->GetPlayer()->DestroyItem( i->GetBagSlot(),i->GetSlot(), true);
+ Script->ItemExpire(m_session->GetPlayer(),i->GetProto());
+
+ return true;
+}
+
//show animation
bool ChatHandler::HandleDebugAnimCommand(const char* args)
{