Core/Creatures: Rewrite trainer handling to properly support multiple trainers on the same creature

* Trainers are now defined as templates (sniffable), assigned by gossip options
This commit is contained in:
Shauren
2017-07-26 00:53:25 +02:00
parent 734fab01bb
commit 0cd5179726
28 changed files with 630 additions and 552 deletions

View File

@@ -19,6 +19,7 @@
#include "WorldSession.h"
#include "Common.h"
#include "DB2Stores.h"
#include "GossipDef.h"
#include "Log.h"
#include "ObjectAccessor.h"
#include "Pet.h"
@@ -65,7 +66,10 @@ void WorldSession::HandleConfirmRespecWipeOpcode(WorldPackets::Talent::ConfirmRe
return;
}
if (!unit->isCanTrainingAndResetTalentsOf(_player))
if (!unit->CanResetTalents(_player))
return;
if (!_player->PlayerTalkClass->GetGossipMenu().HasMenuItemType(GOSSIP_OPTION_UNLEARNTALENTS))
return;
// remove fake death