[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:
+6
-6
@@ -70,7 +70,7 @@ enum PetSpellType
|
||||
|
||||
struct PetSpell
|
||||
{
|
||||
uint16 active;
|
||||
ActiveStates active : 16;
|
||||
|
||||
PetSpellState state : 8;
|
||||
PetSpellType type : 8;
|
||||
@@ -199,12 +199,12 @@ class Pet : public Guardian
|
||||
void _LoadSpells();
|
||||
void _SaveSpells();
|
||||
|
||||
bool addSpell(uint32 spell_id,uint16 active = ACT_DECIDE, PetSpellState state = PETSPELL_NEW, PetSpellType type = PETSPELL_NORMAL);
|
||||
bool addSpell(uint32 spell_id,ActiveStates active = ACT_DECIDE, PetSpellState state = PETSPELL_NEW, PetSpellType type = PETSPELL_NORMAL);
|
||||
bool learnSpell(uint32 spell_id);
|
||||
void learnSpellHighRank(uint32 spellid);
|
||||
void learnLevelupSpells();
|
||||
bool unlearnSpell(uint32 spell_id);
|
||||
bool removeSpell(uint32 spell_id);
|
||||
void InitLevelupSpellsForLevel();
|
||||
bool unlearnSpell(uint32 spell_id, bool learn_prev);
|
||||
bool removeSpell(uint32 spell_id, bool learn_prev);
|
||||
|
||||
PetSpellMap m_spells;
|
||||
TeachSpellMap m_teachspells;
|
||||
@@ -255,5 +255,5 @@ class Pet : public Guardian
|
||||
assert(false);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user