Jelajahi Sumber

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

Arseniy Shestakov 9 tahun lalu
induk
melakukan
113bd1b9ea
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      CCallback.cpp

+ 2 - 1
CCallback.cpp

@@ -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*/)
 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;
 		return;
 
 
 	RecruitCreatures pack(obj->id, dst->id, ID, amount, level);
 	RecruitCreatures pack(obj->id, dst->id, ID, amount, level);