*Update to Mangos 7183.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-25 16:35:14 -06:00
parent 30f6b38941
commit ef88b04451
37 changed files with 914 additions and 646 deletions
+15 -11
View File
@@ -88,8 +88,9 @@ enum PlayerSpellState
struct PlayerSpell
{
PlayerSpellState state : 8;
bool active : 1;
bool disabled : 1;
bool active : 1; // show in spellbook
bool dependent : 1; // learned as result another spell learn, skill grow, quest reward, etc
bool disabled : 1; // first rank has been learned in result talent learn but currently talent unlearned, save max learned ranks
};
// Spell modifier (used for modify other spells)
@@ -106,7 +107,7 @@ struct SpellModifier
Spell const* lastAffected;
};
typedef UNORDERED_MAP<uint16, PlayerSpell*> PlayerSpellMap;
typedef UNORDERED_MAP<uint32, PlayerSpell*> PlayerSpellMap;
typedef std::list<SpellModifier*> SpellModList;
struct SpellCooldown
@@ -731,8 +732,8 @@ enum KeyRingSlots
enum VanityPetSlots
{
VANITYPET_SLOT_START = 118,
VANITYPET_SLOT_END = 136
VANITYPET_SLOT_START = 118, // not use, vanity pets stored as spells
VANITYPET_SLOT_END = 136 // not alloed any content in.
};
enum CurrencyTokenSlots
@@ -1342,6 +1343,7 @@ class TRINITY_DLL_SPEC Player : public Unit
/*********************************************************/
bool LoadFromDB(uint32 guid, SqlQueryHolder *holder);
bool MinimalLoadFromDB(QueryResult *result, uint32 guid);
static bool LoadValuesArrayFromDB(Tokens& data,uint64 guid);
static uint32 GetUInt32ValueFromArray(Tokens const& data, uint16 index);
@@ -1475,18 +1477,21 @@ class TRINITY_DLL_SPEC Player : public Unit
void CharmSpellInitialize();
void PossessSpellInitialize();
bool HasSpell(uint32 spell) const;
bool HasActiveSpell(uint32 spell) const; // show in spellbook
TrainerSpellState GetTrainerSpellState(TrainerSpell const* trainer_spell) const;
bool IsSpellFitByClassAndRace( uint32 spell_id ) const;
bool IsNeedCastPassiveSpellAtLearn(SpellEntry const* spellInfo) const;
void SendProficiency(uint8 pr1, uint32 pr2);
void SendInitialSpells();
bool addSpell(uint32 spell_id, bool active, bool learning, bool disabled);
void learnSpell(uint32 spell_id);
void removeSpell(uint32 spell_id, bool disabled = false);
bool addSpell(uint32 spell_id, bool active, bool learning, bool dependent, bool disabled);
void learnSpell(uint32 spell_id, bool dependent);
void removeSpell(uint32 spell_id, bool disabled = false, bool update_action_bar_for_low_rank = false);
void resetSpells();
void learnDefaultSpells();
void learnQuestRewardedSpells();
void learnQuestRewardedSpells(Quest const* quest);
void learnSpellHighRank(uint32 spellid);
uint32 GetFreeTalentPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS1); }
void SetFreeTalentPoints(uint32 points) { SetUInt32Value(PLAYER_CHARACTER_POINTS1,points); }
@@ -1767,8 +1772,7 @@ class TRINITY_DLL_SPEC Player : public Unit
int16 GetSkillPermBonusValue(uint32 skill) const;
int16 GetSkillTempBonusValue(uint32 skill) const;
bool HasSkill(uint32 skill) const;
void learnSkillRewardedSpells( uint32 id );
void learnSkillRewardedSpells();
void learnSkillRewardedSpells(uint32 id, uint32 value);
void SetDontMove(bool dontMove);
bool GetDontMove() const { return m_dontMove; }
@@ -2270,6 +2274,7 @@ class TRINITY_DLL_SPEC Player : public Unit
void _LoadDailyQuestStatus(QueryResult *result);
void _LoadGroup(QueryResult *result);
void _LoadReputation(QueryResult *result);
void _LoadSkills();
void _LoadSpells(QueryResult *result);
void _LoadTutorials(QueryResult *result);
void _LoadFriendList(QueryResult *result);
@@ -2311,7 +2316,6 @@ class TRINITY_DLL_SPEC Player : public Unit
time_t m_lastHonorUpdateTime;
void outDebugValues() const;
bool _removeSpell(uint16 spell_id);
uint64 m_lootGuid;
uint32 m_race;