TrinityCore
npc_commandscript Class Reference
+ Inheritance diagram for npc_commandscript:

Public Member Functions

 npc_commandscript ()
 
ChatCommandTable GetCommands () const override
 
- Public Member Functions inherited from CommandScript
 ~CommandScript ()
 
virtual std::vector< Trinity::ChatCommands::ChatCommandBuilderGetCommands () const =0
 
- Public Member Functions inherited from ScriptObject
 ScriptObject (ScriptObject const &right)=delete
 
 ScriptObject (ScriptObject &&right)=delete
 
ScriptObjectoperator= (ScriptObject const &right)=delete
 
ScriptObjectoperator= (ScriptObject &&right)=delete
 
std::string const & GetName () const
 

Static Public Member Functions

static bool HandleNpcAddCommand (ChatHandler *handler, CreatureEntry id)
 
static bool HandleNpcAddVendorItemCommand (ChatHandler *handler, ItemTemplate const *item, Optional< uint32 > mc, Optional< uint32 > it, Optional< uint32 > ec, Optional< std::string_view > bonusListIDs)
 
static bool HandleNpcAddMoveCommand (ChatHandler *handler, CreatureSpawnId lowGuid)
 
static bool HandleNpcSetAllowMovementCommand (ChatHandler *handler)
 
static bool HandleNpcSetEntryCommand (ChatHandler *handler, CreatureEntry newEntryNum)
 
static bool HandleNpcSetLevelCommand (ChatHandler *handler, uint8 lvl)
 
static bool HandleNpcDeleteCommand (ChatHandler *handler, Optional< CreatureSpawnId > spawnIdArg)
 
static bool HandleNpcDeleteVendorItemCommand (ChatHandler *handler, ItemTemplate const *item)
 
static bool HandleNpcSetFactionIdCommand (ChatHandler *handler, uint32 factionId)
 
static bool HandleNpcSetFlagCommand (ChatHandler *handler, NPCFlags npcFlags, NPCFlags2 npcFlags2)
 
static bool HandleNpcSetDataCommand (ChatHandler *handler, uint32 data_1, uint32 data_2)
 
static bool HandleNpcFollowCommand (ChatHandler *handler)
 
static bool HandleNpcInfoCommand (ChatHandler *handler)
 
static bool HandleNpcNearCommand (ChatHandler *handler, Optional< float > dist)
 
static bool HandleNpcMoveCommand (ChatHandler *handler, Optional< CreatureSpawnId > spawnid)
 
static bool HandleNpcPlayEmoteCommand (ChatHandler *handler, uint32 emote)
 
static bool HandleNpcSetModelCommand (ChatHandler *handler, uint32 displayId)
 
static bool HandleNpcSetMoveTypeCommand (ChatHandler *handler, Optional< CreatureSpawnId > lowGuid, Variant< EXACT_SEQUENCE("stay"), EXACT_SEQUENCE("random"), EXACT_SEQUENCE("way")> type, Optional< EXACT_SEQUENCE("nodel")> nodel)
 
static bool HandleNpcSetPhaseGroup (ChatHandler *handler, char const *args)
 
static bool HandleNpcSetPhaseCommand (ChatHandler *handler, uint32 phaseID)
 
static bool HandleNpcSetWanderDistanceCommand (ChatHandler *handler, float option)
 
static bool HandleNpcSetSpawnTimeCommand (ChatHandler *handler, uint32 spawnTime)
 
static bool HandleNpcSayCommand (ChatHandler *handler, Tail text)
 
static bool HandleNpcTextEmoteCommand (ChatHandler *handler, Tail text)
 
static bool HandleNpcUnFollowCommand (ChatHandler *handler)
 
static bool HandleNpcWhisperCommand (ChatHandler *handler, Variant< Hyperlink< player >, std::string_view > recv, Tail text)
 
static bool HandleNpcYellCommand (ChatHandler *handler, Tail text)
 
static bool HandleNpcAddTempSpawnCommand (ChatHandler *handler, Optional< std::string_view > lootStr, CreatureEntry id)
 
static bool HandleNpcTameCommand (ChatHandler *handler)
 
static bool HandleNpcEvadeCommand (ChatHandler *handler, Optional< EvadeReason > why, Optional< EXACT_SEQUENCE("force")> force)
 
static void _ShowLootEntry (ChatHandler *handler, uint32 itemId, uint8 itemCount, bool alternateString=false)
 
static void _IterateNotNormalLootMap (ChatHandler *handler, NotNormalLootItemMap const &map, std::vector< LootItem > const &items)
 
static bool HandleNpcShowLootCommand (ChatHandler *handler, Optional< EXACT_SEQUENCE("all")> all)
 
