|
C#传奇3大补帖增强免蜡源代码
- 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();
- }
- }
- }
复制代码
|
-
-
增强免蜡.txt
31.67 KB, 下载次数: 1, 下载积分: 积分 -5
售价: 500 积分 [记录]
[购买]
上一篇:C#传奇3 Zircon商城代码源代码下一篇:AppleM22012_0501全套无加密代码 Delphi2007编译带教程
|