[7839] Rafactoring player targeting code in chat command and related cleanups/improvments.
* New extractOptFirstArg function for easy get 2 args in case option playe name as first arg.
* New extractPlayerTarget function for get player pointer/guid/name for online/offline player base at provided name
or if not provided by current seelction with error cases processing.
* Property apply mute/unmute in case use different character name from loggined currently for account.
* .reset commands can be used from console now
* .repairitems comamnd can be used from console now but only to online player.
Author: VladimirMangos
--HG--
branch : trunk
This commit is contained in:
+11
-8
@@ -668,9 +668,8 @@ typedef std::multimap<uint32, SpellLearnSpellNode> SpellLearnSpellMap;
|
||||
|
||||
typedef std::multimap<uint32, SkillLineAbilityEntry const*> SkillLineAbilityMap;
|
||||
|
||||
//typedef std::multimap<uint32, uint32> PetLevelupSpellSet;
|
||||
//typedef std::map<uint32, PetLevelupSpellSet> PetLevelupSpellMap;
|
||||
typedef std::multimap<uint32, std::pair < uint32,uint32 > >PetLevelupSpellMap;
|
||||
typedef std::multimap<uint32, uint32> PetLevelupSpellSet;
|
||||
typedef std::map<uint32, PetLevelupSpellSet> PetLevelupSpellMap;
|
||||
|
||||
inline bool IsPrimaryProfessionSkill(uint32 skill)
|
||||
{
|
||||
@@ -969,6 +968,15 @@ class SpellMgr
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PetLevelupSpellSet const* GetPetLevelupSpellList(uint32 petFamily) const
|
||||
{
|
||||
PetLevelupSpellMap::const_iterator itr = mPetLevelupSpellMap.find(petFamily);
|
||||
if(itr != mPetLevelupSpellMap.end())
|
||||
return &itr->second;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint32 GetSpellCustomAttr(uint32 spell_id) const
|
||||
{
|
||||
if(spell_id >= mSpellCustomAttr.size())
|
||||
@@ -1016,11 +1024,6 @@ class SpellMgr
|
||||
return SpellAreaForAreaMapBounds(mSpellAreaForAreaMap.lower_bound(area_id),mSpellAreaForAreaMap.upper_bound(area_id));
|
||||
}
|
||||
|
||||
PetLevelupSpellMap const * GetPetLevelupSpellMap() const
|
||||
{
|
||||
return &mPetLevelupSpellMap;
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
public:
|
||||
static SpellMgr& Instance();
|
||||
|
||||
Reference in New Issue
Block a user