static bool HandleNpcAddFormationCommand (ChatHandler *handler, ObjectGuid::LowType leaderGUID)
 
static bool HandleNpcSetLinkCommand (ChatHandler *handler, ObjectGuid::LowType linkguid)
 
static bool HandleNpcAddWeaponCommand (ChatHandler *handler, uint32 SlotID, ItemTemplate const *tmpItem)
 

Additional Inherited Members

- Protected Member Functions inherited from CommandScript
 CommandScript (char const *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (char const *name)
 
virtual ~ScriptObject ()
 

Detailed Description

Definition at line 60 of file cs_npc.cpp.

Constructor & Destructor Documentation

◆ npc_commandscript()

npc_commandscript::npc_commandscript ( )
inline

Definition at line 63 of file cs_npc.cpp.

Member Function Documentation

◆ _IterateNotNormalLootMap()

static void npc_commandscript::_IterateNotNormalLootMap ( ChatHandler handler,
NotNormalLootItemMap const &  map,
std::vector< LootItem > const &  items 
)
inlinestatic

Definition at line 1182 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _ShowLootEntry()

static void npc_commandscript::_ShowLootEntry ( ChatHandler handler,
uint32  itemId,
uint8  itemCount,
bool  alternateString = false 
)
inlinestatic

Definition at line 1170 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCommands()

ChatCommandTable npc_commandscript::GetCommands ( ) const
inlineoverridevirtual

Implements CommandScript.

Definition at line 65 of file cs_npc.cpp.

+ Here is the call graph for this function:

◆ HandleNpcAddCommand()

static bool npc_commandscript::HandleNpcAddCommand ( ChatHandler handler,
CreatureEntry  id 
)
inlinestatic

Definition at line 121 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcAddFormationCommand()

static bool npc_commandscript::HandleNpcAddFormationCommand ( ChatHandler handler,
ObjectGuid::LowType  leaderGUID 
)
inlinestatic

Definition at line 1244 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcAddMoveCommand()

static bool npc_commandscript::HandleNpcAddMoveCommand ( ChatHandler handler,
CreatureSpawnId  lowGuid 
)
inlinestatic

Definition at line 216 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcAddTempSpawnCommand()

static bool npc_commandscript::HandleNpcAddTempSpawnCommand ( ChatHandler handler,
Optional< std::string_view >  lootStr,
CreatureEntry  id 
)
inlinestatic

Definition at line 1057 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcAddVendorItemCommand()

static bool npc_commandscript::HandleNpcAddVendorItemCommand ( ChatHandler handler,
ItemTemplate const *  item,
Optional< uint32 mc,
Optional< uint32 it,
Optional< uint32 ec,
Optional< std::string_view >  bonusListIDs 
)
inlinestatic

Definition at line 168 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcAddWeaponCommand()

static bool npc_commandscript::HandleNpcAddWeaponCommand ( ChatHandler handler,
uint32  SlotID,
ItemTemplate const *  tmpItem 
)
inlinestatic
Todo:
NpcCommands that need to be fixed :

Definition at line 1317 of file cs_npc.cpp.

◆ HandleNpcDeleteCommand()

static bool npc_commandscript::HandleNpcDeleteCommand ( ChatHandler handler,
Optional< CreatureSpawnId spawnIdArg 
)
inlinestatic

Definition at line 301 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcDeleteVendorItemCommand()

static bool npc_commandscript::HandleNpcDeleteVendorItemCommand ( ChatHandler handler,
ItemTemplate const *  item 
)
inlinestatic

Definition at line 338 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcEvadeCommand()

static bool npc_commandscript::HandleNpcEvadeCommand ( ChatHandler handler,
Optional< EvadeReason why,
Optional< EXACT_SEQUENCE("force")>  force 
)
inlinestatic

Definition at line 1146 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcFollowCommand()

static bool npc_commandscript::HandleNpcFollowCommand ( ChatHandler handler)
inlinestatic

Definition at line 451 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcInfoCommand()

static bool npc_commandscript::HandleNpcInfoCommand ( ChatHandler handler)
inlinestatic

Definition at line 470 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcMoveCommand()

static bool npc_commandscript::HandleNpcMoveCommand ( ChatHandler handler,
Optional< CreatureSpawnId spawnid 
)
inlinestatic

Definition at line 618 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcNearCommand()

static bool npc_commandscript::HandleNpcNearCommand ( ChatHandler handler,
Optional< float >  dist 
)
inlinestatic

Definition at line 571 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcPlayEmoteCommand()

static bool npc_commandscript::HandleNpcPlayEmoteCommand ( ChatHandler handler,
uint32  emote 
)
inlinestatic

Definition at line 668 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSayCommand()

static bool npc_commandscript::HandleNpcSayCommand ( ChatHandler handler,
Tail  text 
)
inlinestatic

Definition at line 931 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetAllowMovementCommand()

static bool npc_commandscript::HandleNpcSetAllowMovementCommand ( ChatHandler handler)
inlinestatic

Definition at line 240 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetDataCommand()

static bool npc_commandscript::HandleNpcSetDataCommand ( ChatHandler handler,
uint32  data_1,
uint32  data_2 
)
inlinestatic

Definition at line 433 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetEntryCommand()

static bool npc_commandscript::HandleNpcSetEntryCommand ( ChatHandler handler,
CreatureEntry  newEntryNum 
)
inlinestatic

Definition at line 255 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetFactionIdCommand()

static bool npc_commandscript::HandleNpcSetFactionIdCommand ( ChatHandler handler,
uint32  factionId 
)
inlinestatic

Definition at line 368 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetFlagCommand()

static bool npc_commandscript::HandleNpcSetFlagCommand ( ChatHandler handler,
NPCFlags  npcFlags,
NPCFlags2  npcFlags2 
)
inlinestatic

Definition at line 406 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetLevelCommand()

static bool npc_commandscript::HandleNpcSetLevelCommand ( ChatHandler handler,
uint8  lvl 
)
inlinestatic

Definition at line 276 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetLinkCommand()

static bool npc_commandscript::HandleNpcSetLinkCommand ( ChatHandler handler,
ObjectGuid::LowType  linkguid 
)
inlinestatic

Definition at line 1287 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetModelCommand()

static bool npc_commandscript::HandleNpcSetModelCommand ( ChatHandler handler,
uint32  displayId 
)
inlinestatic

Definition at line 684 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetMoveTypeCommand()

static bool npc_commandscript::HandleNpcSetMoveTypeCommand ( ChatHandler handler,
Optional< CreatureSpawnId lowGuid,
Variant< EXACT_SEQUENCE("stay"), EXACT_SEQUENCE("random"), EXACT_SEQUENCE("way")>  type,
Optional< EXACT_SEQUENCE("nodel")>  nodel 
)
inlinestatic

HandleNpcSetMoveTypeCommand Set the movement type for an NPC.

Valid movement types are:

  • stay - NPC wont move
  • random - NPC will move randomly according to the wander_distance
  • way - NPC will move with given waypoints set

additional parameter: NODEL - so no waypoints are deleted, if you change the movement type

Definition at line 721 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetPhaseCommand()

static bool npc_commandscript::HandleNpcSetPhaseCommand ( ChatHandler handler,
uint32  phaseID 
)
inlinestatic

Definition at line 845 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetPhaseGroup()

static bool npc_commandscript::HandleNpcSetPhaseGroup ( ChatHandler handler,
char const *  args 
)
inlinestatic

Definition at line 819 of file cs_npc.cpp.

+ Here is the call graph for this function:

◆ HandleNpcSetSpawnTimeCommand()

static bool npc_commandscript::HandleNpcSetSpawnTimeCommand ( ChatHandler handler,
uint32  spawnTime 
)
inlinestatic

Definition at line 914 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcSetWanderDistanceCommand()

static bool npc_commandscript::HandleNpcSetWanderDistanceCommand ( ChatHandler handler,
float  option 
)
inlinestatic

Definition at line 872 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcShowLootCommand()

static bool npc_commandscript::HandleNpcShowLootCommand ( ChatHandler handler,
Optional< EXACT_SEQUENCE("all")>  all 
)
inlinestatic

Definition at line 1199 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcTameCommand()

static bool npc_commandscript::HandleNpcTameCommand ( ChatHandler handler)
inlinestatic

Definition at line 1080 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcTextEmoteCommand()

static bool npc_commandscript::HandleNpcTextEmoteCommand ( ChatHandler handler,
Tail  text 
)
inlinestatic

Definition at line 958 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcUnFollowCommand()

static bool npc_commandscript::HandleNpcUnFollowCommand ( ChatHandler handler)
inlinestatic

Definition at line 978 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcWhisperCommand()

static bool npc_commandscript::HandleNpcWhisperCommand ( ChatHandler handler,
Variant< Hyperlink< player >, std::string_view >  recv,
Tail  text 
)
inlinestatic

Definition at line 1013 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNpcYellCommand()

static bool npc_commandscript::HandleNpcYellCommand ( ChatHandler handler,
Tail  text 
)
inlinestatic

Definition at line 1035 of file cs_npc.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: