*Cleanup, search through the talent map instead of spell chains for talent ranks during spec swaps.

Also properly set talent state upon talent reset, and only reset talents that exist in the active spec. Refs #367, #326

--HG--
branch : trunk
This commit is contained in:
maximius
2009-11-20 22:38:01 -08:00
parent 75e37c7599
commit c16e08faed
4 changed files with 69 additions and 62 deletions
+3 -3
View File
@@ -255,8 +255,8 @@ class TRINITY_DLL_SPEC Item : public Object
bool IsLimitedToAnotherMapOrZone( uint32 cur_mapId, uint32 cur_zoneId) const;
bool GemsFitSockets() const;
uint32 GetCount() const { return GetUInt32Value (ITEM_FIELD_STACK_COUNT); }
void SetCount(uint32 value) { SetUInt32Value (ITEM_FIELD_STACK_COUNT, value); }
uint32 GetCount() const { return GetUInt32Value(ITEM_FIELD_STACK_COUNT); }
void SetCount(uint32 value) { SetUInt32Value(ITEM_FIELD_STACK_COUNT, value); }
uint32 GetMaxStackCount() const { return GetProto()->GetMaxStackSize(); }
uint8 GetGemCountWithID(uint32 GemID) const;
uint8 GetGemCountWithLimitCategory(uint32 limitCategory) const;
@@ -264,7 +264,7 @@ class TRINITY_DLL_SPEC Item : public Object
uint8 GetSlot() const {return m_slot;}
Bag *GetContainer() { return m_container; }
uint8 GetBagSlot() const;
void SetSlot(uint8 slot) {m_slot = slot;}
void SetSlot(uint8 slot) { m_slot = slot; }
uint16 GetPos() const { return uint16(GetBagSlot()) << 8 | GetSlot(); }
void SetContainer(Bag *container) { m_container = container; }