ACR_CreatureBehavior.AIParty.PromotePartyLeader C# (CSharp) Method

PromotePartyLeader() public method

Promote a creature in the party to party leader.
public PromotePartyLeader ( CreatureObject PartyLeader ) : void
PartyLeader CreatureObject Supplies the new party leader.
return void
        public void PromotePartyLeader(CreatureObject PartyLeader)
        {
            if (PartyLeader != null)
            {
                if (PartyLeader.Party != this)
                {
                    throw new ApplicationException(String.Format(
                        "Trying to promote creature {0} to party leader, but it is not in this party.",
                        PartyLeader));
                }
            }

            this.PartyLeader = PartyLeader;
        }