Core/Chat: Fix a crash in .lookup spell command
This commit is contained in:
@@ -1048,7 +1048,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char *args)
|
|||||||
|
|
||||||
// unit32 used to prevent interpreting uint8 as char at output
|
// unit32 used to prevent interpreting uint8 as char at output
|
||||||
// find rank of learned spell for learning spell, or talent rank
|
// find rank of learned spell for learning spell, or talent rank
|
||||||
uint32 rank = talentCost ? talentCost : learn ? learnSpellInfo->GetRank() : spellInfo->GetRank();
|
uint32 rank = talentCost ? talentCost : learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank();
|
||||||
|
|
||||||
// send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
|
// send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
|
|||||||
Reference in New Issue
Block a user