private void EventSink_CraftSuccess(Mobile m, Item item, Item tool) { if (m is PlayerMobile && item.GetType() == m_Item) { AchievementSystem.SetAchievementStatus(m as PlayerMobile, this, item.Amount); } }
private void EventSink_ResourceHarvestSuccess(Mobile m, Item tool, Item item, Item bonusItem) { var player = m as PlayerMobile; if (item.GetType() == m_Item) { AchievementSystem.SetAchievementStatus(player, this, item.Amount); } }
private void EventSink_OnKilledBy(Mobile killed, Mobile killedBy) { var player = killedBy as PlayerMobile; if (player != null && killed.GetType() == m_Mobile) { if (m_Prereq == null || AchievementSystem.GetArchievementPoints(player, this) >= m_Prereq.RewardPoints) { AchievementSystem.SetAchievementStatus(player, this, 1); } } }
private void EventSink_OnEnterRegion(Mobile m, Region oldRegion, Region newRegion) { if (m == null || newRegion == null || newRegion.Name == null) { return; } var player = m as PlayerMobile; if (newRegion.Name.Contains(m_Region) && player != null) { AchievementSystem.SetAchievementStatus(player, this, 1); } }