1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

CCallback::recruitCreatures: add refugee camp exception. Fix issue 2426

This commit is contained in:
Arseniy Shestakov 2016-03-13 09:02:08 +03:00
parent 10dbbead2d
commit 113bd1b9ea

View File

@ -66,7 +66,8 @@ int CCallback::selectionMade(int selection, QueryID queryID)
void CCallback::recruitCreatures(const CGDwelling *obj, const CArmedInstance * dst, CreatureID ID, ui32 amount, si32 level/*=-1*/)
{
if(player!=obj->tempOwner && obj->ID != Obj::WAR_MACHINE_FACTORY)
// TODO exception for neutral dwellings shouldn't be hardcoded
if(player != obj->tempOwner && obj->ID != Obj::WAR_MACHINE_FACTORY && obj->ID != Obj::REFUGEE_CAMP)
return;
RecruitCreatures pack(obj->id, dst->id, ID, amount, level);