Fix for unconscious ability skillups.

Fix for zone crash related to item==nullptr in Client::SummonItem().
This commit is contained in:
Uleat
2014-03-31 03:21:22 -04:00
parent 12f8357373
commit d939820918
6 changed files with 50 additions and 9 deletions
+6
View File
@@ -2306,6 +2306,8 @@ uint64 Client::GetAllMoney() {
}
bool Client::CheckIncreaseSkill(SkillUseTypes skillid, Mob *against_who, int chancemodi) {
if (IsDead() || IsUnconscious())
return false;
if (IsAIControlled()) // no skillups while chamred =p
return false;
if (skillid > HIGHEST_SKILL)
@@ -2349,6 +2351,10 @@ bool Client::CheckIncreaseSkill(SkillUseTypes skillid, Mob *against_who, int cha
}
void Client::CheckLanguageSkillIncrease(uint8 langid, uint8 TeacherSkill) {
if (IsDead() || IsUnconscious())
return;
if (IsAIControlled())
return;
if (langid >= MAX_PP_LANGUAGE)
return; // do nothing if langid is an invalid language