示例#1
0
        public void HandleDeath(Mobile m)
        {
            if (m == null)
            {
                return;
            }

            _Deaths++;

            if (m is BaseCreature)
            {
                _DeathsByMonsters++;
            }
            if (m is Factions.BaseFactionGuard)
            {
                _DeathsByFactionGuard++;
            }
            if (m is BaseGuard)
            {
                _DeathsByGuards++;
            }
            if (m is PlayerMobile)
            {
                _DeathsByPlayers++;

                PlayerMobile pm = (PlayerMobile)m;

                if (pm != null)
                {
                    if (_Mobile.Guild != null && m.Guild != null &&
                        !Server.Custom.PvpToolkit.PvpCore.IsInDeathmatch(pm))
                    {
                        Server.Guilds.Guild guildOne = (Server.Guilds.Guild)_Mobile.Guild;
                        Server.Guilds.Guild guildTwo = (Server.Guilds.Guild)m.Guild;

                        if (guildOne.IsEnemy(guildTwo) || guildOne.IsWar(guildTwo))
                        {
                            _DeathsByGuilds++;
                        }
                    }

                    if (Factions.Faction.Find(pm) != null &&
                        Factions.Faction.Find(_Mobile) != null &&
                        !Server.Custom.PvpToolkit.PvpCore.IsInDeathmatch(pm))
                    {
                        if (Factions.Faction.Find(pm) != Factions.Faction.Find(_Mobile))
                        {
                            _DeathsByFactionPlayer++;
                        }
                    }
                }

                if (Server.Custom.PvpToolkit.PvpCore.IsInDeathmatch(pm))
                {
                    _DeathsInDeathMatch++;
                }
            }
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            this.m_GuildAbbr = reader.ReadString();
            this.m_Guild     = (Server.Guilds.Guild)reader.ReadGuild();
        }
示例#3
0
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.ReadInt();

			this.m_GuildAbbr = reader.ReadString();
			this.m_Guild = (Server.Guilds.Guild)reader.ReadGuild();
		}
        public TownshipNPCDeed(Server.Guilds.Guild guild)
            : base(0x14F0)
        {
            if (guild != null)
            {
                m_GuildAbbr = guild.Abbreviation;
                m_Guild     = guild;
            }

            Weight = 1.0;
            SetName("a township NPC");
            LootType = LootType.Blessed;
            this.Hue = Township.TownshipSettings.Hue;
        }
示例#5
0
		public TownshipNPCDeed(Server.Guilds.Guild guild)
			: base(0x14F0)
		{
			if (guild != null)
			{
				m_GuildAbbr = guild.Abbreviation;
				m_Guild = guild;
			}

			Weight = 1.0;
			SetName("a township NPC");
			LootType = LootType.Blessed;
			this.Hue = Township.TownshipSettings.Hue;
		}
示例#6
0
            protected override void OnTick()
            {
                try
                {
                    if (m_Victim.Guild != null)
                    {
                        Server.Guilds.Guild g = m_Victim.Guild as Server.Guilds.Guild;
                        if (g != null)
                        {
                            if (g.IsNoCountingGuild)
                            {
                                return;
                            }
                        }
                    }
                }
                catch (Exception e)
                {
                    Server.Commands.LogHelper.LogException(e);
                }

                m_Victim.SendGump(new ReportMurdererGump(m_Victim, m_Killers));
            }
示例#7
0
        public override void OnSingleClick(Mobile from)
        {
            if (Deleted || (AccessLevel == AccessLevel.Player && DisableHiddenSelfClick && Hidden && from == this))
            {
                return;
            }

            if (Mobile.GuildClickMessage)
            {
                Server.Guilds.Guild guild = this.Guild as Server.Guilds.Guild;

                if (guild != null && (this.DisplayGuildTitle || guild.Type != Server.Guilds.GuildType.Regular))
                {
                    string title = GuildTitle;
                    string type;

                    if (title == null)
                    {
                        title = "";
                    }
                    else
                    {
                        title = title.Trim();
                    }

                    if (guild.Type >= 0 && (int)guild.Type < m_GuildTypes.Length)
                    {
                        type = m_GuildTypes[(int)guild.Type];
                    }
                    else
                    {
                        type = "";
                    }

                    string text = String.Format(title.Length <= 0 ? "[{1}]{2}" : "[{0}, {1}]{2}", title, guild.Abbreviation, type);

                    PrivateOverheadMessage(MessageType.Regular, SpeechHue, true, text, from.NetState);
                }
            }

            int hue;

            if (NameHue != -1)
            {
                hue = NameHue;
            }
            else if (AccessLevel > AccessLevel.Player)
            {
                hue = 11;
            }
            else
            {
                hue = Notoriety.GetHue(Notoriety.Compute(from, this));
            }

            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            if ((Karma >= (int)Noto.LordLady || Karma <= (int)Noto.Dark))
            {
                sb.Append(Female ? "Lady " : "Lord ");
            }

            sb.Append(Name);

            if (ClickTitle && Title != null && Title.Length > 0)
            {
                sb.Append(' ');
                sb.Append(Title);
            }

            if (Frozen || Paralyzed || (this.Spell != null && this.Spell is Spell && this.Spell.IsCasting && ((Spell)this.Spell).BlocksMovement))
            {
                sb.Append(" (frozen)");
            }

            if (Blessed)
            {
                sb.Append(" (invulnerable)");
            }

            PrivateOverheadMessage(MessageType.Label, hue, Mobile.AsciiClickMessage, sb.ToString(), from.NetState);
        }