aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2018-02-11 17:43:12 +0100
committerShauren <shauren.trinity@gmail.com>2021-06-19 23:33:38 +0200
commitcb0672081e7c981d25d84459284717a06a8f7015 (patch)
tree27633d74d92572a3c1905b43dee6497f16693fef /src
parente63c5f7b0c5747c20647c1a98ff76f3e8029f015 (diff)
Core/Player: Add some asserts
Assert PlayerInfo for race/class pair in a few Player functions (cherry picked from commit 3576a38f6c107d6b17795d84fcb4f87809917299)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 0ef3551e0d6..925d1479f69 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -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;