Add custom feature, cross-class skill trainer, fix up stuck detection and added a better solution to it.

This commit is contained in:
KimLS
2017-09-09 00:24:30 -07:00
parent 1a4aa1692a
commit ccdebf0116
12 changed files with 92 additions and 53 deletions
+8 -1
View File
@@ -445,7 +445,7 @@ Mob::Mob(const char* in_name,
AssistAggro = false;
npc_assist_cap = 0;
PathRecalcTimer.reset(new Timer(1500));
PathRecalcTimer.reset(new Timer(500));
PathingLoopCount = 0;
}
@@ -1240,6 +1240,13 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
ns->spawn.flymode = 0;
}
if (RuleB(Character, AllowCrossClassTrainers) && ForWho) {
if (ns->spawn.class_ >= WARRIORGM && ns->spawn.class_ <= BERSERKERGM) {
int trainer_class = WARRIORGM + (ForWho->GetClass() - 1);
ns->spawn.class_ = trainer_class;
}
}
}
void Mob::CreateDespawnPacket(EQApplicationPacket* app, bool Decay)