Browse Source

Fix warnings about empty kill target

nordsoft 2 years ago
parent
commit
966ffe4377
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/mapObjects/CQuest.cpp

+ 3 - 0
lib/mapObjects/CQuest.cpp

@@ -423,6 +423,9 @@ void IQuestObject::afterAddToMapCommon(CMap * map) const
 
 void CGSeerHut::setObjToKill()
 {
+	if(quest->killTarget == ObjectInstanceID::NONE)
+		return;
+	
 	if(getCreatureToKill(true))
 	{
 		quest->stackToKill = getCreatureToKill(false)->getStack(SlotID(0)); //FIXME: stacks tend to disappear (desync?) on server :?