DecoObject.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using Client.MirGraphics;
  2. using Client.MirScenes;
  3. using S = ServerPackets;
  4. namespace Client.MirObjects
  5. {
  6. public class DecoObject : MapObject
  7. {
  8. public override ObjectType Race
  9. {
  10. get { return ObjectType.Deco; }
  11. }
  12. public override bool Blocking
  13. {
  14. get { return false; }
  15. }
  16. public int Image;
  17. public DecoObject(uint objectID)
  18. : base(objectID)
  19. {
  20. }
  21. public void Load(S.ObjectDeco info)
  22. {
  23. CurrentLocation = info.Location;
  24. MapLocation = info.Location;
  25. GameScene.Scene.MapControl.AddObject(this);
  26. Image = info.Image;
  27. BodyLibrary = Libraries.Deco;
  28. }
  29. public override void Process()
  30. {
  31. DrawLocation = new Point((CurrentLocation.X - User.Movement.X + MapControl.OffSetX) * MapControl.CellWidth, (CurrentLocation.Y - User.Movement.Y + MapControl.OffSetY) * MapControl.CellHeight);
  32. DrawLocation.Offset(GlobalDisplayLocationOffset);
  33. DrawLocation.Offset(User.OffSetMove);
  34. }
  35. public override void Draw()
  36. {
  37. BodyLibrary.Draw(Image, DrawLocation, DrawColour, true);
  38. }
  39. public override bool MouseOver(Point p)
  40. {
  41. return false;
  42. }
  43. public override void DrawBehindEffects(bool effectsEnabled)
  44. {
  45. }
  46. public override void DrawEffects(bool effectsEnabled)
  47. {
  48. }
  49. }
  50. }