当前位置: 首页>>代码示例>>C#>>正文


C# GamePlayer.GetModified方法代码示例

本文整理汇总了C#中GamePlayer.GetModified方法的典型用法代码示例。如果您正苦于以下问题:C# GamePlayer.GetModified方法的具体用法?C# GamePlayer.GetModified怎么用?C# GamePlayer.GetModified使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GamePlayer的用法示例。


在下文中一共展示了GamePlayer.GetModified方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

		public override void Execute(GameLiving living)
		{
			if (CheckPreconditions(living, DEAD | SITTING | MEZZED | STUNNED)) return;
			m_caster = living as GamePlayer;
			if (m_caster == null)
				return;

			if (m_caster.TargetObject == null)
			{
				m_caster.Out.SendMessage("You need a target for this ability!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
				m_caster.DisableSkill(this, 3 * 1000);
				return;
			}

			if ( !m_caster.IsWithinRadius( m_caster.TargetObject, (int)( 1500 * m_caster.GetModified(eProperty.SpellRange) * 0.01 ) ) )
			{
				m_caster.Out.SendMessage(m_caster.TargetObject + " is too far away.", eChatType.CT_Spell, eChatLoc.CL_SystemWindow);
				return;
			}

			switch (Level)
			{
				case 1: m_dmgValue = 200; break;
				case 2: m_dmgValue = 500; break;
				case 3: m_dmgValue = 750; break;
				default: return;
			}

			foreach (GamePlayer i_player in m_caster.GetPlayersInRadius(WorldMgr.INFO_DISTANCE))
			{
				if (i_player == m_caster)
				{
					i_player.MessageToSelf("You cast " + this.Name + "!", eChatType.CT_Spell);
				}
				else
				{
					i_player.MessageFromArea(m_caster, m_caster.Name + " casts a spell!", eChatType.CT_Spell, eChatLoc.CL_SystemWindow);
				}

				i_player.Out.SendSpellCastAnimation(m_caster, 7025, 20);
			}

			if (m_caster.RealmAbilityCastTimer != null)
			{
				m_caster.RealmAbilityCastTimer.Stop();
				m_caster.RealmAbilityCastTimer = null;
				m_caster.Out.SendMessage("You cancel your Spell!", eChatType.CT_SpellResisted, eChatLoc.CL_SystemWindow);
			}

			m_caster.RealmAbilityCastTimer = new RegionTimer(m_caster);
			m_caster.RealmAbilityCastTimer.Callback = new RegionTimerCallback(EndCast);
			m_caster.RealmAbilityCastTimer.Start(2000);
		}
开发者ID:Refizul,项目名称:DOL-Kheldron,代码行数:53,代码来源:VolcanicPillarAbility.cs

示例2: Start

        public override void Start(GameLiving target)
        {
            base.Start(target);

            owner = target as GamePlayer;
            if (owner == null) return;

            foreach (GamePlayer p in owner.GetPlayersInRadius(WorldMgr.VISIBILITY_DISTANCE))
                p.Out.SendSpellEffectAnimation(owner, owner, Icon, 0, false, 1);

            m_debuffs = new Dictionary<eProperty, int>(1 + eProperty.Stat_Last - eProperty.Stat_First);

            for (eProperty property = eProperty.Stat_First; property <= eProperty.Stat_Last; property++)
            {
                m_debuffs.Add(property, (int)(owner.GetModified(property) * 0.25));
                owner.DebuffCategory[(int)property] += m_debuffs[property];
            }

            owner.Out.SendCharStatsUpdate();

            m_timer = new RegionTimer(owner, new RegionTimerCallback(HealPulse));
            m_timer.Start(1);
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:23,代码来源:SelflessDevotionEffect.cs

示例3: Show_Info

        private void Show_Info(GamePlayer player, GameClient client)
        {
            var text = new List<string>();
            text.Add(" ");
            text.Add("PLAYER INFORMATION (Client # " + player.Client.SessionID + ", " + player.GetType().FullName + ")");
            text.Add("  - Name Lastname : " + player.Name + " " + player.LastName);
            text.Add("  - Realm Level Class : " + GlobalConstants.RealmToName(player.Realm) + " " + player.Level + " " + player.CharacterClass.Name + " (" + player.CharacterClass.ID + ")");
            text.Add("  - Guild : " + player.GuildName + " " + (player.GuildRank != null ? "Rank: " + player.GuildRank.RankLevel.ToString() : ""));
            text.Add("  - XPs/RPs/BPs : " + player.Experience + " xp, " + player.RealmPoints + " rp, " + player.BountyPoints + " bp");

            if (player.DamageRvRMemory > 0)
                text.Add("  - Damage RvR Memory: " + player.DamageRvRMemory);

            if (player.Champion)
            {
                text.Add("  - Champion :  CL " + player.ChampionLevel + ", " + player.ChampionExperience + " clxp");

                string activeBags = "None";
                if (player.ActiveSaddleBags != 0)
                {
                    if (player.ActiveSaddleBags == (byte)GamePlayer.eHorseSaddleBag.All)
                    {
                        activeBags = "All";
                    }
                    else
                    {
                        activeBags = "";

                        if ((player.ActiveSaddleBags & (byte)GamePlayer.eHorseSaddleBag.LeftFront) > 0)
                        {
                            if (activeBags != "")
                                activeBags += ", ";

                            activeBags += "LeftFront";
                        }
                        if ((player.ActiveSaddleBags & (byte)GamePlayer.eHorseSaddleBag.RightFront) > 0)
                        {
                            if (activeBags != "")
                                activeBags += ", ";

                            activeBags += "RightFront";
                        }
                        if ((player.ActiveSaddleBags & (byte)GamePlayer.eHorseSaddleBag.LeftRear) > 0)
                        {
                            if (activeBags != "")
                                activeBags += ", ";

                            activeBags += "LeftRear";
                        }
                        if ((player.ActiveSaddleBags & (byte)GamePlayer.eHorseSaddleBag.RightRear) > 0)
                        {
                            if (activeBags != "")
                                activeBags += ", ";

                            activeBags += "RightRear";
                        }
                    }
                }

                text.Add(string.Format("  - ActiveSaddleBags : {0} (0x{1:X2})", activeBags, player.ActiveSaddleBags));
            }
            else
            {
                text.Add("  - Champion :  Not Started");
            }
            if (player.MLGranted)
            {
                text.Add("  - Master Levels :  ML " + player.MLLevel + ", " + player.MLExperience + " mlxp , MLLine " + player.MLLine);
            }
            else
            {
                text.Add("  - Master Levels :  Not Started");
            }
            text.Add("  - Craftingskill : " + player.CraftingPrimarySkill + "");
            text.Add("  - Money : " + Money.GetString(player.GetCurrentMoney()) + "");
            text.Add("  - Model ID : " + player.Model);
            text.Add("  - AFK Message: " + player.TempProperties.getProperty<string>(GamePlayer.AFK_MESSAGE) + "");
            text.Add(" ");
            text.Add("HOUSE INFORMATION ");
            text.Add("  - Personal House : " + HouseMgr.GetHouseNumberByPlayer(player));
            if (player.CurrentHouse != null && player.CurrentHouse.HouseNumber > 0)
                text.Add("  - Current House : " + player.CurrentHouse.HouseNumber);
            text.Add("  - In House : " + player.InHouse);
            text.Add(" ");
            text.Add("ACCOUNT INFORMATION ");
            text.Add("  - Account Name & IP : " + player.Client.Account.Name + " from " + player.Client.Account.LastLoginIP);
            text.Add("  - Priv. Level : " + player.Client.Account.PrivLevel);
            text.Add("  - Client Version: " + player.Client.Account.LastClientVersion);
            text.Add(" ");
            text.Add("CHARACTER STATS ");

            String sCurrent = "";
            String sTitle = "";
            int cnt = 0;

            for (eProperty stat = eProperty.Stat_First; stat <= eProperty.Stat_Last; stat++, cnt++)
            {
                sTitle += GlobalConstants.PropertyToName(stat) + "/";
                sCurrent += player.GetModified(stat) + "/";
                if (cnt == 3)
//.........这里部分代码省略.........
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:101,代码来源:Player.cs


注:本文中的GamePlayer.GetModified方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。