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


C# Update.Send方法代码示例

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


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

示例1: UpdateEffects

 public void UpdateEffects(bool screen)
 {
     if (!SendUpdates)
         return;
     update = new Update(true);
     update.UID = UID;
     update.AppendFull2(25, StatusFlag, StatusFlag2, StatusFlag3);
     if (EntityFlag == EntityFlag.Player)
     {
         if (EntityFlag == EntityFlag.Player)
         {
             if (!screen)
                 update.Send(Owner as Client.GameState);
             else
                 (Owner as Client.GameState).SendScreen(update, true);
         }
         else
         {
             MonsterInfo.SendScreen(update);
         }
     }
     else
     {
         MonsterInfo.SendScreen(update);
     }
 }
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:26,代码来源:Entity.cs

示例2: Update2

 public void Update2(byte type, ulong value, bool screen)
 {
     if (!SendUpdates)
         return;
     update = new Update(true);
     update.UID = UID;
     update.Append2(type, value);
     if (EntityFlag == EntityFlag.Player)
     {
         if (!screen)
             update.Send(Owner as Client.GameState);
         else
             (Owner as Client.GameState).SendScreen(update, true);
     }
     else
     {
         MonsterInfo.SendScreen(update);
     }
 }
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:19,代码来源:Entity.cs

示例3: Update

 public void Update(byte type, byte value, bool screen)
 {
     if (!SendUpdates)
         return;
     if (this.Owner == null)
         return;
     update = new Update(true);
     update.UID = UID;
     update.Append(type, value, (byte)UpdateOffset1, (byte)UpdateOffset2, (byte)UpdateOffset3, (byte)UpdateOffset4, (byte)UpdateOffset5, (byte)UpdateOffset6, (byte)UpdateOffset7);
     if (!screen)
         update.Send(Owner);
     else
         Owner.SendScreen(update, true);
 }
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:14,代码来源:Entity.cs

示例4: Execute

        private void Execute()
        {
            #region interactions
            if (attack != null)
            {
                switch (attack.AttackType)
                {
                    case (uint)Network.GamePackets.Attack.InteractionRequest:
                        new InteractionRequest(attack, attacker);
                        return;
                    case (uint)Network.GamePackets.Attack.InteractionEffect:
                        new InteractionEffect(attack, attacker);
                        return;

                    case (uint)Network.GamePackets.Attack.InteractionAccept:
                        new InteractionAccept(attack, attacker);
                        return;
                    case (uint)Network.GamePackets.Attack.InteractionRefuse:
                        new InteractionRefuse(attack, attacker);
                        return;
                    case (uint)Network.GamePackets.Attack.InteractionStopEffect:
                        new InteractionStopEffect(attack, attacker);
                        return;
                }
            }
            #endregion
            #region Monster -> Player \ Monster
            if (attack == null)
            {
                if (attacker.EntityFlag != EntityFlag.Monster)
                    return;
                if (attacker.Companion)
                {
                    if (ServerBase.Constants.PKForbiddenMaps.Contains(attacker.MapID))
                        return;
                }
                if (attacked.EntityFlag == EntityFlag.Player)
                {
                    if (!attacked.Owner.Attackable)
                        return;
                    if (attacked.Dead && attacker.MonsterInfo.SpellID != 1050)
                        return;

                    if (attacker.MonsterInfo.SpellID == 0)// from this bracket to the next die delay replce this with urs
                    {
                        attack = new Attack(true);
                        attack.Effect1 = Attack.AttackEffects1.None;
                        uint damage = Calculate.Melee(attacker, attacked, ref attack);
                        attack.Attacker = attacker.UID;
                        attack.Attacked = attacked.UID;
                        attack.AttackType = Attack.Melee;
                        attack.Damage = damage;
                        attack.X = attacked.X;
                        attack.Y = attacked.Y;
                        BlessEffect.Effect(attacked);
                        if (attacked.EntityFlag == EntityFlag.Player)
                        {
                            if (attacked.Action == Enums.ConquerAction.Sit)
                                if (attacked.Stamina > 20)
                                    attacked.Stamina -= 20;
                                else
                                    attacked.Stamina = 0;
                            attacked.Action = Enums.ConquerAction.None;
                            //Console.WriteLine("ssS");
                        }
                        if (attacked.Hitpoints <= damage)
                        {
                            attacked.Owner.SendScreen(attack, true);
                            attacked.Die(attacker);
                        }
                        else
                        {
                            attacked.Hitpoints -= damage;
                            attacked.Owner.SendScreen(attack, true);
                        }
                    }
                    else
                    {
                        SpellUse suse = new SpellUse(true);
                        attack = new Attack(true);
                        attack.Effect1 = Attack.AttackEffects1.None;
                        uint damage = Calculate.Magic(attacker, attacked, attacker.MonsterInfo.SpellID, 0, ref attack);
                        suse.Effect1 = attack.Effect1;
                        if (attacked.EntityFlag == EntityFlag.Player)
                        {
                            if (attacked.Action == Enums.ConquerAction.Sit)
                                if (attacked.Stamina > 20)
                                    attacked.Stamina -= 20;
                                else
                                    attacked.Stamina = 0;
                            attacked.Action = Enums.ConquerAction.None;
                            //Console.WriteLine("ssS");
                        }
                        if (attacked.Hitpoints <= damage)
                        {
                            attacked.Die(attacker);
                        }
                        else
                        {
                            attacked.Hitpoints -= damage;
//.........这里部分代码省略.........
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:101,代码来源:Handle.cs


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