OSDN Git Service

全滅型のクエスト内でモンスターを倒してレベルアップした際にカオスパト
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 2 Jun 2003 11:38:10 +0000 (11:38 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 2 Jun 2003 11:38:10 +0000 (11:38 +0000)
ロンの報酬で攻撃系効果が発動すると, 既に死んだ敵をもう1回殺してしまっ
てキルカウントが増えて, ユニーク1体だけが残る状況でクエスト達成になっ
てしまうバグがあったので, 殺したモンスターのmonster_death()などが終
わりデータから完全に消えてから最後に経験値獲得の処理をするように修正.

src/xtra2.c

index a476bca..842b944 100644 (file)
@@ -1971,11 +1971,6 @@ msg_format("%s
                        }
                }
 
-               if (r_ptr->flags7 & RF7_KILL_EXP)
-                       get_exp_from_mon((long)m_ptr->max_maxhp*2, &exp_mon);
-               else
-                       get_exp_from_mon(((long)m_ptr->max_maxhp+1L) * 9L / 10L, &exp_mon);
-
                /* Generate treasure */
                monster_death(m_idx, TRUE);
                if ((m_ptr->r_idx == MON_BANOR) || (m_ptr->r_idx == MON_LUPART))
@@ -2023,6 +2018,12 @@ msg_format("%s
                        delete_monster_idx(m_idx);
                }
 
+               /* Prevent bug of chaos patron's reward */
+               if (r_ptr->flags7 & RF7_KILL_EXP)
+                       get_exp_from_mon((long)m_ptr->max_maxhp*2, &exp_mon);
+               else
+                       get_exp_from_mon(((long)m_ptr->max_maxhp+1L) * 9L / 10L, &exp_mon);
+
                /* Not afraid */
                (*fear) = FALSE;