private void Class1_OnCharacterDeathGlobal(orig_OnCharacterDeathGlobal orig, RoR2.Achievements.BaseServerAchievement self, RoR2.DamageReport damageReport) { orig(self, damageReport); if (allowedBodyIndicies.Contains(damageReport.victimBodyIndex) && self.serverAchievementTracker.networkUser.master == damageReport.attackerMaster) { self.Grant(); } }
private void Class1_OnInstall(orig_OnInstall orig, RoR2.Achievements.BaseServerAchievement self) { orig(self); allowedBodyIndicies = new List <BodyIndex> { BodyCatalog.FindBodyIndex("ScavLunar1Body"), BodyCatalog.FindBodyIndex("ScavLunar2Body"), BodyCatalog.FindBodyIndex("ScavLunar3Body"), BodyCatalog.FindBodyIndex("ScavLunar4Body") }; }