Rewrite trainer handling to properly support multiple trainers on the same creature

This commit is contained in:
hondacrx
2017-07-27 17:29:22 -04:00
parent 0d8729ae32
commit 0aa7df2f53
18 changed files with 434 additions and 508 deletions
+2 -9
View File
@@ -860,11 +860,9 @@ namespace Game.Entities
return true;
}
public bool isCanTrainingAndResetTalentsOf(Player player)
public bool CanResetTalents(Player player)
{
return player.getLevel() >= 10
&& GetCreatureTemplate().TrainerType == TrainerType.Class
&& player.GetClass() == GetCreatureTemplate().TrainerClass;
return player.getLevel() >= 15 && player.GetClass() == GetCreatureTemplate().TrainerClass;
}
public void SetTextRepeatId(byte textGroup, byte id)
@@ -2457,11 +2455,6 @@ namespace Game.Entities
return vCount.count;
}
public TrainerSpellData GetTrainerSpells()
{
return Global.ObjectMgr.GetNpcTrainerSpells(GetEntry());
}
public override string GetName(LocaleConstant locale_idx = LocaleConstant.enUS)
{
if (locale_idx != LocaleConstant.enUS)