Real fix for GM trainer crash..evidently the problem went deeper than an undefined condition...

This commit is contained in:
Uleat 2014-11-11 00:11:44 -05:00
parent bb5ae7447d
commit 8ae234aedf
2 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,7 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 11/10/2014 ==
Uleat: Fix for GM Trainer crashing server
Uleat: Fix for GM Trainer crashing server (really!)
== 11/09/2014 ==
Kayen: Implemented support for spell target type (45) 'Target Rings' on Underfoot (does work earlier expansions). Thanks to Lecht for figuring out the op_code side.

View File

@ -1611,12 +1611,11 @@ void Client::OPGMTraining(const EQApplicationPacket *app)
if(DistNoRoot(*pTrainer) > USE_NPC_RANGE2)
return;
SkillUseTypes sk;
for (sk = Skill1HBlunt; sk <= HIGHEST_SKILL; sk = (SkillUseTypes)(sk+1)) {
for (int sk = Skill1HBlunt; sk <= HIGHEST_SKILL; ++sk) {
if(sk == SkillTinkering && GetRace() != GNOME) {
gmtrain->skills[sk] = 0; //Non gnomes can't tinker!
} else {
gmtrain->skills[sk] = GetMaxSkillAfterSpecializationRules(sk, MaxSkill(sk, GetClass(), RuleI(Character, MaxLevel)));
gmtrain->skills[sk] = GetMaxSkillAfterSpecializationRules((SkillUseTypes)sk, MaxSkill((SkillUseTypes)sk, GetClass(), RuleI(Character, MaxLevel)));
//this is the highest level that the trainer can train you to, this is enforced clientside so we can't just
//Set it to 1 with CanHaveSkill or you wont be able to train past 1.
}