aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/Map.cpp16
-rw-r--r--src/game/World.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index 0409da43449..712ab099198 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -39,6 +39,7 @@
#include "WaypointManager.h"
#include "DBCEnums.h"
#include "ScriptMgr.h"
+#include "GossipDef.h"
#include "MapInstanced.h"
#include "InstanceSaveMgr.h"
@@ -3726,6 +3727,21 @@ void Map::ScriptsProcess()
break;
}
+ case SCRIPT_COMMAND_CLOSE_GOSSIP:
+ {
+/*
+ * need to find a good way to do idiot checking here
+ * No one should be using this script command in any scripts tables except
+ * gossip, but I guess someone could fat finger it.
+ if (!source->ToPlayer()->GetPlayer()->GetNPCIfCanInteractWith(target,UNIT_NPC_FLAG_GOSSIP));
+ {
+ sLog.outError("SCRIPT_COMMAND_CLOSE_GOSSIP attempted to be used in a non-gossip case -- IGNORED!");
+ break;
+ }
+*/
+ source->ToPlayer()->PlayerTalkClass->CloseGossip();
+ break;
+ }
case SCRIPT_COMMAND_PLAYMOVIE:
{
if (!source)
diff --git a/src/game/World.h b/src/game/World.h
index d56481f0161..4ff574b42a9 100644
--- a/src/game/World.h
+++ b/src/game/World.h
@@ -444,6 +444,7 @@ enum WorldStates
#define SCRIPT_COMMAND_ORIENTATION 30 // o = orientation
#define SCRIPT_COMMAND_EQUIP 31 // datalong = equipment id
#define SCRIPT_COMMAND_MODEL 32 // datalong = model id
+#define SCRIPT_COMMAND_CLOSE_GOSSIP 33 // close gossip window -- no values
#define SCRIPT_COMMAND_PLAYMOVIE 34 // datalong = movie id
/// Storage class for commands issued for delayed execution