public void Run(int tX, int tY) { int sx = Creature.PosX; int sy = Creature.PosY; int dir = Directions.GetDirByCoords(sx, sy, tX, tY); if (GlobalVars.nwrWin.Style == NWMainWindow.RGS_MODERN) { dir = NWCreature.ShootIsoTrans[dir]; } ProjectileItem.SetPos(sx, sy); ProjectileItem.Frame = (byte)dir; AuxUtils.DoLine(sx, sy, tX, tY, LineProc, true); if (ProjectileItem.Entry.Flags.Contains(ItemFlags.if_ReturnWeapon)) { Creature.PickupItem(ProjectileItem); ProjectileItem.InUse = true; } else { bool loss; if (ProjectileItem.Unique) { loss = false; } else { bool hit = (Hit != HIT_NONE); loss = ProjectileItem.IsBreakage(hit) || Map.CanSink(ProjectileItem.PosX, ProjectileItem.PosY); } if (loss) { Map.Items.Remove(ProjectileItem); } else { Map.RepackItems(); } } }