Browse Source

Merge pull request #3074 from Nordsoft91/quests

Fix warnings about empty kill target
Ivan Savenko 2 years ago
parent
commit
f7718628dc
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()
 void CGSeerHut::setObjToKill()
 {
 {
+	if(quest->killTarget == ObjectInstanceID::NONE)
+		return;
+	
 	if(getCreatureToKill(true))
 	if(getCreatureToKill(true))
 	{
 	{
 		quest->stackToKill = getCreatureToKill(false)->getStack(SlotID(0)); //FIXME: stacks tend to disappear (desync?) on server :?
 		quest->stackToKill = getCreatureToKill(false)->getStack(SlotID(0)); //FIXME: stacks tend to disappear (desync?) on server :?