• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Dynel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Dynel的典型用法代码示例。如果您正苦于以下问题:C# Dynel类的具体用法?C# Dynel怎么用?C# Dynel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Dynel类属于命名空间,在下文中一共展示了Dynel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: FunctionExecute

        public bool FunctionExecute(Dynel self, Dynel caller, object target, object[] arguments)
        {
            Client cli = ((Character)self).Client;
            Quaternion q = new Quaternion(0, 1, 0, 0);
            AOCoord a = new AOCoord();
            Int32 pf;
            if (target is Statels.Statel)
            {
                a.x = Int32.Parse((string)arguments[0]);
                a.y = Int32.Parse((string)arguments[1]);
                a.z = Int32.Parse((string)arguments[2]);
                pf = Int32.Parse((string)arguments[3]);
            }
            else
            {
                a.x = (Int32)arguments[0];
                a.y = (Int32)arguments[1];
                a.z = (Int32)arguments[2];
                pf = (Int32)arguments[3];
            }

            // Same playfield teleport sometimes has 0 for pf argument
            if (pf == 0)
            {
                pf = cli.Character.PlayField;
            }

            cli.Teleport(a, q, pf);
            return true;
        }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:30,代码来源:teleport.cs


示例2: FunctionExecute

 public bool FunctionExecute(Dynel self, Dynel caller, object target, object[] arguments)
 {
     int actionnumber = (Int32)arguments[0];
     NonPlayerCharacterClass knubotTarget = (NonPlayerCharacterClass)self;
     knubotTarget.KnuBot.Action((Int32)arguments[0]);
     return true;
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:7,代码来源:KnubotAction.cs


示例3: FunctionExecute

 public bool FunctionExecute(Dynel Self, Dynel Caller, object Target, object[] Arguments)
 {
     Character ch = (Character)Self;
     Dictionary<int, uint> statstoupdate = new Dictionary<int, uint>();
     foreach (ClassStat cs in ch.Stats.All)
     {
         if (cs.Changed)
         {
             if (cs.SendBaseValue)
             {
                 statstoupdate.Add(cs.StatNumber, cs.StatBaseValue);
             }
             else
             {
                 statstoupdate.Add(cs.StatNumber, (uint)cs.Value);
             }
             cs.Changed = false;
         }
     }
     if (ch.Client == null)
     {
         Stat.SendBulk(ch, statstoupdate);
     }
     else
     {
         Stat.SendBulk(ch.Client, statstoupdate);
     }
     return true;
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:29,代码来源:StatTimerFunction.cs


示例4: FunctionExecute

 public bool FunctionExecute(Dynel Self, Dynel Caller, object Target, object[] Arguments)
 {
     Character ch = (Character)Self;
     ch.Stats.SetPercentageModifier(
         (Int32)Arguments[0], ch.Stats.GetPercentageModifier((Int32)Arguments[0]) + (Int32)Arguments[1]);
     return true;
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:7,代码来源:modifypercentage.cs


示例5: Execute

 public override bool Execute(Dynel self, Dynel caller, object target, object[] arguments)
 {
     lock (self)
     {
         lock (caller)
         {
             lock (target)
             {
                 return this.FunctionExecute(self, caller, target, arguments);
             }
         }
     }
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:13,代码来源:removenano.cs


示例6: ItemContainer

 public ItemContainer(int _type, uint _instance, Dynel _parent)
 {
     Type = _type;
     Instance = _instance;
     LoadFromSQL(_parent.getSQLTablefromDynelType() + "inventory");
     switch (_type)
     {
         // only Characters and NonPC's for now
         case 50000:
             NumberOfSlots = 30;
             break;
         default:
             throw new NotImplementedException("Can't create untyped container");
     }
     Items = new Object[NumberOfSlots];
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:16,代码来源:InventoryHandler.cs


示例7: FunctionExecute

 public bool FunctionExecute(Dynel Self, Dynel Caller, object Target, object[] Arguments)
 {
     if ((Target is Character) || (Target is NonPlayerCharacterClass))
     {
         Character t = (Character)Target;
         bool found = false;
         Int32 placement;
         if (Arguments.Length == 2)
         {
             placement = 0;
         }
         else
         {
             placement = (Int32)Arguments[Arguments.Length - 1];
         }
         if (placement >= 49)
         {
             if (t.SocialTab.ContainsKey((Int32)Arguments[1]))
             {
                 t.SocialTab[(Int32)Arguments[1]] = (Int32)Arguments[0];
             }
             else
             {
                 t.SocialTab.Add((Int32)Arguments[1], (Int32)Arguments[0]);
             }
         }
         else
         {
             foreach (AOTextures aot in t.Textures)
             {
                 if (aot.place == (Int32)Arguments[1])
                 {
                     found = true;
                     aot.Texture = (Int32)Arguments[0];
                 }
             }
             if (!found)
             {
                 t.Textures.Add(new AOTextures((Int32)Arguments[1], (Int32)Arguments[0]));
             }
         }
     }
     return true;
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:44,代码来源:texture.cs


示例8: Send

        public static void Send(Client client, Dynel dynel1, Dynel dynel2)
        {
            PacketWriter packetWriter = new PacketWriter();
            packetWriter.PushByte(0xdf);
            packetWriter.PushByte(0xdf);
            packetWriter.PushShort(0xa);
            packetWriter.PushShort(1);
            packetWriter.PushShort(0);
            packetWriter.PushInt(3086);
            packetWriter.PushInt(client.Character.Id);
            packetWriter.PushInt(0x36284f6e);
            packetWriter.PushIdentity(dynel1.Type, dynel1.Id);
            packetWriter.PushByte(0);
            packetWriter.PushInt(1); // Knubot sends 2 here
            packetWriter.PushByte(0); // and 2 here too
            packetWriter.PushIdentity(dynel2.Type, dynel2.Id); // knubot 0
            packetWriter.PushIdentity(0xc767, 0x39da2458); // temp bag ID?? Knubot 0, needs more testing....

            byte[] packet = packetWriter.Finish();
            client.SendCompressed(packet);
        }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:21,代码来源:Trade.cs


示例9: FunctionExecute

 public bool FunctionExecute(Dynel Self, Dynel Caller, object Target, object[] Arguments)
 {
     if (Arguments.Length == 2)
     {
         ((Character)Self).Stats.BackMesh.Set((Int32)Arguments[0]);
         ((Character)Self).MeshLayer.AddMesh(5, (Int32)Arguments[1], (Int32)Arguments[0], 0);
     }
     else
     {
         int placement = (Int32)Arguments[Arguments.Length - 1];
         if (placement == 51)
         {
             ((Character)Self).SocialMeshLayer.AddMesh(5, (Int32)Arguments[1], (Int32)Arguments[0], 0);
         }
         else
         {
             ((Character)Self).Stats.BackMesh.Set((Int32)Arguments[0]);
             ((Character)Self).MeshLayer.AddMesh(5, (Int32)Arguments[1], (Int32)Arguments[0], 0);
         }
     }
     return true;
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:22,代码来源:backmesh.cs


示例10: FunctionExecute

        public bool FunctionExecute(Dynel Self, Dynel Caller, object Target, object[] Arguments)
        {
            Client cli = ((Character)Self).Client;
            Identity pfinstance = new Identity();
            Identity R = new Identity();
            Identity dest = new Identity();
            int gs = 1;
            int sg = 0;
            if (Target is Statels.Statel)
            {
                pfinstance.Type = Int32.Parse((string)Arguments[0]);
                pfinstance.Instance = Int32.Parse((string)Arguments[1]);
                R.Type = Int32.Parse((string)Arguments[2]);
                R.Instance = Int32.Parse((string)Arguments[3]);
                dest.Type = Int32.Parse((string)Arguments[4]);
                dest.Instance = Int32.Parse((string)Arguments[5]);
            }
            else
            {
                pfinstance.Type = (Int32)Arguments[0];
                pfinstance.Instance = (Int32)Arguments[1];
                R.Type = (Int32)Arguments[2];
                R.Instance = (Int32)Arguments[3];
                dest.Type = (Int32)Arguments[4];
                dest.Instance = (Int32)Arguments[5];
            }

            int to_pf = (Int32)((UInt32)(dest.Instance & 0xffff));
            int arg2 = (Int32)((UInt32)(dest.Instance >> 16));
            CoordHeading a = this.FindEntry(to_pf, arg2);

            if (a.Coordinates.x != -1)
            {
                cli.TeleportProxy(a.Coordinates, a.Heading, to_pf, pfinstance, gs, sg, R, dest);
                return true;
            }
            return false;
        }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:38,代码来源:teleportproxy2.cs


示例11: FunctionExecute

 /// <summary>
 /// Lineteleport
 /// </summary>
 /// <param name="Self"></param>
 /// <param name="Caller"></param>
 /// <param name="Target"></param>
 /// <param name="Arguments">UInt32 (LineType?), UInt32 (Combo of Line# and Playfield), Int32 (Playfield to teleport to)</param>
 /// <returns></returns>
 public bool FunctionExecute(Dynel Self, Dynel Caller, object Target, object[] Arguments)
 {
     uint arg2;
     int to_pf;
     Console.WriteLine(Target.GetType().ToString());
     if (Target is Statels.Statel)
     {
         arg2 = UInt32.Parse((string)Arguments[1]); // Linesegment and playfield (lower word)
         arg2 = arg2 >> 16;
         to_pf = Int32.Parse((string)Arguments[2]);
     }
     else
     {
         arg2 = (UInt32)Arguments[1];
         to_pf = (Int32)Arguments[2];
     }
     CoordHeading a = this.FindEntry(to_pf, (Int32)arg2);
     if (a.Coordinates.x != -1)
     {
         ((Character)Self).Client.Teleport(a.Coordinates, a.Heading, to_pf);
         return true;
     }
     return false;
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:32,代码来源:lineteleport.cs


示例12: Read

        /// <summary>
        /// The read.
        /// </summary>
        /// <param name="packet">
        /// The packet.
        /// </param>
        /// <param name="client">
        /// The client.
        /// </param>
        /// <param name="dynel">
        /// The dynel.
        /// </param>
        public static void Read(byte[] packet, Client client, Dynel dynel)
        {
            sender = client;
            PacketReader packetReader = new PacketReader(packet);
            packetReader.PopHeader();
            packetReader.PopByte();
            temp1 = packetReader.PopInt();
            count = packetReader.PopInt(); // Count of commands sent
            action = packetReader.PopInt();
            temp4 = packetReader.PopInt();
            user = packetReader.PopIdentity();
            target = packetReader.PopIdentity();
            packetReader.Finish();
            bool feedback = true;
            switch (action)
            {
                case 1:

                    // Get
                    break;
                case 2:

                    // Drop
                    break;
                case 3:

                    // Use
                    OnUse();
                    AOCoord newcoord = client.Character.Coordinates;
                    feedback = false;

                    if (Statels.StatelppfonUse.ContainsKey(client.Character.PlayField))
                    {
                        foreach (Statels.Statel s in Statels.StatelppfonUse[client.Character.PlayField])
                        {
                            if (s.onUse(client, target))
                            {
                                return;
                            }
                        }
                    }

                    bool teleport = false;
                    int playfield = 152;
                    switch (target.Instance)
                    {
                            // Need to add feedback to the character 
                            // Are the Newer Grid points in this list???
                            // No newer Grid points in list, will be replaced by a check against a list of statels read from rdb anyway
                            // - Algorithman
                        case -1073605919: // Teleport Tower(noobisland)(right)
                            if (client.Character.Stats.Side.Value != 2)
                            {
                                client.SendChatText("You need to be omni to use this teleporter!");
                                teleport = false;
                            }
                            else
                            {
                                newcoord.x = 202;
                                newcoord.z = 878;
                                newcoord.y = 16;
                                playfield = 687;
                            }

                            break;

                        case -1073736991: // Teleport Tower(noobisland)(left)
                            if (client.Character.Stats.Side.Value != 1)
                            {
                                client.SendChatText("You need to be clan to use this teleporter!");
                                teleport = false;
                            }
                            else
                            {
                                newcoord.x = 390;
                                newcoord.z = 340;
                                newcoord.y = 0;
                                playfield = 545;
                            }

                            break;

                        case -1073671455: // Teleport Tower(noobisland)(middle)
                            if (client.Character.Stats.Side.Value != 0)
                            {
                                client.SendChatText("You need to be neutral to use this teleporter!");
                                teleport = false;
                            }
//.........这里部分代码省略.........
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:101,代码来源:GenericCmd.cs


示例13: DynelStats

        /// <summary>
        /// Character_Stats
        /// Class for character's stats
        /// </summary>
        /// <param name="parent">
        /// Stat's owner (Character or derived class)
        /// </param>
        public DynelStats(Dynel parent)
        {
            this.all.Add(this.flags);
            this.all.Add(this.life);
            this.all.Add(this.volumeMass);
            this.all.Add(this.attackSpeed);
            this.all.Add(this.breed);
            this.all.Add(this.clan);
            this.all.Add(this.team);
            this.all.Add(this.state);
            this.all.Add(this.timeExist);
            this.all.Add(this.mapFlags);
            this.all.Add(this.professionLevel);
            this.all.Add(this.previousHealth);
            this.all.Add(this.mesh);
            this.all.Add(this.anim);
            this.all.Add(this.name);
            this.all.Add(this.info);
            this.all.Add(this.strength);
            this.all.Add(this.agility);
            this.all.Add(this.stamina);
            this.all.Add(this.intelligence);
            this.all.Add(this.sense);
            this.all.Add(this.psychic);
            this.all.Add(this.ams);
            this.all.Add(this.staticInstance);
            this.all.Add(this.maxMass);
            this.all.Add(this.staticType);
            this.all.Add(this.energy);
            this.all.Add(this.health);
            this.all.Add(this.height);
            this.all.Add(this.dms);
            this.all.Add(this.can);
            this.all.Add(this.face);
            this.all.Add(this.hairMesh);
            this.all.Add(this.side);
            this.all.Add(this.deadTimer);
            this.all.Add(this.accessCount);
            this.all.Add(this.attackCount);
            this.all.Add(this.titleLevel);
            this.all.Add(this.backMesh);
            this.all.Add(this.alienXP);
            this.all.Add(this.fabricType);
            this.all.Add(this.catMesh);
            this.all.Add(this.parentType);
            this.all.Add(this.parentInstance);
            this.all.Add(this.beltSlots);
            this.all.Add(this.bandolierSlots);
            this.all.Add(this.fatness);
            this.all.Add(this.clanLevel);
            this.all.Add(this.insuranceTime);
            this.all.Add(this.inventoryTimeout);
            this.all.Add(this.aggDef);
            this.all.Add(this.xp);
            this.all.Add(this.ip);
            this.all.Add(this.level);
            this.all.Add(this.inventoryId);
            this.all.Add(this.timeSinceCreation);
            this.all.Add(this.lastXP);
            this.all.Add(this.age);
            this.all.Add(this.sex);
            this.all.Add(this.profession);
            this.all.Add(this.cash);
            this.all.Add(this.alignment);
            this.all.Add(this.attitude);
            this.all.Add(this.headMesh);
            this.all.Add(this.missionBits5);
            this.all.Add(this.missionBits6);
            this.all.Add(this.missionBits7);
            this.all.Add(this.veteranPoints);
            this.all.Add(this.monthsPaid);
            this.all.Add(this.speedPenalty);
            this.all.Add(this.totalMass);
            this.all.Add(this.itemType);
            this.all.Add(this.repairDifficulty);
            this.all.Add(this.price);
            this.all.Add(this.metaType);
            this.all.Add(this.itemClass);
            this.all.Add(this.repairSkill);
            this.all.Add(this.currentMass);
            this.all.Add(this.icon);
            this.all.Add(this.primaryItemType);
            this.all.Add(this.primaryItemInstance);
            this.all.Add(this.secondaryItemType);
            this.all.Add(this.secondaryItemInstance);
            this.all.Add(this.userType);
            this.all.Add(this.userInstance);
            this.all.Add(this.areaType);
            this.all.Add(this.areaInstance);
            this.all.Add(this.defaultPos);
            this.all.Add(this.race);
            this.all.Add(this.projectileAC);
            this.all.Add(this.meleeAC);
//.........这里部分代码省略.........
开发者ID:Algorithman,项目名称:TestCellAO,代码行数:101,代码来源:DynelStats.cs


示例14: FunctionExecute

 public bool FunctionExecute(Dynel Self, Dynel Caller, object Target, object[] Arguments)
 {
     string text = (string)Arguments[0];
     SystemText.Send(((Character)Self).Client, text, 0);
     return true;
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:6,代码来源:systemtext.cs


示例15: GetClientsInRadius

        /// <summary>
        /// Experimental - Check who is in the given radius
        /// </summary>
        /// <param name="client">Character or NPC to start from</param>
        /// <param name="radius">RAdius</param>
        /// <returns></returns>
        public static List<Dynel> GetClientsInRadius(Dynel client, float radius)
        {
            // we're added ourselves, because we're included in the list too.
            List<Dynel> clientList = new List<Dynel> { client };

            // searching client as first one!

            foreach (Client client1 in Program.zoneServer.Clients)
            {
                if (client1.Character.PlayField != client.PlayField)
                {
                    continue;
                }
                if (client1.Character.Id == client.Id)
                {
                    continue;
                }
                if (client1.Character.Coordinates.Distance2D(client.Coordinates) >= radius)
                {
                    continue;
                }
                clientList.Add(client1.Character);
            }
            return clientList;
        }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:31,代码来源:FindClient.cs


示例16: Read

 public static void Read(byte[] packet, Client client, Dynel dyn)
 {
     SqlWrapper ms = new SqlWrapper();
     PacketWriter _writer = new PacketWriter();
     PacketReader _reader = new PacketReader(packet);
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:6,代码来源:Bank.cs


示例17: FunctionExecute

 public bool FunctionExecute(Dynel Self, Dynel Caller, object Target, object[] Arguments)
 {
     ((Character)Self).Stats.HairMesh.Set((int)Arguments[0]);
     ((Character)Self).MeshLayer.AddMesh(0, (int)Arguments[1], (int)Arguments[0], 0);
     return false;
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:6,代码来源:hairmesh.cs


示例18: CallFunction

 /// <summary>
 /// Calls a function by its number
 /// </summary>
 /// <param name="functionNumber">
 /// The number of the function
 /// </param>
 /// <param name="self">
 /// The self.
 /// </param>
 /// <param name="caller">
 /// The caller.
 /// </param>
 /// <param name="target">
 /// The target.
 /// </param>
 /// <param name="arguments">
 /// The arguments.
 /// </param>
 /// <returns>
 /// </returns>
 public bool CallFunction(int functionNumber, Dynel self, Dynel caller, object target, object[] arguments)
 {
     FunctionPrototype func = this.GetFunctionByNumber(functionNumber);
     return func.Execute(self, caller, target, arguments);
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:25,代码来源:FunctionPrototype.cs


示例19: SetParent

 public void SetParent(Dynel parent)
 {
     this.parent = parent;
 }
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:4,代码来源:ClassStat.cs


示例20: Execute

 /// <summary>
 /// Locks function targets and executes the function
 /// </summary>
 /// <param name="self">Dynel (Character or NPC)</param>
 /// <param name="caller">Caller of the function</param>
 /// <param name="target">Target of the Function (Dynel or Statel)</param>
 /// <param name="arguments">Function Arguments</param>
 /// <returns></returns>
 public abstract bool Execute(Dynel self, Dynel caller, Object target, object[] arguments);
开发者ID:gordonc64,项目名称:CellAO-Archived-Obsolete,代码行数:9,代码来源:FunctionPrototype.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# EA类代码示例发布时间:2022-05-24
下一篇:
C# DynamicVertexBuffer类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap