aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/NPCHandler.cpp2
-rw-r--r--src/game/Player.cpp24
-rw-r--r--src/game/Player.h6
3 files changed, 16 insertions, 16 deletions
diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp
index c97196c0d91..7257a8d2682 100644
--- a/src/game/NPCHandler.cpp
+++ b/src/game/NPCHandler.cpp
@@ -157,7 +157,7 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
// reputation discount
float fDiscountMod = _player->GetReputationPriceDiscount(unit);
- bool can_learn_primary_prof = GetPlayer()->GetFreePrimaryProffesionPoints() > 0;
+ bool can_learn_primary_prof = GetPlayer()->GetFreePrimaryProfessionPoints() > 0;
uint32 count = 0;
for(TrainerSpellMap::const_iterator itr = trainer_spells->spellList.begin(); itr != trainer_spells->spellList.end(); ++itr)
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index cf66f09f11e..0865e65ddff 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -684,7 +684,7 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8
InitTaxiNodesForLevel();
InitGlyphsForLevel();
InitTalentForLevel();
- InitPrimaryProffesions(); // to max set before any spell added
+ InitPrimaryProfessions(); // to max set before any spell added
// apply original stats mods before spell loading or item equipment that call before equip _RemoveStatsMods()
UpdateMaxHealth(); // Update max Health (for add bonus from stamina)
@@ -2971,10 +2971,10 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
m_usedTalentCount += talentCost;
// update free primary prof.points (if any, can be none in case GM .learn prof. learning)
- if(uint32 freeProfs = GetFreePrimaryProffesionPoints())
+ if(uint32 freeProfs = GetFreePrimaryProfessionPoints())
{
if(spellmgr.IsPrimaryProfessionFirstRankSpell(spell_id))
- SetFreePrimaryProffesions(freeProfs-1);
+ SetFreePrimaryProfessions(freeProfs-1);
}
// add dependent skills
@@ -3181,9 +3181,9 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool update_action_bar_
// update free primary prof.points (if not overflow setting, can be in case GM use before .learn prof. learning)
if(spellmgr.IsPrimaryProfessionFirstRankSpell(spell_id))
{
- uint32 freeProfs = GetFreePrimaryProffesionPoints()+1;
+ uint32 freeProfs = GetFreePrimaryProfessionPoints()+1;
if(freeProfs <= sWorld.getConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL))
- SetFreePrimaryProffesions(freeProfs);
+ SetFreePrimaryProfessions(freeProfs);
}
// remove dependent skill
@@ -3830,7 +3830,7 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
return TRAINER_SPELL_GREEN;
// check primary prof. limit
- if(spellmgr.IsPrimaryProfessionFirstRankSpell(spell->Id) && GetFreePrimaryProffesionPoints() == 0)
+ if(spellmgr.IsPrimaryProfessionFirstRankSpell(spell->Id) && GetFreePrimaryProfessionPoints() == 0)
return TRAINER_SPELL_GREEN_DISABLED;
return TRAINER_SPELL_GREEN;
@@ -14257,7 +14257,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
return false;
}
- InitPrimaryProffesions(); // to max set before any spell loaded
+ InitPrimaryProfessions(); // to max set before any spell loaded
// init saved position, and fix it later if problematic
uint32 transGUID = fields[24].GetUInt32();
@@ -16787,7 +16787,7 @@ void Player::PetSpellInitialize()
CharmInfo *charmInfo = pet->GetCharmInfo();
- WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+1);
+ WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+1);
data << uint64(pet->GetGUID());
data << uint32(pet->GetCreatureInfo()->family); // creature family (required for pet talents)
data << uint32(0);
@@ -16862,7 +16862,7 @@ void Player::PossessSpellInitialize()
return;
}
- WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+1);
+ WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+1);
data << uint64(charm->GetGUID());
data << uint32(0);
data << uint32(0);
@@ -16942,7 +16942,7 @@ void Player::CharmSpellInitialize()
}
}
- WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+4*addlist+1);
+ WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+4*addlist+1);
data << uint64(charm->GetGUID());
data << uint32(0);
data << uint32(0);
@@ -18507,9 +18507,9 @@ template void Player::UpdateVisibilityOf(Corpse* target, UpdateData& data
template void Player::UpdateVisibilityOf(GameObject* target, UpdateData& data, std::set<WorldObject*>& visibleNow);
template void Player::UpdateVisibilityOf(DynamicObject* target, UpdateData& data, std::set<WorldObject*>& visibleNow);
-void Player::InitPrimaryProffesions()
+void Player::InitPrimaryProfessions()
{
- SetFreePrimaryProffesions(sWorld.getConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL));
+ SetFreePrimaryProfessions(sWorld.getConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL));
}
void Player::SendComboPoints()
diff --git a/src/game/Player.h b/src/game/Player.h
index 99b2e61b58f..79c5adc00c1 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -1381,9 +1381,9 @@ class TRINITY_DLL_SPEC Player : public Unit
void SetGlyph(uint8 slot, uint32 glyph) { SetUInt32Value(PLAYER_FIELD_GLYPHS_1 + slot, glyph); }
uint32 GetGlyph(uint8 slot) { return GetUInt32Value(PLAYER_FIELD_GLYPHS_1 + slot); }
- uint32 GetFreePrimaryProffesionPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS2); }
- void SetFreePrimaryProffesions(uint16 profs) { SetUInt32Value(PLAYER_CHARACTER_POINTS2, profs); }
- void InitPrimaryProffesions();
+ uint32 GetFreePrimaryProfessionPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS2); }
+ void SetFreePrimaryProfessions(uint16 profs) { SetUInt32Value(PLAYER_CHARACTER_POINTS2, profs); }
+ void InitPrimaryProfessions();
PlayerSpellMap const& GetSpellMap() const { return m_spells; }
PlayerSpellMap & GetSpellMap() { return m_spells; }