Core/Player: Add some asserts
Assert PlayerInfo for race/class pair in a few Player functions (cherry picked from commit 3576a38f6c107d6b17795d84fcb4f87809917299)
This commit is contained in:
@@ -23705,6 +23705,7 @@ void Player::ReportedAfkBy(Player* reporter)
|
||||
WorldLocation Player::GetStartPosition() const
|
||||
{
|
||||
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
|
||||
ASSERT(info);
|
||||
uint32 mapId = info->mapId;
|
||||
if (getClass() == CLASS_DEATH_KNIGHT && HasSpell(50977))
|
||||
mapId = 0;
|
||||
@@ -24484,6 +24485,7 @@ void Player::LearnCustomSpells()
|
||||
|
||||
// learn default race/class spells
|
||||
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
|
||||
ASSERT(info);
|
||||
for (PlayerCreateInfoSpells::const_iterator itr = info->customSpells.begin(); itr != info->customSpells.end(); ++itr)
|
||||
{
|
||||
uint32 tspell = *itr;
|
||||
@@ -24500,6 +24502,7 @@ void Player::LearnDefaultSkills()
|
||||
{
|
||||
// learn default race/class skills
|
||||
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
|
||||
ASSERT(info);
|
||||
for (PlayerCreateInfoSkills::const_iterator itr = info->skills.begin(); itr != info->skills.end(); ++itr)
|
||||
{
|
||||
SkillRaceClassInfoEntry const* rcInfo = *itr;
|
||||
|
||||
Reference in New Issue
Block a user