浏览代码

Disabled achievement NPCs if feature is disabled (#2986)

Fixes #2983

Thanks to @zackdreaver
Lemongrass3110 7 年之前
父节点
当前提交
a16fe436e3
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      npc/re/other/achievements.txt

+ 11 - 0
npc/re/other/achievements.txt

@@ -276,3 +276,14 @@ yuno_fild07,113,339,0	duplicate(ach_treasure#core)	#yuno_ach7::120058	HIDDEN_WAR
 yuno_fild08,179,209,0	duplicate(ach_treasure#core)	#yuno_ach8::120059	HIDDEN_WARP_NPC,5,5
 yuno_fild09,166,228,0	duplicate(ach_treasure#core)	#yuno_ach9::120060	HIDDEN_WARP_NPC,5,5
 yuno_fild11,141,357,0	duplicate(ach_treasure#core)	#yuno_ach10::120061	HIDDEN_WARP_NPC,5,5
+
+// If the feature is turned off these NPCs are useless
+-	script	AchievementInit	-1,{
+	end;
+
+OnInit:
+	if( !getbattleflag( "feature.achievement" ) ){
+		unloadnpc "ach_treasure#core";
+	}
+	end;
+}