传奇单机版,GM论坛,传奇版本库,GM基地

C#传奇3大补帖增强免蜡源代码

[复制链接]
查看: 385   回复: 0     # 登录器源码

197

主题

199

帖子

7614

积分

霸王教主

Rank: 9Rank: 9Rank: 9

积分
7614
2022-4-19 21:21:50   显示全部楼层   阅读模式  
C#传奇3大补帖增强免蜡源代码

[C#] 纯文本查看 复制代码
        private void DefaultDrawObjects()
        {

            int num1 = Math.Max(0, User.CurrentLocation.X - OffSetX - 4);
            int num2 = Math.Min(Width - 1, User.CurrentLocation.X + OffSetX + 4);
            int num3 = Math.Max(0, User.CurrentLocation.Y - OffSetY - 4);
            int num4 = Math.Min(Height - 1, User.CurrentLocation.Y + OffSetY + 25);
            for (int i = num3; i <= num4; i++)
            {
                int num5 = (i - User.CurrentLocation.Y + OffSetY + 1) * 32 - User.MovingOffSet.Y;
                for (int j = num1; j <= num2; j++)
                {
                    int num6 = (j - MapControl.User.CurrentLocation.X + MapControl.OffSetX) * 48 - MapControl.User.MovingOffSet.X;
                    Cell cell = this.Cells[j, i];
                    MirLibrary value2;
                    LibraryFile value;

                    if (Libraries.KROrder.TryGetValue(cell.MiddleFile, out value) && value != LibraryFile.Tilesc && CEnvir.LibraryList.TryGetValue(value, out value2))
                    {
                        int num10 = cell.MiddleImage - 1;
                        bool flag3 = false;
                        if (cell.MiddleAnimationFrame > 1 && cell.MiddleAnimationFrame < 255)
                        {
                            num10 += Animation % (cell.MiddleAnimationFrame & 0xF);
                            flag3 = (cell.MiddleAnimationFrame & 0x20) > 0;
                        }
                        Size size3 = value2.GetSize(num10);
                        if (size3.Width != 48 || size3.Height != 32 || (size3.Width == 96 && size3.Height == 64))
                        {
                            if (!flag3)
                            {
                                value2.Draw(num10, num6, num5 - size3.Height, new Color4(0.85f, 0.85f, 0.85f).ToColor(), false, 1f, ImageType.Image);//地图
                            }
                            else
                            {
                                value2.DrawBlend(num10, num6, num5 - size3.Height, new Color4(1F, 1f, 1f).ToColor(), false, 0.618f, ImageType.Image, 0);
                            }
                        }
                    }
                    if (!Libraries.KROrder.TryGetValue(cell.FrontFile, out value) || value == LibraryFile.Tilesc || !CEnvir.LibraryList.TryGetValue(value, out value2))
                    {
                        continue;
                    }

                    int num8 = (cell.FrontImage & 0x7FFF) - 1;
                    int num11 = cell.FrontImage - 1;
                    bool flag4 = false;
                    if (cell.FrontAnimationFrame > 1 && cell.FrontAnimationFrame < 255)
                    {
                        num11 += Animation % (cell.FrontAnimationFrame & 0x7F);
                        flag4 = (cell.FrontAnimationFrame & 0x80) > 0;
                        int frontAnimationTick = cell.FrontAnimationTick;
                        num8 += Animation % (num11 + num11 * frontAnimationTick) / (1 + frontAnimationTick);
                    }
                    Size size4 = value2.GetSize(num11);
                    if (size4.Width != 48 || size4.Height != 32 || (size4.Width == 96 && size4.Height == 64))
                    {



                        if (!flag4)
                        {
                            value2.Draw(num11, num6, num5 - size4.Height, new Color4(1f, 1f, 1f).ToColor(), false, 1f, ImageType.Image);
                        }
                        else
                        {
                            value2.DrawBlend(num11, num6, num5 - size4.Height, new Color4(0.85f, 0.85f, 0.85f).ToColor(), num8 >= 2723 && num8 <= 2732, 0.618f, ImageType.Image, 0);
                        }


                    }
                }
                foreach (MapObject ob in Objects)
                {
                    if (ob.RenderY == i)
                    {
                        ob.Draw();
                    }
                }



                if (!Config.DrawEffects)
                {
                    continue;
                }

                foreach (MirEffect effect in Effects)
                {
                    if (effect.DrawType != DrawType.Object)
                    {
                        continue;
                    }
                    MapObject target = effect.Target;
                    if (target != null && target.Race == ObjectType.Item && !Config.ShowItemtwinkle)
                    {
                        continue;
                    }
                    if (effect.MapTarget.IsEmpty && effect.Target != null)
                    {
                        if (effect.Target.RenderY == i && effect.Target != User)
                        {
                            effect.Draw();
                        }
                    }
                    else if (effect.MapTarget.Y == i)
                    {
                        effect.Draw();
                    }
                }
            }
            if (User.Opacity != 1f) return;
            float oldOpacity = MapObject.User.Opacity;
            MapObject.User.Opacity = 0.618F;
            MapObject.User.DrawBody(false);
            MapObject.User.Opacity = oldOpacity;




            if (Config.DrawWeather == 1)//天气系统
               CMist.DrawMist(DXManager.Device);
            //if (Config.DrawWeather == 0)//天气系统
            //    this.CMist.DrawSnow(DXManager.Device);



            if (Config.MgicParticle&&Config.DrawEffects)
            {
                CFlyingTail.UpdateSystem(CEnvir.Loopdelay, new Vector3(0f, 0f, 0f));
                CFlyingTail.RenderSystem(DXManager.Device);
                CSmoke.UpdateSystem(CEnvir.Loopdelay, new Vector3(0f, 0f, 0f));
                CSmoke.RenderSystem(DXManager.Device);
                CBoom.UpdateSystem(CEnvir.Loopdelay, new Vector3(0f, 0f, 0f));
                CBoom.RenderSystem(DXManager.Device);
            }
            if (Config.DrawEffects)
            {
                foreach (MirEffect ob in Effects)
                {
                    if (ob.DrawType != DrawType.Object || !ob.MapTarget.IsEmpty || ob.Target != User) continue;

                    ob.Draw();
                }
            }
        }

游客,如果您要查看本帖隐藏内容请回复




上一篇:C#传奇3 Zircon商城代码源代码
下一篇:AppleM22012_0501全套无加密代码 Delphi2007编译带教程
回复 关闭延时

使用道具 举报

您需要登录后才可以回帖   登录 立即注册

高级模式

Powered by Discuz! X3.4 © Comsenz Inc.

Archiver|手机版|小黑屋|美林传奇GM论坛 ( 蜀ICP备2020030293号-2 )