浏览代码

Fix warnings about empty kill target

nordsoft 2 年之前
父节点
当前提交
966ffe4377
共有 1 个文件被更改,包括 3 次插入0 次删除
  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 :?