示例#1
0
        public string GetJobRewardText()
        {
            string description = "";

            string societiesGroupName = Societies.GetSocietyGroupName(m_SocietiesGroupType);

            if (m_PointValue == 1)
            {
                return("" + m_PointValue.ToString() + " Society Point Awarded");
            }

            else
            {
                return("" + m_PointValue.ToString() + " Society Points Awarded");
            }

            return(description);
        }
示例#2
0
        public void Complete(PlayerMobile player)
        {
            SocietyJobPlayerProgress jobProgress = Societies.GetSocietiesJobPlayerProgress(player, this);

            if (jobProgress == null)
            {
                return;
            }

            if (!m_PlayersCompleted.Contains(player))
            {
                m_PlayersCompleted.Add(player);
            }

            SocietyGroupPlayerData societyGroupPlayerData = player.m_SocietiesPlayerSettings.GetSocietyGroupPlayerData(m_SocietiesGroupType);

            if (societyGroupPlayerData != null)
            {
                societyGroupPlayerData.m_PointsAvailable += m_PointValue;
                societyGroupPlayerData.m_MontlyPoints    += m_PointValue;
                societyGroupPlayerData.m_LifetimePoints  += m_PointValue;

                player.SendMessage(Societies.GetSocietyGroupTextHue(m_SocietiesGroupType), "You have been awarded " + m_PointValue.ToString() + " with the " + Societies.GetSocietyGroupName(m_SocietiesGroupType) + " for completion of a job contract.");
            }

            if (jobProgress.m_JobContract != null)
            {
                jobProgress.m_JobContract.JobStatus = SocietiesJobContract.JobStatusType.Completed;
            }

            player.m_SocietiesPlayerSettings.m_JobProgress.Remove(jobProgress);

            Account account = player.Account as Account;

            foreach (Mobile mobile in account.accountMobiles)
            {
                PlayerMobile pm_Target = mobile as PlayerMobile;

                if (pm_Target == null)
                {
                    continue;
                }
                if (pm_Target == player)
                {
                    continue;
                }

                Societies.CheckCreateSocietiesPlayerSettings(pm_Target);

                SocietyJobPlayerProgress otherPlayerJobProgress = Societies.GetSocietiesJobPlayerProgress(player, this);

                if (otherPlayerJobProgress == null)
                {
                    continue;
                }

                if (otherPlayerJobProgress.m_JobContract != null)
                {
                    otherPlayerJobProgress.m_JobContract.JobStatus = SocietiesJobContract.JobStatusType.Completed;
                }

                player.m_SocietiesPlayerSettings.m_JobProgress.Remove(otherPlayerJobProgress);
            }
        }