* Add SCRIPT_COMMAND_CLOSE_GOSSIP that can be used in gossip_scripts to force
* the gossip window to close when a given menu option is chosen. * This is with all my love -- for Malcrom :P --HG-- branch : trunk
This commit is contained in:
@@ -39,6 +39,7 @@
|
|||||||
#include "WaypointManager.h"
|
#include "WaypointManager.h"
|
||||||
#include "DBCEnums.h"
|
#include "DBCEnums.h"
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
|
#include "GossipDef.h"
|
||||||
|
|
||||||
#include "MapInstanced.h"
|
#include "MapInstanced.h"
|
||||||
#include "InstanceSaveMgr.h"
|
#include "InstanceSaveMgr.h"
|
||||||
@@ -3726,6 +3727,21 @@ void Map::ScriptsProcess()
|
|||||||
|
|
||||||
break;
|
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:
|
case SCRIPT_COMMAND_PLAYMOVIE:
|
||||||
{
|
{
|
||||||
if (!source)
|
if (!source)
|
||||||
|
|||||||
@@ -444,6 +444,7 @@ enum WorldStates
|
|||||||
#define SCRIPT_COMMAND_ORIENTATION 30 // o = orientation
|
#define SCRIPT_COMMAND_ORIENTATION 30 // o = orientation
|
||||||
#define SCRIPT_COMMAND_EQUIP 31 // datalong = equipment id
|
#define SCRIPT_COMMAND_EQUIP 31 // datalong = equipment id
|
||||||
#define SCRIPT_COMMAND_MODEL 32 // datalong = model 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
|
#define SCRIPT_COMMAND_PLAYMOVIE 34 // datalong = movie id
|
||||||
|
|
||||||
/// Storage class for commands issued for delayed execution
|
/// Storage class for commands issued for delayed execution
|
||||||
|
|||||||
Reference in New Issue
Block a user