[7168] Spell shift-link and command improvements.

* Support Htrade shift link (it created by client at click by crafting profession spell icon in spellbook)
  in spell comands.
* Support "all" second arg for .learn for learning not provided spell id but it's all ranks.
* Drop support range for .unlearn command but support instead "all" second arg for unlearn not specific spell id but it's all ranks.
* In .list auras output print spell names as shift links for better readable view.
* Add to beggining Chat.cpp lists all supported by commands shift-links (client generated and server-side)
This commit is contained in:
VladimirMangos 2009-01-25 07:08:38 +03:00
parent ae5b65765d
commit 4dc06d6d9e
9 changed files with 148 additions and 83 deletions

View file

@ -19485,3 +19485,13 @@ bool Player::IsAllowUseFlyMountsHere() const
uint32 v_map = GetVirtualMapForMapAndZone(GetMapId(), GetZoneId());
return v_map == 530 || v_map == 571 && HasSpell(54197);
}
void Player::learnSpellHighRank(uint32 spellid)
{
learnSpell(spellid,false);
SpellChainMapNext const& nextMap = spellmgr.GetSpellChainNext();
for(SpellChainMapNext::const_iterator itr = nextMap.lower_bound(spellid); itr != nextMap.upper_bound(spellid); ++itr)
learnSpellHighRank(itr->second);
}