TrinityCore
Loading...
Searching...
No Matches
npc_commandscript Class Reference
+ Inheritance diagram for npc_commandscript:

Public Member Functions

 npc_commandscript ()
 
ChatCommandTable GetCommands () const override
 
- Public Member Functions inherited from ScriptObject
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)
 
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)
 
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, Emote 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 HandleNpcSetPhaseCommand (ChatHandler *handler, uint32 phasemask)
 
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< CreatureAI::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 56 of file cs_npc.cpp.

Constructor & Destructor Documentation

◆ npc_commandscript()

npc_commandscript::npc_commandscript ( )
inline

Definition at line 59 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 1119 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 1105 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 61 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 117 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 1198 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 205 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 992 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 
)
inlinestatic

Definition at line 169 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 1271 of file cs_npc.cpp.

◆ HandleNpcDeleteCommand()

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

Definition at line 290 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 327 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< CreatureAI::EvadeReason why,
Optional< EXACT_SEQUENCE("force")>  force 
)
inlinestatic

Definition at line 1081 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 439 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 458 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 579 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 532 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,
Emote  emote 
)
inlinestatic

Definition at line 629 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 866 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 229 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 421 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 244 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 357 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 
)
inlinestatic

Definition at line 395 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 265 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 1241 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 645 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 683 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  phasemask 
)
inlinestatic

Definition at line 781 of file cs_npc.cpp.

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

◆ HandleNpcSetSpawnTimeCommand()

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

Definition at line 849 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 807 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 1136 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 1015 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 893 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 913 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 948 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 970 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: