public bool CanOpenPack() { SpecialEventType type; NetCache.BoosterStack boosterStack = this.GetBoosterStack(); if (boosterStack == null) { return(false); } DbfRecord record = GameDbf.Booster.GetRecord(boosterStack.Id); if (record == null) { return(false); } string val = string.Empty; if (!record.TryGetString("OPEN_PACK_EVENT", out val)) { return(false); } if (!EnumUtils.TryGetEnum <SpecialEventType>(val, out type)) { return(false); } return((type == SpecialEventType.IGNORE) || SpecialEventManager.Get().IsEventActive(type, false)); }
public static SpecialEventManager Get() { if (s_instance == null) { s_instance = new SpecialEventManager(); } return(s_instance); }
public static SpecialEventType GetActiveEventType() { if (SpecialEventManager.Get().IsEventActive(SpecialEventType.GVG_PROMOTION, false)) { return(SpecialEventType.GVG_PROMOTION); } if (SpecialEventManager.Get().IsEventActive(SpecialEventType.SPECIAL_EVENT_PRE_TAVERN_BRAWL, false)) { return(SpecialEventType.SPECIAL_EVENT_PRE_TAVERN_BRAWL); } return(SpecialEventType.IGNORE); }
public bool IsWingOpen(int wing) { SpecialEventType wingOpenEvent = this.GetWingOpenEvent(wing); return(SpecialEventManager.Get().IsEventActive(wingOpenEvent, false)); }