Fix TC build

This commit is contained in:
Rochet2
2018-01-18 19:04:51 +02:00
parent 346d88dd5e
commit 33deb86671
2 changed files with 4 additions and 3 deletions

View File

@@ -102,6 +102,7 @@ typedef Opcodes OpcodesList;
#define eObjectMgr (sObjectMgr)
#define eAccountMgr (sAccountMgr)
#define eAuctionMgr (sAuctionMgr)
#define eGameEventMgr (sGameEventMgr)
#define eObjectAccessor() ObjectAccessor::
#define REGEN_TIME_FULL

View File

@@ -2896,13 +2896,13 @@ namespace LuaPlayer
#ifdef TRINITY
// check item starting quest (it can work incorrectly if added without item in inventory)
ItemTemplateContainer const* itc = sObjectMgr->GetItemTemplateStore();
ItemTemplateContainer::const_iterator result = std::find_if(itc->begin(), itc->end(), [quest](ItemTemplateContainer::value_type const& value)
ItemTemplateContainer const& itc = sObjectMgr->GetItemTemplateStore();
auto itr = std::find_if(std::begin(itc), std::end(itc), [quest](ItemTemplateContainer::value_type const& value)
{
return value.second.StartQuest == quest->GetQuestId();
});
if (result != itc->end())
if (itr != std::end(itc))
return 0;
// ok, normal (creature/GO starting) quest