TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EnchantmentChatLink Class Reference

#include <ChatLink.h>

Public Member Functions

 EnchantmentChatLink ()
 
virtual bool Initialize (std::istringstream &iss) override
 

Additional Inherited Members

Constructor & Destructor Documentation

EnchantmentChatLink::EnchantmentChatLink ( )
inline
149 : SpellChatLink() { }

Member Function Documentation

bool EnchantmentChatLink::Initialize ( std::istringstream &  iss)
overridevirtual

Reimplemented from SpellChatLink.

523 {
525  return false;
526  // Spell Id
527  uint32 spellId = 0;
528  if (!ReadUInt32(iss, spellId))
529  {
530  TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading enchantment spell entry", iss.str().c_str());
531  return false;
532  }
533  // Validate spell
534  _spell = sSpellMgr->GetSpellInfo(spellId);
535  if (!_spell)
536  {
537  TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |enchant command", iss.str().c_str(), spellId);
538  return false;
539  }
540  return true;
541 }
Definition: SharedDefines.h:4322
#define TC_LOG_TRACE(filterType__,...)
Definition: Log.h:195
#define sSpellMgr
Definition: SpellMgr.h:756
uint32_t uint32
Definition: Define.h:150

+ Here is the call graph for this function:


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