Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.DAV {
- public class DAV_EnmityPortal : BasePlugin, IPortalFoundHandler {
- public string SpeakMessage { get; set; } = "Enmity Portal Found";
- private List<ActorSnoEnum> enmityList { get; set; } = new List<ActorSnoEnum> {
- ActorSnoEnum._p76_portal_oldtristram_seasontheme,
- ActorSnoEnum._p76_portal_newtristram_seasontheme,
- ActorSnoEnum._p76_portal_graveyardact1_seasontheme,
- ActorSnoEnum._p76_portal_bloodpit_seasontheme,
- ActorSnoEnum._p76_portal_moors_sacrifice_seasontheme,
- ActorSnoEnum._p76_portal_boneyard_seasontheme,
- ActorSnoEnum._p76_portal_church_seasontheme,
- ActorSnoEnum._p76_portal_alcarnus_seasontheme,
- ActorSnoEnum._p76_portal_sescheron_seasontheme,
- ActorSnoEnum._p76_portal_foresttower_seasontheme,
- ActorSnoEnum._p76_portal_bog_seasontheme,
- ActorSnoEnum._p76_portal_gideonscourt_seasontheme,
- ActorSnoEnum._p76_portal_spire_seasontheme,
- ActorSnoEnum._p76_portal_hell_seasontheme,
- ActorSnoEnum._p76_portal_ram_seasontheme,
- };
- public DAV_EnmityPortal() {
- Enabled = true;
- }
- public void OnPortalFound(IPortal portal) {
- if (Hud.Game.IsInTown || Hud.Game.Me.SnoArea?.Code?.StartsWith("p76") == true) return;
- if (portal.SnoActor != null && enmityList.Contains(portal.SnoActor.Sno))
- Hud.Sound.Speak(SpeakMessage);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement