Exemplo n.º 1
0
        public override void Apply()
        {
            Player           owner_player      = GetOwnerPlayer();
            FactionComponent faction_component = owner_player.GetComponent(FactionComponent.ID) as FactionComponent;

            if (faction_component == null)
            {
                return;
            }
            m_old_faction             = faction_component.Faction;
            faction_component.Faction = m_faction;
        }
Exemplo n.º 2
0
        public override void Unapply()
        {
            if (!m_revert_when_unapply)
            {
                return;
            }
            Player           owner_player      = GetOwnerPlayer();
            FactionComponent faction_component = owner_player.GetComponent(FactionComponent.ID) as FactionComponent;

            if (faction_component == null)
            {
                return;
            }
            faction_component.Faction = m_old_faction;
        }