public override void Draw() { if (BodyLibrary == null) { return; } BodyLibrary.Draw(DrawFrame, DrawLocation, DrawColour, true); if (QuestIcon == QuestIcon.None) { return; } var offSet = BodyLibrary.GetOffSet(BaseIndex); var size = BodyLibrary.GetSize(BaseIndex); int imageIndex = 981 + ((int)QuestIcon * 2) + QuestIndex; //Libraries.Prguse.Draw(981 + ((int)QuestIcon * 2) + QuestIndex, DrawLocation.Add(offSet).Add(0, -40), Color.White, false); Libraries.Prguse.Draw(imageIndex, DrawLocation.Add(offSet).Add(size.Width / 2 - 28, -40), Color.White, false); }
public override void Process() { bool update = CMain.Time >= NextMotion || GameScene.CanMove; ProcessFrames(); if (update) { UpdateBestQuestIcon(); } if (Frame == null) { DrawFrame = 0; DrawWingFrame = 0; } else { DrawFrame = Frame.Start + (Frame.OffSet * (byte)Direction) + FrameIndex; DrawWingFrame = Frame.EffectStart + (Frame.EffectOffSet * (byte)Direction) + EffectFrameIndex; } DrawY = CurrentLocation.Y; DrawLocation = new Point((Movement.X - User.Movement.X + MapControl.OffSetX) * MapControl.CellWidth, (Movement.Y - User.Movement.Y + MapControl.OffSetY) * MapControl.CellHeight); DrawLocation.Offset(User.OffSetMove); if (BodyLibrary != null) { FinalDrawLocation = DrawLocation.Add(BodyLibrary.GetOffSet(DrawFrame)); } if (BodyLibrary != null && update) { FinalDrawLocation = DrawLocation.Add(BodyLibrary.GetOffSet(DrawFrame)); DisplayRectangle = new Rectangle(DrawLocation, BodyLibrary.GetTrueSize(DrawFrame)); } for (int i = 0; i < Effects.Count; i++) { Effects[i].Process(); } Color colour = DrawColour; switch (Poison) { case PoisonType.None: DrawColour = Color.White; break; case PoisonType.Green: DrawColour = Color.Green; break; case PoisonType.Red: DrawColour = Color.Red; break; case PoisonType.Bleeding: DrawColour = Color.DarkRed; break; case PoisonType.Slow: DrawColour = Color.Purple; break; case PoisonType.Stun: DrawColour = Color.Yellow; break; case PoisonType.Frozen: DrawColour = Color.Blue; break; case PoisonType.Paralysis: DrawColour = Color.Gray; break; } if (colour != DrawColour) { GameScene.Scene.MapControl.TextureValid = false; } if (CMain.Time > QuestTime) { QuestTime = CMain.Time + 500; if (++QuestIndex > 1) { QuestIndex = 0; } } }