mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10406] Fixed work .learn and other spell commands with unlearned talent shift-link.
Unlearned talent have -1 as rank in shift-link, return instead first rank.
This commit is contained in:
parent
0ab4adf517
commit
f3579fba64
2 changed files with 6 additions and 3 deletions
|
|
@ -2750,10 +2750,13 @@ uint32 ChatHandler::ExtractSpellIdFromLink(char** text)
|
|||
if(!talentEntry)
|
||||
return 0;
|
||||
|
||||
uint32 rank;
|
||||
if (!ExtractUInt32(¶m1_str, rank))
|
||||
int32 rank;
|
||||
if (!ExtractInt32(¶m1_str, rank))
|
||||
return 0;
|
||||
|
||||
if (rank < 0) // unlearned talent have in shift-link field -1 as rank
|
||||
rank = 0;
|
||||
|
||||
return rank < MAX_TALENT_RANK ? talentEntry->RankID[rank] : 0;
|
||||
}
|
||||
case SPELL_LINK_GLYPH:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10405"
|
||||
#define REVISION_NR "10406"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue